0-Knowledge FuzzingVincenzoIozzovincenzo.iozzo@zynamics.com
DisclaimerIn this talk you won’t see all those formulas, formal definition, code snippets and bullets. From past experiences the speaker learned that all the aforementioned elements are no useful in making people understand your idea.You instead will see a lot of funny pictures which the speaker hopes will convey better the understanding of the ideas explained in the talkYou don’t want slides like this, do you?
Motivations
Questions!
Fuzzing
How it used to be
How it is today                               (aka the reason of this talk)
Dumb fuzzing
Smart Fuzzing
Evolutionary Based Fuzzing
The idea
The surface
We need a filter
Cyclomatic complexity
This one
Not this one
Original formula				M = E – N + 2PNumber of edgesNumber of nodesConnected components
Why? Cyclomatic number				M = E – N + P
Simplify
FormulaM = E – N + 2
Problem
Loop detection
Dominator tree
Dominators
Function
Dominator tree
Dominators
Implicit loops
REIL
This one…
…to this one
Is that enough?
Not enoughOf course not, more heuristics neededvoid*safe_strcpy(void*old_dest,void *src, intsize){void*dst = realloc(old_dest, size +1);    	strncpy(dst, src, size);   returndst;}
Add your ownFor static analysis we use
DEMO
Questions!
Data Tainting
ExampleTaint SourceTaint markmovl0x4[eax], ebx
Dytan
PIN
Taint sources
Markings granularity
Propagation add eax, ebx, edx
Output				Registers			Memory locations
DEMO
Questions!
In-memory fuzzing
Exampleesi= 0x30f064 Original loc esi= 0x30f0A4 Fuzzed loc rep movs
Why?
Problems
Expertise and patience
Memory instability
False positives
False negatives
Mutation loop insertion
Snapshot mutation restoration
What do we do?Hook imageHook functionsHook instructionsHook
First approach
For instance…30f064-30f068	0x8a Y 0x00 KABCD
Second approach
Example30f064-30f06830f084-30f0980x89 K D F 0x960x00 J K U Y W 0xA70xB8 0x00 0x10 A T N0x00 0xD3ABCD
Code coverage
ScoreBBexecuted/BBtotalBasic Blocks executedTotal Basic Blocks
HaltingCevil = Cgood + tCode coverage evil sampleCode coverage good sampleUser-supplied threshold
How??Good sampleEvil sampleCompareScore Score
What do we use?Code coverageFaults monitor
DEMO
Future – A reasoner
Thanks
Questions!
More Infoviozzo.wordpress.com				@_snaggvincenzo.iozzo@zynamics.com

0-knowledge fuzzing

Editor's Notes