Skip to content

Commit 2b93b92

Browse files
authored
Clean-up the README, trim animation size (w/ webp), redirect ppl to symbolizer-rs (#203)
1 parent 653b085 commit 2b93b92

23 files changed

+27
-28
lines changed

README.md

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<img src='https://github.com/0vercl0k/wtf/workflows/Builds/badge.svg'/>
88
</p>
99
<p>
10-
<img src='pics/wtf.gif'/>
10+
<img src='pics/wtf.webp'/>
1111
</p>
1212
</div>
1313

@@ -33,22 +33,24 @@ The best way to try the features out is to work with the [fuzzer_hevd](src/wtf/f
3333
- `outputs` is the folder where the current minset files are saved into,
3434
- `coverage` is the folder where the `.cov` files are expected to be in,
3535
- `crashes` is where the crashes gets saved in,
36-
- `state` is where the memory dump (`mem.dmp`) as well as the CPU state (`regs.json`) and the symbol store are stored in (`symbol-store.json`). The symbol store is a simple JSON file that is used on Linux systems to know where to put breakpoints as there is no support for symbols / dbgeng on those platforms. *wtf* generates this file at runtime everytime you run your target on Windows.
36+
- `state` is where the memory dump (`mem.dmp`) as well as the CPU state (`regs.json`) and the symbol store are stored in (`symbol-store.json`). The symbol store is a simple JSON file that is used on Linux systems to know where to put breakpoints as there is no support for symbols / dbgeng on those platforms. **wtf** generates this file at runtime everytime you run your target on Windows.
37+
38+
What follows assume that you downloaded the [target-hevd.7z](https://github.com/0vercl0k/wtf/releases) file attached to the latest release, and extracted it in the `targets` directory of your clone of **wtf**. You should have `wtf/targets/hevd` in which you find the `inputs` / `outputs`, etc. directories.
3739

3840
### Starting a server node
3941

4042
The server is basically the brain and keeps track of all the state: the aggregated code-coverage, the corpus, it generates and distributes the test-cases to client.
4143

42-
This is how you might choose to launch a server node:
44+
This is how you might choose to launch a local server node:
4345

4446
```text
45-
(base) c:\work\codes\wtf\targets\hevd>..\..\src\build\wtf.exe master --max_len=1028 --runs=10000000 --target . --address tcp://192.168.2.41/ --name hevd
47+
wtf.exe master --name hevd --max_len=1028 --runs=10000000
4648
```
4749

48-
The `max_len` option is used to limit the size of the generated test-case, `runs` is the number of test-cases it will generate, `address` specify where *wtf* needs to be listening on, `target` is a directory with the directory tree we described above (the user can also choose to override those directories with `--input` / `--output` / `--crashes`) and `name` specifies your fuzzing module name so that the master can invoke your generator function if you have defined one.
50+
The `max_len` option is used to limit the size of the generated test-case, `runs` is the number of test-cases it will generate, `address` specify where **wtf** needs to be listening on, `target` is a directory with the directory tree we described above (the user can also choose to override those directories with `--input` / `--output` / `--crashes`) and `name` specifies your fuzzing module name so that the master can invoke your generator function if you have defined one.
4951

5052
<p align='center'>
51-
<img src='pics/server.gif'>
53+
<img src='pics/server.webp'>
5254
</p>
5355

5456
### Fuzzing nodes
@@ -58,13 +60,13 @@ The client nodes run a test-case that has been generated and distributed by the
5860
This is how you would start a client node that uses the *bochscpu* backend:
5961

6062
```text
61-
..\..\src\build\wtf.exe fuzz --backend=bochscpu --name hevd --limit 10000000
63+
wtf.exe fuzz --name hevd --limit 10000000
6264
```
6365

6466
The `fuzz` subcommand is used with the `name` option to specify which fuzzer module needs to be used, `backend` specifies the execution backend and `limit` the maximum number of instruction to execute per testcase (depending on the backend, this option has different meaning).
6567

6668
<p align='center'>
67-
<img src='pics/client.gif'>
69+
<img src='pics/client.webp'>
6870
</p>
6971

7072
### Running a test-case
@@ -74,11 +76,11 @@ If you would like to run a test-case (or a folder filled with test-cases), you c
7476
This is how you would would run the `crash-0xfffff764b91c0000-0x0-0xffffbf84fb10e780-0x2-0x0` test-case:
7577

7678
```
77-
..\..\src\build\wtf.exe run --name hevd --state state --backend=bochscpu --limit 10000000 --input crashes\crash-0xfffff764b91c0000-0x0-0xffffbf84fb10e780-0x2-0x0
79+
wtf.exe run --name hevd --limit 10000000 --input crashes\crash-0xfffff764b91c0000-0x0-0xffffbf84fb10e780-0x2-0x0
7880
```
7981

8082
<p align='center'>
81-
<img src='pics/run.gif'>
83+
<img src='pics/run.webp'>
8284
</p>
8385

8486
### Minseting a corpus
@@ -88,11 +90,11 @@ To minset a corpus, you need to use a server node and as many client nodes as yo
8890
This is how you would minset the corpus in `outputs` into the `minset` directory (also highlights how you can override the `inputs` and `outputs` directories):
8991

9092
```
91-
..\..\src\build\wtf.exe master --max_len=1028 --runs=0 --target . --inputs=outputs --outputs=minset
93+
wtf.exe master --name hevd --max_len=1028 --runs=0 --inputs=outputs --outputs=minset
9294
```
9395

9496
<p align='center'>
95-
<img src='pics/minset.gif'>
97+
<img src='pics/minset.webp'>
9698
</p>
9799

98100
### Generating execution traces
@@ -102,36 +104,33 @@ The main mechanism available to instrospect in an execution backend is to genera
102104
This is how you would generate an execution trace for the `crash-0xfffff764b91c0000-0x0-0xffffbf84fb10e780-0x2-0x0` test-case:
103105

104106
```
105-
..\..\src\build\wtf.exe run --name hevd --state state --backend=bochscpu --limit 10000000 --input crashes\crash-0xfffff764b91c0000-0x0-0xffffbf84fb10e780-0x2-0x0 --trace-type=rip
107+
wtf.exe run --name hevd --limit 10000000 --input crashes\crash-0xfffff764b91c0000-0x0-0xffffbf84fb10e780-0x2-0x0 --trace-type=rip
106108
```
107109

108110
<p align='center'>
109-
<img src='pics/trace.gif'>
111+
<img src='pics/trace.webp'>
110112
</p>
111113

112-
The execution traces aren't symbolized because Linux systems wouldn't be able to do that and that is why I wrote [symbolizer](https://github.com/0vercl0k/symbolizer).
113-
114-
This is how you would symbolize the `crash-0xfffff764b91c0000-0x0-0xffffbf84fb10e780-0x2-0x0.trace` execution trace generated above:
114+
To symbolize execution traces you should use [symbolizer-rs](https://github.com/0vercl0k/symbolizer). This is how you would symbolize the `crash-0xfffff764b91c0000-0x0-0xffffbf84fb10e780-0x2-0x0.trace` execution trace generated above:
115115

116116
```
117-
symbolizer.exe --input crash-0xfffff764b91c0000-0x0-0xffffbf84fb10e780-0x2-0x0.trace --crash-dump state\mem.dmp
117+
symbolizer-rs.exe --trace crash-0xfffff764b91c0000-0x0-0xffffbf84fb10e780-0x2-0x0.rip.trace
118118
```
119119

120120
<p align='center'>
121-
<img src='pics/symbolizer.gif'>
121+
<img src='pics/symbolizer-rs.webp'>
122122
</p>
123123

124124
## Generating Tenet traces
125125

126126
If you see yourself needing more contextual awareness, the *bochscpu* backend allows you to generate execution traces that can be loaded in the [Tenet](https://github.com/gaasedelen/tenet) trace explorer. In the below, I start from a crash in `memmove` and walk back to find out where the source pointer is coming from (user-mode!):
127127

128128
```
129-
..\..\src\build\wtf.exe run --name hevd --state state --backend=bochscpu --limit 10000000 --input crashes\crash-0xfffff764b91c0000-0x0-0xffffbf84fb10e780-0x2-0x0 --trace-type=tenet
129+
wtf.exe run --name hevd --limit 10000000 --input crashes\crash-0xfffff764b91c0000-0x0-0xffffbf84fb10e780-0x2-0x0 --trace-type=tenet
130130
```
131131

132-
133132
<p align='center'>
134-
<img src='pics/tenet.gif'>
133+
<img src='pics/tenet.webp'>
135134
</p>
136135

137136
### Generating code-coverage traces
@@ -141,36 +140,36 @@ To generate code-coverage traces you can simply use the `run` subcommand with th
141140
This is how you would generate code-coverage traces for all the files inside the `minset` folder and store them in the `coverage-traces` folder:
142141

143142
```
144-
..\..\src\build\wtf.exe run --name hevd --state state --backend=whv --input minset --trace-path=coverage-traces --trace-type=cov
143+
wtf.exe run --name hevd --input minset --trace-path=coverage-traces --trace-type=cov
145144
```
146145

147146
<p align='center'>
148-
<img src='pics/ccov.gif'>
147+
<img src='pics/ccov.webp'>
149148
</p>
150149

151150
Those traces aren't directly loadable into [lighthouse](https://github.com/gaasedelen/lighthouse) because they aren't symbolized.
152151

153152
This is how you would symbolize all the files inside the `coverage-traces` folder and write the results into `coverage-traces-symbolized`:
154153

155154
```
156-
symbolizer.exe --input coverage-traces --crash-dump state\mem.dmp -o coverage-traces-symbolized --style modoff
155+
symbolizer-rs.exe --trace coverage-traces -o coverage-traces-symbolized --style modoff
157156
```
158157

159158
<p align='center'>
160-
<img src='pics/symbolizer-ccov.gif'>
159+
<img src='pics/symbolizer-rs-ccov.webp'>
161160
</p>
162161

163162
And finally, you can load those up in [lighthouse](https://github.com/gaasedelen/lighthouse):
164163

165164
<p align='center'>
166-
<img src='pics/lighthouse.gif'>
165+
<img src='pics/lighthouse.webp'>
167166
</p>
168167

169168
Also if you don't care about individual code-coverage, the master maintains a `coverage.cov` file contains the unique aggregated code-coverage that has been exercised. It makes it easy to check on the global code-coverage really quick during a fuzzing job.
170169

171170
## How does it work?
172171

173-
*wtf* runs user & kernel mode through an *execution backend* and relies on the user to insert test-cases in the target. Unlike other classical fuzzer tools, *wtf* doesn't do much of the heavy lifting; the user does. The user needs to know the harnessed target very well and onboarding a target is an iterative process that will take time. It has a lot of flexibility to offer if you are ready to get hacking though :)
172+
**wtf** runs user & kernel mode through an *execution backend* and relies on the user to insert test-cases in the target. Unlike other classical fuzzer tools, **wtf** doesn't do much of the heavy lifting; the user does. The user needs to know the harnessed target very well and onboarding a target is an iterative process that will take time. It has a lot of flexibility to offer if you are ready to get hacking though :)
174173

175174
The usual workflow to harness a target is as follows:
176175

pics/ccov.gif

-1.02 MB
Binary file not shown.

pics/ccov.webp

116 KB
Binary file not shown.

pics/client.gif

-1.28 MB
Binary file not shown.

pics/client.webp

389 KB
Binary file not shown.

pics/lighthouse.gif

-1.18 MB
Binary file not shown.

pics/lighthouse.webp

424 KB
Binary file not shown.

pics/minset.gif

-552 KB
Binary file not shown.

pics/minset.webp

112 KB
Binary file not shown.

pics/run.gif

-49.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)