- Notifications
You must be signed in to change notification settings - Fork89
Generation-based, context-free grammar fuzzer. Refer tohttps://github.com/posidron/dharma for a maintained version.
License
MozillaSecurity/dharma
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Archived — please seehttps://github.com/posidron/dharma for maintained version.
Generation-based, context-free grammar fuzzer.
All roads lead to Rome but Python 3.x is the prefered vehicle.
pip install dharmadharma --help
pipenv install --devpipenv run dharma --help
python -m dharma --help
docker build -t dharma.docker run --rm -it dharma -grammars dharma/grammars/canvas2d.dgGenerate a single test-case and print it tostdout. Multiple grammars can be appended to the-grammars argument.
dharma -grammars dharma/grammars/canvas2d.dg
Generating multiple test-cases and save the result to disk.
dharma -grammars dharma/grammars/canvas2d.dg -storage. -count 5Generate test-cases and serve them in a template via WebSocket.Launchdharma/grammars/var/index.html in the browser after Dharma launched.
dharma -grammars dharma/grammars/canvas2d.dg -server -template dharma/grammars/var/templates/html5/default.html
Benchmark the generator.
time dharma -grammars dharma/grammars/canvas2d.dg -count 10000> /dev/null
In case you run PyLint 1.9.2 and Python 3.7 you need to upgrade PyLint.
pip3 install pylint astroid --pre -U
%%% comment%const% name := value%section% := value%section% := variable%section% := varianceRefer toextensions.py indharma/core/ and to thexref_registry in theDharmaMachine class to add further extensions.
%range%(0-9)%range%(0.0-9.0)%range%(a-z)%range%(!-~)%range%(0x100-0x200)%repeat%(+variable+)%repeat%(+variable+, ", ")%uri%(path)%uri%(lookup_key)%block%(path)%choice%(foo, "bar", 1)digit := %range%(0-9)sign := + -value := +sign+%repeat%(+digit+)+value+variable := @variable@ = new Foo();value := !variable!.bar();value := attribute=+common:number+foo := Random.pick([0,1]);Dharma mentionings in the news.
- https://webassembly-security.com/fuzzing-wasm-javascript-dharma-chrome-v8/
- https://www.zerodayinitiative.com/blog/2019/1/31/implementing-fuzz-logics-with-dharma
- http://blog.ret2.io/2018/06/13/pwn2own-2018-vulnerability-discovery/
- https://blog.mozilla.org/security/2015/06/29/dharma/
- https://www.redpacketsecurity.com/dharma-generation-based-context-free-grammar-fuzzing-tool/
About
Generation-based, context-free grammar fuzzer. Refer tohttps://github.com/posidron/dharma for a maintained version.
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.

