[1507] | 1 | .TH zzuf 1 "2006-12-22" "zzuf" |
---|
| 2 | .SH NAME |
---|
| 3 | zzuf \- multiple purpose fuzzer |
---|
| 4 | .SH SYNOPSIS |
---|
[1705] | 5 | \fBzzuf\fR [\fB\-AcdimnqSvx\fR] [\fB\-s\fR \fIseed\fR|\fB\-s\fR \fIstart:stop\fR] [\fB\-r\fR \fIratio\fR|\fB\-r\fR \fImin:max\fR] |
---|
[1539] | 6 | .br |
---|
[1720] | 7 | [\fB\-f\fR \fIfuzzing\fR] [\fB\-D\fR \fIdelay\fR] [\fB\-F\fR \fIforks\fR] [\fB\-C\fR \fIcrashes\fR] [\fB\-B\fR \fIbytes\fR] |
---|
[1539] | 8 | .br |
---|
[1720] | 9 | [\fB\-T\fR \fIseconds\fR] [\fB\-M\fR \fImegabytes\fR] [\fB\-P\fR \fIprotect\fR] [\fB\-R\fR \fIrefuse\fR] |
---|
[1555] | 10 | .br |
---|
[1720] | 11 | [\fB\-b\fR \fIranges\fR] [\fB\-I\fR \fIinclude\fR] [\fB\-E\fR \fIexclude\fR] [\fIPROGRAM\fR [\fB\-\-\fR] [\fIARGS\fR]...] |
---|
[1539] | 12 | .br |
---|
| 13 | \fBzzuf \-h\fR | \fB\-\-help\fR |
---|
| 14 | .br |
---|
[1666] | 15 | \fBzzuf \-V\fR | \fB\-\-version\fR |
---|
[1507] | 16 | .SH DESCRIPTION |
---|
[1539] | 17 | .PP |
---|
[1656] | 18 | \fBzzuf\fR is a transparent application input fuzzer. It works by intercepting |
---|
[1569] | 19 | file and network operations and changing random bits in the program's input. |
---|
[1656] | 20 | \fBzzuf\fR's behaviour is deterministic, making it easy to reproduce bugs. |
---|
[1507] | 21 | .SH USAGE |
---|
[1539] | 22 | .PP |
---|
[1656] | 23 | \fBzzuf\fR will run an application specified on its command line, one or |
---|
[1539] | 24 | several times, with optional arguments, and will report the application's |
---|
[1669] | 25 | relevant behaviour on the standard error channel, eg: |
---|
[1539] | 26 | .PP |
---|
[1559] | 27 | \fB zzuf cat /dev/zero\fR |
---|
[1557] | 28 | .PP |
---|
[1559] | 29 | If you want to specify flags for your application, put a \(oq\fB\-\-\fR\(cq |
---|
[1557] | 30 | marker before them on the command line (otherwise \fBzzuf\fR will try to |
---|
| 31 | interpret them as arguments for itself), eg: |
---|
| 32 | .PP |
---|
[1633] | 33 | \fB zzuf \-B 1000 cat \-\- \-v /dev/zero\fR |
---|
[1616] | 34 | .PP |
---|
| 35 | When no program is specified, \fBzzuf\fR simply fuzzes the standard input, as |
---|
| 36 | if the \fBcat\fR utility had been called: |
---|
| 37 | .PP |
---|
| 38 | \fB zzuf < /dev/zero\fR |
---|
[1507] | 39 | .SH OPTIONS |
---|
| 40 | .TP |
---|
[1663] | 41 | \fB\-A\fR, \fB\-\-autoinc\fR |
---|
| 42 | Increment random seed each time a new file is opened. This is only required |
---|
[1672] | 43 | if one instance of the application is expected to open the same file several |
---|
| 44 | times and you want to test a different seed each time. |
---|
[1663] | 45 | .TP |
---|
[1705] | 46 | \fB\-b\fR, \fB\-\-bytes\fR=\fIranges\fR |
---|
| 47 | Restrict fuzzing to bytes whose offsets in the file are within \fIranges\fR. |
---|
| 48 | |
---|
| 49 | Range values start at zero and are inclusive. Use dashes between range values |
---|
| 50 | and commas between ranges. If the right-hand part of a range is ommited, it |
---|
| 51 | means end of file. For instance, to restrict fuzzing to bytes 0, 3, 4, 5 and |
---|
| 52 | all bytes after offset 31, use \(oq\fB\-r0,3-5,31-\fR\(cq. |
---|
| 53 | |
---|
| 54 | This option is useful to preserve file headers or corrupt only a specific |
---|
| 55 | portion of a file. |
---|
| 56 | .TP |
---|
[1633] | 57 | \fB\-B\fR, \fB\-\-max\-bytes\fR=\fIn\fR |
---|
| 58 | Automatically terminate child processes that output more than \fIn\fR bytes |
---|
| 59 | on the standard output and standard error channels. This is useful to detect |
---|
| 60 | infinite loops. See also the \fB\-T\fR flag. |
---|
| 61 | .TP |
---|
[1539] | 62 | \fB\-c\fR, \fB\-\-cmdline\fR |
---|
[1529] | 63 | Only fuzz files whose name is specified in the target application's command |
---|
[1647] | 64 | line. This is mostly a shortcut to avoid specifying twice the argument: |
---|
[1559] | 65 | |
---|
| 66 | \fB zzuf \-c cat file.txt\fR |
---|
| 67 | |
---|
| 68 | has the same effect as |
---|
| 69 | |
---|
| 70 | \fB zzuf \-I \(aq^file\\.txt$\(aq cat file.txt\fR |
---|
| 71 | |
---|
[1569] | 72 | See the \fB\-I\fR flag for more information on restricting fuzzing to |
---|
| 73 | specific files. |
---|
[1529] | 74 | .TP |
---|
[1573] | 75 | \fB\-C\fR, \fB\-\-max\-crashes\fR=\fIn\fR |
---|
| 76 | Stop forking when at least \fIn\fR children have crashed. The default value |
---|
| 77 | is 1, meaning \fBzzuf\fR will stop as soon as one child has crashed. A process |
---|
| 78 | is considered to have crashed if any signal (such as, but not limited to, |
---|
[1634] | 79 | \fBSIGSEGV\fR) caused it to exit. If the \fB\-x\fR flag is used, this will |
---|
| 80 | also include processes that exit with a non-zero status. |
---|
[1573] | 81 | |
---|
[1673] | 82 | This option is only relevant if the \fB\-s\fR flag is used with a range |
---|
[1573] | 83 | argument. |
---|
| 84 | .TP |
---|
[1539] | 85 | \fB\-d\fR, \fB\-\-debug\fR |
---|
[1531] | 86 | Activate the display of debug messages. |
---|
| 87 | .TP |
---|
[1660] | 88 | \fB\-D\fR, \fB\-\-delay\fR=\fIdelay\fR |
---|
| 89 | Do not launch more than one process every \fIdelay\fR seconds. This option |
---|
| 90 | should be used together with \fB\-F\fR to avoid fork bombs. |
---|
| 91 | .TP |
---|
[1539] | 92 | \fB\-E\fR, \fB\-\-exclude\fR=\fIregex\fR |
---|
| 93 | Do not fuzz files whose name matches the \fIregex\fR regular expression. This |
---|
| 94 | option supersedes anything that is specified by the \fB\-I\fR flag. Use this |
---|
| 95 | for instance if you are unsure of what files your application is going to read |
---|
| 96 | and do not want it to fuzz files in the \fB/etc\fR directory. |
---|
[1529] | 97 | |
---|
[1539] | 98 | Multiple \fB\-E\fR flags can be specified, in which case files matching any one |
---|
| 99 | of the regular expressions will be ignored. |
---|
[1507] | 100 | .TP |
---|
[1720] | 101 | \fB\-f\fR, \fB\-\-fuzzing\fR=\fImode\fR |
---|
| 102 | Select how the input is fuzzed. Valid values for \fImode\fR are: |
---|
| 103 | .RS |
---|
| 104 | .TP |
---|
| 105 | \fBxor\fR |
---|
| 106 | randomly set and unset bits |
---|
| 107 | .TP |
---|
| 108 | \fBset\fR |
---|
| 109 | only set bits |
---|
| 110 | .TP |
---|
| 111 | \fBunset\fR |
---|
| 112 | only unset bits |
---|
| 113 | .RE |
---|
| 114 | .IP |
---|
| 115 | The default value for \fImode\fR is \fBxor\fR. |
---|
| 116 | .TP |
---|
[1607] | 117 | \fB\-F\fR, \fB\-\-max\-forks\fR=\fIforks\fR |
---|
[1573] | 118 | Specify the number of simultaneous children that can be run. |
---|
| 119 | |
---|
[1673] | 120 | This option is only relevant if the \fB\-s\fR flag is used with a range |
---|
[1660] | 121 | argument. See also the \fB\-D\fR flag. |
---|
[1507] | 122 | .TP |
---|
[1539] | 123 | \fB\-i\fR, \fB\-\-stdin\fR |
---|
| 124 | Fuzz the application's standard input. By default \fBzzuf\fR only fuzzes files. |
---|
[1531] | 125 | .TP |
---|
[1539] | 126 | \fB\-I\fR, \fB\-\-include\fR=\fIregex\fR |
---|
| 127 | Only fuzz files whose name matches the \fIregex\fR regular expression. Use |
---|
| 128 | this for instance if your application reads configuration files at startup |
---|
| 129 | and you only want specific files to be fuzzed. |
---|
[1531] | 130 | |
---|
[1539] | 131 | Multiple \fB\-I\fR flags can be specified, in which case files matching any one |
---|
| 132 | of the regular expressions will be fuzzed. See also the \fB\-c\fR flag. |
---|
[1531] | 133 | .TP |
---|
[1640] | 134 | \fB\-m\fR, \fB\-\-md5\fR |
---|
[1680] | 135 | Instead of displaying the program's \fIstandard output\fR, just print its MD5 |
---|
| 136 | digest to \fBzzuf\fR's standard output. The standard error channel is left |
---|
| 137 | untouched. |
---|
[1623] | 138 | .TP |
---|
[1641] | 139 | \fB\-M\fR, \fB\-\-max-memory\fR=\fImegabytes\fR |
---|
| 140 | Specify the maximum amount of memory, in megabytes, that children are allowed |
---|
| 141 | to allocate. This is useful to detect infinite loops that eat up a lot of |
---|
| 142 | memory. The value should set reasonably high so as not to interfer with normal |
---|
| 143 | program operation. |
---|
| 144 | |
---|
[1656] | 145 | \fBzzuf\fR uses the \fBsetrlimit\fR() call to set memory usage limitations and |
---|
[1741] | 146 | relies on the operating system's ability to enforce such limitations. |
---|
[1641] | 147 | .TP |
---|
[1562] | 148 | \fB\-n\fR, \fB\-\-network\fR |
---|
[1560] | 149 | Fuzz the application's network input. By default \fBzzuf\fR only fuzzes files. |
---|
| 150 | .TP |
---|
[1554] | 151 | \fB\-P\fR, \fB\-\-protect\fR=\fIlist\fR |
---|
| 152 | Protect a list of characters so that if they appear in input data that would |
---|
| 153 | normally be fuzzed, they are left unmodified instead. |
---|
| 154 | |
---|
| 155 | Characters in \fIlist\fR can be expressed verbatim or through escape sequences. |
---|
| 156 | The sequences interpreted by \fBzzuf\fR are: |
---|
| 157 | .RS |
---|
| 158 | .TP |
---|
| 159 | \fB\\n\fR |
---|
| 160 | new line |
---|
| 161 | .TP |
---|
| 162 | \fB\\r\fR |
---|
| 163 | return |
---|
| 164 | .TP |
---|
| 165 | \fB\\t\fR |
---|
| 166 | tabulation |
---|
| 167 | .TP |
---|
[1563] | 168 | \fB\\\fR\fINNN\fR |
---|
| 169 | the byte whose octal value is \fINNN\fR |
---|
| 170 | .TP |
---|
[1554] | 171 | \fB\\x\fR\fINN\fR |
---|
| 172 | the byte whose hexadecimal value is \fINN\fR |
---|
| 173 | .TP |
---|
| 174 | \fB\\\\\fR |
---|
[1559] | 175 | backslash (\(oq\\\(cq) |
---|
[1554] | 176 | .RE |
---|
| 177 | .IP |
---|
[1607] | 178 | You can use \(oq\fB\-\fR\(cq to specify ranges. For instance, to protect all |
---|
[1705] | 179 | bytes from \(oq\\001\(cq to \(oq/\(cq, use \(oq\fB\-P\ \(aq\\001\-/\(aq\fR\(cq. |
---|
[1555] | 180 | |
---|
[1563] | 181 | The statistical outcome of this option should not be overlooked: if characters |
---|
| 182 | are protected, the effect of the \(oq\fB\-r\fR\(cq flag will vary depending |
---|
| 183 | on the data being fuzzed. For instance, asking to fuzz 1% of input bits |
---|
[1705] | 184 | (\fB\-r0.01\fR) and to protect lowercase characters (\fB\-P\ a\-z\fR) will |
---|
[1563] | 185 | result in an actual average fuzzing ratio of 0.9% with truly random data, |
---|
| 186 | 0.3% with random ASCII data and 0.2% with standard English text. |
---|
[1557] | 187 | |
---|
[1555] | 188 | See also the \fB\-R\fR flag. |
---|
[1554] | 189 | .TP |
---|
[1539] | 190 | \fB\-q\fR, \fB\-\-quiet\fR |
---|
[1531] | 191 | Hide the output of the fuzzed application. This is useful if the application |
---|
[1532] | 192 | is very verbose but only its exit code or signaled status is really useful to |
---|
| 193 | you. |
---|
[1531] | 194 | .TP |
---|
[1539] | 195 | \fB\-r\fR, \fB\-\-ratio\fR=\fIratio\fR |
---|
[1672] | 196 | .PD 0 |
---|
| 197 | .TP |
---|
[1698] | 198 | \fB\-r\fR, \fB\-\-ratio\fR=\fImin:max\fR |
---|
[1672] | 199 | .PD |
---|
[1557] | 200 | Specify the proportion of bits that will be randomly fuzzed. A value of 0 |
---|
[1531] | 201 | will not fuzz anything. A value of 0.05 will fuzz 5% of the open files' |
---|
| 202 | bits. A value of 1.0 or more will fuzz all the bytes, theoretically making |
---|
| 203 | the input files undiscernible from random data. The default fuzzing ratio |
---|
| 204 | is 0.004 (fuzz 0.4% of the files' bits). |
---|
[1672] | 205 | |
---|
[1673] | 206 | A range can also be specified. When doing so, \fBzzuf\fR will pick ratio |
---|
[1698] | 207 | values from the interval. The choice is deterministic and only depends on |
---|
| 208 | the interval bounds and the current seed. |
---|
[1531] | 209 | .TP |
---|
[1555] | 210 | \fB\-R\fR, \fB\-\-refuse\fR=\fIlist\fR |
---|
| 211 | Refuse a list of characters by not fuzzing bytes that would otherwise be |
---|
| 212 | changed to a character that is in \fIlist\fR. If the original byte is already |
---|
| 213 | in \fIlist\fR, it is left unchanged. |
---|
| 214 | |
---|
| 215 | See the \fB\-P\fR option for a description of \fIlist\fR. |
---|
| 216 | .TP |
---|
[1539] | 217 | \fB\-s\fR, \fB\-\-seed\fR=\fIseed\fR |
---|
[1531] | 218 | .PD 0 |
---|
| 219 | .TP |
---|
[1539] | 220 | \fB\-s\fR, \fB\-\-seed\fR=\fIstart:stop\fR |
---|
[1531] | 221 | .PD |
---|
[1673] | 222 | Specify the random seed to use for fuzzing, or a range of random seeds. |
---|
[1539] | 223 | Running \fBzzuf\fR twice with the same random seed will fuzz the files exactly |
---|
| 224 | the same way, even with a different target application. The purpose of this is |
---|
| 225 | to use simple utilities such as \fBcat\fR or \fBcp\fR to generate a file that |
---|
| 226 | causes the target application to crash. |
---|
[1531] | 227 | |
---|
[1673] | 228 | If a range is specified, \fBzzuf\fR will run the application several times, |
---|
[1539] | 229 | each time with a different seed, and report the behaviour of each run. |
---|
[1531] | 230 | .TP |
---|
[1539] | 231 | \fB\-S\fR, \fB\-\-signal\fR |
---|
[1532] | 232 | Prevent children from installing signal handlers for signals that usually |
---|
[1539] | 233 | cause coredumps. These signals are \fBSIGABRT\fR, \fBSIGFPE\fR, \fBSIGILL\fR, |
---|
| 234 | \fBSIGQUIT\fR, \fBSIGSEGV\fR, \fBSIGTRAP\fR and, if available on the running |
---|
| 235 | platform, \fBSIGSYS\fR, \fBSIGEMT\fR, \fBSIGBUS\fR, \fBSIGXCPU\fR and |
---|
| 236 | \fBSIGXFSZ\fR. Instead of calling the signal handler, the application will |
---|
| 237 | simply crash. If you do not want core dumps, you should set appropriate limits |
---|
| 238 | with the \fBlimit coredumpsize\fR command. See your shell's documentation on |
---|
| 239 | how to set such limits. |
---|
[1532] | 240 | .TP |
---|
[1539] | 241 | \fB\-T\fR, \fB\-\-max\-time\fR=\fIn\fR |
---|
| 242 | Automatically terminate child processes that run for more than \fIn\fR |
---|
[1531] | 243 | seconds. This is useful to detect infinite loops or processes stuck in other |
---|
[1633] | 244 | situations. See also the \fB\-B\fR flag. |
---|
[1531] | 245 | .TP |
---|
[1667] | 246 | \fB\-v\fR, \fB\-\-verbose\fR |
---|
| 247 | Print information during the run, such as the current seed, what processes |
---|
| 248 | get run, their exit status, etc. |
---|
| 249 | .TP |
---|
[1634] | 250 | \fB\-x\fR, \fB\-\-check\-exit\fR |
---|
| 251 | Report processes that exit with a non-zero status. By default only processes |
---|
| 252 | that crash due to a signal are reported. |
---|
| 253 | .TP |
---|
[1554] | 254 | \fB\-h\fR, \fB\-\-help\fR |
---|
| 255 | Display a short help message and exit. |
---|
| 256 | .TP |
---|
[1666] | 257 | \fB\-V\fR, \fB\-\-version\fR |
---|
[1507] | 258 | Output version information and exit. |
---|
[1670] | 259 | .SH DIAGNOSTICS |
---|
| 260 | .PP |
---|
| 261 | Exit status is zero if no child process crashed. If one or several children |
---|
| 262 | crashed, \fBzzuf\fR exits with status 1. |
---|
[1507] | 263 | .SH EXAMPLES |
---|
[1539] | 264 | .PP |
---|
| 265 | Fuzz the input of the \fBcat\fR program using default settings: |
---|
| 266 | .PP |
---|
[1559] | 267 | \fB zzuf cat /etc/motd\fR |
---|
[1539] | 268 | .PP |
---|
| 269 | Fuzz 1% of the input bits of the \fBcat\fR program using seed 94324: |
---|
| 270 | .PP |
---|
[1705] | 271 | \fB zzuf \-s94324 \-r0.01 cat /etc/motd\fR |
---|
[1539] | 272 | .PP |
---|
[1569] | 273 | Fuzz the input of the \fBcat\fR program but do not fuzz newline characters |
---|
[1555] | 274 | and prevent non-ASCII characters from appearing in the output: |
---|
| 275 | .PP |
---|
[1607] | 276 | \fB zzuf \-P \(aq\\n\(aq \-R \(aq\\x00\-\\x1f\\x7f\-\\xff\(aq cat /etc/motd\fR |
---|
[1555] | 277 | .PP |
---|
[1539] | 278 | Fuzz the input of the \fBconvert\fR program, using file \fBfoo.jpeg\fR as the |
---|
| 279 | original input and excluding \fB.xml\fR files from fuzzing (because |
---|
| 280 | \fBconvert\fR will also open its own XML configuration files and we do not |
---|
| 281 | want \fBzzuf\fR to fuzz them): |
---|
| 282 | .PP |
---|
[1607] | 283 | \fB zzuf \-E \(aq\\.xml$\(aq convert \-\- foo.jpeg \-format tga /dev/null\fR |
---|
[1539] | 284 | .PP |
---|
[1682] | 285 | Fuzz the input of VLC, using file \fBmovie.avi\fR as the original input |
---|
[1539] | 286 | and restricting fuzzing to filenames that appear on the command line |
---|
[1607] | 287 | (\fB\-c\fR), then generate \fBfuzzy\-movie.avi\fR which is a file that |
---|
[1682] | 288 | can be read by VLC to reproduce the same behaviour without using |
---|
[1559] | 289 | \fBzzuf\fR: |
---|
[1539] | 290 | .PP |
---|
[1705] | 291 | \fB zzuf \-c \-s87423 \-r0.01 vlc movie.avi\fR |
---|
[1664] | 292 | .br |
---|
[1705] | 293 | \fB zzuf \-c \-s87423 \-r0.01 <movie.avi >fuzzy\-movie.avi\fR |
---|
[1664] | 294 | .br |
---|
[1607] | 295 | \fB vlc fuzzy\-movie.avi\fR |
---|
[1539] | 296 | .PP |
---|
[1705] | 297 | Fuzz between 0.1% and 2% of MPlayer's input bits (\fB\-r0.001:0.02\fR) |
---|
| 298 | with seeds 0 to 9999 (\fB\-s0:10000\fR), preserving the AVI 4-byte header |
---|
| 299 | by restricting fuzzing to offsets after 4 (\fB\-b4\-\fR), disabling its |
---|
| 300 | standard output messages (\fB\-q\fR), launching up to five simultaneous child |
---|
| 301 | processes (\fB\-F5\fR) but waiting at least half a second between launches |
---|
| 302 | (\fB\-D0.5\fR), killing MPlayer if it takes more than one minute to |
---|
| 303 | read the file (\fB\-T60\fR) and disabling its \fBSIGSEGV\fR signal handler |
---|
[1672] | 304 | (\fB\-S\fR): |
---|
[1539] | 305 | .PP |
---|
[1705] | 306 | \fB zzuf \-c \-r0.001:0.02 \-s0:10000 \-b4\- \-q \-F5 \-D0.5 \-T60 \-S \\\fR |
---|
[1664] | 307 | .br |
---|
[1607] | 308 | \fB mplayer \-\- \-benchmark \-vo null \-fps 1000 movie.avi\fR |
---|
[1663] | 309 | .PP |
---|
[1682] | 310 | Create an HTML-like file that loads 200 times the same \fBhello.jpg\fR image |
---|
| 311 | and open it in Firefox\(tm in auto-increment mode (\fB\-A\fR): |
---|
[1663] | 312 | .PP |
---|
[1682] | 313 | \fB seq -f \(aq<img src="hello.jpg#%g">\(aq 1 200 > hello.html\fR |
---|
[1664] | 314 | .br |
---|
[1682] | 315 | (or: \fBjot -w \(aq<img src="hello.jpg#%d">\(aq 200 1 > hello.html\fR) |
---|
| 316 | .br |
---|
[1705] | 317 | \fB zzuf -A -I \(aqhello[.]jpg\(aq -r0.001 firefox hello.html\fR |
---|
[1708] | 318 | .PP |
---|
| 319 | Run a simple HTTP redirector on the local host using \fBsocat\fR and |
---|
| 320 | corrupt each network connection (\fB\-n\fR) in a different way (\fB\-A\fR) |
---|
| 321 | after one megabyte of data was received on it (\fB\-b1000000\-\fR): |
---|
| 322 | .PP |
---|
| 323 | \fB zzuf \-n \-A \-b1000000\- \\\fR |
---|
| 324 | \fB socat TCP4-LISTEN:8080,reuseaddr,fork TCP4:192.168.1.42:80\fR |
---|
[1569] | 325 | .SH RESTRICTIONS |
---|
[1539] | 326 | .PP |
---|
[1641] | 327 | Due to \fBzzuf\fR using shared object preloading (\fBLD_PRELOAD\fR, |
---|
| 328 | \fB_RLD_LIST\fB, \fBDYLD_INSERT_LIBRARIES\fR, etc.) to run its child |
---|
[1557] | 329 | processes, it will fail in the presence of any mechanism that disables |
---|
| 330 | preloading. For instance setuid root binaries will not be fuzzed when run |
---|
[1569] | 331 | as an unprivileged user. |
---|
[1539] | 332 | .PP |
---|
[1597] | 333 | For the same reasons, \fBzzuf\fR will also not work with statically linked |
---|
| 334 | binaries. Bear this in mind when using \fBzzuf\fR on the OpenBSD platform, |
---|
| 335 | where \fBcat\fR, \fBcp\fR and \fBdd\fR are static binaries. |
---|
| 336 | .PP |
---|
[1569] | 337 | Though best efforts are made, identical behaviour for different versions of |
---|
| 338 | \fBzzuf\fR is not guaranteed. The reproducibility for subsequent calls on |
---|
| 339 | different operating systems and with different target programs is only |
---|
| 340 | guaranteed when the same version of \fBzzuf\fR is being used. |
---|
| 341 | .SH BUGS |
---|
| 342 | .PP |
---|
[1656] | 343 | \fBzzuf\fR probably does not behave correctly with 64-bit offsets. |
---|
[1610] | 344 | .PP |
---|
[1557] | 345 | It is not yet possible to insert or drop bytes from the input, to fuzz |
---|
[1569] | 346 | according to the file format, to swap bytes, etc. More advanced fuzzing |
---|
| 347 | methods are planned. |
---|
[1554] | 348 | .PP |
---|
| 349 | As of now, \fBzzuf\fR does not really support multithreaded applications. The |
---|
[1557] | 350 | behaviour with multithreaded applications where more than one thread does file |
---|
[1569] | 351 | descriptor operations is undefined. |
---|
| 352 | .SH NOTES |
---|
[1641] | 353 | In order to intercept file and network operations, signal handlers and memory |
---|
| 354 | allocations, \fBzzuf\fR diverts and reimplements the following functions, |
---|
| 355 | which can be private libc symbols, too: |
---|
[1569] | 356 | .TP |
---|
[1579] | 357 | Unix file descriptor handling: |
---|
[1678] | 358 | \fBopen\fR(), \fBlseek\fR(), \fBread\fR(), \fBreadv\fR(), \fBpread\fR(), |
---|
[1691] | 359 | \fBaccept\fR(), \fBsocket\fR(), \fBrecv\fR(), \fBrecvfrom\fR(), \fBrecvmsg\fR(), |
---|
[1693] | 360 | \fBaio_read\fR(), \fBaio_return\fR(), \fBclose\fR() |
---|
[1569] | 361 | .TP |
---|
| 362 | Standard IO streams: |
---|
[1619] | 363 | \fBfopen\fR(), \fBfreopen\fR(), \fBfseek\fR(), \fBfseeko\fR(), \fBrewind\fR(), |
---|
| 364 | \fBfread\fR(), \fBgetc\fR(), \fBfgetc\fR(), \fBfgets\fR(), \fBungetc\fR(), |
---|
| 365 | \fBfclose\fR() |
---|
[1569] | 366 | .TP |
---|
[1641] | 367 | Memory management: |
---|
| 368 | \fBmmap\fR(), \fBmunmap\fR(), \fBmalloc\fR(), \fBcalloc\fR(), \fBvalloc\fR(), |
---|
[1645] | 369 | \fBfree\fR(), \fBmemalign\fR(), \fBposix_memalign\fR() |
---|
[1641] | 370 | .TP |
---|
[1595] | 371 | Linux-specific: |
---|
| 372 | \fBopen64\fR(), \fBlseek64\fR(), \fBmmap64\fR(), \fB_IO_getc\fR(), |
---|
| 373 | \fBgetline\fR(), \fBgetdelim\fR(), \fB__getdelim\fR() |
---|
[1569] | 374 | .TP |
---|
[1595] | 375 | BSD-specific: |
---|
[1616] | 376 | \fBfgetln\fR(), \fB__srefill\fR() |
---|
[1570] | 377 | .TP |
---|
[1631] | 378 | Mac OS X-specific: |
---|
| 379 | \fBmap_fd\fR() |
---|
| 380 | .TP |
---|
[1570] | 381 | Signal handling: |
---|
| 382 | \fBsignal\fR(), \fBsigaction\fR() |
---|
[1557] | 383 | .PP |
---|
[1575] | 384 | If an application manipulates file descriptors (reading data, seeking around) |
---|
| 385 | using functions that are not in that list, \fBzzuf\fR will not fuzz its |
---|
| 386 | input consistently and the results should not be trusted. You can use a tool |
---|
| 387 | such as \fBltrace(1)\fR on Linux to know the missing functions. |
---|
| 388 | .PP |
---|
[1620] | 389 | On BSD systems, such as FreeBSD or Mac OS X, \fB__srefill\fR() is enough to |
---|
| 390 | monitor all standard IO streams functions. On other systems, such as Linux, |
---|
| 391 | each function is reimplemented on a case by case basis. One important |
---|
| 392 | unimplemented function is \fBfscanf\fR(), because of its complexity. Missing |
---|
| 393 | functions will be added upon user request. |
---|
[1563] | 394 | .SH HISTORY |
---|
| 395 | .PP |
---|
[1656] | 396 | \fBzzuf\fR started its life in 2002 as the \fBstreamfucker\fR tool, a small |
---|
[1682] | 397 | multimedia stream corrupter used to find bugs in the VLC media player. |
---|
[1507] | 398 | .SH AUTHOR |
---|
[1539] | 399 | .PP |
---|
[1570] | 400 | Copyright \(co 2002, 2007 Sam Hocevar <sam@zoy.org>. |
---|
[1539] | 401 | .PP |
---|
[1656] | 402 | \fBzzuf\fR and this manual page are free software. They come without any |
---|
[1539] | 403 | warranty, to the extent permitted by applicable law. You can redistribute |
---|
| 404 | them and/or modify them under the terms of the Do What The Fuck You Want |
---|
| 405 | To Public License, Version 2, as published by Sam Hocevar. See |
---|
| 406 | \fBhttp://sam.zoy.org/wtfpl/COPYING\fR for more details. |
---|
| 407 | .PP |
---|
[1656] | 408 | \fBzzuf\fR's webpage can be found at \fBhttp://sam.zoy.org/zzuf/\fR. |
---|