source: zzuf/trunk/doc/zzuf.1 @ 1511

Last change on this file since 1511 was 1511, checked in by Sam Hocevar, 14 years ago
  • Slightly updated documentation.
File size: 5.0 KB
Line 
1.TH zzuf 1 "2006-12-22" "zzuf"
2.SH NAME
3zzuf \- multiple purpose fuzzer
4.SH SYNOPSIS
5.B zzuf
6[
7.B \-vqdh
8] [
9.B \-r
10.I ratio
11] [
12.B \-s
13.I seed
14|
15.B \-s
16.I start:stop
17]
18.PD 0
19.IP
20.PD
21[
22.B \-F
23.I children
24] [
25.B \-B
26.I bytes
27] [
28.B \-T
29.I seconds
30]
31.PD 0
32.IP
33.PD
34[
35.B \-i
36.I include
37] [
38.B \-e
39.I exclude
40]
41.I COMMAND [ARGS]...
42.RI
43.SH DESCRIPTION
44.B Zzuf
45is a transparent application input fuzzer. It works by intercepting
46file operations and changing random bits in the program's input.
47.B Zzuf's
48behaviour is deterministic, making it easy to reproduce bugs.
49.RI
50.SH USAGE
51.B Zzuf
52will run an application specified on its command line, one or several times,
53with optional arguments, and will report the application's behaviour on
54the standard output.
55
56If you want to specify arguments for your application, put a
57.B \-\-
58marker before them on the command line, or
59.B zzuf
60will try to interpret them as arguments for itself.
61.RI
62.SH OPTIONS
63.TP
64.B \-r, \-\-ratio <ratio>
65Specify the amount of bits that will be randomly fuzzed. A value of 0
66will not fuzz anything. A value of 0.05 will fuzz 5% of the open files'
67bits. A value of 1.0 or more will fuzz all the bytes, theoretically making
68the input files undiscernible from random data. The default fuzzing ratio
69is 0.004 (fuzz 0.4% of the files' bits).
70.TP
71.B \-s, \-\-seed <seed>
72.PD 0
73.TP
74.B \-s, \-\-seed <start:stop>
75.PD
76Specify the random seed to use for fuzzing, or an interval of random seeds.
77Running
78.B zzuf
79twice with the same random seed will fuzz the files exactly the same way,
80even with a different target application. The purpose of this is to use
81simple utilities such as
82.B cat
83or
84.B cp
85to generate a file that causes the target application to crash.
86
87If an interval is specified,
88.B zzuf
89will run the application several times, each time with a different seed, and
90report the behaviour of each run.
91.TP
92.B \-F, \-\-fork <children>
93Specify the number of simultaneous children that can be run. This option is
94only useful if the
95.B \-s
96flag is used with an interval argument.
97.TP
98.B \-B, \-\-max\-bytes <n>
99Automatically terminate child processes that output more than
100.B <n>
101bytes on the standard output and standard error channels. This is useful to
102detect infinite loops.
103.TP
104.B \-T, \-\-max\-time <n>
105Automatically terminate child processes that run for more than
106.B <n>
107seconds. This is useful to detect infinite loops or processes stuck in other
108situations.
109.TP
110.B \-q, \-\-quiet
111Hide the output of the fuzzed application. This is useful if the application
112is very verbose but only its exit code is really useful to you.
113.TP
114.B \-i, \-\-include <regex>
115Only fuzz files whose name matches the
116.B <regex>
117regular expression. Use this for instance if your application reads
118configuration files in many places and you do not want them to be fuzzed.
119.TP
120.B \-e, \-\-exclude <regex>
121Do not fuzz files whose name matches the
122.B <regex>
123regular expression. This option supersedes anything that is specified by the
124.B \-\-exclude
125flag. Use this for instance if you do not know for sure what files your
126application is going to read, but do not want it to fuzz files in the
127.B /etc
128directory.
129.TP
130.B \-d, \-\-debug
131Activate the display of debug messages.
132.TP
133.B \-h, \-\-help
134Display a short help message and exit.
135.TP
136.B \-v, \-\-version
137Output version information and exit.
138.RI
139.SH EXAMPLES
140Fuzz the input of the
141.B cat
142program using default settings:
143.nf
144
145.B % zzuf cat /etc/motd
146
147.fi
148Fuzz 1% of the input bits of the
149.B cat
150program using seed 94324:
151.nf
152
153.B % zzuf -s 94324 -r 0.01 cat /etc/motd
154
155.fi
156Fuzz the input of the
157.B convert
158program, using file
159.B foo.jpeg
160as the original input and restricting fuzzing to filenames matching the
161regular expression
162.B "foo[.]jpeg"
163(because
164.B convert
165will also open its own configuration files and we do not want
166.B zzuf
167to fuzz them):
168.nf
169
170.B % zzuf -i "foo[.]jpeg" convert -- foo.jpeg -format tga /dev/null
171
172.fi
173Fuzz the input of
174.BR vlc ,
175using file
176.B movie.avi
177as the original input, and generate
178.B fuzzy-movie.avi
179which is a file that can be fed to
180.B vlc
181to reproduce the same behaviour without using
182.BR zzuf :
183.fn
184
185.B % zzuf -s 87423 -r 0.01 vlc movie.avi
186
187.B % zzuf -s 87423 -r 0.01 cp movie.avi fuzzy-movie.avi
188
189.B % vlc fuzzy-movie.avi
190
191.fi
192Fuzz
193.BR mplayer 's
194input with seeds 0 to 9999, launching up to 3 simultaneous child processes
195and killing
196.BR mplayer
197if it takes more than one minute to read the file:
198.fn
199
200.B % zzuf -q -s 0:10000 -F 3 -T 60 -r 0.02 -i movie.avi mplayer movie.avi -- -benchmark -vo null -fps 1000
201
202.fi
203.RI
204.SH BUGS
205Only the most common file operations are implemented as of now:
206.BR open (),
207.BR read (),
208.BR fopen (),
209.BR fseek (),
210etc. One important unimplemented function is
211.BR fscanf ().
212
213Network fuzzing is not implemented. It is not yet possible to insert or
214drop bytes from the input, to fuzz according to the file format, or to do
215all these complicated operations. They are planned, though.
216.RI
217.SH AUTHOR
218.B Zzuf
219and this manual page were written by Sam Hocevar <sam@zoy.org>. There is a
220webpage available at http://sam.zoy.org/zzuf/
Note: See TracBrowser for help on using the repository browser.