-
Hi! I've been spending quite some time now trying to understand what exactly is going on when you started examining the assembly code from the if statements in your writeup from PicoCTF: Gogo. You mentioned placing a breakpoint but I couldn't find anywhere more info online about doing this as I assume you do this within Ghidra right? Also when I try doing the same hexdump as you did on the file (my file is called enter_password tho) I always get the entire output rather than what you get, did I maybe misunderstand on what file I had to hexdump from or did I not add some code through Ghidra? for reference, here is a link to the repo: https://github.com/Dvd848/CTFs/blob/master/2021_picoCTF/gogo.md Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey Daan! You're right, it looks like I skipped over a few details in the writeup, let me try to explain them here. Today Ghidra 10.0+ comes with a built in debugger, but honestly I don't have much experience with it, and at the time it wasn't even available. Therefore, in the writeup I'm using good old
After starting ┌──(user@kali)-[/media/sf_CTFs/pico_2021/gogo]
└─$ gdb -q ./enter_password
GEF for linux ready, type `gef' to start, `gef config' to configure
92 commands loaded for GDB 10.1.90.20210103-git using Python engine 3.9
[+] Configuration from '/home/user/.gef.rc' restored
Reading symbols from ./enter_password...
warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /media/sf_CTFs/pico_2021/gogo/enter_password.
Use `info auto-load python-scripts [REGEXP]' to list them.
gef> This is how we interact with the debugger. We first want to set a breakpoint at
Then we run with
At this stage the breakpoint should hit and the GEF UI should appear. We can run
And similarly inspect the other locations:
The rest of the calculations are performed in the writeup with Python, but the can be done with
Hope this clarifies things. |
Beta Was this translation helpful? Give feedback.
Hey Daan!
You're right, it looks like I skipped over a few details in the writeup, let me try to explain them here.
Today Ghidra 10.0+ comes with a built in debugger, but honestly I don't have much experience with it, and at the time it wasn't even available. Therefore, in the writeup I'm using good old
gdb
in order to debug. However, the defaultgdb
UX/UI is a bit too bare-bones and in order to enhance the debug experience, there are a few different "plugins" that offer additional capabilities.In the writeup I'm using a "plugin" called gef: