<?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 for The Knotter</title>
	<atom:link href="http://www.theknotter.net/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theknotter.net</link>
	<description>... after all, we&#039;re all alike</description>
	<lastBuildDate>Tue, 29 Mar 2011 10:25:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on Testing Web Applications With Embedded Tokens by digital</title>
		<link>http://www.theknotter.net/testing-web-applications-with-embedded-tokens/comment-page-1/#comment-68</link>
		<dc:creator>digital</dc:creator>
		<pubDate>Tue, 29 Mar 2011 10:25:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.theknotter.net/?p=345#comment-68</guid>
		<description>Thanks for your comment, I&#039;ll give the new Burp a try. I had no idea about the recursive grep option so thanks for that too.

The nice thing about the extension was that it handled anti-CSRF tokens for all the tools transparently instead of having something specific for the intruder. Not that you can&#039;t do any job just with the intruder but it&#039;s just easier to use.

I dropped an email to portswigger the day after I wrote this post but never got a response back, we&#039;ll never know if he reused my code but I want to think that at least it helped :-)</description>
		<content:encoded><![CDATA[<p>Thanks for your comment, I&#8217;ll give the new Burp a try. I had no idea about the recursive grep option so thanks for that too.</p>
<p>The nice thing about the extension was that it handled anti-CSRF tokens for all the tools transparently instead of having something specific for the intruder. Not that you can&#8217;t do any job just with the intruder but it&#8217;s just easier to use.</p>
<p>I dropped an email to portswigger the day after I wrote this post but never got a response back, we&#8217;ll never know if he reused my code but I want to think that at least it helped <img src='http://www.theknotter.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Web Applications With Embedded Tokens by Andre Gironda</title>
		<link>http://www.theknotter.net/testing-web-applications-with-embedded-tokens/comment-page-1/#comment-67</link>
		<dc:creator>Andre Gironda</dc:creator>
		<pubDate>Tue, 29 Mar 2011 02:21:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.theknotter.net/?p=345#comment-67</guid>
		<description>Burp Pro 1.4beta now has support for anti-CSRF token and other anti-automation for all modules (e.g. Intruder, Scanner, Spider, Sequencer, et al).

However, previous to Burp 1.4beta, one could implement automation against anti-automation, including anti-CSRF tokens by using the recursive grep Intruder payload set. This is only available in the Intruder module, but it suffices.

recursive grep is easy to configure, as well. You go into the options, extract grep portion of the configuration and add the relevant portion of the response, probably as regex ending ni the token name (along with the equals sign if it&#039;s there), which is typically found in either the HTTP header response or the HTML body as a body parameter. Set the stop capturing field, which is below the extract grep configuration. Usually this would be a quote or double-quote character. You may also need to set the max-length (some CSRF tokens and other anti-automation varies, so it&#039;s best to collect a few before you settle on a maximum length). 

Back in the intruder payloads section, the `select &quot;extract grep&quot; item to use&#039; field should be automatically set to the extract grep field added in the options tab. Configure the first payload as the first token found (usually the one in the intruder positions tab that was sent via the proxy history). Put it to work by using intruder menu, &quot;start attack&quot; as normal. That&#039;s it -- and I know you&#039;re thinking this sounds like a mouthful, but really it&#039;s not that bad. In some ways, I almost prefer it to the new Burp Pro 1.4beta macro language that is necessary (although it&#039;s worth it to be able to use Spider, Scanner, and the other tools).</description>
		<content:encoded><![CDATA[<p>Burp Pro 1.4beta now has support for anti-CSRF token and other anti-automation for all modules (e.g. Intruder, Scanner, Spider, Sequencer, et al).</p>
<p>However, previous to Burp 1.4beta, one could implement automation against anti-automation, including anti-CSRF tokens by using the recursive grep Intruder payload set. This is only available in the Intruder module, but it suffices.</p>
<p>recursive grep is easy to configure, as well. You go into the options, extract grep portion of the configuration and add the relevant portion of the response, probably as regex ending ni the token name (along with the equals sign if it&#8217;s there), which is typically found in either the HTTP header response or the HTML body as a body parameter. Set the stop capturing field, which is below the extract grep configuration. Usually this would be a quote or double-quote character. You may also need to set the max-length (some CSRF tokens and other anti-automation varies, so it&#8217;s best to collect a few before you settle on a maximum length). </p>
<p>Back in the intruder payloads section, the `select &#8220;extract grep&#8221; item to use&#8217; field should be automatically set to the extract grep field added in the options tab. Configure the first payload as the first token found (usually the one in the intruder positions tab that was sent via the proxy history). Put it to work by using intruder menu, &#8220;start attack&#8221; as normal. That&#8217;s it &#8212; and I know you&#8217;re thinking this sounds like a mouthful, but really it&#8217;s not that bad. In some ways, I almost prefer it to the new Burp Pro 1.4beta macro language that is necessary (although it&#8217;s worth it to be able to use Spider, Scanner, and the other tools).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Web Applications With Embedded Tokens by am</title>
		<link>http://www.theknotter.net/testing-web-applications-with-embedded-tokens/comment-page-1/#comment-63</link>
		<dc:creator>am</dc:creator>
		<pubDate>Thu, 13 Jan 2011 19:02:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.theknotter.net/?p=345#comment-63</guid>
		<description>&quot;In $v[$i]=$fakezval.$i PHP will change the stack pointer to make room for the ne
w variable using the same address that was used for “AAAA”.&quot;

can you give me some hint about how/where is the stack pointer changed?

so $fakezval. $i will be allocated at he adress of &#039;AAAA&#039; ?
Again, can you point me to the php sources where to take a look?



Note that “BBBB” is
still pointing there so effectively anything we write to $v will be referenced o
n access to “BBBB”.

You mean, that  with the code
$objst-&gt;rewind();$objst-&gt;next(); 

we will go to the secondd element (&#039;BBBB&#039;) which has a reference to the &#039;AAAA&#039; and now we will find at that address everything that is written into $v array? I understood correctly?</description>
		<content:encoded><![CDATA[<p>&#8220;In $v[$i]=$fakezval.$i PHP will change the stack pointer to make room for the ne<br />
w variable using the same address that was used for “AAAA”.&#8221;</p>
<p>can you give me some hint about how/where is the stack pointer changed?</p>
<p>so $fakezval. $i will be allocated at he adress of &#8216;AAAA&#8217; ?<br />
Again, can you point me to the php sources where to take a look?</p>
<p>Note that “BBBB” is<br />
still pointing there so effectively anything we write to $v will be referenced o<br />
n access to “BBBB”.</p>
<p>You mean, that  with the code<br />
$objst-&gt;rewind();$objst-&gt;next(); </p>
<p>we will go to the secondd element (&#8216;BBBB&#8217;) which has a reference to the &#8216;AAAA&#8217; and now we will find at that address everything that is written into $v array? I understood correctly?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Web Applications With Embedded Tokens by digital</title>
		<link>http://www.theknotter.net/testing-web-applications-with-embedded-tokens/comment-page-1/#comment-62</link>
		<dc:creator>digital</dc:creator>
		<pubDate>Thu, 13 Jan 2011 11:50:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.theknotter.net/?p=345#comment-62</guid>
		<description>a) If you look at the big comment before that code you will see that after r:1;,s:4:&quot;BBBB&quot; is parsed the reference to &quot;AAAA&quot; is no longer valid. This happens be
cause a duplicate is detected and the reference count is decreased. The referenc
e is not valid but the data is still on the stack, waiting to be overwritten by the creation of a new variable.

In $v[$i]=$fakezval.$i PHP will change the stack pointer to make room for the ne
w variable using the same address that was used for &quot;AAAA&quot;. Note that &quot;BBBB&quot; is
still pointing there so effectively anything we write to $v will be referenced o
n access to &quot;BBBB&quot;.

b) In the last code snippet there are two $fakezval variables. If you read the p
ost carefully you will see he has got control over the instruction pointer. He k
nows the address of the system function, which takes it&#039;s parameter from the sta
ck. Using the same trick as in the previous question he gets the string &quot;sh&quot; ont
o the stack (that is the first integer in $fakezval2 (translate those hex values into ASCII) so that when system gets called it will find it and take it as it&#039;s first parameter.

c) I haven&#039;t had the time to try this yet, at first sight it looks like the reference at the end on the string might be wrong (r:11;). If I have the time to look into it I will let you know.</description>
		<content:encoded><![CDATA[<p>a) If you look at the big comment before that code you will see that after r:1;,s:4:&#8221;BBBB&#8221; is parsed the reference to &#8220;AAAA&#8221; is no longer valid. This happens be<br />
cause a duplicate is detected and the reference count is decreased. The referenc<br />
e is not valid but the data is still on the stack, waiting to be overwritten by the creation of a new variable.</p>
<p>In $v[$i]=$fakezval.$i PHP will change the stack pointer to make room for the ne<br />
w variable using the same address that was used for &#8220;AAAA&#8221;. Note that &#8220;BBBB&#8221; is<br />
still pointing there so effectively anything we write to $v will be referenced o<br />
n access to &#8220;BBBB&#8221;.</p>
<p>b) In the last code snippet there are two $fakezval variables. If you read the p<br />
ost carefully you will see he has got control over the instruction pointer. He k<br />
nows the address of the system function, which takes it&#8217;s parameter from the sta<br />
ck. Using the same trick as in the previous question he gets the string &#8220;sh&#8221; ont<br />
o the stack (that is the first integer in $fakezval2 (translate those hex values into ASCII) so that when system gets called it will find it and take it as it&#8217;s first parameter.</p>
<p>c) I haven&#8217;t had the time to try this yet, at first sight it looks like the reference at the end on the string might be wrong (r:11;). If I have the time to look into it I will let you know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Web Applications With Embedded Tokens by am</title>
		<link>http://www.theknotter.net/testing-web-applications-with-embedded-tokens/comment-page-1/#comment-61</link>
		<dc:creator>am</dc:creator>
		<pubDate>Thu, 13 Jan 2011 08:23:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.theknotter.net/?p=345#comment-61</guid>
		<description>don&#039;t know any of these ?....</description>
		<content:encoded><![CDATA[<p>don&#8217;t know any of these ?&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Web Applications With Embedded Tokens by am</title>
		<link>http://www.theknotter.net/testing-web-applications-with-embedded-tokens/comment-page-1/#comment-60</link>
		<dc:creator>am</dc:creator>
		<pubDate>Wed, 12 Jan 2011 06:40:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.theknotter.net/?p=345#comment-60</guid>
		<description>Thanks a lot! I&#039;ll write them here:

Regarding the reading part:

a)
for($i = 0; $i &lt; 5; $i++) {
	$v[$i]=$fakezval.$i; // we repeat the same value several times to overwrite the zval that was freed
}

$fakezval.$i    will overwrite the freed zval? Can you give some more details?


b) in the last example, how is the parameter to &#039;system&#039; passed?

c)
also i&#039;m trying to create manually a serialized string:

$a= unserialize(&#039;a:1:{i:0;C:16:&quot;SplObjectStorage&quot;:173:{x:i:2;i:0;,a:10:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;i:7;i:8;i:8;i:9;i:9;i:10;};O:8:&quot;stdClass&quot;:0:{},i:1;;m:a:2:{i:1;S:19:&quot;0100AAA01101\x00BBCCC&quot;;i:2;r:11;}}}
&#039;);

It gives me an error because of the string &quot;0100AAA01101\x00BBCCC&quot;

but if i try to unserialize this string separately:

$s = &#039;S:19:&quot;0100AAA01101\x00BBCCC&quot;&#039;;

echo unserialize($s) . &#039; ccccc&#039;;

it doesn&#039;t give me any error. any idea why?

Thanks again!</description>
		<content:encoded><![CDATA[<p>Thanks a lot! I&#8217;ll write them here:</p>
<p>Regarding the reading part:</p>
<p>a)<br />
for($i = 0; $i &lt; 5; $i++) {<br />
	$v[$i]=$fakezval.$i; // we repeat the same value several times to overwrite the zval that was freed<br />
}</p>
<p>$fakezval.$i    will overwrite the freed zval? Can you give some more details?</p>
<p>b) in the last example, how is the parameter to &#039;system&#039; passed?</p>
<p>c)<br />
also i&#039;m trying to create manually a serialized string:</p>
<p>$a= unserialize(&#039;a:1:{i:0;C:16:&quot;SplObjectStorage&quot;:173:{x:i:2;i:0;,a:10:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;i:7;i:8;i:8;i:9;i:9;i:10;};O:8:&quot;stdClass&quot;:0:{},i:1;;m:a:2:{i:1;S:19:&quot;0100AAA01101\x00BBCCC&quot;;i:2;r:11;}}}<br />
&#039;);</p>
<p>It gives me an error because of the string &quot;0100AAA01101\x00BBCCC&quot;</p>
<p>but if i try to unserialize this string separately:</p>
<p>$s = &#039;S:19:&quot;0100AAA01101\x00BBCCC&quot;&#039;;</p>
<p>echo unserialize($s) . &#039; ccccc&#039;;</p>
<p>it doesn&#039;t give me any error. any idea why?</p>
<p>Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Web Applications With Embedded Tokens by digital</title>
		<link>http://www.theknotter.net/testing-web-applications-with-embedded-tokens/comment-page-1/#comment-59</link>
		<dc:creator>digital</dc:creator>
		<pubDate>Tue, 11 Jan 2011 23:50:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.theknotter.net/?p=345#comment-59</guid>
		<description>I&#039;m not sure I will be able to help you but ask your questions and I&#039;ll do my best to answer them.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure I will be able to help you but ask your questions and I&#8217;ll do my best to answer them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Testing Web Applications With Embedded Tokens by am</title>
		<link>http://www.theknotter.net/testing-web-applications-with-embedded-tokens/comment-page-1/#comment-58</link>
		<dc:creator>am</dc:creator>
		<pubDate>Tue, 11 Jan 2011 18:18:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.theknotter.net/?p=345#comment-58</guid>
		<description>Hello man,

This is sort of off-topic but i&#039;m trying anyway, perhaps you can help me.....
I saw you have commented here : http://blog.nibbles.fr/1837
and i was curious if you understand everything from that article and you could answer me to some questions about that.....

Thanks a lot!</description>
		<content:encoded><![CDATA[<p>Hello man,</p>
<p>This is sort of off-topic but i&#8217;m trying anyway, perhaps you can help me&#8230;..<br />
I saw you have commented here : <a href="http://blog.nibbles.fr/1837" rel="nofollow">http://blog.nibbles.fr/1837</a><br />
and i was curious if you understand everything from that article and you could answer me to some questions about that&#8230;..</p>
<p>Thanks a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 8086 real mode coding by force</title>
		<link>http://www.theknotter.net/8086-real-mode-coding/comment-page-1/#comment-30</link>
		<dc:creator>force</dc:creator>
		<pubDate>Wed, 27 Oct 2010 05:13:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.theknotter.net/?p=232#comment-30</guid>
		<description>Hi Digital,

Thanks for the information, I especially enjoyed this article as you included the asm overview. If you have any further information on the startup processes of the x86 arch, I would very much enjoy reading it. 

Regards,
Force</description>
		<content:encoded><![CDATA[<p>Hi Digital,</p>
<p>Thanks for the information, I especially enjoyed this article as you included the asm overview. If you have any further information on the startup processes of the x86 arch, I would very much enjoy reading it. </p>
<p>Regards,<br />
Force</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 8086 real mode coding by Tweets that mention The Knotter » Blog Archive » 8086 real mode coding -- Topsy.com</title>
		<link>http://www.theknotter.net/8086-real-mode-coding/comment-page-1/#comment-29</link>
		<dc:creator>Tweets that mention The Knotter » Blog Archive » 8086 real mode coding -- Topsy.com</dc:creator>
		<pubDate>Tue, 26 Oct 2010 08:40:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.theknotter.net/?p=232#comment-29</guid>
		<description>[...] This post was mentioned on Twitter by Nick Sonneveld, reddit_prog_hot. reddit_prog_hot said: 8086 real mode coding http://bit.ly/8Zzsx0 http://bit.ly/9N8HGt [6 comments] [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Nick Sonneveld, reddit_prog_hot. reddit_prog_hot said: 8086 real mode coding <a href="http://bit.ly/8Zzsx0" rel="nofollow">http://bit.ly/8Zzsx0</a> <a href="http://bit.ly/9N8HGt" rel="nofollow">http://bit.ly/9N8HGt</a> [6 comments] [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

