Back to Challenges
Binary Exploitation
Hard
Active

Buffer Overflow Basics

A poorly written C program awaits your exploitation skills. Overflow the buffer, control the execution flow, and spawn a shell to capture the flag.

350points
67solves
August 1, 2024
Buffer OverflowBinary ExploitationMemory Corruption
Buffer Overflow Basics

Connection Information

nc ctf.example.com 9001

Objective

Exploit a buffer overflow vulnerability to execute arbitrary code and read the flag file.

Scenario

You are given a binary executable with a classic buffer overflow vulnerability. The program is running on a remote server with the flag file. Exploit the vulnerability to gain code execution and retrieve the flag.

Hints

Hint 1

The program uses strcpy without bounds checking

Hint 2

Find the offset to overwrite the return address

Hint 3

You might need to disable ASLR for local testing

Hint 4

A simple ret2win or shell spawning payload will work