easy_reverse
Goal: get the binary to print its flag.
Triage
Downloaded it, chmod +x, ran it: it wants a password.
In Ghidra there’s a secret flag path, but no hard-coded password to pull out, so this one has to be solved at runtime.
Dynamic analysis
Loaded it in gdb and ran disass main. There are two cmp instructions that decide whether you pass:
main+40:cmp $0xa, %rax, compares the result ofstrlenagainst 10main+64:cmp $0x40, %al, compares one character of the input against0x40
Solution
Break on both checks, then overwrite the register each time so the comparison passes:
1break *main+40 # first check (length == 10)
2break *main+64 # second check (char == 0x40)
3run 1 # any password works
4set $rax=10 # at bp 1: make the length check pass
5continue
6set $rax=0x40 # at bp 2: make the char check pass
7continue # flag prints
Flag: flag{1}
Comments aren't connected yet. Check back soon.