libzzuf(3)
β¨ NAME β¨
libzzuf β the helper library for the zzuf multiple purpose fuzzer π
okay so real quick, bestie: this is the manual page for libzzuf(3), straight out of the Library Functions Manual. it's a library, it's a baddie, and it's about to make your fuzzing life so much easier. let's get into it π«Ά
πΈ DESCRIPTION πΈ
libzzuf is a helper library that zzuf automatically preloads whenever it's fuzzing applications. but here's the tea β it can also be used all on its own, for debugging purposes or for those specific cases that zzuf just can't cover. main character energy fr π
π USAGE π
libzzuf has to be preloaded using your operating system's default way of preloading libraries. like, the normal one, nothing fancy. for example, on a typical Linux installation:
LD_PRELOAD=/usr/lib/zzuf/libzzuf.so
periodt. that's the whole vibe. β¨
π¦ ENVIRONMENT VARIABLES π¦
so libzzuf's initial setup happens through environment variables. and listen β after they're read, no further information can be sent to the fuzzed process. that's it, that's the window, it closes. π
all environment variables are optional. every single one. no pressure bestie π
ZZUF_DEBUGβ this one gets set to the debugging level.0means no debugging information is sent tozzuf.1logs important information as well as all diverted functions.2logs fuzzing status and all optional file stream information. pick your level of yapping πZZUF_DEBUGFDβ set this to a file descriptor, andlibzzufwill send its debugging information there. this is how data gets shipped off to the mainzzufcontrolling binary. it's giving messenger π¦ZZUF_SEEDβ set to the initial random seed. correspondingzzufflag:--seed.ZZUF_MINRATIO,ZZUF_MAXRATIOβ these get set to the minimal and maximal fuzzing ratios. correspondingzzufflag:--ratio.ZZUF_AUTOINCβ if this one is set, the random seed gets incremented each time a new file is opened. correspondingzzufflag:--autoinc.ZZUF_BYTESβ contains byte ranges that fuzzing should be restricted to. correspondingzzufflag:--bytes.ZZUF_LISTβ contains file descriptor ranges that fuzzing should be restricted to. correspondingzzufflag:--list.ZZUF_NETWORKβ if this is set, network mode is activated. correspondingzzufflag:--network.ZZUF_PORTSβ contains port ranges that fuzzing should be restricted to. correspondingzzufflag:--port.ZZUF_PROTECT,ZZUF_REFUSEβ these contain character ranges to protect or refuse. correspondingzzufflags:--protect,--refuse.ZZUF_INCLUDE,ZZUF_EXCLUDEβ these contain regular expressions to indicate which files should be included in or excluded from the list of fuzzed files. correspondingzzufflags:--include,--exclude.ZZUF_SIGNALβ if this is set, the fuzzed process will be prevented from installing signal handlers that usually cause coredumps. correspondingzzufflag:--signal.ZZUF_MEMORYβ contains the maximum amount of memory that the fuzzed process is allowed to allocate. correspondingzzufflag:--max-memory.ZZUF_STDINβ if this is set, standard input will be fuzzed, too. correspondingzzufflag:--stdin.
π NOTES π
okay so to intercept file and network operations, signal handlers, and memory allocations, libzzuf diverts and reimplements the following functions. heads up though β sometimes these are private C library symbols, too. iykyk π
π Unix file descriptor handling:
open(), dup(), dup2(), lseek(), read(), readv(), pread(), accept(), socket(), recv(), recvfrom(), recvmsg(), aio_read(), aio_return(), close()
π Standard IO streams:
fopen(), freopen(), fseek(), fseeko(), rewind(), fread(), getc(), getchar(), fgetc(), fgets(), ungetc(), fclose()
π§ Memory management:
mmap(), munmap(), malloc(), calloc(), valloc(), free(), memalign(), posix_memalign()
π§ Required on Linux:
open64(), lseek64(), mmap64(), _IO_getc(), getline(), getdelim(), __getdelim(), getc_unlocked(), getchar_unlocked(), fgetc_unlocked(), fgets_unlocked(), fread_unlocked(), __uflow()
π Required on BSD systems:
fgetln(), __srefill(), __srget()
π Required on Mac OS X:
map_fd()
π Required on HP-UX:
__open64(), __lseek64(), __filbuf()
βοΈ Required on OpenSolaris:
freopen64(), fseeko64(), fsetpos64()
π¨ Signal handling:
signal(), sigaction()
okay this part is IMPORTANT, bestie, listen up: if an application manipulates file descriptors (reading data, seeking around) using functions that are not in that list, thenlibzzufwill not fuzz its input consistently and the results should not be trusted. like, do not trust them. at all. π you can use a tool such asltrace(1)on Linux to figure out which functions are missing.
on BSD systems, such as FreeBSD or Mac OS X, __srefill() alone is enough to monitor all standard IO streams functions. on other systems, such as Linux, each function is reimplemented on a case by case basis. one important unimplemented function is fscanf(), because of its complexity. missing functions will be added upon user request β so like, just ask π«Ά
π SEE ALSO π
π AUTHOR π
Copyright Β© 2002-2015 Sam Hocevar <sam@hocevar.net>.
libzzuf and this manual page are free software. they come without any warranty, to the extent permitted by applicable law. you can redistribute them and/or modify them under the terms of the Do What the Fuck You Want to Public License, Version 2, as published by the WTFPL Task Force. see http://www.wtfpl.net/ for more details.
zzuf's webpage can be found at http://caca.zoy.org/wiki/zzuf. an overview of the architecture and inner works is at http://caca.zoy.org/wiki/zzuf/internals.
and that's the whole page, bestie π
this was libzzuf version 0.15, dated 2015-01-06 β go fuzz something iconic π¦β¨
π¦ where this page comes from
- arch rolling: zzuf 0.15-4 Β· WTFPL
- debian bookworm: zzuf 0.15-2+b3 Β· WTFPL-2
- debian trixie: zzuf 0.15-5+b1 Β· WTFPL-2
- fedora 43: zzuf 0.15-25.fc43 Β· WTFPL
- fedora 44: zzuf 0.15-26.fc44 Β· WTFPL
- nixos 26.05: zzuf 0.15
- nixpkgs unstable: zzuf 0.15
- ubuntu noble: zzuf 0.15-2build3 Β· WTFPL-2
- ubuntu questing: zzuf 0.15-5build2
- ubuntu resolute: zzuf 0.15-5ubuntu1 Β· WTFPL-2
- ubuntu stonking: zzuf 0.15-5ubuntu2 Β· WTFPL-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms