Closed iz0n closed 8 years ago
Hey,
this is not really a bug of ropper. Ropper uses the Cmd module of python. The history functionality is implemented in this module. The history isn't broken, only the part of the command is not deleted there, if it is a long command.
cheers Sascha
Hi again Sashs, I hope you are having a nice day :)
When generating a ropchain, then checking history command (UP keypress) once, then returning back (DOWN keypress), the history command will contain a broken command instead of a blank one. Example: (a.dll/PE/x86)> ropchain virtualprotect address=0x123456
[INFO] Ropchain Generator for VirtualProtect:
[INFO] eax 0x90909090 ecx old protection (writable addr) edx 0x40 (RWE) ebx size esp address ebp return address (jmp esp) esi pointer to VirtualProtect edi ret (rop nop)
[INFO] Try to create gadget to fill esi with content of IAT address: 0x123456 [INFO] Try to create chain which fills registers without delete content of previous filled registers [*] Try permuation 3 / 720 [INFO] Look for pushad gadget [INFO] generating rop chain
!/usr/bin/env python
Generated by ropper ropchain generator
from struct import pack [...removed...] rop = '' [...removed...] rop += shellcode
print(rop)
[INFO] rop chain generated! (a.dll/PE/x86)> ropchain vi
The "ropchain vi" was obtained after pressing "UP" then "DOWN" keys :)
Have fun,