Skip to content
Memory corruption Write-up Advanced

Desenvolvimento de Exploit para Buffer Overflow

A buffer overflow in the Sync Breeze login form allowed an attacker to overwrite the EIP and redirect execution to a reverse shell. The author developed a working exploit that achieved remote code execution on the Windows host.

medium.com

Published on medium.com

Olá, neste post irei desenvolver um exploit e simular um ataque de Buffer Overflow (BOF), de forma pratica.

Lipeozyy, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application copied user-supplied input into a fixed-size stack buffer without bounds checking.

Impact

An unauthenticated attacker could achieve remote code execution and gain full control of the Windows system running the vulnerable application.

What the attacker needed

Network access to the login endpoint; no authentication required

How it was found

  1. Capture HTTP traffic with tcpdump and inspect the POST /login request in Wireshark.
  2. Build a fuzzer in C that sends increasing lengths of 'A' in the username parameter until the application crashes.
  3. Repeat fuzzing on the password parameter and find it crashes at 600 bytes.
  4. Use Immunity Debugger to confirm EIP is overwritten with 0x41414141.
  5. Generate a unique pattern with pattern_create, send it, and use pattern_offset to find the exact offset (520 bytes).
  6. Find a JMP ESP address with mona.py, generate shellcode with msfvenom avoiding bad characters, and send the final exploit to get a reverse shell.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A buffer overflow happens when a program writes more data into a fixed-size memory area than it can hold, spilling over into nearby memory. Here, the login form did not check input length, so a long password overwrote the return address that tells the program where to go next. The attacker replaced that address with a pointer to their own code, which opened a remote shell.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.