Skip to content

Instantly share code, notes, and snippets.

@moyix
Created February 5, 2022 22:51
Show Gist options
  • Save moyix/95ca9a7a26a639b2322c36c7411dc3be to your computer and use it in GitHub Desktop.
Save moyix/95ca9a7a26a639b2322c36c7411dc3be to your computer and use it in GitHub Desktop.
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@mgalgs
Copy link

mgalgs commented Jul 29, 2022

lmao

@mbikovitsky
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment