Skip to content

Commit e2eedef

Browse files
docs to md
1 parent fd03c64 commit e2eedef

14 files changed

+32
-27
lines changed

QuickStartGuide.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/QuickStartGuide.md

QuickStartGuide.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,11 @@ see [http://lcamtuf.coredump.cx/afl/plot/](http://lcamtuf.coredump.cx/afl/plot/)
433433
Every instance of afl-fuzz takes up roughly one core. This means that on
434434
multi-core systems, parallelization is necessary to fully utilize the hardware.
435435
For tips on how to fuzz a common target on multiple cores or multiple networked
436-
machines, please refer to [docs/parallel_fuzzing.txt](docs/parallel_fuzzing.txt).
436+
machines, please refer to [docs/parallel_fuzzing.md](docs/parallel_fuzzing.md).
437437

438438
The parallel fuzzing mode also offers a simple way for interfacing AFL to other
439439
fuzzers, to symbolic or concolic execution engines, and so forth; again, see the
440-
last section of [docs/parallel_fuzzing.txt](docs/parallel_fuzzing.txt) for tips.
440+
last section of [docs/parallel_fuzzing.md](docs/parallel_fuzzing.md) for tips.
441441

442442

443443
## 10) Fuzzer dictionaries

afl-whatsup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ if [ "$DIR" = "" ]; then
4545
echo "Usage: $0 [ -s ] afl_sync_dir" 1>&2
4646
echo 1>&2
4747
echo "The -s option causes the tool to skip all the per-fuzzer trivia and show" 1>&2
48-
echo "just the summary results. See docs/parallel_fuzzing.txt for additional tips." 1>&2
48+
echo "just the summary results. See docs/parallel_fuzzing.md for additional tips." 1>&2
4949
echo 1>&2
5050
exit 1
5151

docs/QuickStartGuide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ following files:
5151
- README.md - A general introduction to AFL,
5252
- docs/perf_tips.txt - Simple tips on how to fuzz more quickly,
5353
- docs/status_screen.txt - An explanation of the tidbits shown in the UI,
54-
- docs/parallel_fuzzing.txt - Advice on running AFL on multiple cores.
54+
- docs/parallel_fuzzing.md - Advice on running AFL on multiple cores.

docs/life_pro_tips.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See dictionaries/README.dictionaries to learn how.
1414
%
1515

1616
You can get the most out of your hardware by parallelizing AFL jobs.
17-
See docs/parallel_fuzzing.txt for step-by-step tips.
17+
See docs/parallel_fuzzing.md for step-by-step tips.
1818

1919
%
2020

docs/parallel_fuzzing.txt renamed to docs/parallel_fuzzing.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
=========================
2-
Tips for parallel fuzzing
3-
=========================
1+
# Tips for parallel fuzzing
42

53
This document talks about synchronizing afl-fuzz jobs on a single machine
64
or across a fleet of systems. See README for the general instruction manual.
75

8-
1) Introduction
9-
---------------
6+
## 1) Introduction
107

118
Every copy of afl-fuzz will take up one CPU core. This means that on an
129
n-core system, you can almost always run around n concurrent fuzzing jobs with
@@ -33,8 +30,7 @@ several instances in parallel. See docs/power_schedules.txt
3330
Alternatively running other AFL spinoffs in parallel can be of value,
3431
e.g. Angora (https://github.com/AngoraFuzzer/Angora/)
3532

36-
2) Single-system parallelization
37-
--------------------------------
33+
## 2) Single-system parallelization
3834

3935
If you wish to parallelize a single job across multiple cores on a local
4036
system, simply create a new, empty output directory ("sync dir") that will be
@@ -43,12 +39,16 @@ for every instance - say, "fuzzer01", "fuzzer02", etc.
4339

4440
Run the first one ("master", -M) like this:
4541

42+
```
4643
$ ./afl-fuzz -i testcase_dir -o sync_dir -M fuzzer01 [...other stuff...]
44+
```
4745

4846
...and then, start up secondary (-S) instances like this:
4947

48+
```
5049
$ ./afl-fuzz -i testcase_dir -o sync_dir -S fuzzer02 [...other stuff...]
5150
$ ./afl-fuzz -i testcase_dir -o sync_dir -S fuzzer03 [...other stuff...]
51+
```
5252

5353
Each fuzzer will keep its state in a separate subdirectory, like so:
5454

@@ -68,9 +68,11 @@ Note that running multiple -M instances is wasteful, although there is an
6868
experimental support for parallelizing the deterministic checks. To leverage
6969
that, you need to create -M instances like so:
7070

71+
```
7172
$ ./afl-fuzz -i testcase_dir -o sync_dir -M masterA:1/3 [...]
7273
$ ./afl-fuzz -i testcase_dir -o sync_dir -M masterB:2/3 [...]
7374
$ ./afl-fuzz -i testcase_dir -o sync_dir -M masterC:3/3 [...]
75+
```
7476

7577
...where the first value after ':' is the sequential ID of a particular master
7678
instance (starting at 1), and the second value is the total number of fuzzers to
@@ -86,15 +88,16 @@ WARNING: Exercise caution when explicitly specifying the -f option. Each fuzzer
8688
must use a separate temporary file; otherwise, things will go south. One safe
8789
example may be:
8890

91+
```
8992
$ ./afl-fuzz [...] -S fuzzer10 -f file10.txt ./fuzzed/binary @@
9093
$ ./afl-fuzz [...] -S fuzzer11 -f file11.txt ./fuzzed/binary @@
9194
$ ./afl-fuzz [...] -S fuzzer12 -f file12.txt ./fuzzed/binary @@
95+
```
9296

9397
This is not a concern if you use @@ without -f and let afl-fuzz come up with the
9498
file name.
9599

96-
3) Multi-system parallelization
97-
-------------------------------
100+
## 3) Multi-system parallelization
98101

99102
The basic operating principle for multi-system parallelization is similar to
100103
the mechanism explained in section 2. The key difference is that you need to
@@ -106,18 +109,22 @@ write a simple script that performs two actions:
106109
that includes host name in the fuzzer ID, so that you can do something
107110
like:
108111

112+
```sh
109113
for s in {1..10}; do
110114
ssh user@host${s} "tar -czf - sync/host${s}_fuzzid*/[qf]*" >host${s}.tgz
111115
done
116+
```
112117

113118
- Distributes and unpacks these files on all the remaining machines, e.g.:
114119

120+
```sh
115121
for s in {1..10}; do
116122
for d in {1..10}; do
117123
test "$s" = "$d" && continue
118124
ssh user@host${d} 'tar -kxzf -' <host${s}.tgz
119125
done
120126
done
127+
```
121128

122129
There is an example of such a script in experimental/distributed_fuzzing/;
123130
you can also find a more featured, experimental tool developed by
@@ -167,8 +174,7 @@ It is *not* advisable to skip the synchronization script and run the fuzzers
167174
directly on a network filesystem; unexpected latency and unkillable processes
168175
in I/O wait state can mess things up.
169176

170-
4) Remote monitoring and data collection
171-
----------------------------------------
177+
## 4) Remote monitoring and data collection
172178

173179
You can use screen, nohup, tmux, or something equivalent to run remote
174180
instances of afl-fuzz. If you redirect the program's output to a file, it will
@@ -192,8 +198,7 @@ Keep in mind that crashing inputs are *not* automatically propagated to the
192198
master instance, so you may still want to monitor for crashes fleet-wide
193199
from within your synchronization or health checking scripts (see afl-whatsup).
194200

195-
5) Asymmetric setups
196-
--------------------
201+
## 5) Asymmetric setups
197202

198203
It is perhaps worth noting that all of the following is permitted:
199204

docs/perf_tips.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ options to use non-instrumented system-wide copies instead.
140140

141141
The fuzzer is designed to need ~1 core per job. This means that on a, say,
142142
4-core system, you can easily run four parallel fuzzing jobs with relatively
143-
little performance hit. For tips on how to do that, see parallel_fuzzing.txt.
143+
little performance hit. For tips on how to do that, see parallel_fuzzing.md.
144144

145145
The afl-gotcpu utility can help you understand if you still have idle CPU
146146
capacity on your system. (It won't tell you about memory bandwidth, cache

docs/status_screen.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ now. It tells you about the current stage, which can be any of:
218218
splices together two random inputs from the queue at some arbitrarily
219219
selected midpoint.
220220

221-
- sync - a stage used only when -M or -S is set (see parallel_fuzzing.txt).
221+
- sync - a stage used only when -M or -S is set (see parallel_fuzzing.md).
222222
No real fuzzing is involved, but the tool scans the output from other
223223
fuzzers and imports test cases as necessary. The first time this is done,
224224
it may take several minutes or so.
@@ -370,7 +370,7 @@ comparing it to the number of logical cores on the system.
370370

371371
If the value is shown in green, you are using fewer CPU cores than available on
372372
your system and can probably parallelize to improve performance; for tips on
373-
how to do that, see parallel_fuzzing.txt.
373+
how to do that, see parallel_fuzzing.md.
374374

375375
If the value is shown in red, your CPU is *possibly* oversubscribed, and
376376
running additional fuzzers may not give you any benefits.

docs/technical_details.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ This allows for extreme flexibility in fuzzer setup, including running synced
485485
instances against different parsers of a common data format, often with
486486
synergistic effects.
487487

488-
For more information about this design, see parallel_fuzzing.txt.
488+
For more information about this design, see parallel_fuzzing.md.
489489

490490
12) Binary-only instrumentation
491491
-------------------------------

0 commit comments

Comments
 (0)