Rating:

# Reversing
Ooh boy, my worst area




## 50 points: Patches Punches
```
That moment when you go for a body slam and you realize you jump too far. Adjust your aim, and you'll crush this challenge!
```
patches
```
Author: soaspro
```
I first downloaded and ran it. Since this is reversing, I then used gdb to analyze the program. I saw that `main` was indeed a function, so I set a breakpoint at main.

Disassembling main gives us its machine code:

Looking at it I noticed these lines:

No matter what happens, it will always jump because `0x0` is never equal to `0x1`. Running the file and the description mentions jumping past the flag/too far, so perhaps this jump, which jumps us to near the end of the program, is the problem. Therefore, I set a breakpoint at this line, so that before it was called, the program stopped. Then, I jumped to `main+41` to skip over that line, and continued running from there.

flag: `sun{To0HotToHanDleTo0C0ldToH0ld!}`

Original writeup (https://github.com/VermillionBird/CTF-Writeups/blob/master/2019/SunshineCTF/rev.md).