diff options
| author | WorksButNotTested <62701594+WorksButNotTested@users.noreply.github.com> | 2021-05-27 21:33:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-27 22:33:44 +0200 |
| commit | f677be5e86a096edbba74cb8c739e8b10850a379 (patch) | |
| tree | 1335aaa0592d251926a1b0e62acf28ceaba2e41e /frida_mode/src/persistent/persistent_x86.c | |
| parent | 14178141dcdc1a81ea4f4461790ec87f60606985 (diff) | |
| download | afl++-f677be5e86a096edbba74cb8c739e8b10850a379.tar.gz | |
Support for AFL_FRIDA_PERSISTENT_RET (#941)
Co-authored-by: Your Name <you@example.com>
Diffstat (limited to 'frida_mode/src/persistent/persistent_x86.c')
| -rw-r--r-- | frida_mode/src/persistent/persistent_x86.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/frida_mode/src/persistent/persistent_x86.c b/frida_mode/src/persistent/persistent_x86.c index 20a3dc42..b30dfadf 100644 --- a/frida_mode/src/persistent/persistent_x86.c +++ b/frida_mode/src/persistent/persistent_x86.c @@ -244,9 +244,24 @@ void persistent_prologue(GumStalkerOutput *output) { /* original: */ gum_x86_writer_put_label(cw, original); + if (persistent_debug) { gum_x86_writer_put_breakpoint(cw); } + gum_x86_writer_flush(cw); } +void persistent_epilogue(GumStalkerOutput *output) { + + GumX86Writer *cw = output->writer.x86; + + if (persistent_debug) { gum_x86_writer_put_breakpoint(cw); } + + gum_x86_writer_put_lea_reg_reg_offset(cw, GUM_REG_ESP, GUM_REG_ESP, + persistent_ret_offset); + + gum_x86_writer_put_ret(cw); + +} + #endif |
