1 | .TH zzuf 1 "2010-01-31" "zzuf @PACKAGE_VERSION@" |
---|
2 | .SH NAME |
---|
3 | zzuf \- multiple purpose fuzzer |
---|
4 | .SH SYNOPSIS |
---|
5 | \fBzzuf\fR [\fB\-aAcdimnqSvx\fR] |
---|
6 | [\fB\-s\fR \fIseed\fR|\fB\-s\fR \fIstart:stop\fR] |
---|
7 | [\fB\-r\fR \fIratio\fR|\fB\-r\fR \fImin:max\fR] |
---|
8 | [\fB\-f\fR \fIfuzzing\fR] [\fB\-D\fR \fIdelay\fR] [\fB\-j\fR \fIjobs\fR] |
---|
9 | [\fB\-C\fR \fIcrashes\fR] [\fB\-B\fR \fIbytes\fR] [\fB\-t\fR \fIseconds\fR] |
---|
10 | [\fB\-T\fR \fIseconds\fR] [\fB\-U\fR \fIseconds\fR] [\fB\-M\fR \fImebibytes\fR] |
---|
11 | [\fB\-b\fR \fIranges\fR] [\fB\-p\fR \fIports\fR] [\fB\-P\fR \fIprotect\fR] |
---|
12 | [\fB\-R\fR \fIrefuse\fR] [\fB\-l\fR \fIlist\fR] [\fB\-I\fR \fIinclude\fR] |
---|
13 | [\fB\-E\fR \fIexclude\fR] [\fIPROGRAM\fR [\fIARGS\fR]...] |
---|
14 | .br |
---|
15 | \fBzzuf \-h\fR | \fB\-\-help\fR |
---|
16 | .br |
---|
17 | \fBzzuf \-V\fR | \fB\-\-version\fR |
---|
18 | .SH DESCRIPTION |
---|
19 | .PP |
---|
20 | \fBzzuf\fR is a transparent application input fuzzer. It works by intercepting |
---|
21 | file and network operations and changing random bits in the program's input. |
---|
22 | \fBzzuf\fR's behaviour is deterministic, making it easy to reproduce bugs. |
---|
23 | .SH USAGE |
---|
24 | .PP |
---|
25 | \fBzzuf\fR will run an application specified on its command line, one or |
---|
26 | several times, with optional arguments, and will report the application's |
---|
27 | relevant behaviour on the standard error channel, eg: |
---|
28 | .PP |
---|
29 | \fB zzuf cat /dev/zero\fR |
---|
30 | .PP |
---|
31 | Flags found after the application name are considered arguments for the |
---|
32 | application, not for \fBzzuf\fR. For instance, \fB\-v\fR below is an |
---|
33 | argument for \fBcat\fR: |
---|
34 | .PP |
---|
35 | \fB zzuf \-B 1000 cat \-v /dev/zero\fR |
---|
36 | .PP |
---|
37 | When no program is specified, \fBzzuf\fR simply fuzzes the standard input, as |
---|
38 | if the \fBcat\fR utility had been called: |
---|
39 | .PP |
---|
40 | \fB zzuf < /dev/zero\fR |
---|
41 | .SH OPTIONS |
---|
42 | .TP |
---|
43 | \fB\-a\fR, \fB\-\-allow\fR=\fIlist\fR |
---|
44 | Only fuzz network input for IPs in \fIlist\fR, a comma-separated list of |
---|
45 | IP addresses. If the list starts with \fB!\fR, the flag meaning is reversed |
---|
46 | and all addresses are fuzzed except the ones in the list. |
---|
47 | |
---|
48 | As of now, this flag only understands INET (IPv4) addresses. |
---|
49 | |
---|
50 | This option requires network fuzzing to be activated using \fB\-n\fR. |
---|
51 | .TP |
---|
52 | \fB\-A\fR, \fB\-\-autoinc\fR |
---|
53 | Increment random seed each time a new file is opened. This is only required |
---|
54 | if one instance of the application is expected to open the same file several |
---|
55 | times and you want to test a different seed each time. |
---|
56 | .TP |
---|
57 | \fB\-b\fR, \fB\-\-bytes\fR=\fIranges\fR |
---|
58 | Restrict fuzzing to bytes whose offsets in the file are within \fIranges\fR. |
---|
59 | |
---|
60 | Range values start at zero and are inclusive. Use dashes between range values |
---|
61 | and commas between ranges. If the right-hand part of a range is ommited, it |
---|
62 | means end of file. For instance, to restrict fuzzing to bytes 0, 3, 4, 5 and |
---|
63 | all bytes after offset 31, use \(oq\fB\-b0,3\-5,31\-\fR\(cq. |
---|
64 | |
---|
65 | This option is useful to preserve file headers or corrupt only a specific |
---|
66 | portion of a file. |
---|
67 | .TP |
---|
68 | \fB\-B\fR, \fB\-\-max\-bytes\fR=\fIn\fR |
---|
69 | Automatically stop after \fIn\fR bytes have been output. |
---|
70 | |
---|
71 | This either terminates child processes that output more than \fIn\fR bytes |
---|
72 | on the standard output and standard error channels, or stop reading from |
---|
73 | standard input if no program is being fuzzed. |
---|
74 | |
---|
75 | This is useful to detect infinite loops. See also the \fB\-U\fR and \fB\-T\fR |
---|
76 | flags. |
---|
77 | .TP |
---|
78 | \fB\-c\fR, \fB\-\-cmdline\fR |
---|
79 | Only fuzz files whose name is specified in the target application's command |
---|
80 | line. This is mostly a shortcut to avoid specifying twice the argument: |
---|
81 | |
---|
82 | \fB zzuf \-c cat file.txt\fR |
---|
83 | |
---|
84 | has the same effect as |
---|
85 | |
---|
86 | \fB zzuf \-I \(aq^file\\.txt$\(aq cat file.txt\fR |
---|
87 | |
---|
88 | See the \fB\-I\fR flag for more information on restricting fuzzing to |
---|
89 | specific files. |
---|
90 | .TP |
---|
91 | \fB\-C\fR, \fB\-\-max\-crashes\fR=\fIn\fR |
---|
92 | Stop forking when at least \fIn\fR children have crashed. The default value |
---|
93 | is 1, meaning \fBzzuf\fR will stop as soon as one child has crashed. A value |
---|
94 | of 0 tells \fBzzuf\fR to never stop. |
---|
95 | |
---|
96 | Note that \fBzzuf\fR will not kill any remaining children once \fIn\fR is |
---|
97 | reached. To ensure that processes do not last forever, see the \fB\-U\fR |
---|
98 | flag. |
---|
99 | |
---|
100 | A process is considered to have crashed if any signal (such as, but not limited |
---|
101 | to, \fBSIGSEGV\fR) caused it to exit. If the \fB\-x\fR flag is used, this will |
---|
102 | also include processes that exit with a non-zero status. |
---|
103 | |
---|
104 | This option is only relevant if the \fB\-s\fR flag is used with a range |
---|
105 | argument. See also the \fB\-t\fR flag. |
---|
106 | .TP |
---|
107 | \fB\-d\fR, \fB\-\-debug\fR |
---|
108 | Activate the display of debug messages. Can be specified multiple times for |
---|
109 | increased verbosity. |
---|
110 | .TP |
---|
111 | \fB\-D\fR, \fB\-\-delay\fR=\fIdelay\fR |
---|
112 | Do not launch more than one process every \fIdelay\fR seconds. This option |
---|
113 | should be used together with \fB\-j\fR to avoid fork bombs. |
---|
114 | .TP |
---|
115 | \fB\-E\fR, \fB\-\-exclude\fR=\fIregex\fR |
---|
116 | Do not fuzz files whose name matches the \fIregex\fR regular expression. This |
---|
117 | option supersedes anything that is specified by the \fB\-I\fR flag. Use this |
---|
118 | for instance if you are unsure of what files your application is going to read |
---|
119 | and do not want it to fuzz files in the \fB/etc\fR directory. |
---|
120 | |
---|
121 | Multiple \fB\-E\fR flags can be specified, in which case files matching any one |
---|
122 | of the regular expressions will be ignored. |
---|
123 | .TP |
---|
124 | \fB\-f\fR, \fB\-\-fuzzing\fR=\fImode\fR |
---|
125 | Select how the input is fuzzed. Valid values for \fImode\fR are: |
---|
126 | .RS |
---|
127 | .TP |
---|
128 | \fBxor\fR |
---|
129 | randomly set and unset bits |
---|
130 | .TP |
---|
131 | \fBset\fR |
---|
132 | only set bits |
---|
133 | .TP |
---|
134 | \fBunset\fR |
---|
135 | only unset bits |
---|
136 | .RE |
---|
137 | .IP |
---|
138 | The default value for \fImode\fR is \fBxor\fR. |
---|
139 | .TP |
---|
140 | \fB\-j\fR, \fB\-\-jobs\fR=\fIjobs\fR |
---|
141 | Specify the number of simultaneous children that can be run. By default, |
---|
142 | \fBzzuf\fR only launches one process at a time. |
---|
143 | |
---|
144 | This option is only relevant if the \fB\-s\fR flag is used with a range |
---|
145 | argument. See also the \fB\-D\fR flag. |
---|
146 | .TP |
---|
147 | \fB\-i\fR, \fB\-\-stdin\fR |
---|
148 | Fuzz the application's standard input. By default \fBzzuf\fR only fuzzes files. |
---|
149 | .TP |
---|
150 | \fB\-I\fR, \fB\-\-include\fR=\fIregex\fR |
---|
151 | Only fuzz files whose name matches the \fIregex\fR regular expression. Use |
---|
152 | this for instance if your application reads configuration files at startup |
---|
153 | and you only want specific files to be fuzzed. |
---|
154 | |
---|
155 | Multiple \fB\-I\fR flags can be specified, in which case files matching any one |
---|
156 | of the regular expressions will be fuzzed. See also the \fB\-c\fR flag. |
---|
157 | .TP |
---|
158 | \fB\-l\fR, \fB\-\-list\fR=\fIlist\fR |
---|
159 | Cherry-pick the list of file descriptors that get fuzzed. The Nth descriptor |
---|
160 | will really be fuzzed only if N is in \fIlist\fR. |
---|
161 | |
---|
162 | Values start at 1 and ranges are inclusive. Use dashes between values and |
---|
163 | commas between ranges. If the right-hand part of a range is ommited, it means |
---|
164 | all subsequent file descriptors. For instance, to restrict fuzzing to the |
---|
165 | first opened descriptor and all descriptors starting from the 10th, use |
---|
166 | \(oq\fB\-l1,10\-\fR\(cq. |
---|
167 | |
---|
168 | Note that this option only affects file descriptors that would otherwise be |
---|
169 | fuzzed. Even if 10 write-only descriptors are opened at the beginning of the |
---|
170 | program, only the next descriptor with a read flag will be the first one |
---|
171 | considered by the \fB\-l\fR flag. |
---|
172 | .TP |
---|
173 | \fB\-m\fR, \fB\-\-md5\fR |
---|
174 | Instead of displaying the program's \fIstandard output\fR, just print its MD5 |
---|
175 | digest to \fBzzuf\fR's standard output. The standard error channel is left |
---|
176 | untouched. |
---|
177 | .TP |
---|
178 | \fB\-M\fR, \fB\-\-max\-memory\fR=\fImebibytes\fR |
---|
179 | Specify the maximum amount of memory, in mebibytes (1 MiB = 1,048,576 bytes), |
---|
180 | that children are allowed to allocate. This is useful to detect infinite loops |
---|
181 | that eat up a lot of memory. |
---|
182 | |
---|
183 | The value should be set reasonably high so as not to interfer with normal |
---|
184 | program operation. By default, it is set to 1024 MiB in order to avoid |
---|
185 | accidental excessive swapping. To disable the limitation, set the maximum |
---|
186 | memory usage to -1 instead. |
---|
187 | |
---|
188 | \fBzzuf\fR uses the \fBsetrlimit\fR() call to set memory usage limitations and |
---|
189 | relies on the operating system's ability to enforce such limitations. |
---|
190 | .TP |
---|
191 | \fB\-n\fR, \fB\-\-network\fR |
---|
192 | Fuzz the application's network input. By default \fBzzuf\fR only fuzzes files. |
---|
193 | |
---|
194 | Only INET (IPv4) and INET6 (IPv6) connections are fuzzed. Other protocol |
---|
195 | families are not yet supported. |
---|
196 | .TP |
---|
197 | \fB\-p\fR, \fB\-\-ports\fR=\fIranges\fR |
---|
198 | Only fuzz network ports that are in \fIranges\fR. By default \fBzzuf\fR |
---|
199 | fuzzes all ports. The port considered is the listening port if the socket |
---|
200 | is listening and the destination port if the socket is connecting, because |
---|
201 | most of the time the source port cannot be predicted. |
---|
202 | |
---|
203 | Range values start at zero and are inclusive. Use dashes between range values |
---|
204 | and commas between ranges. If the right-hand part of a range is ommited, it |
---|
205 | means end of file. For instance, to restrict fuzzing to the HTTP and HTTPS |
---|
206 | ports and to all unprivileged ports, use \(oq\fB\-p80,443,1024\-\fR\(cq. |
---|
207 | |
---|
208 | This option requires network fuzzing to be activated using \fB\-n\fR. |
---|
209 | .TP |
---|
210 | \fB\-P\fR, \fB\-\-protect\fR=\fIlist\fR |
---|
211 | Protect a list of characters so that if they appear in input data that would |
---|
212 | normally be fuzzed, they are left unmodified instead. |
---|
213 | |
---|
214 | Characters in \fIlist\fR can be expressed verbatim or through escape sequences. |
---|
215 | The sequences interpreted by \fBzzuf\fR are: |
---|
216 | .RS |
---|
217 | .TP |
---|
218 | \fB\\n\fR |
---|
219 | new line |
---|
220 | .TP |
---|
221 | \fB\\r\fR |
---|
222 | return |
---|
223 | .TP |
---|
224 | \fB\\t\fR |
---|
225 | tabulation |
---|
226 | .TP |
---|
227 | \fB\\\fR\fINNN\fR |
---|
228 | the byte whose octal value is \fINNN\fR |
---|
229 | .TP |
---|
230 | \fB\\x\fR\fINN\fR |
---|
231 | the byte whose hexadecimal value is \fINN\fR |
---|
232 | .TP |
---|
233 | \fB\\\\\fR |
---|
234 | backslash (\(oq\\\(cq) |
---|
235 | .RE |
---|
236 | .IP |
---|
237 | You can use \(oq\fB\-\fR\(cq to specify ranges. For instance, to protect all |
---|
238 | bytes from \(oq\\001\(cq to \(oq/\(cq, use \(oq\fB\-P\ \(aq\\001\-/\(aq\fR\(cq. |
---|
239 | |
---|
240 | The statistical outcome of this option should not be overlooked: if characters |
---|
241 | are protected, the effect of the \(oq\fB\-r\fR\(cq flag will vary depending |
---|
242 | on the data being fuzzed. For instance, asking to fuzz 1% of input bits |
---|
243 | (\fB\-r0.01\fR) and to protect lowercase characters (\fB\-P\ a\-z\fR) will |
---|
244 | result in an actual average fuzzing ratio of 0.9% with truly random data, |
---|
245 | 0.3% with random ASCII data and 0.2% with standard English text. |
---|
246 | |
---|
247 | See also the \fB\-R\fR flag. |
---|
248 | .TP |
---|
249 | \fB\-q\fR, \fB\-\-quiet\fR |
---|
250 | Hide the output of the fuzzed application. This is useful if the application |
---|
251 | is very verbose but only its exit code or signaled status is really useful to |
---|
252 | you. |
---|
253 | .TP |
---|
254 | \fB\-r\fR, \fB\-\-ratio\fR=\fIratio\fR |
---|
255 | .PD 0 |
---|
256 | .TP |
---|
257 | \fB\-r\fR, \fB\-\-ratio\fR=\fImin:max\fR |
---|
258 | .PD |
---|
259 | Specify the proportion of bits that will be randomly fuzzed. A value of 0 |
---|
260 | will not fuzz anything. A value of 0.05 will fuzz 5% of the open files' |
---|
261 | bits. A value of 1.0 or more will fuzz all the bytes, theoretically making |
---|
262 | the input files undiscernible from random data. The default fuzzing ratio |
---|
263 | is 0.004 (fuzz 0.4% of the files' bits). |
---|
264 | |
---|
265 | A range can also be specified. When doing so, \fBzzuf\fR will pick ratio |
---|
266 | values from the interval. The choice is deterministic and only depends on |
---|
267 | the interval bounds and the current seed. |
---|
268 | .TP |
---|
269 | \fB\-R\fR, \fB\-\-refuse\fR=\fIlist\fR |
---|
270 | Refuse a list of characters by not fuzzing bytes that would otherwise be |
---|
271 | changed to a character that is in \fIlist\fR. This does not prevent characters |
---|
272 | from appearing in the output if the original byte was already in \fIlist\fR. |
---|
273 | |
---|
274 | See the \fB\-P\fR option for a description of \fIlist\fR. |
---|
275 | .TP |
---|
276 | \fB\-s\fR, \fB\-\-seed\fR=\fIseed\fR |
---|
277 | .PD 0 |
---|
278 | .TP |
---|
279 | \fB\-s\fR, \fB\-\-seed\fR=\fIstart:stop\fR |
---|
280 | .PD |
---|
281 | Specify the random seed to use for fuzzing, or a range of random seeds. |
---|
282 | Running \fBzzuf\fR twice with the same random seed will fuzz the files exactly |
---|
283 | the same way, even with a different target application. The purpose of this is |
---|
284 | to use simple utilities such as \fBcat\fR or \fBcp\fR to generate a file that |
---|
285 | causes the target application to crash. |
---|
286 | |
---|
287 | If a range is specified, \fBzzuf\fR will run the application several times, |
---|
288 | each time with a different seed, and report the behaviour of each run. If the |
---|
289 | \(oq:\(cq character is used but the second part of the range is omitted, |
---|
290 | \fBzzuf\fR will increment the seed value indefinitely. |
---|
291 | .TP |
---|
292 | \fB\-S\fR, \fB\-\-signal\fR |
---|
293 | Prevent children from installing signal handlers for signals that usually |
---|
294 | cause coredumps. These signals are \fBSIGABRT\fR, \fBSIGFPE\fR, \fBSIGILL\fR, |
---|
295 | \fBSIGQUIT\fR, \fBSIGSEGV\fR, \fBSIGTRAP\fR and, if available on the running |
---|
296 | platform, \fBSIGSYS\fR, \fBSIGEMT\fR, \fBSIGBUS\fR, \fBSIGXCPU\fR and |
---|
297 | \fBSIGXFSZ\fR. Instead of calling the signal handler, the application will |
---|
298 | simply crash. If you do not want core dumps, you should set appropriate limits |
---|
299 | with the \fBlimit coredumpsize\fR command. See your shell's documentation on |
---|
300 | how to set such limits. |
---|
301 | .TP |
---|
302 | \fB\-t\fR, \fB\-\-max\-time\fR=\fIn\fR |
---|
303 | Stop forking after \fIn\fR seconds. By default, \fBzzuf\fR runs until the |
---|
304 | end of the seed range is reached. |
---|
305 | |
---|
306 | Note that \fBzzuf\fR will not kill any remaining children once \fIn\fR is |
---|
307 | reached. To ensure that processes do not last forever, see the \fB\-U\fR |
---|
308 | flag. |
---|
309 | |
---|
310 | This option is only relevant if the \fB\-s\fR flag is used with a range |
---|
311 | argument. See also the \fB\-C\fR flag. |
---|
312 | .TP |
---|
313 | \fB\-T\fR, \fB\-\-max\-cputime\fR=\fIn\fR |
---|
314 | Automatically terminate child processes that use more than \fIn\fR seconds |
---|
315 | of CPU time. |
---|
316 | |
---|
317 | \fBzzuf\fR uses the \fBsetrlimit\fR() call to set CPU usage limitations and |
---|
318 | relies on the operating system's ability to enforce such limitations. If the |
---|
319 | system sends \fBSIGXCPU\fR signals and the application catches that signal, |
---|
320 | it will receive a \fBSIGKILL\fR signal after 5 seconds. |
---|
321 | |
---|
322 | This is more accurate than \fB\-U\fR because the behaviour should be |
---|
323 | independent from the system load, but it does not detect processes stuck into |
---|
324 | infinite \fBselect\fR() calls because they use very little CPU time. See also |
---|
325 | the \fB\-B\fR and \fB\-U\fR flags. |
---|
326 | .TP |
---|
327 | \fB\-U\fR, \fB\-\-max\-usertime\fR=\fIn\fR |
---|
328 | Automatically terminate child processes that run for more than \fIn\fR |
---|
329 | seconds. This is useful to detect infinite loops or processes stuck in other |
---|
330 | situations. See also the \fB\-B\fR and \fB\-T\fR flags. |
---|
331 | .TP |
---|
332 | \fB\-v\fR, \fB\-\-verbose\fR |
---|
333 | Print information during the run, such as the current seed, what processes |
---|
334 | get run, their exit status, etc. |
---|
335 | .TP |
---|
336 | \fB\-x\fR, \fB\-\-check\-exit\fR |
---|
337 | Report processes that exit with a non-zero status. By default only processes |
---|
338 | that crash due to a signal are reported. |
---|
339 | .TP |
---|
340 | \fB\-h\fR, \fB\-\-help\fR |
---|
341 | Display a short help message and exit. |
---|
342 | .TP |
---|
343 | \fB\-V\fR, \fB\-\-version\fR |
---|
344 | Output version information and exit. |
---|
345 | .SH DIAGNOSTICS |
---|
346 | .PP |
---|
347 | Exit status is zero if no child process crashed. If one or several children |
---|
348 | crashed, \fBzzuf\fR exits with status 1. |
---|
349 | .SH EXAMPLES |
---|
350 | .PP |
---|
351 | Fuzz the input of the \fBcat\fR program using default settings: |
---|
352 | .PP |
---|
353 | \fB zzuf cat /etc/motd\fR |
---|
354 | .PP |
---|
355 | Fuzz 1% of the input bits of the \fBcat\fR program using seed 94324: |
---|
356 | .PP |
---|
357 | \fB zzuf \-s94324 \-r0.01 cat /etc/motd\fR |
---|
358 | .PP |
---|
359 | Fuzz the input of the \fBcat\fR program but do not fuzz newline characters |
---|
360 | and prevent non-ASCII characters from appearing in the output: |
---|
361 | .PP |
---|
362 | \fB zzuf \-P \(aq\\n\(aq \-R \(aq\\x00\-\\x1f\\x7f\-\\xff\(aq cat /etc/motd\fR |
---|
363 | .PP |
---|
364 | Fuzz the input of the \fBconvert\fR program, using file \fBfoo.jpeg\fR as the |
---|
365 | original input and excluding \fB.xml\fR files from fuzzing (because |
---|
366 | \fBconvert\fR will also open its own XML configuration files and we do not |
---|
367 | want \fBzzuf\fR to fuzz them): |
---|
368 | .PP |
---|
369 | \fB zzuf \-E \(aq\\.xml$\(aq convert foo.jpeg \-format tga /dev/null\fR |
---|
370 | .PP |
---|
371 | Fuzz the input of VLC, using file \fBmovie.avi\fR as the original input |
---|
372 | and restricting fuzzing to filenames that appear on the command line |
---|
373 | (\fB\-c\fR), then generate \fBfuzzy\-movie.avi\fR which is a file that |
---|
374 | can be read by VLC to reproduce the same behaviour without using |
---|
375 | \fBzzuf\fR: |
---|
376 | .PP |
---|
377 | \fB zzuf \-c \-s87423 \-r0.01 vlc movie.avi\fR |
---|
378 | .br |
---|
379 | \fB zzuf \-c \-s87423 \-r0.01 <movie.avi >fuzzy\-movie.avi\fR |
---|
380 | .br |
---|
381 | \fB vlc fuzzy\-movie.avi\fR |
---|
382 | .PP |
---|
383 | Fuzz between 0.1% and 2% of MPlayer's input bits (\fB\-r0.001:0.02\fR) |
---|
384 | with seeds 0 to 9999 (\fB\-s0:10000\fR), preserving the AVI 4-byte header |
---|
385 | by restricting fuzzing to offsets after 4 (\fB\-b4\-\fR), disabling its |
---|
386 | standard output messages (\fB\-q\fR), launching up to five simultaneous child |
---|
387 | processes (\fB\-j5\fR) but waiting at least half a second between launches |
---|
388 | (\fB\-D0.5\fR), killing MPlayer if it takes more than one minute to |
---|
389 | read the file (\fB\-T60\fR) and disabling its \fBSIGSEGV\fR signal handler |
---|
390 | (\fB\-S\fR): |
---|
391 | .PP |
---|
392 | \fB zzuf \-c \-r0.001:0.02 \-s0:10000 \-b4\- \-q \-j5 \-D0.5 \-T60 \-S \\\fR |
---|
393 | .br |
---|
394 | \fB mplayer \-benchmark \-vo null \-fps 1000 movie.avi\fR |
---|
395 | .PP |
---|
396 | A more advanced VLC fuzzing example, stopping only at the first crash: |
---|
397 | .PP |
---|
398 | \fB zzuf \-j4 \-vqc \-r0.000001:0.01 \-s0: vlc \-v \-I dummy movie.avi \\\fR |
---|
399 | .br |
---|
400 | \fB \-\-sout \(aq#transcode{acodec=s16l,vcodec=I420}:dummy\(aq vlc:quit |
---|
401 | .PP |
---|
402 | Create an HTML-like file that loads 200 times the same \fBhello.jpg\fR image |
---|
403 | and open it in Firefox\(tm in auto-increment mode (\fB\-A\fR): |
---|
404 | .PP |
---|
405 | \fB seq \-f \(aq<img src="hello.jpg#%g">\(aq 1 200 > hello.html\fR |
---|
406 | .br |
---|
407 | (or: \fBjot \-w \(aq<img src="hello.jpg#%d">\(aq 200 1 > hello.html\fR) |
---|
408 | .br |
---|
409 | \fB zzuf \-A \-I \(aqhello[.]jpg\(aq \-r0.001 firefox hello.html\fR |
---|
410 | .PP |
---|
411 | Run a simple HTTP redirector on the local host using \fBsocat\fR and |
---|
412 | corrupt each network connection (\fB\-n\fR) in a different way (\fB\-A\fR) |
---|
413 | after one megabyte of data was received on it (\fB\-b1000000\-\fR): |
---|
414 | .PP |
---|
415 | \fB zzuf \-n \-A \-b1000000\- \\\fR |
---|
416 | \fB socat TCP4\-LISTEN:8080,reuseaddr,fork TCP4:192.168.1.42:80\fR |
---|
417 | .PP |
---|
418 | Browse the intarweb (\fB\-n\fR) using Firefox\(tm without fuzzing local files |
---|
419 | (\fB\-E.\fR) or non-HTTP connections (\fB\-p80,8010,8080\fR), preserving |
---|
420 | the beginning of the data sent with each HTTP response (\fB\-b4000\-\fR) |
---|
421 | and using another seed on each connection (\fB\-A\fR): |
---|
422 | .PP |
---|
423 | \fB zzuf \-r 0.0001 \-n \-E. \-p80,8010,8080 \-b4000\- \-A firefox\fR |
---|
424 | .SH RESTRICTIONS |
---|
425 | .PP |
---|
426 | Due to \fBzzuf\fR using shared object preloading (\fBLD_PRELOAD\fR, |
---|
427 | \fB_RLD_LIST\fB, \fBDYLD_INSERT_LIBRARIES\fR, etc.) to run its child |
---|
428 | processes, it will fail in the presence of any mechanism that disables |
---|
429 | preloading. For instance setuid root binaries will not be fuzzed when run |
---|
430 | as an unprivileged user. |
---|
431 | .PP |
---|
432 | For the same reasons, \fBzzuf\fR will also not work with statically linked |
---|
433 | binaries. Bear this in mind when using \fBzzuf\fR on the OpenBSD platform, |
---|
434 | where \fBcat\fR, \fBcp\fR and \fBdd\fR are static binaries. |
---|
435 | .PP |
---|
436 | Though best efforts are made, identical behaviour for different versions of |
---|
437 | \fBzzuf\fR is not guaranteed. The reproducibility for subsequent calls on |
---|
438 | different operating systems and with different target programs is only |
---|
439 | guaranteed when the same version of \fBzzuf\fR is being used. |
---|
440 | .SH BUGS |
---|
441 | .PP |
---|
442 | \fBzzuf\fR probably does not behave correctly with 64-bit offsets. |
---|
443 | .PP |
---|
444 | It is not yet possible to insert or drop bytes from the input, to fuzz |
---|
445 | according to the file format, to swap bytes, etc. More advanced fuzzing |
---|
446 | methods are planned. |
---|
447 | .PP |
---|
448 | As of now, \fBzzuf\fR does not really support multithreaded applications. The |
---|
449 | behaviour with multithreaded applications where more than one thread does file |
---|
450 | descriptor operations is undefined. |
---|
451 | .SH HISTORY |
---|
452 | .PP |
---|
453 | \fBzzuf\fR started its life in 2002 as the \fBstreamfucker\fR tool, a small |
---|
454 | multimedia stream corrupter used to find bugs in the VLC media player. |
---|
455 | .SH SEE ALSO |
---|
456 | .PP |
---|
457 | \fBlibzzuf(3)\fR, \fBzzat(1)\fR |
---|
458 | .SH AUTHOR |
---|
459 | .PP |
---|
460 | Copyright \(co 2002\-2010 Sam Hocevar <sam@hocevar.net>. |
---|
461 | .PP |
---|
462 | \fBzzuf\fR and this manual page are free software. They come without any |
---|
463 | warranty, to the extent permitted by applicable law. You can redistribute |
---|
464 | them and/or modify them under the terms of the Do What The Fuck You Want |
---|
465 | To Public License, Version 2, as published by Sam Hocevar. See |
---|
466 | \fBhttp://sam.zoy.org/wtfpl/COPYING\fR for more details. |
---|
467 | .PP |
---|
468 | \fBzzuf\fR's webpage can be found at \fBhttp://caca.zoy.org/wiki/zzuf\fR. |
---|
469 | An overview of the architecture and inner works is at |
---|
470 | \fBhttp://caca.zoy.org/wiki/zzuf/internals\fR. |
---|