asm4
Last updated
Was this helpful?
Last updated
Was this helpful?
What will asm4("picoCTF_376ee") return? Submit the flag as a hexadecimal value (starting with '0x'). NOTE: Your submission for this question will NOT be in the normal flag format. Source located in the directory at /problems/asm4_2_0932017a5f5efe2bc813afd0fe0603aa.
Let's look at the source:
Since this challenge is more complicated than challenges asm1
and asm2
, we will compile and run it using a different method than asm3
.
We can compile the function into a C file using the following syntax ():
Note that jumps were ported to use labels, the input parameter was renamed and the frame setup and teardown were already taken care of by the compiler and therefore commented out in the assembly. The nops were inserted in order to make it easier to locate the inline assembly with a debugger or disassembler. An alternative was to use a dedicated assembly file as we did in asm3
.
Compile by running gcc -masm=intel -m32 solve.c -o solve
.
Run the file with ./solve
0x24d