<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Juho+Myllylahti</id>
		<title>OWASP - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Juho+Myllylahti"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Juho_Myllylahti"/>
		<updated>2026-04-03T17:17:51Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Fuzzing&amp;diff=133750</id>
		<title>Fuzzing</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Fuzzing&amp;diff=133750"/>
				<updated>2012-08-01T15:37:26Z</updated>
		
		<summary type="html">&lt;p&gt;Juho Myllylahti: Added Radamsa fuzzer to the Fuzzing tools&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''Fuzz testing'' or ''Fuzzing'' is a Black Box software testing technique, which basically consists in finding implementation bugs using malformed/semi-malformed data injection in an automated fashion.&lt;br /&gt;
&lt;br /&gt;
== A trivial example: ==&lt;br /&gt;
&lt;br /&gt;
Lets's consider an integer in a program, which stores the result of a user's choice between 3 questions. When the user picks one, the choice will be 0, 1 or 2. Which makes three practical cases. But what if we transmit 3, or 255 ? We can, because integers are stored a static size variable. If the default switch case hasn't been implemented securely, the program may crash and lead to &amp;quot;classical&amp;quot; security issues: (un)exploitable buffer overflows, DoS, ...&lt;br /&gt;
&lt;br /&gt;
Fuzzing is the art of automatic bug finding, and it's role is to find software implementation faults, and identify them if possible.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Fuzz testing was developed at the University of Wisconsin Madison in 1989 by Professor Barton Miller and his students. Their (continued) work can be found at http://www.cs.wisc.edu/~bart/fuzz/ ; it's mainly oriented towards command-line and UI fuzzing, and shows that modern operating systems are vulnerable to even simple fuzzing.&lt;br /&gt;
&lt;br /&gt;
== Fuzzer implementations ==&lt;br /&gt;
&lt;br /&gt;
A fuzzer is a program which injects automatically semi-random data into a program/stack and detect bugs.&lt;br /&gt;
&lt;br /&gt;
The data-generation part is made of generators, and vulnerability identification relies on debugging tools. Generators usually use combinations of static fuzzing vectors (known-to-be-dangerous values), or totally random data. New generation fuzzers use genetic algorithms to link injected data and observed impact. Such tools are not public yet.&lt;br /&gt;
&lt;br /&gt;
== Comparison with cryptanalysis ==&lt;br /&gt;
&lt;br /&gt;
The number of possible tryable solutions is ''the explorable solutions space''. The aim of cryptanalysis is to reduce this space, which means finding a way of having less keys to try than pure bruteforce to decrypt something. &lt;br /&gt;
&lt;br /&gt;
Most of the fuzzers are:&lt;br /&gt;
&lt;br /&gt;
- protocol/file-format dependant&lt;br /&gt;
&lt;br /&gt;
- data-type dependant&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* First, because the fuzzer has to connect to the input channel, which is bound to the target.&lt;br /&gt;
&lt;br /&gt;
* Second, because a program only understands structured-enough data. If you connect to a web server in a raw way, it will only respond to listed commands such as GET (or eventually crash). It will take less time to start the string with &amp;quot;GET &amp;quot;, and fuzz the rest, but the drawback is that you'll skip all the tests on the first verb.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this regard, Fuzzers try to reduce the number of unuseful tests, i.e. the values we already know that there's little chance they'll work: you reduce impredictibility, in favor of speed.&lt;br /&gt;
&lt;br /&gt;
== Attack types ==&lt;br /&gt;
&lt;br /&gt;
A fuzzer would try combinations of attacks on:&lt;br /&gt;
&lt;br /&gt;
- numbers (signed/unsigned integers/float...)&lt;br /&gt;
&lt;br /&gt;
- chars (urls, command-line inputs)&lt;br /&gt;
&lt;br /&gt;
- metadata : user-input text (id3 tag)&lt;br /&gt;
&lt;br /&gt;
- pure binary sequences&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A common approach to fuzzing is to define lists of &amp;quot;known-to-be-dangerous values&amp;quot; (''fuzz vectors'') for each type, and to inject them or recombinations.&lt;br /&gt;
&lt;br /&gt;
- for integers: zero, possibly negative or very big numbers&lt;br /&gt;
&lt;br /&gt;
- for chars: escaped, interpretable characters / instructions (ex: For SQL Requests, quotes / commands...)&lt;br /&gt;
&lt;br /&gt;
- for binary: random ones&lt;br /&gt;
&lt;br /&gt;
Please refer to OWASP's Fuzz Vector's resource[http://www.owasp.org/index.php/OWASP_Testing_Guide_Appendix_C:_Fuzz_Vectors] for real-life fuzzing vectors examples and methodology.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Protocols and file formats imply norms, which are sometimes blurry, very complicated or badly implemented : that's why developers sometimes mess up in the implementation process (because of time/cost constraints). That's why it can be interesting to take the opposite approach: take a norm, look at all mandatory features and constraints, and try all of them; forbidden/reserved values, linked parameters, field sizes. That would be ''conformance testing oriented'' fuzzing.&lt;br /&gt;
&lt;br /&gt;
== Application fuzzing ==&lt;br /&gt;
&lt;br /&gt;
Whatever the fuzzed system is, the attack vectors are within it's I/O. For a desktop app:&lt;br /&gt;
&lt;br /&gt;
- the UI (testing all the buttons sequences / text inputs)&lt;br /&gt;
&lt;br /&gt;
- the command-line options&lt;br /&gt;
&lt;br /&gt;
- the import/export capabilities (see file format fuzzing below)&lt;br /&gt;
&lt;br /&gt;
For a web app: urls, forms, user-generated content, RPC requests, ...&lt;br /&gt;
&lt;br /&gt;
== Protocol fuzzing ==&lt;br /&gt;
&lt;br /&gt;
A protocol fuzzer sends forged packets to the tested application, or eventually acts as a proxy, modifying requests on the fly and replaying them.&lt;br /&gt;
&lt;br /&gt;
== File format fuzzing ==&lt;br /&gt;
&lt;br /&gt;
A file format fuzzer generates multiple malformed samples, and opens them sequentially. When the program crashes, debug information is kept for further investigation.&lt;br /&gt;
&lt;br /&gt;
One can attack:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- the parser layer (container layer): file format constraints, structure, conventions, field sizes, flags, ...&lt;br /&gt;
&lt;br /&gt;
- the codec/application layer: lower-level attacks, aiming at the program's deeper internals&lt;br /&gt;
&lt;br /&gt;
One example of file format related vulnerabilities: MS04-028[http://www.microsoft.com/technet/security/bulletin/ms04-028.mspx] (KB833987) Microsoft's JPEG GDI+ vulnerability was a zero sized comment field, without content.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Surprisingly, file format fuzzers are not that common, but tend to appear these days; some examples:&lt;br /&gt;
&lt;br /&gt;
* A generic file format fuzzer : Ilja van Sprundel's mangle.c[http://www.digitaldwarf.be/products/mangle.c]; &amp;quot;it's usage is very simple, it takes a filename and headersize as input. it will then change approximatly between 0 and 10% of the header with random bytes.&amp;quot; (from the author)&lt;br /&gt;
&lt;br /&gt;
* Zzuf can act as a fuzzed file generator, http://sam.zoy.org/zzuf/&lt;br /&gt;
&lt;br /&gt;
* One may use tools like Hachoir[http://hachoir.org/] as a generic parser for file format fuzzers development.&lt;br /&gt;
&lt;br /&gt;
== Fuzzers advantages ==&lt;br /&gt;
&lt;br /&gt;
''The great advantage of fuzz testing is that the test design is extremely simple, and free of preconceptions about system behavior'' (from Wikipedia [http://en.wikipedia.org/wiki/Fuzz_testing]).&lt;br /&gt;
&lt;br /&gt;
The systematical/random approach allows this method to find bugs that would have often been missed by human eyes. Plus, when the tested system is totally closed (say, a SIP phone), fuzzing is one of the only means of reviewing it's quality.&lt;br /&gt;
&lt;br /&gt;
== Fuzzers limitations ==&lt;br /&gt;
&lt;br /&gt;
Fuzzers usually tend to find simple bugs; plus, the more a fuzzer is protocol-aware, the less weird errors it will find. This is why the exhaustive / random approach is still popular among the fuzzing community.&lt;br /&gt;
&lt;br /&gt;
Another problem is that when you do some black-box-testing, you usually attack a closed system, which increases difficulty to evaluate the dangerosity/impact of the found vulnerability (no debugging possibilities).&lt;br /&gt;
&lt;br /&gt;
== Why Fuzz? ==&lt;br /&gt;
&lt;br /&gt;
The purpose of fuzzing relies on the assumption that there are bugs within every program, which are waiting to be discovered. Therefore, a systematical approach should find them sooner or later.&lt;br /&gt;
&lt;br /&gt;
Fuzzing can add another point of view to classical software testing techniques (hand code review, debugging) because of it's non-human approach. It doesn't replace them,  but is a reasonable complement, thanks to the limited work needed to put the procedure in place.&lt;br /&gt;
&lt;br /&gt;
Recent fuzzing initiatives:&lt;br /&gt;
&lt;br /&gt;
- The Month of Kernel Bugs[http://projects.info-pull.com/mokb/], which revealed an Apple Wireless flaw; see here[http://kernelfun.blogspot.com/]; mainly used file system fuzzing tools&lt;br /&gt;
&lt;br /&gt;
- The Month of Browser Bugs[http://browserfun.blogspot.com/] (review here[http://osvdb.org/blog/?p=127]); number of bugs found: MSIE: 25 Apple Safari: 2 Mozilla: 2 Opera: 1 Konqueror: 1; used DHTML, Css, DOM, ActiveX fuzzing tools&lt;br /&gt;
&lt;br /&gt;
== Fuzzers from OWASP ==&lt;br /&gt;
&lt;br /&gt;
Fuzzing with WebScarab [http://www.owasp.org/index.php/Fuzzing_with_WebScarab]: a framework for analysing applications that communicate using the HTTP and HTTPS protocols&lt;br /&gt;
&lt;br /&gt;
JBroFuzz [http://www.owasp.org/index.php/JBroFuzz]: a stateless network protocol fuzzer&lt;br /&gt;
&lt;br /&gt;
WSFuzzer [http://www.owasp.org/index.php/WSFuzzer]: real-world manual SOAP pen testing tool&lt;br /&gt;
&lt;br /&gt;
== Technical resources on OWASP  ==&lt;br /&gt;
&lt;br /&gt;
Fuzzing vectors [http://www.owasp.org/index.php/OWASP_Testing_Guide_Appendix_C:_Fuzz_Vectors]&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
Wikipedia article [http://en.wikipedia.org/wiki/Fuzz_testing]&lt;br /&gt;
&lt;br /&gt;
Fuzzing-related papers [http://www.threatmind.net/secwiki/FuzzingPapers]&lt;br /&gt;
&lt;br /&gt;
== Fuzzing tools ==&lt;br /&gt;
&lt;br /&gt;
Peach Fuzzing Platform [http://peachfuzzer.com]&lt;br /&gt;
&lt;br /&gt;
Radamsa - a flock of fuzzers [http://code.google.com/p/ouspg/wiki/Radamsa]&lt;br /&gt;
&lt;br /&gt;
Microsoft SDL MiniFuzz File Fuzzer [http://www.microsoft.com/download/en/details.aspx?id=21769]&lt;br /&gt;
&lt;br /&gt;
Untidy - XML Fuzzer [http://untidy.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
Microsoft SDL Regex Fuzzer [http://www.microsoft.com/download/en/details.aspx?id=20095]&lt;br /&gt;
&lt;br /&gt;
The fuzzing mailing list [http://www.whitestar.linuxbox.org/mailman/listinfo/fuzzing]&lt;br /&gt;
&lt;br /&gt;
== Commercial products ==&lt;br /&gt;
&lt;br /&gt;
Codenomicon's product suite: [http://www.codenomicon.com/products/all.shtml]&lt;br /&gt;
&lt;br /&gt;
Beyond Security's beSTORM product: [http://www.beyondsecurity.com/bestorm_overview.html]&lt;br /&gt;
[[Category:Externally Linked Page]]&lt;/div&gt;</summary>
		<author><name>Juho Myllylahti</name></author>	</entry>

	</feed>