This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
fsk_message_service_test_harness.py | |
Loads the context of a process into Unicorn Engine, | |
loads a custom (mutated) inputs, and executes the | |
parser/handler routine. | |
Author: | |
Nathan Voss | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------- | |
// From cgc_packet.h: | |
#define MAX_PACKET_LENGTH (48) | |
typedef struct PACKET_INFO_STRUCT | |
{ | |
uint8_t packetData[MAX_PACKET_LENGTH]; | |
uint32_t dataLen; | |
struct PACKET_INFO_STRUCT *pNextPacket; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------- | |
// From cgc_packet.h: | |
#define MAX_PACKET_LENGTH (48) | |
typedef struct PACKET_INFO_STRUCT | |
{ | |
uint8_t packetData[MAX_PACKET_LENGTH]; | |
uint32_t dataLen; | |
struct PACKET_INFO_STRUCT *pNextPacket; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Simple test harness for AFL's Unicorn Mode. | |
This loads the simple_target.bin binary (precompiled as MIPS code) into | |
Unicorn's memory map for emulation, places the specified input into | |
simple_target's buffer (hardcoded to be at 0x300000), and executes 'main()'. | |
If any crashes occur during emulation, this script throws a matching signal | |
to tell AFL that a crash occurred. | |
Run under AFL as follows: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Sample target file to test afl-unicorn fuzzing capabilities. | |
* This is a very trivial example that will crash pretty easily | |
* in several different exciting ways. | |
* | |
* Input is assumed to come from a buffer located at DATA_ADDRESS | |
* (0x00300000), so make sure that your Unicorn emulation of this | |
* puts user data there. | |
* | |
* Written by Nathan Voss <njvoss99@gmail.com> |