<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Countslide alphanumeric GetPC</title>
	<atom:link href="http://skypher.com/index.php/2010/01/02/countslide-alphanumeric-getpc/feed/" rel="self" type="application/rss+xml" />
	<link>http://skypher.com/index.php/2010/01/02/countslide-alphanumeric-getpc/</link>
	<description>The blog for absolutely nothing!</description>
	<lastBuildDate>Fri, 25 Jun 2010 07:02:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: moonpants</title>
		<link>http://skypher.com/index.php/2010/01/02/countslide-alphanumeric-getpc/comment-page-1/#comment-649</link>
		<dc:creator>moonpants</dc:creator>
		<pubDate>Mon, 11 Jan 2010 04:46:47 +0000</pubDate>
		<guid isPermaLink="false">http://skypher.com/?p=347#comment-649</guid>
		<description>ah yes, what you say makes sense.  i was thinking about it a different way (aka the wrong way :).  that is indeed a clever approach, nice work!</description>
		<content:encoded><![CDATA[<p>ah yes, what you say makes sense.  i was thinking about it a different way (aka the wrong way <img src='http://skypher.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .  that is indeed a clever approach, nice work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SkyLined</title>
		<link>http://skypher.com/index.php/2010/01/02/countslide-alphanumeric-getpc/comment-page-1/#comment-647</link>
		<dc:creator>SkyLined</dc:creator>
		<pubDate>Sun, 10 Jan 2010 22:25:14 +0000</pubDate>
		<guid isPermaLink="false">http://skypher.com/?p=347#comment-647</guid>
		<description>We are working under the assumption that you cannot know EXACTLY where your shellcode will start. If you would, you would not need a nopsled at all. Since we do not know where the shellcode starts, we do not know where in the shellcode to put the patcher to have at an exact location. We can only make sure it is in a certain region.</description>
		<content:encoded><![CDATA[<p>We are working under the assumption that you cannot know EXACTLY where your shellcode will start. If you would, you would not need a nopsled at all. Since we do not know where the shellcode starts, we do not know where in the shellcode to put the patcher to have at an exact location. We can only make sure it is in a certain region.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: moonpants</title>
		<link>http://skypher.com/index.php/2010/01/02/countslide-alphanumeric-getpc/comment-page-1/#comment-646</link>
		<dc:creator>moonpants</dc:creator>
		<pubDate>Sun, 10 Jan 2010 20:50:32 +0000</pubDate>
		<guid isPermaLink="false">http://skypher.com/?p=347#comment-646</guid>
		<description>i guess what i&#039;m saying is if you can predict that code execution will start somewhere within [A_min, A_max], then you can assume the address of EIP is A_max and then append the &quot;patcher&quot; stub starting at A_max + 1.  This is because A_min and A_max are fixed addresses per your description above.  

in other words, you fill [A_min, A_max] with your NOP sled, followed by the &quot;patcher&quot; piece which is really just a fixed geteip that stores the address of A_max + lengthof(patcher) in the desired register, followed by the decoder stub.

what is the downside of doing it this way over what was described above?</description>
		<content:encoded><![CDATA[<p>i guess what i&#8217;m saying is if you can predict that code execution will start somewhere within [A_min, A_max], then you can assume the address of EIP is A_max and then append the &#8220;patcher&#8221; stub starting at A_max + 1.  This is because A_min and A_max are fixed addresses per your description above.  </p>
<p>in other words, you fill [A_min, A_max] with your NOP sled, followed by the &#8220;patcher&#8221; piece which is really just a fixed geteip that stores the address of A_max + lengthof(patcher) in the desired register, followed by the decoder stub.</p>
<p>what is the downside of doing it this way over what was described above?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SkyLined</title>
		<link>http://skypher.com/index.php/2010/01/02/countslide-alphanumeric-getpc/comment-page-1/#comment-644</link>
		<dc:creator>SkyLined</dc:creator>
		<pubDate>Sun, 03 Jan 2010 12:54:55 +0000</pubDate>
		<guid isPermaLink="false">http://skypher.com/?p=347#comment-644</guid>
		<description>I need to do all these elaborate tricks to calculate the exact value of &lt;strong&gt;A&lt;sub&gt;nop&lt;/sub&gt;&lt;/strong&gt; not &lt;strong&gt;A&lt;sub&gt;avg&lt;/sub&gt;&lt;/strong&gt;; the later is the predictable &lt;em&gt;average&lt;/em&gt; address where the shellcode will likely be but doesn&#039;t say much about the &lt;em&gt;exact&lt;/em&gt; location of the shellcode when it gets executed. The former is what you need to know; it is the exact location where the shellcode starts for each try and it changes with each try. This is a value predicted to be in the range [&lt;strong&gt;A&lt;sub&gt;min&lt;/sub&gt;&lt;/strong&gt;, &lt;strong&gt;A&lt;sub&gt;max&lt;/sub&gt;&lt;/strong&gt;]. The countslide trick is the only way that I know to calculate it.</description>
		<content:encoded><![CDATA[<p>I need to do all these elaborate tricks to calculate the exact value of <strong>A<sub>nop</sub></strong> not <strong>A<sub>avg</sub></strong>; the later is the predictable <em>average</em> address where the shellcode will likely be but doesn&#8217;t say much about the <em>exact</em> location of the shellcode when it gets executed. The former is what you need to know; it is the exact location where the shellcode starts for each try and it changes with each try. This is a value predicted to be in the range [<strong>A<sub>min</sub></strong>, <strong>A<sub>max</sub></strong>]. The countslide trick is the only way that I know to calculate it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: moonpants</title>
		<link>http://skypher.com/index.php/2010/01/02/countslide-alphanumeric-getpc/comment-page-1/#comment-643</link>
		<dc:creator>moonpants</dc:creator>
		<pubDate>Sun, 03 Jan 2010 02:11:48 +0000</pubDate>
		<guid isPermaLink="false">http://skypher.com/?p=347#comment-643</guid>
		<description>I suspect that i&#039;m being overly dense here... 

You assume that your nop sled will reside in a predictable sub-region of [&lt;strong&gt;A&lt;sub&gt;min&lt;/sub&gt;&lt;/strong&gt;, &lt;strong&gt;A&lt;sub&gt;max&lt;/sub&gt;&lt;/strong&gt;] and based on this you can calculate the fixed address of the countslide (&lt;strong&gt;A&lt;sub&gt;avg&lt;/sub&gt;&lt;/strong&gt; + &lt;strong&gt;D&lt;sub&gt;max&lt;/sub&gt;&lt;/strong&gt; * 3 + &lt;strong&gt;P&lt;/strong&gt;).  this effectively means you are able to pre-compute the location of your actual shellcode to begin with, since the address of the patcher and the following countslide is a constant.  if this is true, why not just replace the patcher with a bit of code that directly initializes &lt;TT&gt;ECX&lt;/TT&gt; to the effective address of the shellcode, since in essence this seems to be what you&#039;re doing. I can understand that this value may need to be encoded somehow to be alpha compatible, although it seems like the patcher already has to account for this in your example considering that it pushes this value to the stack.

what is the benefit of the added complexity that you describe above?</description>
		<content:encoded><![CDATA[<p>I suspect that i&#8217;m being overly dense here&#8230; </p>
<p>You assume that your nop sled will reside in a predictable sub-region of [<strong>A<sub>min</sub></strong>, <strong>A<sub>max</sub></strong>] and based on this you can calculate the fixed address of the countslide (<strong>A<sub>avg</sub></strong> + <strong>D<sub>max</sub></strong> * 3 + <strong>P</strong>).  this effectively means you are able to pre-compute the location of your actual shellcode to begin with, since the address of the patcher and the following countslide is a constant.  if this is true, why not just replace the patcher with a bit of code that directly initializes <tt>ECX</tt> to the effective address of the shellcode, since in essence this seems to be what you&#8217;re doing. I can understand that this value may need to be encoded somehow to be alpha compatible, although it seems like the patcher already has to account for this in your example considering that it pushes this value to the stack.</p>
<p>what is the benefit of the added complexity that you describe above?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
