Skip to content

Commit

Permalink
Removed newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan2320 authored and Stefan-Radu committed May 22, 2024
1 parent dd37981 commit db96cce
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions content/umdctf_2024/ready_aim_fire.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,9 @@ We can see in the image below that the RBP value is used in the exception handle
```

To address this issue, we need a valid address for RBP after our input of length 44. This address can be the stack leak we get.

Because the stack leak address and the address where RBP is used are very close, we need to add an offset to avoid interfering with the stack when executing future instructions. Therefore, I subtracted 0x10 from the stack leak address.

The goal here is to make the exception execute normally so that we return to main and overwrite the return address of main.
To achieve this, I needed to replicate the stack.

So I extended the payload with an address that was normally on the stack (this was found by running the program with gdb),
ensuring that the exception would execute smoothly and return in the the main function.
To complete the exploit, I added the address of the print_flag function to the end of the payload.
Expand Down

0 comments on commit db96cce

Please sign in to comment.