[출처 : https://github.com/OpenRCE/sulley/wiki/Windows-Installation]
Windows Installation
These instructions are for Windows XP => Windows 7 using Python 2.7 (though other versions should work too)
Thanks to louppen for the great starting point!
- Download and install MinGW Compilier v20101030
- Make sure to use pre-packaged repo catalogs and the old version! PyDasm barfs when compiling because MinGW32 removed support for -mno-cygwin! Bug Report
- On the "Select Components" dialog check C++ Compiler and ObjC Compiler in addition to selected by default set
- Download and install Python 2.7 (x64)
- Download and install Git for windows
- Make sure it adds git to your path variable!
- Update $PATH to include C:\Python27 and C:\MinGW\bin KB article
Checkout pydbg
C:\sulley_build>git clone https://Fitblip@github.com/Fitblip/pydbg.git Cloning into 'pydbg'... remote: Counting objects: 17, done. remote: Compressing objects: 100% (12/12), done. remote: Total 17 (delta 4), reused 17 (delta 4) Unpacking objects: 100% (17/17), done.
Build pydbg
C:\sulley_build\pydbg>python setup.py install running install running build running build_py creating build creating build\lib creating build\lib\pydbg ...snip... running install_egg_info Removing C:\python27\Lib\site-packages\pydbg-0.0.0-py2.7.egg-info Writing C:\python27\Lib\site-packages\pydbg-0.0.0-py2.7.egg-info
Download and extract libdasm
Build the extention and install it (beware of gcc version 4.7.x removed support for -mno-cygwin, seehttp://stackoverflow.com/q/6034390/333353 and https://gist.github.com/4466320 for a fix)
C:\sulley_build\libdisasm\pydasm>python setup.py build_ext -c mingw32 running build_ext building 'pydasm' extension ...snip... C:\sulley_build\libdisasm\pydasm>python setup.py install running install running build running build_ext running install_lib copying build\lib.win32-2.7\pydasm.pyd -> C:\python27\Lib\site-packages running install_egg_info Writing C:\python27\Lib\site-packages\pydasm-1.5-py2.7.egg-info
Checkout Sulley
C:\sulley_build>git clone https://github.com/OpenRCE/sulley.git Cloning into 'sulley'... remote: Counting objects: 148, done. remote: Compressing objects: 100% (91/91), done. remote: Total 148 (delta 53), reused 146 (delta 51) Receiving objects: 100% (148/148), 267.03 KiB, done. Resolving deltas: 100% (53/53), done.
Make sure process_monitor.py works (no import errors)
C:\sulley_build\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
Download and extract PCapy
Download and extract WinPcap Dev Kit (I put mine in C:\sulley_build\WpdPack)
Build PCapy (pointing to WinPcap's include and lib directories) and install it
C:\sulley_build\pcapy-0.10.5>python setup.py build_ext -c mingw32 -I "C:\sulley_build\WpdPack\Include" -L "C:\sulley_build\WpdPack\Lib" running build_ext building 'pcapy' extension creating build creating build\temp.win32-2.7 creating build\temp.win32-2.7\Release creating build\temp.win32-2.7\Release\win32 ...snip... C:\sulley_build\pcapy-0.10.5>python setup.py install running install running build running build_ext running install_lib copying build\lib.win32-2.7\pcapy.pyd -> C:\python27\Lib\site-packages running install_data creating C:\python27\share creating C:\python27\share\doc creating C:\python27\share\doc\pcapy copying README -> C:\python27\share\doc\pcapy copying LICENSE -> C:\python27\share\doc\pcapy copying pcapy.html -> C:\python27\share\doc\pcapy running install_egg_info Writing C:\python27\Lib\site-packages\pcapy-0.10.5-py2.7.egg-info
Download and install WinPcap
Download and extract Impacket
Install Impacket
C:\sulley_build\Impacket-0.9.6.0>python setup.py install running install running build running build_py creating build creating build\lib creating build\lib\impacket copying impacket\ImpactDecoder.py -> build\lib\impacket copying impacket\ImpactPacket.py -> build\lib\impacket copying impacket\nmb.py -> build\lib\impacket copying impacket\ntlm.py -> build\lib\impacket copying impacket\smb.py -> build\lib\impacket copying impacket\structure.py -> build\lib\impacket copying impacket\uuid.py -> build\lib\impacket copying impacket\__init__.py -> build\lib\impacket creating build\lib\impacket\dcerpc ...snip...
Check to make sure network_monitor.py works
C:\sulley_build\sulley>python network_monitor.py ERR> USAGE: network_monitor.py <-d|--device DEVICE #> device to sniff on (see list below) [-f|--filter PCAP FILTER] BPF filter string [-P|--log_path PATH] log directory to store pcaps to [-l|--log_level LEVEL] log level (default 1), increase for more verbosity [--port PORT] TCP port to bind this agent to Network Device List: [0] \Device\NPF_GenericDialupAdapter [1] {CF0B388B-8DF5-4BC4-8ECF-404F2A1B489C} 10.0.2.64
'프로그래밍 > Python' 카테고리의 다른 글
danger_track를 이용한 crash dump 활용 (0) | 2013.07.30 |
---|---|
win7 에서 pydbg 이용한 snap 찍기 (0) | 2013.07.29 |
파이썬 호출 방식과 C 호출 방식 - win7 pydbg library 사용기 (0) | 2013.07.26 |
Windows 7에서 GetSystemInfo 사용하기 (0) | 2013.07.25 |
Windows 7에서 사용하는 파이선 디버거(W7PD) (0) | 2013.07.24 |