asudhak / peachfuzz-code Goto Github PK
View Code? Open in Web Editor NEWPeach Fuzzer 3.x
License: Other
Peach Fuzzer 3.x
License: Other
Peach 3 - RC 1 ================ Welcome to Peach 3, a complete re-write of Peach using the Microsoft.NET framework. Peach 3 is a cross-platform fuzzer that mainly targets data consumers. Peach 3 currently supports the following OSes: - Windows - OS X - Linux (e.g. Ubuntu, Redhat, etc.) Installing from Source ---------------------- Windows Pre-requisits: - Microsoft.NET v4 - Visual Studio 2010 SP1 Linux Pre-requisites: - build-essential - mono-complete - g++-multilib (x86_64 only) OS X Pre-requisites: - XCode 4 - Mono SDK (2.10.10) ./waf configure ./waf build ./waf install Copyright (c) Deja vu Security Copyright (c) Michael Eddington
I tried running the peachfuzzer on the png.xml from dumb fuzzing tutorial.
However, when starting to fuzz, I receive an Unhandled Exception
error, any advice would be helpful:
$ ./peach -t png.xml
[[ Peach v0.0.0.0
[[ Copyright (c) Michael Eddington
[*] Validating file [png.xml]... File parsed successfully, but XSD validation is not supported on the Mono runtime.
$ ./peach -1 png.xml
[[ Peach v0.0.0.0
[[ Copyright (c) Michael Eddington
Unhandled Exception:
System.ArgumentException: Expression of type 'System.Nullable`1[System.Boolean]' cannot be used for parameter of type 'System.Object' of method 'Void SetValue(System.Object, System.Object)'
Parameter name: arg0
at System.Dynamic.Utils.ExpressionUtils.ValidateOneArgument (System.Reflection.MethodBase method, System.Linq.Expressions.ExpressionType nodeKind, System.Linq.Expressions.Expression arguments, System.Reflection.ParameterInfo pi, System.String methodParamName, System.String argumentParamName, System.Int32 index) [0x00091] in <b5b8f552f9484fab8c19a20c404b4624>:0
at System.Linq.Expressions.Expression.ValidateOneArgument (System.Reflection.MethodBase method, System.Linq.Expressions.ExpressionType nodeKind, System.Linq.Expressions.Expression arg, System.Reflection.ParameterInfo pi, System.String methodParamName, System.String argumentParamName) [0x00000] in <b5b8f552f9484fab8c19a20c404b4624>:0
at System.Linq.Expressions.Expression.Call (System.Linq.Expressions.Expression instance, System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1) [0x00032] in <b5b8f552f9484fab8c19a20c404b4624>:0
at Peach.Core.ObjectCopier.AssignField (System.Reflection.FieldInfo fieldInfo, System.Linq.Expressions.Expression clone, System.Linq.Expressions.Expression value) [0x000bc] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.ObjectCopier.CopyComplexType (System.Type type, System.Linq.Expressions.Expression original, System.Linq.Expressions.Expression clone, System.Collections.Generic.List`1[T] exprs) [0x0004b] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.ObjectCopier.CopyComplexType (System.Type type, System.Linq.Expressions.Expression original, System.Linq.Expressions.Expression clone, System.Collections.Generic.List`1[T] exprs) [0x00075] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.ObjectCopier.CloneComplexType (System.Type type, System.Collections.Generic.List`1[T] vars, System.Collections.Generic.List`1[T] exprs) [0x000cb] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.ObjectCopier..ctor (System.Type type) [0x000f5] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.ObjectCopier.findOrCreateCloner (System.Type type) [0x00012] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,System.Collections.Hashtable,object,object)
at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,System.Collections.Hashtable,object,object)
at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,System.Collections.Hashtable,object,object)
at Peach.Core.ObjectCopier.Clone[T] (T obj, System.Object ctx) [0x0002e] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Dom.DataElement.Clone (System.String name) [0x00008] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Dom.DataModel.PitParser (Peach.Core.Analyzers.PitParser context, System.Xml.XmlNode node, Peach.Core.Dom.DataElementContainer parent) [0x00089] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handleDataModel (System.Xml.XmlNode node, Peach.Core.Dom.DataModel old) [0x00099] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handleActionData (System.Xml.XmlNode node, Peach.Core.Dom.ActionData data, System.String type, System.Boolean hasData) [0x00026] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handleActionOutput (System.Xml.XmlNode node, Peach.Core.Dom.Actions.Output action) [0x0001c] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handleAction (System.Xml.XmlNode node, Peach.Core.Dom.State parent) [0x001a2] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handleState (System.Xml.XmlNode node, Peach.Core.Dom.StateModel parent) [0x0007f] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handleStateModel (System.Xml.XmlNode node, Peach.Core.Dom.Dom parent) [0x00060] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handlePeach (Peach.Core.Dom.Dom dom, System.Xml.XmlNode node, System.Collections.Generic.Dictionary`2[TKey,TValue] args) [0x00562] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.asParser (System.Collections.Generic.Dictionary`2[TKey,TValue] args, System.IO.Stream data, System.Boolean doValidatePit) [0x0006c] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.asParser (System.Collections.Generic.Dictionary`2[TKey,TValue] args, System.IO.Stream data) [0x00000] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzer.asParser (System.Collections.Generic.Dictionary`2[TKey,TValue] args, System.String fileName) [0x0000a] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Runtime.Program..ctor (System.String[] args) [0x00655] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Program.Main (System.String[] args) [0x00005] in <d4d7a17a5173497ab1ff38f3bb6e9a6c>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: Expression of type 'System.Nullable`1[System.Boolean]' cannot be used for parameter of type 'System.Object' of method 'Void SetValue(System.Object, System.Object)'
Parameter name: arg0
at System.Dynamic.Utils.ExpressionUtils.ValidateOneArgument (System.Reflection.MethodBase method, System.Linq.Expressions.ExpressionType nodeKind, System.Linq.Expressions.Expression arguments, System.Reflection.ParameterInfo pi, System.String methodParamName, System.String argumentParamName, System.Int32 index) [0x00091] in <b5b8f552f9484fab8c19a20c404b4624>:0
at System.Linq.Expressions.Expression.ValidateOneArgument (System.Reflection.MethodBase method, System.Linq.Expressions.ExpressionType nodeKind, System.Linq.Expressions.Expression arg, System.Reflection.ParameterInfo pi, System.String methodParamName, System.String argumentParamName) [0x00000] in <b5b8f552f9484fab8c19a20c404b4624>:0
at System.Linq.Expressions.Expression.Call (System.Linq.Expressions.Expression instance, System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1) [0x00032] in <b5b8f552f9484fab8c19a20c404b4624>:0
at Peach.Core.ObjectCopier.AssignField (System.Reflection.FieldInfo fieldInfo, System.Linq.Expressions.Expression clone, System.Linq.Expressions.Expression value) [0x000bc] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.ObjectCopier.CopyComplexType (System.Type type, System.Linq.Expressions.Expression original, System.Linq.Expressions.Expression clone, System.Collections.Generic.List`1[T] exprs) [0x0004b] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.ObjectCopier.CopyComplexType (System.Type type, System.Linq.Expressions.Expression original, System.Linq.Expressions.Expression clone, System.Collections.Generic.List`1[T] exprs) [0x00075] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.ObjectCopier.CloneComplexType (System.Type type, System.Collections.Generic.List`1[T] vars, System.Collections.Generic.List`1[T] exprs) [0x000cb] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.ObjectCopier..ctor (System.Type type) [0x000f5] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.ObjectCopier.findOrCreateCloner (System.Type type) [0x00012] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,System.Collections.Hashtable,object,object)
at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,System.Collections.Hashtable,object,object)
at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,System.Collections.Hashtable,object,object)
at Peach.Core.ObjectCopier.Clone[T] (T obj, System.Object ctx) [0x0002e] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Dom.DataElement.Clone (System.String name) [0x00008] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Dom.DataModel.PitParser (Peach.Core.Analyzers.PitParser context, System.Xml.XmlNode node, Peach.Core.Dom.DataElementContainer parent) [0x00089] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handleDataModel (System.Xml.XmlNode node, Peach.Core.Dom.DataModel old) [0x00099] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handleActionData (System.Xml.XmlNode node, Peach.Core.Dom.ActionData data, System.String type, System.Boolean hasData) [0x00026] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handleActionOutput (System.Xml.XmlNode node, Peach.Core.Dom.Actions.Output action) [0x0001c] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handleAction (System.Xml.XmlNode node, Peach.Core.Dom.State parent) [0x001a2] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handleState (System.Xml.XmlNode node, Peach.Core.Dom.StateModel parent) [0x0007f] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handleStateModel (System.Xml.XmlNode node, Peach.Core.Dom.Dom parent) [0x00060] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.handlePeach (Peach.Core.Dom.Dom dom, System.Xml.XmlNode node, System.Collections.Generic.Dictionary`2[TKey,TValue] args) [0x00562] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.asParser (System.Collections.Generic.Dictionary`2[TKey,TValue] args, System.IO.Stream data, System.Boolean doValidatePit) [0x0006c] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzers.PitParser.asParser (System.Collections.Generic.Dictionary`2[TKey,TValue] args, System.IO.Stream data) [0x00000] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Analyzer.asParser (System.Collections.Generic.Dictionary`2[TKey,TValue] args, System.String fileName) [0x0000a] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Core.Runtime.Program..ctor (System.String[] args) [0x00655] in <945a2fc8975f4112b9c95a088f9cb53e>:0
at Peach.Program.Main (System.String[] args) [0x00005] in <d4d7a17a5173497ab1ff38f3bb6e9a6c>:0
<?xml version="1.0" encoding="utf-8"?>
<Peach xmlns="http://peachfuzzer.com/2012/Peach"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://peachfuzzer.com/2012/Peach peach.xsd">
<!-- TODO: Create data model -->
<DataModel name="TheDataModel">
<Blob/>
</DataModel>
<!-- TODO: Create state model -->
<StateModel name="TheState" initialState="Initial">
<State name="Initial">
<Action type="output">
<DataModel ref="TheDataModel"/>
<Data name="data" fileName="samples_png/*.png" />
</Action>
<Action type="close"/>
<Action type="call" method="LaunchViewer" publisher="Peach.Agent"/>
</State>
</StateModel>
<Agent name="LinAgent">
<!-- Register for core file notifications. -->
<Monitor class="LinuxDebugger" >
<!-- This is the program we're going to run inside of the debugger -->
<Param name="Executable" value="feh"/>
<!-- These are arguments to the executable we want to run -->
<Param name="Arguments" value="fuzzed.png"/>
<!-- This parameter will cause the monitor to terminate the process
once the CPU usage reaches zero.
-->
<Param name="CpuKill" value="true"/>
</Monitor>
</Agent>
<Test name="Default">
<Agent ref="LinAgent" platform="linux"/>
<StateModel ref="TheState"/>
<Publisher class="File">
<Param name="FileName" value="fuzzed.png"/>
</Publisher>
<Strategy class="Random"/>
<Logger class="Filesystem">
<Param name="Path" value="logs" />
</Logger>
</Test>
</Peach>
<!-- end -->
I am trying to build peach fuzzer from source on linux. While executing the waf build I am facing the below mentioned issue.
[ 43/114] | linux_x86_debug | bblocks32 | cxx | ['bblocks.cpp'] | ['bblocks.cpp.1.o'] In file included from /root/Peach/peachfuzz-code/3rdParty/pin/pin-2.13-61206-gcc.4.4.7-linux/source/include/pin/pin.H:41:0, from ../../Peach.Core.Analysis.Pin.BasicBlocks/bblocks.cpp:46: /root/Peach/peachfuzz-code/3rdParty/pin/pin-2.13-61206-gcc.4.4.7-linux/source/include/pin/compiler_version_check2.H:102:2: error: #error The C++ ABI of your compiler does not match the ABI of the pin kit. #error The C++ ABI of your compiler does not match the ABI of the pin kit. ^ /root/Peach/peachfuzz-code/3rdParty/pin/pin-2.13-61206-gcc.4.4.7-linux/source/include/pin/compiler_version_check2.H:117:2: error: #error This kit requires gcc 3.4 or later #error This kit requires gcc 3.4 or later ^ Compilation failed: 1 error(s), 0 warnings error CS8001: Warning as Error: SDK path could not be resolved Waf: Leaving directory
/root/Peach/peachfuzz-code/slag/linux_x86_debug'
Build failed
`
When I check for gcc version it shows:
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
OS : Ubuntu 16.04
While i am executing the waf build, I am facing the below mentioned issue.
[ 55/114] | linux_x86_debug | cedge32 | cxxshlib | ['cedge.cpp.1.o', 'cedge32_version.cpp.1.o'] | ['cedge32.so']
/usr/bin/ld:/root/peachfuzz-code/3rdParty/pin/pin-2.13-61206-gcc.4.4.7-linux/ia32/lib-ext/libdwarf.so: file format not recognized; treating as linker script
/usr/bin/ld:/root/peachfuzz-code/3rdParty/pin/pin-2.13-61206-gcc.4.4.7-linux/ia32/lib-ext/libdwarf.so:0: syntax error
collect2: error: ld returned 1 exit status
/usr/bin/ld:/root/peachfuzz-code/3rdParty/pin/pin-2.13-61206-gcc.4.4.7-linux/ia32/lib-ext/libdwarf.so: file format not recognized; treating as linker script
/usr/bin/ld:/root/peachfuzz-code/3rdParty/pin/pin-2.13-61206-gcc.4.4.7-linux/ia32/lib-ext/libdwarf.so:0: syntax error
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/root/peachfuzz-code/slag/linux_x86_debug'
Build failed
OS:Ubuntu 20.04
I have switched gcc version,now the gcc version is
gcc (Ubuntu 4.8.5-4ubuntu2) 4.8.5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.