Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbwl/615f7b5dcfd62b1a577ddfd76d8556ef to your computer and use it in GitHub Desktop.
Save jbwl/615f7b5dcfd62b1a577ddfd76d8556ef 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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment