IOCTL Fuzzer 使用说明

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zfs2008zfs/article/details/51694229

IOCTL Fuzzer ver. 1.3使用说明
IOCTL Fuzzer是一款自动化windows内核驱动漏洞挖掘工具,支持32/64位,windows xp/7/2003/2008操作系统。目前最新的版本是1.3。
最近在进行驱动测试时开始接触这些工具,使用过程中有一些困惑,可惜网上这方面的资料实在有限,只能自己摸索。

1、下载地址

http://code.google.com/p/ioctlfuzzer/downloads/list(需要翻墙)

2、README.txt

下载文件是一个zip压缩包,解压缩之后看到两个文件夹和README.txt文件:
- bin目录:这个文件下保存可执行文件及配置文件,ioctlfuzzer.exe在32位系统下使用,提供了一个控制界面;ioctlfuzzer.xml是配置文件,关于这个配置文件的用法,后面结合README.txt进行详细说明;bin目录下还包含一个X64文件夹,X64文件夹下保存的是64位系统中使用的可执行程序;
- src目录:保存源文件
- README.txt是英文说明文档,就是软件的使用说明书,后面重点分析这个文档

3、README.txt

README.txt指出,IOCTL Fuzzer支持命令行参数,各个参数的含义如下:
–config - 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.
设置xml配置文件的路径。这里特别说明,如果不使用’–config’选项,ioctlfuzzer.exe将使用IOCTLS监控模式,即不会使用配置文件。因此,如果你希望ioctlfuzzer.exe按照配置文件中的规则进行测试,必须在命令行下进行调用,使用’–config’选项执行配置文件的路径。
如果你直接双击ioctlfuzzer.exe,由于没有传入’–config’,ioctlfuzzer.exe在IOCTLS监控模式下工作,配置文件根本不起作用。

–boot - Boot time fuzzing/monitoring. This option will run fuzzer with the next system reboot.
这是参数的意思是配置ioctlfuzzer.exe,使其在下次系统重启时运行。这样就可以从驱动程序被操作系统加载的时候开始测试。

–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.
这个参数的意思是启用异常监测功能。注意,如果使用这个功能,应该确保ioctlfuzzer.exe所在目录存在 dbgeng.dll, dbghelp.dll and symsrv.dll这三个动态链接库文件

–noioctls - Disable IOCTLs monitoring, show exceptions only (this option valid if ‘–exceptions’ has been specified).
这个参数的意思是只对异常进行监测,不进行IOCTLS测试。

–uninstall - Uninstall IOCTL Fuzzer kernel driver and exit.
很明显,这个参数的意思是卸载IOCTL Fuzzer工具的内核驱动。

–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 - Load catched IOCTLs information for attack surface analysis from external log file. This option can be used only with ‘–analyze’, as ‘’ 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.

4、ioctlfuzzer.xml

ioctlfuzzer.xml中可以对ioctlfuzzer进行配置,为了确保配置生效,应该在命令行下运行下面的命令:

扫描二维码关注公众号,回复: 2972643 查看本文章

> ioctlfuzzer.exe –config ioctlfuzzer.xml

xml文件中的内容如下:

<?xml version="1.0" encoding="windows-1251" ?> 
<cfg>

  <!-- 
      Data generation mode for fuzzing:
      random - Fills input buffer with the random data.
      dwords - Change each dword of input buffer by single 
               iteration with incorrect address constant.
  --> 
  <fuzzing_type>dwords</fuzzing_type>

  <!-- Path to log file. --> 
  <log_file>C:\ioctls.txt</log_file> //设置日志文件的路径和名称

  <!--  If true, hex dumps of IOCTL buffers will be logged. --> 
  <hex_dump>false</hex_dump> //是否把IOCTL buffer中的内容记录到日志文件中

  <!-- If true, will print logging output to console. --> 
  <log_requests>true</log_requests> //是否用控制台方式显示信息

  <!-- If true, will print logging output to kernel debugger. -->
  <debug_log_requests>true</debug_log_requests> //是否向内核调试器发送信息,可以用DebugView查看

  <!-- If true, will fuzz IOCTLs (false - only logging). -->
  <fuze_requests>true</fuze_requests> //是否对IOCTL进行fuzz

  <!-- If true, will also randomly modify fuzzed IRP's input buffer size. -->
  <fuze_size>true</fuze_size> //对IOCTL进行fuzz时是否改变input buffer的大小

  <!-- If true - malformed IOCTLs will sending in context of ioctlfuzzer.exe process. -->
  <fair_fuzzing>false</fair_fuzzing>

  <!-- 

      IOCTLs "allow" list.

      The fuzzer will process (i.e. log and/or fuzz) any IOCTL request 
      containing at least one parameter from the <allow> list.

      If the list is empty, each IRP will be processed.
  --> 

  <allow>
    <!-- IOCTL request destination driver name. --> 
    //想要FUZZ的驱动程序名称,如果设置了allow列表中的 <drivers>,后面的<deny>中的<drivers>配置将不会生效
    <drivers>
     <entry>mydriver.sys</entry>
    </drivers>

    <!-- IOCTL request destination device name. -->
    //想要FUZZ的设备名称
    <devices>
    </devices>

    <!-- IOCTL request Control Code. --> 
    //可以指定对某个驱动程序的部分Control Code进行FUZZ
    <ioctls>
    </ioctls>

    <!-- IOCTL request sender process file path/name. -->
    <processes>
    </processes>
  </allow>

  <!-- 
      IOCTLs "deny" list.
      Can be empty.
  --> 
  <deny>
    <!-- 
        "deny" list is identical in structure to "allow" list.
    --> 

    <!-- Don't fuzz default Windows drivers. --> 
    <drivers>
        //此列表中的驱动程序将不会被FUZZ,如果<allow>中<drivers>不为空,此列表不会生效
      <entry>tcpip.sys</entry>
      <entry>afd.sys</entry>
      <entry>NDIS.sys</entry>
      <entry>fltMgr.sys</entry>
      <entry>ipsec.sys</entry>
      <entry>mrxsmb.sys</entry>
      <entry>KsecDD.sys</entry>
      <entry>netbios.sys</entry>
      <entry>nsiproxy.sys</entry>
    </drivers>
  </deny>
</cfg>

猜你喜欢

转载自blog.csdn.net/zfs2008zfs/article/details/51694229
今日推荐