
Bruteforcer di ioctl per Windows NT e fuzzer modulare
Suite di strumenti IOCTL per driver Windows.
Questo strumento comprende due funzionalità distinte. Indovina i valori IOCTL accettati dal driver e anche i relativi limiti di dimensione validi e salva i risultati in un file per un uso futuro. La seconda funzionalità è composta da 3 fuzzer "stupidi": un fuzzer puramente casuale, un fuzzer DWORD scorrevole e un fuzzer asincrono. Puoi eseguire qualsiasi combinazione dei 3 in sequenza e impostare limiti di tempo per ogni esecuzione del fuzzer. I fuzzer sincroni avviseranno anche se troppe richieste falliscono consecutivamente (indicando che ulteriori fuzzing potrebbero essere inutili, ad esempio per mancanza di permessi) e il fuzzer asincrono consente di impostare la percentuale di richieste su cui tentare l'annullamento e il livello di concorrenza (quante richieste pendenti contemporaneamente). Altre funzionalità includono il controllo del livello di verbosità e la possibilità di interrompere qualsiasi esecuzione del fuzzer in modo pulito con ctrl-c. Al termine, ogni fuzzer visualizzerà statistiche cumulative.
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.
Per fornire pacchetti fuzzati al fuzzer Named Pipe, connettersi a \\.\pipe\dibf_pipe in modalità PIPE_TYPE_MESSAGE e inviare i dati fuzzati. Gli ultimi 4 byte del pacchetto verranno interpretati come codice IOCTL. Inoltre, il publisher Peach named pipe può essere utilizzato per fuzzare endpoint named pipe al di fuori dell'ambito di DIBF.
Il publisher Peach fornito può essere usato per collegare Peach al provider di fuzzing Named Pipe di DIBF. Un file Peach XML di esempio peach_np.xml che utilizza questo provider si trova nella cartella 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
---------------------------------------
Questo strumento molto semplice codifica e decodifica i codici di controllo IOCTL di Windows. Offre un modo intuitivo per gestire la codifica IO di tipi di dispositivo, numero di funzione, metodo di trasferimento e tipo di accesso.
iocode.exe [IOCODE] or iocode.exe [DEVICE_TYPE] [FUNCTION] [METHOD] [ACCESS]
Questo strumento è pensato per la verifica delle vulnerabilità e va usato in combinazione con un hex-editor. Una volta preparata la richiesta di interesse al suo interno, questa utilità la invierà al driver usando i parametri della riga di comando. La risposta viene inviata a stdout. Indirizzi arbitrari possono essere usati anche come indirizzi dei buffer di input e output.
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