Comparing Strings

entry level challenge

files included:

file-archive
7KB

Program behaviour

when running the program, the program takes in an input and compares it

Static disassembly

opening the file in ghidra, we see the following decompiled C code

ghidra decompiler output

the program calls the function revstr() on some strings that are represented in hex

analysing revstr():

we can see that all this function does is to reverse a string

revstr() function

for example, revstr("olleh") would return the string "hello"

hence, by pasting the hex values of the string in reverse, we can get the flag

flag: flag{r3v3rs3d_l1terally!}

Last updated