Hi.
I wanna share my experiences.
I tried to made afl-fuzz, which is specialized for JavaScript, during winter internship in Naver corp.
here is my repo:
(It's from version 1.06b and some 1.18b)
I implemented three things.
1. Extract auto dictionary using comment
2. Sometimes use threshold to ignore small flow changes.
3. find start position (skip initialization) for better performance.
To find start position, I used ptrace.
First, find position, which open or read my input.
After finding, restart and setup fork server at right before the found position.
through this, performance increases 2x ~ 3x in JavaScriptCore of Webkit.
But, This method is not for general.
For example, it does not work on v8, because of isolate? I don't know..
Also, There are many other cases we cannot expect.
So, I added function that user can define start position by himself.
I think it is good enough, if it cannot be done automatically.
Whatever, it works well in JavaScriptCore.
I found some crahses like
----
var{A}
----
function f(arguments) {
var arguments;
f.apply(null, ['']);
}
f('')
----