r/AskReverseEngineering • u/Yash_Chaurasia630 • Mar 13 '24
i was trying to complete a basic buffer overflow challenge but for some reason i can't set the memory address correctly
"stack3 protostar" is the name of the challenge. Can't set the memory address its glitching i have figured out the the \x84 is causing the glitch coz if i put something else in it's place the rest of the memory address is good but as soon as i use \x84 the memory address get fucked up.
source code -> https://exploit.education/protostar/stack-three/



2
Upvotes
1
u/anaccountbyanyname Mar 22 '24
Where are you getting that return address from? It's definitely not the address for complete_level on either the amd64 or i486 builds of the binary in the latest release
1
u/[deleted] Mar 14 '24
I'd look at getting gef or something similar for gdb. Also it's hard to help much without the disassembly or seeing the stack space allocated.
1
u/[deleted] Mar 14 '24
Also I would send your input as padding = b"AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHHIIIIJJJJKKKKLLLLMMMMNNNNOOOOPPPP" EBP = b"QQQQ" EIP = b"\x24\x84\x04\x08" Input = padding + EBP + EIP
I think that should get you where you want.