
Windows NT ioctl ブルートフォーサーおよびモジュラーファザー
Windows ドライバー IOCTL ツールスイート。
このツールには2つの異なる機能があります。ドライバーが受け付けるIOCTL値とその有効なサイズ制限を推測し、結果をファイルに保存して将来再利用できるようにします。2つ目の機能は、3つの単純なファザーで構成されています。純粋ランダムファザー、スライディングDWORDファザー、非同期ファザーです。3つを任意に組み合わせて順次実行でき、各ファザーの実行時間を設定できます。同期ファザーは、リクエストが連続して多すぎる回数失敗した場合(たとえば権限不足などで、それ以上のファジングが無意味になる可能性がある場合)にも警告します。非同期ファザーでは、キャンセルを試みるリクエストの割合と、並行レベル(同時に保留するリクエスト数)を設定できます。その他の機能には、冗長レベルの制御と、ctrl-c による任意のファザー実行のクリーンな停止があります。各ファザーは完了時に累計統計を表示します。
dibf.exe <options> <device name>
Options:
-h You're looking at it
-i Ignore previous logfile - THIS WILL OVERWRITE IT
-l Specify custom logfile name to read from/write to (default dibf-bf-results.txt)
-d Deep IOCTL bruteforce (8-9 times slower)
-v [0-3] Verbosity level
-s [ioctl] Start IOCTL value
-e [ioctl] End IOCTL value
-t [d1,d2,d4] Timeout for each fuzzer in seconds -- no spaces and decimal input ONLY
-p [max requests] Max number of async pending requests (loosely enforced, default 64)
-a [max threads] Max number of threads, default is 2xNbOfProcessors, max is 128
-c [% cancelation] Async cancelation attempt percent rate (default 15)
-f [0-7] Fuzz flag. OR values together to run multiple
fuzzer stages. If left out, it defaults to all
stages.
0 = Brute-force IOCTLs only
1 = Sliding DWORD (sync)
2 = Random (async)
4 = Named Pipe (async)
Examples:
dibf \\.\MyDevice
dibf -v -d -s 0x10000000 \\.\MyDevice
dibf -f 0x3 \\.\MyDevice
Notes:
- The bruteforce stage will generate a file named "dibf-bf-results.txt"
in the same directory as the executable. If dibf is started with no
arguments, it will look for this file and start the fuzzer with the values
from it The -l flag can be used to specify a custom results file name.
- If not specified otherwise, command line arguments can be passed as decimal or hex (prefix with "0x")
- CTRL-C interrupts the current stage and moves to the next if any. Current statistics will be displayed.
- The statistics are cumulative.
- The command-line flags are case-insensitive.
Named Pipe ファザーにファズされたパケットを提供するには、\\.\pipe\dibf_pipe に PIPE_TYPE_MESSAGE モードで接続し、ファズされたデータを送信します。パケットの最後の4バイトは IOCTL コードとして解釈されます。さらに、named pipe Peach パブリッシャーを使用して、DIBF の範囲外の named pipe エンドポイントをファズすることもできます。
提供されている Peach パブリッシャーを使用して、Peach を DIBF の Named Pipe Fuzzing Provider に接続できます。このプロバイダーを利用するサンプルの Peach XML ファイル peach_np.xml は、PeachNamedPipePublisher フォルダーにあります。
<?xml version="1.0" encoding="utf-8"?>
<Peach xmlns="http://peachfuzzer.com/2012/Peach" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://peachfuzzer.com/2012/Peach ../peach.xsd">
<!-- DataModel containing a single string -->
<DataModel name="TheDataModel">
<String value="Hello World!" />
<Number name="IOCTL0" value="EFBEADDE" valueType="hex" size="32" mutable="false" />
</DataModel>
<!-- StateModel referencing data model above -->
<StateModel name="DibfState" initialState="DibfState0">
<State name="DibfState0">
<Action type="output">
<DataModel ref="TheDataModel"/>
</Action>
</State>
</StateModel>
<!-- The test with pipe publisher -->
<Test name="Default">
<StateModel ref="DibfState"/>
<Publisher class="NamedPipe">
<Param name="host" value="." />
<Param name="pipeName" value="dibf_pipe" />
<Param name="impersonationLevel" value="1" />
</Publisher>
</Test>
</Peach>
<!-- end -->
<<<< RUNNING RANDOM FUZZER >>>>
RUN STARTED: 3/17/2014 4:14 PM
---------------------------------------
Sent Requests : 4233
Completed Requests : 4233 (4233 sync, 0 async)
SuccessfulRequests : 1254
FailedRequests : 2979
CanceledRequests : 0
RUN ENDED: 3/17/2014 4:14 PM
---------------------------------------
<<<< RUNNING SLIDING DWORD FUZZER >>>>
RUN STARTED: 3/17/2014 4:14 PM
---------------------------------------
Sent Requests : 6339
Completed Requests : 6339 (6339 sync, 0 async)
SuccessfulRequests : 1254
FailedRequests : 5085
CanceledRequests : 0
RUN ENDED: 3/17/2014 4:14 PM
---------------------------------------
<<<< RUNNING ASYNC FUZZER >>>>
RUN STARTED: 3/17/2014 4:14 PM
---------------------------------------
Sent Requests : 8272
Completed Requests : 8272 (6339 sync, 1933 async)
SuccessfulRequests : 1738
FailedRequests : 6414
CanceledRequests : 120
RUN ENDED: 3/17/2014 4:14 PM
---------------------------------------
この非常にシンプルなツールは、Windows IOCTL コントロールコードをエンコードおよびデコードします。デバイスタイプ、機能番号、転送方法、アクセスタイプの IO エンコーディングをユーザーフレンドリーに扱う方法を提供します。
iocode.exe [IOCODE] or iocode.exe [DEVICE_TYPE] [FUNCTION] [METHOD] [ACCESS]
これは脆弱性の実証を目的としたツールであり、16進エディタと組み合わせて使用することを想定しています。対象のリクエストをその中で作成すると、このユーティリティはコマンドライン引数を使用してドライバーに送信します。応答は stdout に送信されます。任意のアドレスを入力バッファおよび出力バッファのアドレスとして使用することもできます。
iosend [Device] [IOCODE] [InputBufFilePath|InputAdress] [InputLen] [[OutputAddress]] [OutputLen] > [Output file]
Notes:
- This utility prints error/status messages to stderr
- Input can be provided as an arbitrary address or a file name
- An output buffer is allocated and its contents eventually written to stdout unless the optional OutputAddress parameter is provided
GPLv2