IOCTL Fuzzer ver. 1.3
http://code.google.com/p/ioctlfuzzer/
(c) 2009-2011 eSage lab
http://www.esagelab.com/
dmitry@esagelab.com
==============================================
Overview
==============================================
IOCTL Fuzzer is a tool designed to automate the task of searching vulnerabilities in Windows kernel drivers by performing fuzz tests on them.
Current OS support (x32 and x64): Windows XP, Vista, 2003 Server, 2008 Server, 7.
The fuzzers own driver hooks nt!NtDeviceIoControlFile() in order to take control of all IOCTL requests throughout the system.
While processing IOCTLs, the fuzzer will spoof those IOCTLs conforming to conditions specified in the configuration file. A spoofed IOCTL is identical to the original IRP in all respects except the input data, which is changed to randomly generated fuzz.
Besides the fuzzing functionality, monitoring mode is also available with the tool. The monitoring mode allows logging of IRPs, optionally including their HEX dumps, into a file and/or a console.
Also, since 1.2 version exceptions monitoring feature is available, that can be usefull while fuzzing not only a kernel drivers. Exception monitoring is working through unexported function nt!KiDispatchException() pathing, which address obtained from Windows kernel debug symbols (they are automatically downloading from Microsoft's PDB server, during fuzzer initialization).
Specific IOCTLs which are to be logged or fuzzed by the tool are defined in the XML configuration file. IOCTLs may be filtered by the following parameters:
* Path to executable file corresponding to a process from which an IOCTL request is sent.
* IOCTL destination device name.
* IOCTL destination driver name.
* IOCTL Control Code.
Since 1.3 version IOCTL Fuzzer dumps _all_ catched IOCTLs information in text file %SystemDrive%\ioctls.log
Information from this file can be used for calculating requests count for each device/driver during the attack surface analysis (see below).
==============================================
Command line options
==============================================
--config <path> - Specify path to the fuzzer XML configuration file. For more information about configuration file format see example in bin/ioctlfuzzer.xml. If '--config' option is not specified - application will start in IOCTLs monitoring mode.
--boot - Boot time fuzzing/monitoring. This option will run fuzzer with the next system reboot.
--exceptions - Enable exceptions monitoring. Notice: files dbgeng.dll, dbghelp.dll and symsrv.dll are required for exceptions monitoring and must be placed into the same directory, as IOCTL Fuzzer executable.
--noioctls - Disable IOCTLs monitoring, show exceptions only (this option valid if '--exceptions' has been specified).
--uninstall - Uninstall IOCTL Fuzzer kernel driver and exit.
--analyze - Attack surface analysis feature: prints list of all drivers, devices and their properties (security settings, number of catched IOCTL requests, driver file product/vendor information, opened handles for devices, etc.), see log file example in attack-surface-analysis_NT6.1_x86.log.
--loadlog <path> - Load catched IOCTLs information for attack surface analysis from external log file. This option can be used only with '--analyze', as '<path>' parameter you can specify path to the catched IOCTLs log file (%SystemDrive%\ioctls.log), which is created automatically when IOCTL Fuzzer runs in IOCTLs fuzzing or monitoring mode.
Typical usage example (run IOCTL Fuzzer with XML config and enable exceptions monitoring):
> ioctlfuzzer.exe --config ioctlfuzzer.xml --exceptions
==============================================
Using the fuzzer
==============================================
General algorithm for fuzz-testing an application is as follows.
1. Install target application onto a virtual machine.
2. Attach a remote debugger to the virtual machine. Notice: how to configure WinDbg remote connection to VMware: http://silverstr.ufies.org/lotr0/windbg-vmware.html.
3. Run IOCTL Fuzzer in fuzzing mode on the guest OS.
4. Play around with target application unless an unhandled exception is displayed in the remotely attached debugger. Notice: normally, i.e. with no debugger attached, an unhandled exception will provoke a BSOD.
5. Release code execution on the virtual machine (F5 in WinDbg) to allow guest OS generate a crash dump.
6. Analyze the crash dump. IOCTL which provoked the unhandled exception should be found at this step.
7. If necessary, manual analysis of the application binary code may be performed.
==============================================
Using the attack surface analysis feature
==============================================
Typical attack surface analysis usage scenario:
1. Enable boot time monitoring to collect information about the most frequently-used IOCTL requests:
> ioctlfuzzer.exe --config ioctlfuzzer.xml --boot
2. Reboot the box.
3. After reboot run attack surface analysis and pass to the IOCTL Fuzzer path of the log file, with all of the collected IOCTLs information:
> ioctlfuzzer.exe --analyze --loadlog %SystemDrive%\ioctls.log.
==============================================
Using the fuzzer with
Kernel Debugger Communication Engine
==============================================
Integration with Kernel Debugger Communicatioin Engine allows the IOCTL Fuzzer to execute any commands in remote kernel debugger for IOCTL requests parameters, which were specified in the XML configuration file.
1. Before running fuzzer you need to load Kernel Debugger Communicatioin Engine extension in your remote kernel debugger by executing command ".load \path\to\ioctlfuzzer\binaries\dbgcb.dll".
2. Edit "dbgcb" nodes list in XML configuration file. For example, if you want to run "kb 40" command for each IOCTL request, that executed from the net.exe process context:
<dbgcb>
<process val="net.exe"><![CDATA[kb 40]]></process>
</dbgcb>
Also, you can use "device" or "driver" nodes, for specifying device/driver name, and "ioctl" for I/O Control Code value:
<dbgcb>
<device val="\Device\Ndis"><![CDATA[kb 40]]></device>
<driver val="\Driver\NDIS"><![CDATA[kb 40]]></driver>
<ioctl val="0x00170014"><![CDATA[kb 40]]></ioctl>
</dbgcb>
If command value is not specified -- fuzzer just breaks into debugger when catching request with the appropriate parameters:
<dbgcb>
<process val="net.exe" />
</dbgcb>
3. Run fuzzer with XML configuration file:
> ioctlfuzzer.exe --config ioctlfuzzer.xml
Note: Kernel Debugger Communication engine uses breakpoints for interaction between debugger extension and target system (https://github.com/Cr4sh/DbgCb/blob/master/dbgcb_scheme.png), so, you can use VirtualKD (http://virtualkd.sysprogs.org/) for better performance.
==============================================
Building from sources
==============================================
1. Download and install Windows Driver Kit Version 7.1.0
http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=36a2630f-5d56-43b5-b996-7633f2ec14ff
2. Run Windows Server 2003 x86 (or x64, to build 64-bit version) Free Build Environment (Start -> «Windows Driver Kits» -> «WDK 7600.16385.1» ->
«Build Environments» -> «Windows Server 2003» -> «x86 Free Build Environment»).
3. Go to the directory ./src/ and execute .\build.bat (or .\build64.bat, to build 64-bit version) from the Build Environment.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
IOCTL Fuzzer是一款自动化windows内核驱动漏洞挖掘工具,支持32/64位,windows xp/7/2003/2008操作系统。IOCTL Fuzzer hook了NtDeviceIoControlFile函数,接管了所有通往系统内核的IOCTL请求。 IOCTL Fuzzer更新了,新版本支持GUI设置了,可以打印驱动设备及它们的信息,还集成了一个内核调试引擎,并对fuzzing做了一些改进。
资源推荐
资源详情
资源评论
收起资源包目录
IOCTL Fuzzer (162个子文件)
common_asm.asm 791B
common_asm.asm 719B
build64.bat 774B
build.bat 751B
dbgcb_drv_x64.bat 422B
dbgcb_drv.bat 418B
attack_surface_analysis.bat 312B
_config.bat 265B
build_ext.bat 235B
ioctlfuzzer_boot.bat 112B
ioctlfuzzer.bat 105B
exceptions_monitor.bat 104B
ioctlfuzzer_uninstall.bat 92B
build64.bat 67B
build64.bat 67B
build64.bat 67B
build.bat 65B
build.bat 65B
build.bat 65B
clean.bat 58B
itab.c 212KB
decode.c 34KB
input.c 6KB
syn-intel.c 5KB
syn-att.c 5KB
udis86.c 4KB
syn.c 2KB
engextcpp.cpp 110KB
driver.cpp 51KB
ioctlfuzzer.cpp 45KB
common.cpp 45KB
analyzer.cpp 45KB
handlers.cpp 37KB
dbgcb.cpp 19KB
excpthook.cpp 14KB
rules.cpp 13KB
xml.cpp 11KB
service.cpp 10KB
debug.cpp 9KB
log.cpp 8KB
debug.cpp 8KB
common.cpp 7KB
lst.cpp 6KB
rng.cpp 5KB
symbols.cpp 4KB
hook.cpp 4KB
dbgcb_client.cpp 3KB
dbgcb_app.cpp 3KB
dbgcb_drv.cpp 2KB
dbgcb_stub.cpp 66B
dbgcb_stub.cpp 44B
driver.def 183B
dbgcb.def 54B
dbgcb_x64.def 54B
dirs 46B
dirs 46B
dbgeng.dll 4.29MB
dbgeng.dll 3.31MB
dbghelp.dll 1.49MB
dbghelp.dll 1.03MB
symsrv.dll 146KB
symsrv.dll 125KB
dbgcb_x64.dll 15KB
dbgcb.dll 14KB
ioctlfuzzer64.exe 479KB
ioctlfuzzer.exe 429KB
dbgcb_app_x64.exe 14KB
dbgcb_app.exe 14KB
dbgeng.h 522KB
dbghelp.h 126KB
wdbgexts.h 75KB
extsfns.h 56KB
resource.h 23KB
undocnt.h 16KB
itab.h 12KB
itab.h 12KB
decode.h 9KB
undocnt.h 9KB
TlHelp32.h 9KB
types.h 5KB
types.h 5KB
excpthook.h 3KB
drvcomm.h 3KB
common.h 3KB
rules.h 2KB
ntdll_defs.h 2KB
common.h 2KB
extern.h 2KB
extern.h 2KB
input.h 1KB
handlers.h 1KB
options.h 1KB
dbgcb_api.h 955B
lst.h 834B
stdafx.h 801B
targetver.h 765B
xml.h 709B
stdafx.h 655B
syn.h 585B
service.h 432B
共 162 条
- 1
- 2
资源评论
- dxawggggg2012-10-31里发言,表示您接受了CSDN社区的用户
q1600578875
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功