autorop.bof package
Submodules
autorop.bof.Corefile module
- class autorop.bof.Corefile.Corefile[source]
Bases:
autorop.toplevel.Pipe.Pipe- __call__(state)[source]
Transform the given
PwnStateto have a buffer overflowoverwriter.- Parameters
state (
PwnState) –The current
PwnStatewith the following setbinary_name: Path to binary.bof_ret_offset: (optional) If notNone, skips corefile generation step.overwriter: Function which writes rop chain to the “right place”.
- Return type
- Returns
Mutated
PwnState, with the following updatedbof_ret_offset: Updated if it was not set before.overwriter: Now calls the previousoverwriterbut withbof_ret_offsetpadding bytes prepended to the data given, and reading the same number of lines as were observed at the crash.
- __init__()[source]
Find offset to the return address via buffer overflow using corefile.
This pipe not only finds the offset from the input to the return address on the stack, but also sets
state.overwriterto be a function that correctly overwrites starting at the return address.You can avoid active corefile generation by setting
state.bof_ret_offsetyourself - in this case, thestate.overwriteris set appropriately.