sashs / Ropper

Display information about files in different file formats and find gadgets to build rop chains for different architectures (x86/x86_64, ARM/ARM64, MIPS, PowerPC, SPARC64). For disassembly ropper uses the awesome Capstone Framework.
https://scoding.de/ropper
BSD 3-Clause "New" or "Revised" License
1.87k stars 206 forks source link

Fix execve syscall code in ropchain generator #171

Open jakelamberson opened 1 year ago

jakelamberson commented 1 year ago

Closes #170

Fixes a message in the x86_64 chain generator to display the correct syscall.

The original issue notes that an incorrect syscall code is displayed. I discovered that an incorrect syscall code is present in the actual chain generator for the x86 version. x86_64 is correct. This pull request fixes both generators' print statements and changes the execve code in the x86 chain generator's gadget creator to the correct 0x3b.

sashs commented 1 year ago

Are you sure, that this fix the issue? The changes shows only a change in the message

jakelamberson commented 5 months ago

@sashs Yes, this is right. The rop chain values are already correct. Just the message printed has the improper code.

I also went ahead and also updated the indices used in the generator to be hex-formatted to be more consistent with x86 (non-functional change). You can take or leave that.