使用sulley模糊ftp但没有崩溃

时间:2018-07-12 09:23:56

标签: python ftp

我是sulley的新手,在正确安装sulley之后,我开始感到困惑,并且遇到了这样的问题:this is my 127.0.0.1:26000

这是我的process_monitor和network_monitor:screenshot

我尝试了很多次,重新安装了很多次,结果没有改变,仍然没有崩溃。

这是我的ftp.py,我将其放在以下路径中:D:\ Sulley \ python \ Lib \ site-packages \ requests \ ftp.py

#ftp.py
from sulley import *
s_initialize("user")
s_static("USER")
s_delim(" ")
s_string("justin")
s_static("\r\n")
s_initialize("pass")
s_static("PASS")
s_delim(" ")
s_string("justin")
s_static("\r\n")
s_initialize("cwd")
s_static("CWD")
s_delim(" ")
s_string("c: ")
s_static("\r\n")
s_initialize("dele")
s_static("DELE")
s_delim(" ")
s_string("c:\\test.txt")
s_static("\r\n")
s_initialize("mdtm")
s_static("MDTM")
s_delim(" ")
s_string("C:\\boot.ini")
s_static("\r\n")
s_initialize("mkd")
s_static("MKD")
s_delim(" ")
s_string("C:\\TESTDIR")
s_static("\r\n")

这是我的ftp_session.py,我将其放在以下路径中:D:\ Sulley \ sulley \ ftp_session.py

#coding=utf-8
from sulley import *
from requests import ftp
# this is our ftp.py file
def receive_ftp_banner(sock):
    sock.recv(1024)
sess = sessions.session(session_filename="D:\\Sulley\\sulley\\audits\\easyftpserver.session",sleep_time=0.01)
target = sessions.target("172.20.10.2", 21)
target.netmon = pedrpc.client("172.20.10.2",26001)
target.procmon = pedrpc.client("172.20.10.2", 26002)
target.procmon_options = \
{ 
    "proc_name" : "easyftp.exe",
    "stop_commands" : ['taskkill /im "easyftp.exe" -f'],
    "start_commands" : ['D:\\Sulley\\easyftp\\easyftp.exe'], 
}

# Here we tie in the receive_ftp_banner function which receives
# a socket.socket() object from Sulley as its only parameter
sess.pre_send = receive_ftp_banner
sess.add_target(target)
sess.connect(s_get("user"))
sess.connect(s_get("user"), s_get("pass"))
sess.connect(s_get("pass"), s_get("cwd"))
sess.connect(s_get("pass"), s_get("dele"))
sess.connect(s_get("pass"), s_get("mdtm"))
sess.connect(s_get("pass"), s_get("mkd"))
sess.fuzz()

这是我的easyftp Here are the IP address, the port 21 where the easyftp.exe is running

一切似乎都是正确的,但肯定有问题。

0 个答案:

没有答案