<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>phed.org</title>
	<atom:link href="http://phed.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://phed.org</link>
	<description>The Rantings of Michael Eddington</description>
	<pubDate>Thu, 07 Aug 2008 05:16:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>First Peach Training</title>
		<link>http://phed.org/2008/08/04/first-peach-training/</link>
		<comments>http://phed.org/2008/08/04/first-peach-training/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 11:47:39 +0000</pubDate>
		<dc:creator>Michael Eddington</dc:creator>
		
		<category><![CDATA[Peach]]></category>

		<guid isPermaLink="false">http://phed.org/2008/08/04/first-peach-training/</guid>
		<description><![CDATA[&#160; The first Peach training at Blackhat finished today and it was a blast.&#160; This first class had about 18 people in it writing fuzzers for PNG, QuakeWorld, Yahoo! IM Client, and Quicktime.&#160; Everyone learned allot, we found a number of bugs, and we are planning on many improvements to the error messages and debugging [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp; The first Peach training at Blackhat finished today and it was<a href="http://phed.org/wp-content/uploads/smaller-sign.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="244" alt="smaller-sign" src="http://phed.org/wp-content/uploads/smaller-sign-thumb.jpg" width="177" align="right" border="0"></a> a blast.&nbsp; This first class had about 18 people in it writing fuzzers for PNG, QuakeWorld, Yahoo! IM Client, and Quicktime.&nbsp; Everyone learned allot, we found a number of bugs, and we are planning on many improvements to the error messages and debugging of Peach fuzzers based on this first class.</p>
<p>Tomorrow starts is the start of the second class, hopefully it will be just as fun as the first.</p>
<p>Thanks to everyone who signed up!</p>
]]></content:encoded>
			<wfw:commentRss>http://phed.org/2008/08/04/first-peach-training/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Peach 2.1 BETA3 Bug Patch #2</title>
		<link>http://phed.org/2008/06/15/peach-21-beta3-bug-patch-2/</link>
		<comments>http://phed.org/2008/06/15/peach-21-beta3-bug-patch-2/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 20:01:05 +0000</pubDate>
		<dc:creator>Michael Eddington</dc:creator>
		
		<category><![CDATA[Peach]]></category>

		<guid isPermaLink="false">http://phed.org/2008/06/15/peach-21-beta3-bug-patch-2/</guid>
		<description><![CDATA[A big thanks to Chris Clark who found the second patch worthy bug. This is a gnarly bug in the Mutator code that would sometimes cause a mutator to get skipped.&#160; Chris is also the first to submit a new custom mutator that will be included in next release Peach 2.1.&#160; Thanks Chris!
See this mail [...]]]></description>
			<content:encoded><![CDATA[<p>A big thanks to Chris Clark who found the second patch worthy bug. This is a gnarly bug in the Mutator code that would sometimes cause a mutator to get skipped.&nbsp; Chris is also the first to submit a new custom mutator that will be included in next release Peach 2.1.&nbsp; Thanks Chris!
<p><a href="http://groups.google.com/group/peachfuzz/browse_thread/thread/85e4be75e94d4ef9">See this mail list post to correct the problem.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://phed.org/2008/06/15/peach-21-beta3-bug-patch-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Peach 2.1 - Fuzzing GUI Applications</title>
		<link>http://phed.org/2008/06/13/peach-21-fuzzing-gui-applications/</link>
		<comments>http://phed.org/2008/06/13/peach-21-fuzzing-gui-applications/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 05:22:19 +0000</pubDate>
		<dc:creator>Michael Eddington</dc:creator>
		
		<category><![CDATA[Peach]]></category>

		<guid isPermaLink="false">http://phed.org/2008/06/13/peach-21-fuzzing-gui-applications/</guid>
		<description><![CDATA[I&#8217;ve had a few emails about fuzzing file formats consumed by GUI application, these are applications that display a window such as image viewers, movie players, etc.&#160; Included in Peach 2.1 is good support for fuzzing these types of applications on Windows.&#160; People on OS X and Unix are sadly out of luck for now.
The [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a few emails about fuzzing file formats consumed by GUI application, these are applications that display a window such as image viewers, movie players, etc.&nbsp; Included in Peach 2.1 is good support for fuzzing these types of applications on Windows.&nbsp; People on OS X and Unix are sadly out of luck for now.</p>
<p>The following article will walk you through an example file fuzzer.</p>
</p>
<p><span id="more-74"></span></p>
<p>Fuzzing file formats passed to applications on the command line have the following flow for each test iteration:</p>
<ol>
<li>Create some mutated data
<li>Write the data to disk
<li>Launch the application
<li>Close the application</li>
</ol>
<p>To detect faults we will use <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=bd02c19c-1250-433c-8c1b-2619bd93b3a2&amp;displaylang=en">Microsoft&#8217;s Application Verifier</a> application which is able to automatically attached a debugger and set variouse memory debugging options on all processes with a specific executable name.&nbsp; This is perfect for us since we will be restarting the application for each test we perform.&nbsp; Peach includes a monitor called &#8220;debugger.WindowsAppVerifier&#8221; that we will use to control this tool.</p>
<p>Okay, so next up we need to be able to perform steps 2-4.&nbsp; We will use a publisher called &#8220;file.FileWriterLauncherGui&#8221;.&nbsp; This publisher will act as both a stream and call based publisher allowing us to write out a file and then launch an application.&nbsp; It will wait about 5 seconds and than send a WM_CLOSE message to the application, and finally if the application does not shut down will terminate it.&nbsp; If we are lucky, the WM_CLOSE message will let the application shutdown normally allowing for additional code coverage.</p>
<p>On with the XML!</p>
<p><strong>Data Model</strong></p>
<p>Nothing very interesting here.&nbsp; We will have two data models, one will specify the filename for the program (this will make more sense later).&nbsp; Note that one side affect of requiring the FileName data model will be some fuzzing of the filename.&nbsp; There are a few mutators (the data tree set) that will not notice the &#8220;isStatic&#8221; and perform some mutations anyways.</p>
<p>
<pre>&lt;!-- Define our file format DDL --&gt;
&lt;DataModel name="FileData"&gt;
	&lt;String value="Hello World!" /&gt;
&lt;/DataModel&gt;

&lt;!-- A template to hold the filename --&gt;
&lt;DataModel name="FileName"&gt;
	&lt;String isStatic="true" value="fuzzedfile.txt" /&gt;
&lt;/DataModel&gt;</pre>
</p>
<p><strong>State Model</strong></p>
<p>Now things get more interesting.&nbsp; This is were we will define steps 2-4.&nbsp; There are three actions in the following state model.&nbsp; The first two will create, write, and close the file after writing out data model out to it.&nbsp; The third action will launch our application passing as a parameter the FileName data model (fuzzedfile.txt).</p>
<p>
<pre>&lt;StateModel name="State" initialState="Initial"&gt;
    &lt;State name="Initial"&gt;
        &lt;!-- Write out contents of file --&gt;
        <strong>&lt;Action name=&#8221;WriteFile&#8221; type=&#8221;output&#8221;&gt;</strong>
            &lt;DataModel ref=&#8221;FileData&#8221; /&gt;
        &lt;/Action&gt;

        &lt;!&#8211; Close file &#8211;&gt;
        <strong>&lt;Action type=&#8221;close&#8221; /&gt;
</strong>
        &lt;!&#8211; Launch the file consumer &#8211;&gt;
        <strong>&lt;Action type=&#8221;call&#8221; method=&#8221;c:\windows\system32\notepad.exe&#8221;&gt;
</strong>            &lt;Param type=&#8221;in&#8221; name=&#8221;filename&#8221;&gt;
                &lt;DataModel ref=&#8221;FileName&#8221;/&gt;
            &lt;/Param&gt;
        &lt;/Action&gt;
    &lt;/State&gt;
&lt;/StateModel&gt;
</pre>
<p><strong>Agent Configuration</strong></p>
<p>Next up we need to configure out agent and monitor to use the debugger.WindowsAppVerifier monitor.&nbsp; Notice that the parameter to the monitor specified just the executable name, not the full path.</p>
<p>
<pre>&lt;!-- Setup a local agent that will monitor for faults --&gt;
&lt;Agent name="LocalAgent" location="http://127.0.0.1:9000"&gt;
    &lt;!-- For file fuzzing were the application will be launched and closed
        a number of times we will use Microsofts Application Verifier to
        monitor the process for faults.  --&gt;
    &lt;Monitor class="debugger.WindowsAppVerifier"&gt;
        <strong>&lt;Param name=&#8221;Application&#8221; value=&#8221;notepad.exe&#8221; /&gt;</strong>
    &lt;/Monitor&gt;
&lt;/Agent&gt;
</pre>
<p><strong>Test and Run Configuration</strong></p>
<p>Almost done now, this is the final section were we configure the test and run.&nbsp; These two sections will tie all these things together and associate our publisher.&nbsp; I have bolded the two parameters for the publisher we are using.&nbsp; The filename <em>must</em> match the one in our FileName data model or things will not work right.&nbsp; Additionally the <em>windowName</em> parameter should be a unique (but partial) application window title.</p>
<p>
<pre>&lt;Test name="TheTest"&gt;
    &lt;Agent ref="LocalAgent" /&gt;

    &lt;StateModel ref="State"/&gt;

    &lt;!-- Configure our publisher with correct filename to write too --&gt;
    &lt;Publisher class="file.FileWriterLauncherGui"&gt;
<strong>        &lt;Param name=&#8221;fileName&#8221; value=&#8221;fuzzedfile.txt&#8221; /&gt;
        &lt;Param name=&#8221;windowName&#8221; value=&#8221;Notepad&#8221; /&gt;</strong>
    &lt;/Publisher&gt;
&lt;/Test&gt;

&lt;Run name=&#8221;DefaultRun&#8221;&gt;
    &lt;Test ref=&#8221;TheTest&#8221; /&gt;
    &lt;Logger class=&#8221;logger.Filesystem&#8221;&gt;
        &lt;Param name=&#8221;path&#8221; value=&#8221;c:\peach\logtest&#8221; /&gt;
    &lt;/Logger&gt;
&lt;/Run&gt;
</pre>
<p><strong>Running the Fuzzer</strong></p>
<p>Okay, to run this bad boy we will need to launch two command windows.&nbsp; In one kick off a Peach Agent by running &#8220;peach.py -a&#8221;.&nbsp; In the second window we will run our fuzzer by saying &#8220;peach.py FileFuzzerGui.xml&#8221;.&nbsp; If all works well you will see notepad popup with &#8220;Hello World!&#8221; for a few seconds than go away only to be replaced with another notepad window.&nbsp; If you continue watching you will see &#8220;Hello World!&#8221; start to get mutated.</p>
<p><strong>The Complete File Listing</strong></p>
<p>Here is the complete file listing for this fuzzer example.&nbsp; I hope it made sense!</p>
<p>
<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;Peach xmlns="http://phed.org/2008/Peach" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://phed.org/2008/Peach ../peach.xsd" version="1.0"
	author="Michael Eddington"&gt;

	&lt;!-- Import defaults for Peach instance --&gt;
	&lt;Include ns="default" src="file:defaults.xml" /&gt;
	&lt;Include ns="pt" src="file:PeachTypes.xml" /&gt;

	&lt;!-- Define our file format DDL --&gt;
	&lt;DataModel name="FileData"&gt;
		&lt;String value="Hello World!" /&gt;
	&lt;/DataModel&gt;

	&lt;!-- A template to hold the filename --&gt;
	&lt;DataModel name="FileName"&gt;
		&lt;String isStatic="true" value="fuzzedfile.txt" /&gt;
	&lt;/DataModel&gt;

	&lt;!-- Define a simple state machine that will write the file and
		then launch a program using the FileWriterLauncher publisher --&gt;
	&lt;StateModel name="State" initialState="Initial"&gt;
		&lt;State name="Initial"&gt;
			&lt;!-- Write out contents of file --&gt;
			&lt;Action name="WriteFile" type="output"&gt;
				&lt;DataModel ref="FileData" /&gt;
			&lt;/Action&gt;

			&lt;!-- Close file --&gt;
			&lt;Action type="close" /&gt;

			&lt;!-- Launch the file consumer --&gt;
			&lt;Action type="call" method="c:\windows\system32\notepad.exe"&gt;
				&lt;Param type="in" name="filename"&gt;
					&lt;DataModel ref="FileName"/&gt;
				&lt;/Param&gt;
			&lt;/Action&gt;
		&lt;/State&gt;
	&lt;/StateModel&gt;

	&lt;!-- Setup a local agent that will monitor for faults --&gt;
	&lt;Agent name="LocalAgent" location="http://127.0.0.1:9000"&gt;
		&lt;!-- For file fuzzing were the application will be launched and closed
			a number of times we will use Microsofts Application Verifier to
			monitor the process for faults.  --&gt;
		&lt;Monitor class="debugger.WindowsAppVerifier"&gt;
			&lt;Param name="Application" value="notepad.exe" /&gt;
		&lt;/Monitor&gt;
	&lt;/Agent&gt;

	&lt;Test name="TheTest"&gt;
		&lt;Agent ref="LocalAgent" /&gt;

		&lt;StateModel ref="State"/&gt;

		&lt;!-- Configure our publisher with correct filename to write too --&gt;
		&lt;Publisher class="file.FileWriterLauncherGui"&gt;
			&lt;Param name="fileName" value="fuzzedfile.txt" /&gt;
			&lt;Param name="windowName" value="Notepad" /&gt;
		&lt;/Publisher&gt;
	&lt;/Test&gt;

	&lt;Run name="DefaultRun"&gt;
		&lt;Test ref="TheTest" /&gt;
		&lt;Logger class="logger.Filesystem"&gt;
			&lt;Param name="path" value="c:\peach\logtest" /&gt;
		&lt;/Logger&gt;
	&lt;/Run&gt;

&lt;/Peach&gt;
&lt;!-- end --&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://phed.org/2008/06/13/peach-21-fuzzing-gui-applications/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Peach 2.1 - Fixups, checksums, crc32&#8217;s</title>
		<link>http://phed.org/2008/06/13/peach-21-fixups-checksums-crc32s/</link>
		<comments>http://phed.org/2008/06/13/peach-21-fixups-checksums-crc32s/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 03:56:24 +0000</pubDate>
		<dc:creator>Michael Eddington</dc:creator>
		
		<category><![CDATA[Peach]]></category>

		<guid isPermaLink="false">http://phed.org/2008/06/13/peach-21-fixups-checksums-crc32s/</guid>
		<description><![CDATA[Peach 2.1 includes a much improved mechanism for performing what I call data fix-ups were we calculate checksums required to make our data correct.&#160; Many protocols and most file formats include some form of checksum field to verify that data was not corrupted.&#160; When we generate/mutate data we want to make sure we re-calculate these [...]]]></description>
			<content:encoded><![CDATA[<p>Peach 2.1 includes a much improved mechanism for performing what I call data fix-ups were we calculate checksums required to make our data correct.&nbsp; Many protocols and most file formats include some form of checksum field to verify that data was not corrupted.&nbsp; When we generate/mutate data we want to make sure we re-calculate these checksums after our modifications, otherwise we will likely not get very far down the parser code paths due to failed validations.</p>
<p>Peach 2.1 BETA3 includes the following fixups out of the box:</p>
<ul>
<li>checksums.Crc32Fixup &#8212; This fixup computes the standard CRC32 as defined by ISO 3309 and is used by PNG, zip, etc.
<li>checksums.EthernetChecksumFixup &#8212; Computes the ethernet checksum.
<li>checksums.IcmpChecksumFixup &#8212; Computes the ICMP packet checksum.</li>
</ul>
<p>
<span id="more-70"></span>
 </p>
<p><strong>Using Fixups</strong></p>
<p>Our example will be a PNG chunk data model which looks like this:</p>
<p>&lt;DataModel name=&#8221;Chunk&#8221;&gt;<br />&nbsp;&nbsp;&nbsp; &lt;Number name=&#8221;Length&#8221; size=&#8221;32&#8243; endian=&#8221;network&#8221; signed=&#8221;false&#8221;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Relation type=&#8221;size&#8221; of=&#8221;Core.Data&#8221;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/Number&gt;<br />&nbsp;&nbsp;&nbsp; &lt;String name=&#8221;Type&#8221; length=&#8221;4&#8243;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;Blob name=&#8221;Data&#8221; value=&#8221;"/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;Number name=&#8221;CRC&#8221; size=&#8221;32&#8243; signed=&#8221;false&#8221; endian=&#8221;network&#8221; isStatic=&#8221;true&#8221; value=&#8221;9999&#8243; /&gt;<br />&lt;/DataModel&gt;
<p>From the PNG spec we know the CRC should be of <em>Type</em> and <em>Data</em>.&nbsp; We will need to do two modifications to this data model.&nbsp; First we will need to wrap <em>Type</em> and <em>Data</em> in a Block element.&nbsp; Second we will add our fixup.
<p>&lt;DataModel name=&#8221;Chunk&#8221;&gt;<br />&nbsp;&nbsp;&nbsp; &lt;Number name=&#8221;Length&#8221; size=&#8221;32&#8243; endian=&#8221;network&#8221; signed=&#8221;false&#8221;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Relation type=&#8221;size&#8221; of=&#8221;Core.Data&#8221;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/Number&gt;<br />&nbsp;&nbsp;&nbsp; <strong>&lt;Block name=&#8221;Core&#8221;&gt;</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;String name=&#8221;Type&#8221; length=&#8221;4&#8243;/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Blob name=&#8221;Data&#8221; value=&#8221;"/&gt;<br />&nbsp;&nbsp;&nbsp; <strong>&lt;/Block&gt;</strong><br />&nbsp;&nbsp;&nbsp; &lt;Number name=&#8221;CRC&#8221; size=&#8221;32&#8243; signed=&#8221;false&#8221; endian=&#8221;network&#8221; isStatic=&#8221;true&#8221; value=&#8221;9999&#8243;&gt;<br /><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Fixup class=&#8221;checksums.Crc32Fixup&#8221;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Param name=&#8221;ref&#8221; value=&#8221;Core&#8221;/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Fixup&gt;<br /></strong>&nbsp;&nbsp;&nbsp; &lt;/Number&gt;<br />&lt;/DataModel&gt;
<p>The bolded portions are the changes we made.&nbsp; The one of most interest is the &lt;Fixup&gt; element that is a child of the <em>CRC</em> number.&nbsp; All fixups take a single parameter of <em>ref</em> that specifies the name of the element that we will operate on.&nbsp; In this case that is <em>Core</em> the wrapper of <em>Length</em> and <em>Data</em>.</p>
<p><strong>Creating Custom Fixups</strong></p>
<p>Creating custom fixups are easy and require implementing a single class and two methods.&nbsp; The following is the code for the <em>Crc32Fixup</em> that we used in the above example:</p>
<p>
<pre>class Crc32Fixup(Fixup):
	'''
	Standard CRC32 as defined by ISO 3309.  Used by PNG, zip, etc.
	'''

	def __init__(self, ref):
		Fixup.__init__(self)
		self.ref = ref

	def fixup(self):
		stuff = self._findDataElementByName(self.ref).getValue()
		if stuff == None:
			raise Exception("Error: Crc32Fixup was unable to locate [%s]&#8221; % self.ref)

		<strong>return zlib.crc32(stuff)
</strong></pre>
<p>To implement your own Fixup simply copy this code and change the class name (Crc33Fixup), the Exception string and finally implement your own fixup code instead of &#8220;return zlib.crc32&#8243;.&nbsp; To include your custom module see the documentation about &lt;PythonPath&gt; and &lt;Import&gt; in the Peach 2 Tutorial.</p>
]]></content:encoded>
			<wfw:commentRss>http://phed.org/2008/06/13/peach-21-fixups-checksums-crc32s/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Peach 2.1 BETA3 Bug Patch</title>
		<link>http://phed.org/2008/06/13/peach-21-beta3-bug-patch/</link>
		<comments>http://phed.org/2008/06/13/peach-21-beta3-bug-patch/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 03:16:39 +0000</pubDate>
		<dc:creator>Michael Eddington</dc:creator>
		
		<category><![CDATA[Peach]]></category>

		<guid isPermaLink="false">http://phed.org/2008/06/13/peach-21-beta3-bug-patch/</guid>
		<description><![CDATA[Well it was bound to happen, the first &#8220;stupid developer&#8221; (that&#8217;s me ;) bug was reported.&#160; I have a patched posted up to the mailing list.&#160; This bug affects the &#60;Number&#62; element when specifying valueType=&#8221;hex&#8221; values.&#160; Additionally, I fixed the Tutorial_DHCP-Request.xml so it works with beta3.
Thanks to David for reporting this bug.
Patch and List Post
]]></description>
			<content:encoded><![CDATA[<p>Well it was bound to happen, the first &#8220;stupid developer&#8221; (that&#8217;s me ;) bug was reported.&nbsp; I have a patched posted up to the mailing list.&nbsp; This bug affects the &lt;Number&gt; element when specifying valueType=&#8221;hex&#8221; values.&nbsp; Additionally, I fixed the Tutorial_DHCP-Request.xml so it works with beta3.</p>
<p>Thanks to David for reporting this bug.</p>
<p><a href="http://groups.google.com/group/peachfuzz/browse_thread/thread/2ce533fec18e234a">Patch and List Post</a></p>
]]></content:encoded>
			<wfw:commentRss>http://phed.org/2008/06/13/peach-21-beta3-bug-patch/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Peach 2.1 - Exposed Mutators - Part 1</title>
		<link>http://phed.org/2008/06/13/peach-21-exposed-mutators-part-1/</link>
		<comments>http://phed.org/2008/06/13/peach-21-exposed-mutators-part-1/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 08:35:08 +0000</pubDate>
		<dc:creator>Michael Eddington</dc:creator>
		
		<category><![CDATA[Peach]]></category>

		<guid isPermaLink="false">http://phed.org/2008/06/13/peach-21-exposed-mutators-part-1/</guid>
		<description><![CDATA[Peach 2.1 BETA3 exposes the mutators used by Peach to perform fuzzing.&#160; Each mutator performs a specific mutation.&#160; Custom mutators can be created and included, additionally the order in which mutators are used can be customized for all fuzzers down to specific tests.


 
First up lets take a look at the default mutators included with [...]]]></description>
			<content:encoded><![CDATA[<p>Peach 2.1 BETA3 exposes the mutators used by Peach to perform fuzzing.&nbsp; Each mutator performs a specific mutation.&nbsp; Custom mutators can be created and included, additionally the order in which mutators are used can be customized for all fuzzers down to specific tests.</p>
<p>
<span id="more-68"></span>
 </p>
<p>First up lets take a look at the default mutators included with this release:</p>
<p><strong>default.NullMutator</strong></p>
<p>The first mutator we will look at is the NullMutator.&nbsp; This mutator has a single test case that does not modify anything.&nbsp; By default this is the first mutator Peach will use so the first iteration (#1) will produce data that was not modified in anyway to help with debugging of your fuzzer.</p>
<p><strong>string.StringTokenMutator</strong></p>
<p>Next up is the StringTokenMutator.&nbsp; This mutator is applied to all string elements in a data model.&nbsp; This mutator will tokenize the strings default value (if any) and perform a number of mutations on the resulting token tree including 1,000 to 2,000 bad strings, removals, additions, duplications, etc.&nbsp; The string &#8220;?key1=value1&amp;key2=value2&#8243; will result in about 40,000 test cases from this mutator.</p>
<p><strong>string.XmlW3CMutator</strong></p>
<p>The XmlW3CMutator will cycle through every XML test case provided by the W3C.&nbsp; This numerous XML files that have caused faults in various XML parsers.&nbsp; This mutator will only target string elements that have a hint of type=xml.</p>
<p><strong>string.PathMutator</strong></p>
<p>As one would guess this mutator performs mutations on file system paths including UNC network paths.&nbsp; In the current beta3 release this mutator is fairly limited but will be expanded for the non-beta 2.1 release.&nbsp; Additionally, this mutator will only target strings that have a hint of type=path.</p>
<p><strong>string.HostnameMutator</strong></p>
<p>You would also be correct in assuming this mutator performed mutations of hostname.&nbsp; Again, the mustations performed will be expanded for the 2.1 release, but still currently useful.&nbsp; This mutator will only target strings that have a hint of type=hostname.</p>
<p><strong>string.FilenameMutator</strong></p>
<p>Finally, I bet you can guess what this mutator does!&nbsp; That&#8217;s right, mutates filenames and filenames that include paths.&nbsp; This mutator will only target strings that have a hint of type=filename.</p>
<p><strong>number.NumericalEdgeCaseMutator</strong></p>
<p>The NumericalEdgeCaseMutator targets all Number elements in the data model and cycles through a number of interesting numerical edge cases which occur on type boundaries (0, min/max for both signed/unsigned).&nbsp; Currently we will go from Edge Number - 50 through Edge Number + 50.&nbsp; This mutator is good at locating certain types of integer overflow related faults.</p>
<p><strong>number.NumericalVarianceMutator</strong></p>
<p>The NumericalVarianceMutator also targets all Number elements in the data model.&nbsp; This mutator will take the default value and generate a range of values starting with Default Value - 50 through Default Value + 50.</p>
<p><strong>number.FiniteRandomNumbersMutator</strong></p>
<p>This mutator will produce upto 5,000 random numbers between the min/max of a Number element.&nbsp; This mutator is useful for triggering unpredictable faults.</p>
<p><strong>blob.BitFlipperMutator</strong></p>
<p>This release also includes a simple bit flipper that targets Blob elements in the data model and performs random bit flips based on the size of the blob.&nbsp; For example the larger the blob the more flips will occur.&nbsp; This mutator is finite.</p>
<p><strong>datatree.DataTreeRemoveMutator</strong></p>
<p>This mutator will walk our data model and remove nodes one at a time.</p>
<p><strong>datatree.DataTreeDuplicateMutator</strong></p>
<p>Similar to the DataTreeRemoverMutator accept this mutator will walk the data model and duplicate nodes from 2 through 50 duplications of each node.</p>
<p><strong>datatree.DataTreeSwapNearNodesMutator</strong></p>
<p>Finally, the last mutator included with Peach 2.1 will swap sibling nodes in the data model causing the data model to be reagranged.</p>
]]></content:encoded>
			<wfw:commentRss>http://phed.org/2008/06/13/peach-21-exposed-mutators-part-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Peach 2.1 - Mutator Hints</title>
		<link>http://phed.org/2008/06/13/peach-21-mutator-hints/</link>
		<comments>http://phed.org/2008/06/13/peach-21-mutator-hints/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 08:12:17 +0000</pubDate>
		<dc:creator>Michael Eddington</dc:creator>
		
		<category><![CDATA[Peach]]></category>

		<guid isPermaLink="false">http://phed.org/2008/06/13/peach-21-mutator-hints/</guid>
		<description><![CDATA[This is the first in several articles covering some of the new features in Peach 2.1 BETA3.&#160; In this article I will cover the new &#60;Hint&#62; element.&#160; This element was added to allow metadata that can be used by different mutators to be added to the data model.&#160; For example, consider this data model:

&#60;DataModel name="FilenameParameter"&#62;
 [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first in several articles covering some of the new features in Peach 2.1 BETA3.&nbsp; In this article I will cover the new &lt;Hint&gt; element.&nbsp; This element was added to allow metadata that can be used by different mutators to be added to the data model.&nbsp; For example, consider this data model:</p>
<p>
<pre>&lt;DataModel name="FilenameParameter"&gt;
  &lt;String name="Filename" value="c:\path\file.bin" /&gt;
&lt;/DataModel&gt;
</pre>
<p>The <em>Filename</em> string element is a prime candidate for a hint indicating that not only is it a string, it is also a filename.&nbsp; The following is our changed data model that includes a hint:</p>
<p>
<pre>&lt;DataModel name="FilenameParameter"&gt;
  &lt;String name="Filename" value="c:\path\file.bin"&gt;
    &lt;Hint name="type" value="filename" /&gt;
  &lt;/String&gt;
&lt;/DataModel&gt;
</pre>
<p>Multiple Hints are allowed per data element.&nbsp; The current set of mutators included with Peach only understand the following hints:</p>
<table cellspacing="0" cellpadding="2" width="400" border="1">
<tbody>
<tr>
<td valign="top" width="101"><strong>Name</strong></td>
<td valign="top" width="93"><strong>Value</strong></td>
<td valign="top" width="204"><strong>Description</strong></td>
</tr>
<tr>
<td valign="top" width="100">type</td>
<td valign="top" width="96">path</td>
<td valign="top" width="204">Indicates a path name</td>
</tr>
<tr>
<td valign="top" width="100">&nbsp;</td>
<td valign="top" width="98">filename</td>
<td valign="top" width="204">Indicates a filename w/path.</td>
</tr>
<tr>
<td valign="top" width="99">&nbsp;</td>
<td valign="top" width="100">xml</td>
<td valign="top" width="204">Indicates value is XML.&nbsp; Causes the inclusion of the W3C parser tests</td>
</tr>
<tr>
<td valign="top" width="99">&nbsp;</td>
<td valign="top" width="101">hostname</td>
<td valign="top" width="204">Indicates value is a hostname.</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://phed.org/2008/06/13/peach-21-mutator-hints/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Peach 2.1 BETA3 Released</title>
		<link>http://phed.org/2008/06/12/peach-21-beta3-released/</link>
		<comments>http://phed.org/2008/06/12/peach-21-beta3-released/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 07:57:57 +0000</pubDate>
		<dc:creator>Michael Eddington</dc:creator>
		
		<category><![CDATA[Peach]]></category>

		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://phed.org/2008/06/12/peach-21-beta3-released/</guid>
		<description><![CDATA[
This new beta includes a lot of changes and makes Peach feature complete for the 2.1 release coming in the next month or so.&#160; Many of the changes were internal clean ups.&#160; The internal DOM is now much cleaner and easier to use, as is the API to the engine and parser.&#160; Additionally, this release [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://phed.org/wp-content/uploads/peachvalidation.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="288" alt="PeachValidation" src="http://phed.org/wp-content/uploads/peachvalidation-thumb.jpg" width="272" align="right" border="0"></a></p>
<p>This new beta includes a lot of changes and makes Peach feature complete for the 2.1 release coming in the next month or so.&nbsp; Many of the changes were internal clean ups.&nbsp; The internal DOM is now much cleaner and easier to use, as is the API to the engine and parser.&nbsp; Additionally, this release include a new GUI application called Peach Validation.&nbsp; This application allows testing of your data model and also mutators.&nbsp; A screen shot has been included.</p>
<p>Additional features include Hints, Fixups, new &#8220;calc&#8221; length types, ability to specify a file to Data elements, etc.&nbsp; To much to talk about in this post.&nbsp; However, keep an eye on this blog for additional articles over the next few days exploring the new features of Peach 2.1 BETA3.</p>
<p><a href="http://peachfuzzer.com">Peach</a></p>
<p><a href="http://peachfuzzer.com/docs/releasenotes.html">Peach Release Notes</a></p>
<p><a href="http://sourceforge.net/project/showfiles.php?group_id=149840">Peach Downloads</a></p>
]]></content:encoded>
			<wfw:commentRss>http://phed.org/2008/06/12/peach-21-beta3-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Peach @ PH-Neutral 0&#215;7d8</title>
		<link>http://phed.org/2008/05/25/peach-ph-neutral-0x7d8/</link>
		<comments>http://phed.org/2008/05/25/peach-ph-neutral-0x7d8/#comments</comments>
		<pubDate>Sun, 25 May 2008 21:03:58 +0000</pubDate>
		<dc:creator>Michael Eddington</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://phed.org/2008/05/25/peach-ph-neutral-0x7d8/</guid>
		<description><![CDATA[The past ph-neutral security conferences in Berlin I have attended were all very fun, laid back, and informative.&#160; The European security &#8220;underground&#8221; scene is highly refreshing after so many high cost US conferences.&#160; Additionally the people are excellent and provide for good conversations.&#160; This years ph-neutral was no exception and was held at an Island [...]]]></description>
			<content:encoded><![CDATA[<p>The past ph-neutral security conferences in <a href="http://phed.org/wp-content/uploads/img-0242.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="184" alt="IMG_0242" src="http://phed.org/wp-content/uploads/img-0242-thumb.jpg" width="244" align="right" border="0"></a>Berlin I have attended were all very fun, laid back, and informative.&nbsp; The European security &#8220;underground&#8221; scene is highly refreshing after so many high cost US conferences.&nbsp; Additionally the people are excellent and provide for good conversations.&nbsp; This years ph-neutral was no exception and was held at an Island club, providing more space for this ever growing conference.&nbsp; This year was packed as usual with a record high of 450 pre-registrations.</p>
<p>I originally wrote Peach 1 at ph-neutral 4 or 5 years ago, so it seemed fitting to come back and talk about Peach 2.&nbsp; I had a blast and look forward to next year.</p>
<p><a href="http://ph-neutral.darklab.org/">ph-neutral</a></p>
]]></content:encoded>
			<wfw:commentRss>http://phed.org/2008/05/25/peach-ph-neutral-0x7d8/feed/</wfw:commentRss>
		</item>
		<item>
		<title>.NET &#34;Unsafe&#34; Security Issues &#8212; Part 1</title>
		<link>http://phed.org/2008/05/22/net-unsafe-security-issues-part-1/</link>
		<comments>http://phed.org/2008/05/22/net-unsafe-security-issues-part-1/#comments</comments>
		<pubDate>Thu, 22 May 2008 20:01:16 +0000</pubDate>
		<dc:creator>Michael Eddington</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://phed.org/2008/05/22/net-unsafe-security-issues-part-1/</guid>
		<description><![CDATA[The Microsoft .NET Framework provides the developer with a number of advanced features such as P/Invoke and unsafe code blocks.&#160; This article will take a look at unsafe code blocks and some of the security issues that should be looked for when reviewing or writing such code.
First off, what is the unsafe keyword and how [...]]]></description>
			<content:encoded><![CDATA[<p>The Microsoft .NET Framework provides the developer with a number of advanced features such as P/Invoke and unsafe code blocks.&#160; This article will take a look at unsafe code blocks and some of the security issues that should be looked for when reviewing or writing such code.</p>
<p>First off, what is the unsafe keyword and how can it be used?&#160; Glad you asked, unsafe allows for the use of pointers in .NET code.&#160; This includes pointers to managed objects such as arrays and strings.&#160; To use the unsafe keyword the assembly or executable must be compiled with a special flag allowing for unsafe code blocks.&#160; The resulting assembly/executable will not be verifiable by the CLR.</p>
<p><strong>Modification of Immutable Types</strong></p>
<p>With power comes the temptation to modify immutable types such as strings.&#160; Resist this urge as the CLR does a number of internal optimizations for known immutable types like strings.&#160; Modification of these immutable types can and will cause instability in the CLR, and have interesting ramifications.&#160; For example, some versions of the CLR keep only a single copy of strings.&#160; So if I created three strings, all with the value &quot;Hello World&quot;, I would really only have three references to the same string.&#160; This is okay since the string object is immutable.&#160; However, if I take a pointer to the string and change its contents I will end up changing the contents of all three strings!!</p>
<p><strong>Managed Pointers and Pinning</strong></p>
<p>The .NET memory manager can move values and object instances around in memory as needed.&#160; So, if we are going to get a pointer to such a memory region we need to tell the memory manager not to move that memory on us.&#160; Enter object pinning.&#160; Pinning tells the CLR not to move something until it is unpinned.&#160; A typical bug in unsafe code is when a managed pointer is held on to and used after it&#8217;s reference has been unpinned.&#160; This is a hard bug to detect as the program may run fine most of time and the crashes that occur may not be obviously linked to the unsafe code.</p>
<p>In the C# managed language, pinning typically occurs using the &quot;fixed&quot; block.&#160; This makes it easier to spot issues.&#160; I recommend avoiding other methods of pinning variables as they can be harder to review.</p>
<p>The managed extensions to C++ also provide what feels like &quot;lower level&quot; control over variable pinning.&#160; This is typically harder to review, but then if you are writing in MC++ you should already know what your about :)</p>
<p><strong>Buffer Overflows and other Pointer Issues</strong></p>
<p>With the unsafe keyword and pointer math come all the standard security issues those C/C++ developers need to worry about.&#160; There is a real possibility of causing buffer overflows that result in exploitable conditions in .NET applications.&#160; Buffer manipulation should be reviewed just like C/C++ for possible overflows.</p>
<p><strong></strong></p>
<p>And so ends part 1 of this article.&#160; Please feel free to comment on this post with questions and comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://phed.org/2008/05/22/net-unsafe-security-issues-part-1/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
