在windows系统中安装Sulley
我是在win10的64位系统下面完成本次安装的,具体教程如下,需要安装的库和工具比较多,需要耐心处理各种问题。
需要的文件打包下载:
链接: https://pan.baidu.com/s/1micKZpu 密码: tkeb
1、下载和安装MinGW
MinGW,是Minimalist GNU for Windows的缩写。它是一个可自由使用和自由发布的Windows特定头文件和使用GNU工具集导入库的集合,允许你在GNU/Linux和Windows平台生成本地的Windows程序而不需要第三方C运行时(C Runtime)库。
MinGW下载
2、下载和安装Python
整个Sulley都是用python来写的,推荐python版本2.7.9中的32位版本
python2.7.9 x86下载
3、下载和安装Git
用git获取github上面的项目,后面的项目会用到git clone这个命令
git下载
4、设置环境变量
配置环境变量,将git、python以及MinGW的根目录添加到path中,使能在cmd中使用
5、下载pydbg并安装
获取pydbg的最新版本,如图:
pydbg下载
接着,进入pydbg目录,在cmd目录下执行python setup.py install命令,如图:
是不是感觉已经安装完pydbg了?其实并没有,就像上文说的,pydbg依赖于libdasm,所以是没有完全安装完的,如果我们此时进入python命令行,执行import pydbg命令会出现Import Error错误!,如图:
6、下载libdasm并安装
这一步就是安装libdasm,先安装其extension模块,再安装其主要模块,这里是非常容易出现错误的地方
libdasm下载
1. 下载的libdasm解压后目录\pydasm\>python setup.py build_ext -c mingw3
2. 下载的libdasm解压后目录\pydasm\>python setup.py install
如图:
我们现在试试import pydbg和import pydasm会不会出错,如下图:如图所示:
7、下载Sulley并验证
我们开始下载Sulley主工程,下载完以后进入sulley目录,运行如下命令来检测process_monitor.py是否能运行,没有import errors:
sulley主工程下载
下载Sulley所在目录>python process_monitor.py
ERR> USAGE: process_monitor.py
<-c|--crash_bin FILENAME> filename to serialize crash bin class to
[-p|--proc_name NAME] process name to search for and attach to
[-i|--ignore_pid PID] ignore this PID when searching for the target process
[-l|--log_level LEVEL] log level (default 1), increase for more verbosity
[--port PORT] TCP port to bind this agent to
8、下载Pcapy和WinPcap Dev Kit
下载Pcapy和WinPcap Dev Kit(WinPcap开发者版本,主要使用到这里的头文件和lib),并把下载的WinPack放在c:\Sulley\目录下(当然你可以选择自己的方式)。
Pcapy下载
WinPcap下载
9、编译安装pcapy
进入pcapy的目录,运行以下代码:
pcapy的目录>python setup.py build_ext -c mingw32 -I "C:\sulley\WpdPack\Include" -L "C:\sulley\WpdPack\Lib"(主要是包含这两个目录)
10、下载和安装WinPcap
您是不是感觉已经pcapy安装完了呢,其实并没有,如果此时我们进Python命令行执行import pcapy命令会发现Import Error:DLL not fond错误,如图:
这是因为我们还没有安装WinPcap,这些DLL就缺失了,下载WinPcap,然后进行安装(一直next就ok拉),最后我们再次运行一下import pcapy命令,就会发现没有任何问题啦,如图:
11、下载和安装Impacket
下载Impacket包,然后进入目录执行install命令:
Impacket的目录>python setup.py install
12、最后一步-运行network_monitor.py
最后就是运行network_monitor.py来确保模块安装成功!如图所示:
其中Network Device List就是网卡列表啦,OK,大功告成!我们可以start fuzzing!
我从网上收集资料时,发现一个安装脚本,大家可以自己尝试一下:
# Sulley fuzzer installation script
# Written By Tony Ward
# Requires Python 2.7.11 32bit (use other versions at your own peril)
# Installation instrucitons from https://github.com/OpenRCE/sulley/wiki/Windows-Installation
import subprocess
import urllib
import os
import sys
###########################
# Dependencies for sulley #
###########################
# Before anything else
GIT = "https://github.com/git-for-windows/git/releases/download/v2.10.1.windows.1/Git-2.10.1-32-bit.exe"
MINGW_PRECOMPILED_BINARIES = "https://github.com/develersrl/gccwinbinaries/releases/download/v1.1/gcc-mingw-4.3.3-setup.exe"
UNZIP = "http://stahlworks.com/dev/unzip.exe"
# Debugging
PYDBG = "https://github.com/Fitblip/pydbg.git"
LIBDASM = "https://github.com/alexeevdv/libdasm.git"
# Packet capture
WIN_PCAP = "https://www.winpcap.org/install/bin/WinPcap_4_1_3.exe"
WPD_PACK = "http://www.winpcap.org/install/bin/WpdPack_4_1_2.zip"
PCAPY = "https://github.com/CoreSecurity/pcapy.git"
IMPACKET = "https://github.com/CoreSecurity/impacket.git"
# The fuzzey guy himself
SULLEY = "https://github.com/OpenRCE/sulley.git"
#####################################
# Download and install dependencies #
#####################################
# Install MinGW
print("Downloading MinGW precompiled binaries\n...")
urllib.urlretrieve(MINGW_PRECOMPILED_BINARIES, "MinGW.exe")
print("Installing MinGW precompiled binaries\n...\n")
subprocess.check_call("MinGW.exe")
# Install git
print("Downloading git\n...")
urllib.urlretrieve(GIT, "git_installer.exe")
print("Installing git\n...\n")
subprocess.check_call("git_installer.exe")
# Download unzip
print("Downloading unzip\n...\n")
urllib.urlretrieve(UNZIP, "unzip.exe")
# Add MinGW, Python and git to PATH
os.environ['PATH'] += ";C:\Python27;C:\MinGW\\bin;C:\Program Files\Git\cmd" # Seriously fuck \b and this bullshit bug
# Install pydbg
print("Cloning pydbg\n...")
subprocess.check_call("git clone " + PYDBG + " pydbg")
print("installing pydbg\n...\n")
subprocess.check_call("python pydbg\setup.py install")
# Install libdasm
print("Cloning libdasm\n...")
subprocess.check_call("git clone " + LIBDASM + " libdasm")
print("installing libdasm\n...\n")
os.chdir("libdasm\pydasm")
subprocess.check_call("python setup.py build_ext -c mingw32")
subprocess.check_call("python setup.py install")
os.chdir("..\..")
# Install WpdPack
print("Downloading WpdPack\n...")
urllib.urlretrieve(WPD_PACK, "WpdPack.zip")
subprocess.check_call("unzip WpdPack")
# Install pcapy
print("Cloning pcapy\n...")
subprocess.check_call("git clone " + PCAPY + " pcapy")
print("installing pcapy\n...\n")
os.chdir("pcapy")
subprocess.check_call("python setup.py build_ext -I \"..\WpdPack\Include\" -L \"..\WpdPack\Lib\"")
subprocess.check_call("python setup.py install")
os.chdir("..")
# Install WinPcap
print("Downloading WinPcap\n...")
urllib.urlretrieve(WIN_PCAP, "WinPcap.exe")
print("Installing WinPacap\n...\n")
subprocess.check_call("WinPcap.exe", shell=True)
# Install Impacket
print("Downloading Impacket\n...")
subprocess.check_call("git clone " + IMPACKET + " impacket")
print("Installing Impacket\n...\n")
os.chdir("impacket")
subprocess.check_call("python setup.py install")
os.chdir("..")
# Finally clone Sulley and call it a day
print("Installing Sulley... Finally!\n...")
subprocess.check_call("git clone " + SULLEY + " sulley")
print("run process_monintor.py and network_monitor.py to make sure everything went well :)")
后记
Sulley的安装步骤就是麻烦,大家要耐心。接下来我会写一些sulley的语法和一些实例。
本人也是网络安全的初学者,之前也没写过技术博客,本文借鉴了许多大佬的内容,希望自己能坚持下去,提升自己的写作和技术的能力。