pwn
Challenges

Index

I literally hand you the flag, just exploit it already!
Load up to dogbolt, or
objdumpWe could see this

cmp $0x539 compares the user input with 0x539 in hex it is
1337in decimalje 150eif they're equal — confirmed with decompiler

1337 will triggers a secret fucntion that open
flag.txtWe go to
LABEL_401448Or the menu() to be exact

Now, we need option 2 because
read_datacan read from any memory location without bounds checkingThe flag address is
0x40a0
we also know nums array is at
0x4060Finally the calculation is
nums_base + (index * 8)
Flag address - nums address = 0x40a0 - 0x4060 = 0x40 = 64 bytes\64 bytes ÷ 8 bytes per index = 8Final exploit

scriptCTF{4rra4y_00B_unl0ck3d_0aed67c7e137
Index-2

This time, you get the file pointer, not the flag itself.
tbd, will write later
Last updated