Git Product home page Git Product logo

peachfuzz-code's Introduction

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

peachfuzz-code's People

Contributors

a-baire avatar adamdeja avatar amanda-mitchell avatar asudhak avatar avri-schneider avatar digitaldan05 avatar emiaj avatar fholm avatar flaub-coco avatar haraldkl avatar hyh avatar ievgent avatar immerrr avatar itreptil avatar jgoz avatar joshdeja avatar matt-dejavu avatar matthoosier-garmin avatar mattyclarkson avatar meddington avatar mkoppanen avatar rgl avatar seth-deja avatar sirusdv avatar sliverc avatar staticcat avatar sustrik avatar tweenk avatar weeble avatar zougloub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

peachfuzz-code's Issues

Issue running dumb fuzzing tutorial

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:

  • Validate XML file
$ ./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.
  • Run peach for a single iteration
$ ./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
  • The XML file derived from the tutorial:
<?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 -->
  • System Info:
    • Ubuntu 18.04
    • gcc 4.8
    • Mono 6.0.0.313

Facing Issue in waf build

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

Facing Issue in waf build

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.