Neural-Fuzzer is an experimental fuzzer designed to use state-of-the-art Machine Learning to learn from a set of initial files. It works in two phases: training and generation.
In training mode: it uses long-short term memory (LSTM) to learn how sequences of bytes are structured.
In generation mode: it will automatically generate corrupted or unexpected files and it will try to crash a given program.
In order to generate XML, we can use one of the pre-trained XML generators:
$ wget "https://github.com/CIFASIS/neural-fuzzer/releases/download/0.0/0-gen-xml.lstm" $ wget "https://github.com/CIFASIS/neural-fuzzer/releases/download/0.0/0-gen-xml.lstm.map"
Then, we need a seed to start the generation. For instance, to use '>'
$ mkdir seeds $ printf ">" > seeds/input.xml
Finally, we can start producing some random xmls using the generators:
$ ./neural-fuzzer.py --max-gen-size 64 0-gen-xml.lstm seeds/ Using Theano backend. Using ./gen-449983086021 to store the generated files Generating a batch of 8 file(s) of size 35 (temp: 0.5 )...................................
The resulting files will be stored in a randomly named directory (e.g gen-449983086021). It is faster to generate files in a batch, instead of one by one (you can experiment with different batch sizes). In this case, one of the files we obtained is this one:
></p> <p><termdef id='dt-encoding'>