Skip to content

Instantly share code, notes, and snippets.

@NSEcho
Created October 19, 2021 19:49
Show Gist options
  • Save NSEcho/f42e65fa30e3eb2050ea4dc221428899 to your computer and use it in GitHub Desktop.
Save NSEcho/f42e65fa30e3eb2050ea4dc221428899 to your computer and use it in GitHub Desktop.
Simple radamsa fuzzing template
#!/bin/bash
while true; do
radamsa sample.xml > input.xml
/path/to/binary/you/are/fuzzing ./input.xml
if [ $? -gt 0 ]; then
crash_filename=$(date +"%F %T")
cp input.xml "${crash_filename}.xml"
echo "Crash found!"
exit
fi
done
@NSEcho
Copy link
Author

NSEcho commented Oct 19, 2021

If you are fuzzing some command line parameter, change the following:

  • radamsa sample.xml > input.xml to echo -n 'input' | radamsa > input.txt
  • /path/to/binary/you/are/fuzzing ./input.xml to /path/to/binary/you/are/fuzzing "$(cat input.txt)"
  • cp input.xml "${crash_filename}.xml" to cp input.txt "${crash_filename}.txt"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment