<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Security Thoughts</title>
	<atom:link href="http://securitythoughts.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://securitythoughts.wordpress.com</link>
	<description>Thinking Security 24/7</description>
	<lastBuildDate>Sun, 18 Dec 2011 19:38:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='securitythoughts.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Security Thoughts</title>
		<link>http://securitythoughts.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://securitythoughts.wordpress.com/osd.xml" title="Security Thoughts" />
	<atom:link rel='hub' href='http://securitythoughts.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How-to: Modify Apache-Coyote/1.1 Banner</title>
		<link>http://securitythoughts.wordpress.com/2011/03/30/how-to-modify-apache-coyote1-1-banner/</link>
		<comments>http://securitythoughts.wordpress.com/2011/03/30/how-to-modify-apache-coyote1-1-banner/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 11:03:50 +0000</pubDate>
		<dc:creator>Wasim Halani</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[PenTest]]></category>
		<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://securitythoughts.wordpress.com/?p=228</guid>
		<description><![CDATA[If you&#8217;ve ever done a penetration test or got one done, you may have come across the following scenario: HTTP Service running on port 8080, revealing the version information of the product in it banner. The banner  revealed is Apache-Coyote/1.1. This is the banner of the Apache Tomcat Web Server which runs on port 8080 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=228&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever done a penetration test or got one done, you may have come across the following scenario:</p>
<p>HTTP Service running on port 8080, revealing the version information of the product in it banner.<br />
The banner  revealed is Apache-Coyote/1.1.<br />
This is the banner of the Apache Tomcat Web Server which runs on port 8080 by default.</p>
<div id="attachment_237" class="wp-caption aligncenter" style="width: 310px"><a href="http://securitythoughts.files.wordpress.com/2011/03/tomcat-original-header1.png"><img class="size-medium wp-image-237 " title="tomcat-original-header" src="http://securitythoughts.files.wordpress.com/2011/03/tomcat-original-header1.png?w=300&#038;h=127" alt="" width="300" height="127" /></a><p class="wp-caption-text">Apache-Coyote/1.1 Version Disclosure</p></div>
<p>Now, as per good security practice, the banner should be removed or modified, so that it no longer reveals the version number.<br />
This can be achieved by editing your server.xml configuration file found at the below location:</p>
<p><strong>CATALINA_HOME/conf/server.xml</strong></p>
<div id="attachment_238" class="wp-caption aligncenter" style="width: 310px"><a href="http://securitythoughts.files.wordpress.com/2011/03/tomcat-original-server_xml1.png"><img class="size-medium wp-image-238 " title="tomcat-original-server_xml" src="http://securitythoughts.files.wordpress.com/2011/03/tomcat-original-server_xml1.png?w=300&#038;h=68" alt="" width="300" height="68" /></a><p class="wp-caption-text">Original server.xml reveals version information</p></div>
<div id="attachment_236" class="wp-caption aligncenter" style="width: 310px"><a href="http://securitythoughts.files.wordpress.com/2011/03/tomcat-modified-server_xml1.png"><img class="size-medium wp-image-236 " title="tomcat-modified-server_xml" src="http://securitythoughts.files.wordpress.com/2011/03/tomcat-modified-server_xml1.png?w=300&#038;h=63" alt="" width="300" height="63" /></a><p class="wp-caption-text">Modified server.xml </p></div>
<p>You may need to restart your server for the changes to reflect.<br />
Once the Tomcat server is up, test the server to see if it shows the custom header.</p>
<p>&nbsp;</p>
<pre>&gt; telnet localhost 8080
HEAD / HTTP/1.0
&lt;CRLF&gt;
&lt;CRLF&gt;</pre>
<div id="attachment_235" class="wp-caption aligncenter" style="width: 310px"><a href="http://securitythoughts.files.wordpress.com/2011/03/tomcat-modified-header1.png"><img class="size-medium wp-image-235 " title="tomcat-modified-header" src="http://securitythoughts.files.wordpress.com/2011/03/tomcat-modified-header1.png?w=300&#038;h=121" alt="" width="300" height="121" /></a><p class="wp-caption-text">Web Server with Custom HTTP Banner</p></div>
<p>&nbsp;</p>
<p>Hope this helps others who are looking for a solution to the banner version disclosure</p>
<p>Check out OWASP&#8217;s article on <a title="Security Tomcat" href="http://www.owasp.org/index.php/Securing_tomcat" target="_blank">Securing Tomcat</a> for more details.</p>
<p>&#8211;</p>
<p>Wasim</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securitythoughts.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securitythoughts.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securitythoughts.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securitythoughts.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securitythoughts.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securitythoughts.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securitythoughts.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securitythoughts.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securitythoughts.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securitythoughts.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securitythoughts.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securitythoughts.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securitythoughts.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securitythoughts.wordpress.com/228/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=228&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securitythoughts.wordpress.com/2011/03/30/how-to-modify-apache-coyote1-1-banner/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8c514cc5e42c466959b19f6782a39a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">securitythoughts</media:title>
		</media:content>

		<media:content url="http://securitythoughts.files.wordpress.com/2011/03/tomcat-original-header1.png?w=300" medium="image">
			<media:title type="html">tomcat-original-header</media:title>
		</media:content>

		<media:content url="http://securitythoughts.files.wordpress.com/2011/03/tomcat-original-server_xml1.png?w=300" medium="image">
			<media:title type="html">tomcat-original-server_xml</media:title>
		</media:content>

		<media:content url="http://securitythoughts.files.wordpress.com/2011/03/tomcat-modified-server_xml1.png?w=300" medium="image">
			<media:title type="html">tomcat-modified-server_xml</media:title>
		</media:content>

		<media:content url="http://securitythoughts.files.wordpress.com/2011/03/tomcat-modified-header1.png?w=300" medium="image">
			<media:title type="html">tomcat-modified-header</media:title>
		</media:content>
	</item>
		<item>
		<title>Vulnerable Web Applications for learning</title>
		<link>http://securitythoughts.wordpress.com/2010/03/22/vulnerable-web-applications-for-learning/</link>
		<comments>http://securitythoughts.wordpress.com/2010/03/22/vulnerable-web-applications-for-learning/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 20:00:29 +0000</pubDate>
		<dc:creator>Wasim Halani</dc:creator>
				<category><![CDATA[PenTest]]></category>
		<category><![CDATA[Resource]]></category>
		<category><![CDATA[Web Application]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[references]]></category>
		<category><![CDATA[webapp]]></category>

		<guid isPermaLink="false">http://securitythoughts.wordpress.com/?p=176</guid>
		<description><![CDATA[Update: 08/08/2010: Created a tabled output of the listing. Platforms for most applications added. More applications added to list thanks to comments. Just a quick post. Someone on the &#8216;NULL&#8217; mailing asked for WebGoat alternatives to learning Web Application penetration testing. The reponse was amazing, with many applications being listed as vulnerable web applications designed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=176&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Update: 08/08/2010: Created a tabled output of the listing. Platforms for most applications added. More applications added to list thanks to comments. </strong></p>
<p>Just a quick post. Someone on the &#8216;NULL&#8217; mailing asked for WebGoat alternatives to learning Web Application penetration testing. The reponse was amazing, with many applications being listed as vulnerable web applications designed for learning web-app pentest. I have collected  all vulnerable web applications and listed them below for reference:</p>
<p><span id="more-176"></span></p>
<table width="80%" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="9%"><strong>S.No.</strong></td>
<td valign="top" width="52%"><strong>Vulnerable Application</strong></td>
<td valign="top" width="37%"><strong>Platform</strong></td>
</tr>
<tr>
<td valign="top" width="9%">1</td>
<td valign="top" width="52%"><a href="http://zero.webappsecurity.com/">SPI Dynamics (live)</a></td>
<td valign="top" width="37%">ASP</td>
</tr>
<tr>
<td valign="top" width="9%">2</td>
<td valign="top" width="52%"><a href="http://crackme.cenzic.com/">Cenzic (live)</a></td>
<td valign="top" width="37%">PHP</td>
</tr>
<tr>
<td valign="top" width="9%">3</td>
<td valign="top" width="52%"><a href="http://demo.testfire.net/">Watchfire (live)</a></td>
<td valign="top" width="37%">ASPX</td>
</tr>
<tr>
<td valign="top" width="9%">4</td>
<td valign="top" width="52%"><a href="http://testphp.acunetix.com/">Acunetix 1 (live)</a></td>
<td valign="top" width="37%">PHP</td>
</tr>
<tr>
<td valign="top" width="9%">5</td>
<td valign="top" width="52%"><a href="http://testasp.acunetix.com/">Acunetix 2 (live)</a></td>
<td valign="top" width="37%">ASP</td>
</tr>
<tr>
<td valign="top" width="9%">6</td>
<td valign="top" width="52%"><a href="http://testaspnet.acunetix.com/">Acunetix 3 (live)</a></td>
<td valign="top" width="37%">ASP.Net</td>
</tr>
<tr>
<td valign="top" width="9%">7</td>
<td valign="top" width="52%"><a href="http://pctechtips.org/hacker-challenge-pwn3d-the-login-form/">PCTechtips Challenge (live)</a></td>
<td valign="top" width="37%"></td>
</tr>
<tr>
<td valign="top" width="9%">8</td>
<td valign="top" width="52%"><a href="http://dvwa.co.uk/">Damn Vulnerable Web Application</a></td>
<td valign="top" width="37%">PHP/MySQL</td>
</tr>
<tr>
<td valign="top" width="9%">9</td>
<td valign="top" width="52%"><a href="http://www.irongeek.com/i.php?page=security/mutillidae-deliberately-vulnerable-php-owasp-top-10">Mutillidae</a></td>
<td valign="top" width="37%">PHP</td>
</tr>
<tr>
<td valign="top" width="9%">10</td>
<td valign="top" width="52%"><a href="http://sourceforge.net/projects/thebutterflytmp/files/ButterFly%20Project/">The Butterfly Security Project</a></td>
<td valign="top" width="37%">PHP</td>
</tr>
<tr>
<td valign="top" width="9%">11</td>
<td valign="top" width="52%"><a href="http://www.foundstone.com/us/resources/proddesc/hacmecasino.htm">Hacme Casino</a></td>
<td valign="top" width="37%">Ruby on Rails</td>
</tr>
<tr>
<td valign="top" width="9%">12</td>
<td valign="top" width="52%"><a href="http://www.foundstone.com/us/resources/proddesc/hacmebank.htm">Hacme Bank 2.0</a></td>
<td valign="top" width="37%">ASP.NET (2.0)</td>
</tr>
<tr>
<td valign="top" width="9%">13</td>
<td valign="top" width="52%"><a href="http://www.o2-ounceopen.com/technical-info/2008/12/8/updated-version-of-hacmebank.html">Updated HackmeBank</a></td>
<td valign="top" width="37%">ASP.NET (2.0)</td>
</tr>
<tr>
<td valign="top" width="9%">14</td>
<td valign="top" width="52%"><a href="http://www.foundstone.com/us/resources/proddesc/hacmebooks.htm">Hacme Books</a></td>
<td valign="top" width="37%">J2EE</td>
</tr>
<tr>
<td valign="top" width="9%">15</td>
<td valign="top" width="52%"><a href="http://www.foundstone.com/us/resources/proddesc/hacmetravel.htm">Hacme Travel</a></td>
<td valign="top" width="37%">C++ (application client-server)</td>
</tr>
<tr>
<td valign="top" width="9%">16</td>
<td valign="top" width="52%"><a href="http://www.foundstone.com/us/resources/proddesc/hacmeshipping.htm">Hacme Shipping</a></td>
<td valign="top" width="37%">ColdFusion MX 7, MySQL</td>
</tr>
<tr>
<td valign="top" width="9%">17</td>
<td valign="top" width="52%"><a href="http://www.owasp.org/index.php/OWASP_WebGoat_Project">OWASP WebGoat</a></td>
<td valign="top" width="37%">JAVA</td>
</tr>
<tr>
<td valign="top" width="9%">18</td>
<td valign="top" width="52%"><a href="http://www.owasp.org/index.php/Category:OWASP_Vicnum_Project">OWASP Vicnum</a></td>
<td valign="top" width="37%">PHP, Perl</td>
</tr>
<tr>
<td valign="top" width="9%">19</td>
<td valign="top" width="52%"><a href="http://www.owasp.org/index.php/Category:OWASP_Insecure_Web_App_Project">OWASP InsecureWebApp</a></td>
<td valign="top" width="37%">JAVA</td>
</tr>
<tr>
<td valign="top" width="9%">20</td>
<td valign="top" width="52%"><a href="http://www.owasp.org/index.php/Owasp_SiteGenerator">OWASP SiteGenerator</a></td>
<td valign="top" width="37%">ASP.NET</td>
</tr>
<tr>
<td valign="top" width="9%">21</td>
<td valign="top" width="52%"><a href="http://www.bonsai-sec.com/en/research/moth.php">Moth</a></td>
<td valign="top" width="37%"></td>
</tr>
<tr>
<td valign="top" width="9%">22</td>
<td valign="top" width="52%"><a href="http://suif.stanford.edu/%7Elivshits/securibench/">Stanford SecuriBench</a></td>
<td valign="top" width="37%">JAVA</td>
</tr>
<tr>
<td valign="top" width="9%">23</td>
<td valign="top" width="52%"><a href="http://suif.stanford.edu/%7Elivshits/work/securibench-micro/">SecuriBench Micro</a></td>
<td valign="top" width="37%">JAVA</td>
</tr>
<tr>
<td valign="top" width="9%">24</td>
<td valign="top" width="52%"><a href="http://www.badstore.net/">BadStore</a></td>
<td valign="top" width="37%">Perl(CGI)</td>
</tr>
<tr>
<td valign="top" width="9%">25</td>
<td valign="top" width="52%"><a href="http://www.mavensecurity.com/webmaven">WebMaven/Buggy Bank</a> (very old)</td>
<td valign="top" width="37%"></td>
</tr>
<tr>
<td valign="top" width="9%">26</td>
<td valign="top" width="52%"><a href="http://enigmagroup.org/">EnigmaGroup </a>(live)</td>
<td valign="top" width="37%"></td>
</tr>
<tr>
<td valign="top" width="9%">27</td>
<td valign="top" width="52%"><a href="http://www.nottrusted.com/x5s/">XSS Encoding Skills</a> &#8211; x5s (Casaba Watcher)</td>
<td valign="top" width="37%"></td>
</tr>
<tr>
<td valign="top" width="9%">28</td>
<td valign="top" width="52%"><a href="http://google-gruyere.appspot.com/">Google – Gruyere</a> (live) (previously Jarlsberg)</td>
<td valign="top" width="37%"></td>
</tr>
<tr>
<td valign="top" width="9%">29</td>
<td valign="top" width="52%"><a href="http://www.exploit-db.com/webapps">Exploit- DB</a></td>
<td valign="top" width="37%">Multi-platform</td>
</tr>
<tr>
<td valign="top" width="9%">30</td>
<td valign="top" width="52%"><a href="http://code.google.com/p/bodgeit/">The Bodgeit Store</a></td>
<td valign="top" width="37%">JSP</td>
</tr>
<tr>
<td valign="top" width="9%">31</td>
<td valign="top" width="52%"><a href="http://sourceforge.net/projects/lampsecurity/">LampSecurity</a></td>
<td valign="top" width="37%">PHP</td>
</tr>
<tr>
<td valign="top" width="9%">32</td>
<td valign="top" width="52%"><a href="http://hackxor.sourceforge.net/cgi-bin/index.pl">hackxor</a></td>
<td valign="top" width="37%">Perl(CGI)</td>
</tr>
<tr>
<td valign="top" width="9%">33</td>
<td valign="top" width="52%"><a href="http://www.owasp.org/index.php/OWASP_Hackademic_Challenges_Project">OWASP &#8211; Hackademic</a></td>
<td valign="top" width="37%">PHP</td>
</tr>
<tr>
<td valign="top" width="9%">34</td>
<td valign="top" width="52%"><a href="http://exploit.co.il/hacking/exploit-kb-vulnerable-web-app/">Exploit.co.il-WA</a></td>
<td valign="top" width="37%">PHP</td>
</tr>
</tbody>
</table>
<p>If you know of any other vulnerable web applications (which can be used as a platform for learning web-app pentest), drop a line in the comments.Let me know if any of the links appear dead.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securitythoughts.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securitythoughts.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securitythoughts.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securitythoughts.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securitythoughts.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securitythoughts.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securitythoughts.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securitythoughts.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securitythoughts.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securitythoughts.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securitythoughts.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securitythoughts.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securitythoughts.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securitythoughts.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=176&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securitythoughts.wordpress.com/2010/03/22/vulnerable-web-applications-for-learning/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8c514cc5e42c466959b19f6782a39a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">securitythoughts</media:title>
		</media:content>
	</item>
		<item>
		<title>[Tool] Unique Pattern Generator for Exploit Development</title>
		<link>http://securitythoughts.wordpress.com/2010/03/18/tool-unique-pattern-generator-for-exploit-development/</link>
		<comments>http://securitythoughts.wordpress.com/2010/03/18/tool-unique-pattern-generator-for-exploit-development/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 18:19:28 +0000</pubDate>
		<dc:creator>Wasim Halani</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Tool]]></category>
		<category><![CDATA[exploit developemt]]></category>
		<category><![CDATA[metasploit]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://securitythoughts.wordpress.com/?p=163</guid>
		<description><![CDATA[CAUTION: I have realised, that this script gives wrong results after a certain length of characters. It&#8217;s not recommended for use. The intention for this script was for me to learn some coding &#8211; which I have. But I haven&#8217; got the time at the moment to fix the errors. Hopefully, sometime in the future, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=163&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>CAUTION:</strong> I have realised, that this script gives wrong results after a certain length of characters. It&#8217;s not recommended for use. The intention for this script was for me to learn some coding &#8211; which I have. But I haven&#8217; got the time at the moment to fix the errors. Hopefully, sometime in the future, I&#8217;ll be able to re-write the code. You can use corelanc0d3r&#8217;s pvefindaddr.py, which is an excellent script for Immunity Debugger.</p>
<p><strong>Update:</strong> <em>Thanks to corelanc0d3r for pointing out that my script does not generate an output same as the metasploit and pvefindaddr scripts. This is useful, as pointed by him, to anyone wishing to mix the outputs/offsets between the tools. I have made relevant changes to the code and also fixed another bug which prevented all offsets from being calculated.</em></p>
<p>While developing exploits, at times you require a unique string for which any 4 consecutive characters selected at an instance are unique across the string(or may be repeated only after a large gap of characters). This is mostly used to find the &#8216;offset&#8217; of the characters which have over-written the EIP register.</p>
<p>Metasploit (version 3.0+) has a tool for both:<br />
1) to generate the string pattern (<strong>tools/pattern_create.rb</strong>)<br />
2) to find the offset of the required pattern (<strong>tools/pattern_offset.rb</strong>)<br />
<span id="more-163"></span><br />
These are amazing utilities and really helpful for exploit development. However, the scripts are based on Ruby (in the Metasploit Framework) and it may not be possible for someone to carry the entire MSF.<br />
Now people have come up with many alternate solutions and have made their own ports to different scripting languages based on these 2 utilities. I have been getting my hand dirty with Perl for sometime now, and this served as a good project for me to learn Perl.</p>
<p>So I have also developed a Perl script which combines these two functionality (i.e. pattern generation and offset search) into one script. The code is available at the end of this post. It&#8217;s not a complete port, but it be should be able to do the job most of the time.</p>
<p>There are two modes of operation:<br />
1) Only one argument is provided which is the length of the string to be generated<br />
(<strong>./gspattern.pl  [length of string]</strong>)<br />
2) Both length of string and pattern whose offset is to be found are provided<br />
(<strong>./gspattern.pl [length of string] [pattern to search]</strong> )</p>
<p>The script can handle multiple occurrences of the pattern (this would happen in cases where the string length is very large)</p>
<p><em>(Let me know if you find any bugs in the code. I am no expert programmer. Just getting my hands dirty in Perl.The script can currently generate strings of length upto 20306 characters.)</em></p>
<p>Thanks !</p>
<p><pre class="brush: perl;">
#!/usr/bin/perl -w
use strict;

# Generate/Search Pattern (gspattern.pl) v0.2
# Scripted by Wasim Halani (washal)
# Visit me at http://securitythoughts.wordpress.com/
# Thanks to hdm and the Metasploit team
# Special thanks to Peter Van Eeckhoutte(corelanc0d3r) for his amazing Exploit Development tutorials
# This script is to be used for educational purposes only.

my $ustart = 65;
my $uend = 90;
my $lstart = 97;
my $lend = 122;
my $nstart = 0;
my $nend = 9;
my $length ;
my $string = &quot;&quot;;
my ($upper, $lower, $num);
my $searchflag = 0;
my $searchstring;

sub credits(){
    print &quot;\nGenerate/Search Pattern \n&quot;;
    print &quot;Scripted by Wasim Halani (washal)\n&quot;;
    print &quot;http://securitythoughts.wordpress.com/\n&quot;;
    print &quot;Version 0.2\n\n&quot;;
}

sub usage(){
    credits();
    print &quot; Usage: \n&quot;;
    print &quot; gspattern.pl  \n&quot;;
    print &quot;         Will generate a string of given length. \n&quot;;
    print &quot;\n&quot;;
    print &quot; gspattern.pl   \n&quot;;
    print &quot;         Will generate a string of given length,\n&quot;;
    print &quot;         and display the offsets of pattern found.\n&quot;;
}

sub generate(){
    credits();
    $length = $ARGV[0];
    #print &quot;Generating string for length : &quot; .$length . &quot;\n&quot;;
    if(length($string) == $length){
		finish();
    }
    #looping for the uppercase
    for($upper = $ustart; $upper &lt;= $uend;$upper++){
		$string =$string.chr($upper);
		if(length($string) == $length){
			finish();
		}
		#looping for the lowercase
		for($lower = $lstart; $lower &lt;= $lend;$lower++){
			$string =$string.chr($lower);
            if(length($string) == $length){
                finish();
			}
            #looping for the numeral
            for($num = $nstart; $num &lt;= $nend;$num++){
                $string = $string.$num;
                if(length($string) == $length){
                    finish();
				}
				$string = $string.chr($upper);
				if(length($string) == $length){
					finish();
				}
				if($num != $nend){
                    $string = $string.chr($lower);
				}
				if(length($string) == $length){
					finish();
				}
			}
		}
    }
}

sub search(){
    my $offset = index($string,$searchstring);
    if($offset == -1){
		print &quot;Pattern '&quot;.$searchstring.&quot;' not found\n&quot;;
		exit(1);
    }
    else{
		print &quot;Pattern '&quot;.$searchstring.&quot;' found at offset(s) : &quot;;
    }
    my $count = $offset;
    print $count.&quot; &quot;;

    while($length){
        $offset = index($string,$searchstring,$offset+1);
        if($offset == -1){
			print &quot;\n&quot;;
			exit(1);
		}
		print $offset .&quot; &quot;;
		$count = $count + $offset;
    }
    print &quot;\n&quot;;
    exit(1);
}

sub finish(){
    print &quot;String is : \n&quot;.$string .&quot;\n\n&quot;;
    if($searchflag){
        search();
    }
    exit(1);
}

if(!$ARGV[0]){
    usage();
    #print &quot;Going into usage..&quot;;
}
elsif ($ARGV[1]){
    $searchflag = 1;
    $searchstring = $ARGV[1];
    generate();
    #print &quot;Going into pattern search...&quot;;
}
else {
     generate();
     #print &quot;Going into string generation...&quot;;
}

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securitythoughts.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securitythoughts.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securitythoughts.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securitythoughts.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securitythoughts.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securitythoughts.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securitythoughts.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securitythoughts.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securitythoughts.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securitythoughts.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securitythoughts.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securitythoughts.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securitythoughts.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securitythoughts.wordpress.com/163/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=163&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securitythoughts.wordpress.com/2010/03/18/tool-unique-pattern-generator-for-exploit-development/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8c514cc5e42c466959b19f6782a39a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">securitythoughts</media:title>
		</media:content>
	</item>
		<item>
		<title>Rediffmail XSS vulnerability disclosed</title>
		<link>http://securitythoughts.wordpress.com/2010/02/02/rediffmail-xss-vulnerability-disclosed/</link>
		<comments>http://securitythoughts.wordpress.com/2010/02/02/rediffmail-xss-vulnerability-disclosed/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 10:17:13 +0000</pubDate>
		<dc:creator>Wasim Halani</dc:creator>
				<category><![CDATA[Security News]]></category>
		<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[0-day]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[poc]]></category>
		<category><![CDATA[rediffmail]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://securitythoughts.wordpress.com/?p=155</guid>
		<description><![CDATA[A member of the &#8216;NULL&#8217; mailing-list today announced a &#8216;Persistent XSS&#8217; vulnerability in the &#8216;subject&#8217; parameter of RediffMail&#8217;s email application. This Vulnerability was discovered and reported by w4rl0ck.d0wn and Rockey Killer of h4ck3r crew Check out their PoC video at: Rediffmail PoC Now, this is an extremely critical vulnerability as the user will be attacked [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=155&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A member of the &#8216;NULL&#8217; mailing-list today announced a &#8216;Persistent XSS&#8217; vulnerability in the &#8216;subject&#8217; parameter of RediffMail&#8217;s email application.<br />
This Vulnerability was discovered and reported by w4rl0ck.d0wn and Rockey Killer of h4ck3r crew<br />
Check out their PoC video at:<br />
<a href="http://h4ck3r.in/Reported%20Vulnerabilities/rediff/" target="_blank">Rediffmail PoC</a><br />
<span id="more-155"></span><br />
Now, this is an extremely critical vulnerability as the user will be attacked by simply visiting their Inbox.<br />
As shown in the PoC, session variables can be captured and re-direction is also possible.Infact, the possibilities are endless !!<br />
Rediffmail being quite popular with a certain segment of Indian masses, I think they should seriously look into this and also improve their overall perspective on security.They must be one of those rare service providers who still allow users to send their credentials over unencrypted HTTP protocol.</p>
<div class="wp-caption alignnone" style="width: 624px"><a href="http://securitythoughts.files.wordpress.com/2010/02/rediffmail-wireshark-plaintext-credentials.jpg" target="_blank"><img src="http://securitythoughts.files.wordpress.com/2010/02/rediffmail-wireshark-plaintext-credentials.jpg?w=614&#038;h=223" alt="Rediffmail Plaintext credentails captured using wireshark" width="614" height="223" /></a><p class="wp-caption-text">Rediffmail Plaintext credentails captured using wireshark</p></div>
<p>Rediff needs to get their act together !</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Below is the original advisory:</p>
<p>About Rediff<br />
Rediff.com (Nasdaq: REDF) is one of the premier worldwide online providers of news, information, communication, entertainment and shopping services.<br />
Rediff.com provides a platform for Indians worldwide to connect with one another online. Rediff.com is committed to offering a personalized and a secure surfing and shopping environment.<br />
Rediff.com additionally offers the Indian American community one of the oldest and largest Indian weekly newspapers, India Abroad.<br />
Founded in 1996, Rediff.com is headquartered in Mumbai, India with offices in New Delhi, Bangalore, Chennai, Hyderabad and New York, USA.</p>
<p>Mission In The Internet Space<br />
To provide world-class online consumer service offerings to Indians worldwide.</p>
<p>Vulnerability<br />
Persistant XSS Vulnerability in Subject field of rediff<br />
Vulnerability Reported on : Sat, Jan 23, 2010 at 1:23 AM<br />
But they din&#8217;t even cared to respond back .</p>
<p>Credits<br />
This Vulnerability was discovered and reported by w4rl0ck.d0wn and Rockey Killer of h4ck3r crew</p>
<p>POC</p>
<p>http://h4ck3r.in/Reported%20Vulnerabilities/rediff/</p>
<p>Rockey Killer<br />
h4ck3r Crew</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securitythoughts.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securitythoughts.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securitythoughts.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securitythoughts.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securitythoughts.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securitythoughts.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securitythoughts.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securitythoughts.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securitythoughts.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securitythoughts.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securitythoughts.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securitythoughts.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securitythoughts.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securitythoughts.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=155&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securitythoughts.wordpress.com/2010/02/02/rediffmail-xss-vulnerability-disclosed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8c514cc5e42c466959b19f6782a39a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">securitythoughts</media:title>
		</media:content>

		<media:content url="http://securitythoughts.files.wordpress.com/2010/02/rediffmail-wireshark-plaintext-credentials.jpg" medium="image">
			<media:title type="html">Rediffmail Plaintext credentails captured using wireshark</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows (Trusted) Authentication Vs SQL (Mixed-Mode) Authentication</title>
		<link>http://securitythoughts.wordpress.com/2009/12/24/trusted-vs-mixed-mode-authentication/</link>
		<comments>http://securitythoughts.wordpress.com/2009/12/24/trusted-vs-mixed-mode-authentication/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 08:02:48 +0000</pubDate>
		<dc:creator>Wasim Halani</dc:creator>
				<category><![CDATA[Attack Vectors]]></category>
		<category><![CDATA[PenTest]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[sql authentication mode]]></category>

		<guid isPermaLink="false">http://securitythoughts.wordpress.com/?p=145</guid>
		<description><![CDATA[Just a quick post for my future reference on the differences between Trusted authentication and Mixed-mode Authentication used by SQL Server Windows Authentication When a user connects through a Windows user account, SQL Server validates the account name and password using the Windows principal token in the operating system. This means that the user identity [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=145&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a quick post for my future reference on the differences between Trusted authentication and Mixed-mode Authentication used by SQL Server</p>
<h3>Windows Authentication</h3>
<ul>
<li>When a user connects through a Windows user account, SQL Server validates the account name and password using the Windows principal token in the operating system. This means that the user identity is confirmed by Windows.</li>
<li>SQL Server does not ask for the password, and does not perform the identity validation.</li>
<li>Windows Authentication is the default authentication mode, and is much more secure than SQL Server Authentication.</li>
<li>Windows Authentication
<ul>
<li>uses Kerberos security protocol,</li>
<li>provides password policy enforcement with regard to complexity validation for strong passwords,</li>
<li>provides support for account lockout,</li>
<li>and supports password expiration.</li>
</ul>
</li>
<li>A connection made using Windows Authentication is sometimes called a trusted connection, because <span style="text-decoration:underline;">SQL Server trusts the credentials provided by Windows.</span></li>
</ul>
<h3>SQL Authentication</h3>
<ul>
<li>When using SQL Server Authentication, logins are created in SQL Server that are not based on Windows user accounts.</li>
<li>Both the user name and the password are created by using SQL Server and stored in SQL Server.</li>
<li>Users connecting using SQL Server Authentication must provide their credentials (login and password) every time that they connect.</li>
<li>When using SQL Server Authentication, you must set strong passwords for all SQL Server accounts.</li>
<li>Three optional password policies are available for SQL Server logins.
<ul>
<li>User must change password at next login</li>
<li>Enforce password expiration</li>
<li>Enforce password policy</li>
</ul>
</li>
<li>SQL Server Authentication cannot use Kerberos security protocol.</li>
<li>Supports environments with mixed operating systems, where all users are not authenticated by a Windows domain.</li>
</ul>
<p><em><span style="text-decoration:underline;">Source:</span></em> <a title="MSDN - SQL Authentication Modes" href="http://msdn.microsoft.com/en-us/library/ms144284.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms144284.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securitythoughts.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securitythoughts.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securitythoughts.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securitythoughts.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securitythoughts.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securitythoughts.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securitythoughts.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securitythoughts.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securitythoughts.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securitythoughts.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securitythoughts.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securitythoughts.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securitythoughts.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securitythoughts.wordpress.com/145/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=145&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securitythoughts.wordpress.com/2009/12/24/trusted-vs-mixed-mode-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8c514cc5e42c466959b19f6782a39a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">securitythoughts</media:title>
		</media:content>
	</item>
		<item>
		<title>Exploiting ActiveX</title>
		<link>http://securitythoughts.wordpress.com/2009/11/09/exploiting-activex/</link>
		<comments>http://securitythoughts.wordpress.com/2009/11/09/exploiting-activex/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 20:19:27 +0000</pubDate>
		<dc:creator>Wasim Halani</dc:creator>
				<category><![CDATA[Attack Vectors]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[activex exploitation]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://securitythoughts.wordpress.com/?p=141</guid>
		<description><![CDATA[I&#8217;ve been reading a very interesting paper over the weekend. It&#8217;s about exploiting ActiveX controls implemented in the Microsoft Windows OS (mostly IE). The article is very lucid and easy to understand even for beginners. The paper is titled &#8220;ActiveX &#8211; Active Exploitation&#8221; and it&#8217;s written by &#8216;warlord&#8217; Highly recommended. You can find the article [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=141&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been reading a very interesting paper over the weekend. It&#8217;s about exploiting ActiveX controls implemented in the Microsoft Windows OS (mostly IE).<br />
The article is very lucid and easy to understand even for beginners. The paper is titled &#8220;ActiveX &#8211; Active Exploitation&#8221; and it&#8217;s written by &#8216;warlord&#8217;</p>
<p>Highly recommended. You can find the article <a href="http://uninformed.org/?v=9&amp;a=2">here</a>. I&#8217;m also adding it to my <a href="http://securitythoughts.wordpress.com/reading-room/">Reading Room</a> for future reference.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securitythoughts.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securitythoughts.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securitythoughts.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securitythoughts.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securitythoughts.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securitythoughts.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securitythoughts.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securitythoughts.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securitythoughts.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securitythoughts.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securitythoughts.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securitythoughts.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securitythoughts.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securitythoughts.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=141&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securitythoughts.wordpress.com/2009/11/09/exploiting-activex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8c514cc5e42c466959b19f6782a39a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">securitythoughts</media:title>
		</media:content>
	</item>
		<item>
		<title>Deobfuscating Javascript Malware</title>
		<link>http://securitythoughts.wordpress.com/2009/08/28/deobfuscating-javascript-malware/</link>
		<comments>http://securitythoughts.wordpress.com/2009/08/28/deobfuscating-javascript-malware/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 12:34:48 +0000</pubDate>
		<dc:creator>Wasim Halani</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[javascript-deobfuscation]]></category>
		<category><![CDATA[javascript-malware]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[malware-analysis]]></category>

		<guid isPermaLink="false">http://securitythoughts.wordpress.com/?p=65</guid>
		<description><![CDATA[An edited version of this post has been added to my company blog at Checkmate Some days back I was greeted by a Google Safe browsing warning when I tried visiting a &#8216;known&#8217; site. As I was sure it was supposed to be clean and harmless site, I thought it would be good to dig [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=65&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>An edited version of this post has been added to my company blog at <a href="http://niiconsulting.com/checkmate/2009/10/01/deobfuscating-javascript-malware/">Checkmate</a></strong></p>
<p>Some days back I was greeted by a Google Safe browsing warning when I tried visiting a &#8216;known&#8217; site. As I was sure it was supposed to be clean and harmless site, I thought it would be good to dig further into this problem. The trail led to interesting amounts of codes, concepts and techniques.</p>
<p>Malware writers are very smart nowadays (haven&#8217;t they always been ?). They know that once their code is understood it most likely to be detected by anti-malware applications. To delay detection by such applications, they resort to a wide range of techniques. In this blog post I&#8217;ll be discussing the most potent and easily created malware.</p>
<p>Javascript has become the boon and bane of the Internet. It provides greater interactivity with the user but can also be used by malware writers to infect innocent users. Javascript is a client-side scripting technology which means the processing of the script is handled by the user&#8217;s browser.</p>
<blockquote><p>Obfuscation is the concealment of intended meaning in communication, making communication confusing, intentionally ambiguous, and more difficult to interpret.</p></blockquote>
<p>JavaScript is sometimes obfuscated to prevent users from easily understanding their functionality. ( Legitimate uses are to prevent stealing of code)<br />
<span id="more-65"></span><br />
There may be many ways to obfuscate a code and similarly there may be multiple ways to de-obfuscate a code. What I&#8217;ve presented below is very raw and cannot be used to analyze many malicious JS. But since this is the beginning for me, I thought it may help others too.</p>
<p><strong>Disclaimer: Links presented below are live at the time of writing this blog post. Please do not visit them if you do not know what you are getting into.<br />
</strong></p>
<p>First thing first, we need to get the HTML source the malicious page. We can either use wget/curl or <a href="http://malzilla.sourceforge.net/">Malzilla</a>, which is what I used. It was observed that this page is dependent on the HTTP referrer. So if the domain receives a request for the page without a &#8216;valid&#8217; HTTP referrer page, the page is not returned.<br />
We get the &#8216;bad&#8217; HTML at http://mybetorwager.cn:8080/index.php with a valid HTTP referrer.</p>
<p>The complete HTML source can be viewed <a href="http://docs.google.com/View?id=dctvmpj6_28f9pwcrhd"><strong>here</strong></a> </p>
<p>The code starts off with the following in the SCRIPT tag.</p>
<blockquote><p><strong>Vhotzdq(function(p,a,c,k,e,d)</strong></p></blockquote>
<p>This section of the code shows that the javascript has been packed by the popular <a href="http://dean.edwards.name/packer/">Dean Edword JS Packer</a>. This packer is available online as well as in <a href="http://dean.edwards.name/download/#packer">download-able formats</a>. We use a GreaseMonkey script &#8220;<a href="http://userscripts.org/scripts/show/25935">Decode It!</a>&#8221; to enable the online &#8216; <em>Decoder</em>&#8216; on the webpage.<br />
</br><br />
We paste the code from Vhotzdq(function(p,a,c,k,e,d) onwards till the end and <strong>rename the function name Vhotzdq to eval</strong>. This will help us decode and evaluate the result. The output of which can be found <a href="http://docs.google.com/View?id=dctvmpj6_29hgzk3tdr"><strong>here</strong></a></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><strong>Update 2: 16th September,2009</strong><em><br />
Seems like Dean Edwards had coded an UNPACKER as well. It can be accessed at <a href="http://dean.edwards.name/unpacker/">http://dean.edwards.name/unpacker/</a>. If using this tool, simply <strong>replace the Vhotzdq to eval</strong> and run the script. No additional GreaseMonkey scripts are necessary <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
</em></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<div id="attachment_82" class="wp-caption alignnone" style="width: 610px"><img src="http://securitythoughts.files.wordpress.com/2009/08/js_unpack_1.jpg?w=570" alt="Unpacked Javascript using Dean Edwards Packer" title="js_unpack_1"   class="size-full wp-image-82" /><p class="wp-caption-text">Unpacked Javascript using Dean Edwards Packer</p></div>
<p>As can be seen above, we need to unescape the code to get the decoded output. This can be done in multiple ways:</p>
<ul>
<li>Replace <em>Vhotzdq </em>as <em>eval</em>, and execute the script</li>
<li>Use the Malzilla decoder feature &#8220;Decode UCS2 (%u)&#8221;</li>
<li>Use an online encoder/decoder like <a href="http://www.yehg.net/encoding/">PHP Charset Encoder/PHP String Encrypter</a></li>
</ul>
<div id="attachment_83" class="wp-caption aligncenter" style="width: 610px"><img src="http://securitythoughts.files.wordpress.com/2009/08/js_decoded-php-charset-1.jpg?w=600" alt="Using the &#39;unescape&#39; feature provided by PHP Charset Encoder" title="js_decoded-php-charset-1" width="600" height="315" class="size-full wp-image-83" /><p class="wp-caption-text">Using the 'unescape' feature provided by PHP Charset Encoder</p></div>
<p>The decoded output of the above step can be found <a href="http://docs.google.com/View?id=dctvmpj6_30dd9nvgdk"><strong>here</strong></a></p>
<p>Now the code is in a more human readable format. To further complicate analysis, the malware authors have implemented small amounts of string manipulations on the code. Also, the variables used have been obfuscated or mangled. This will not pose a problem to us as the variables can be given any names.</p>
<blockquote><p>Note that there exists a certain amount of code-block which is still encoded.<del datetime="2009-09-14T07:10:17+00:00">On decoding this further, I was presented with non-English language statement. I wasn&#8217;t able to figure out the use of this code. </del><del datetime="2009-09-03T06:03:00+00:00">A guess would be that a message/error is inserted here. This would most likely be the malware authors original language.</del> Another <a href="http://wepawet.iseclab.org/view.php?hash=835f950f74bbdaebab4e91a28c73d1d8&amp;t=1250389682&amp;type=js">malware analysis</a> shows this section as the Shellcode. I will update this as I get more information on how to decode it.</p></blockquote>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><strong>Update 1: 14th September,2009</strong><em><br />
OK, it turns out that the segment was indeed the shellcode. Using the Malzilla tool we concatenate the variable &#8220;<strong>var unf57UBnT</strong>&#8220;<br />
This presents us with an encoding which seems to be UCS2. Next, we can either use Malzilla to convert UCS2 to Hex (which does not provide reliable results) or use a shellcode to EXE converter available at <a href="http://sandsprite.com/shellcode_2_exe.php">http://sandsprite.com/shellcode_2_exe.php</a>.</em><div id="attachment_96" class="wp-caption aligncenter" style="width: 463px"><a href="http://sandsprite.com/shellcode_2_exe.php"><img src="http://securitythoughts.files.wordpress.com/2009/08/shellcode-2-exe_2.jpg?w=570" alt="ShellCode 2 EXE" title="shellcode-2-exe_2"   class="size-full wp-image-96" /></a><p class="wp-caption-text">ShellCode 2 EXE</p></div><br />
<em>Once we obtain the EXE from the shellcode, we can analyze this executable in a tool called <a href="http://www.webwasher.de/download/fileinsight/"><strong>FileInsight </strong>developed by Mcafee Labs</a>. Below is a snapshot of FileInsight analysis output which shows the malicious URL.</em><br />
<div id="attachment_97" class="wp-caption aligncenter" style="width: 610px"><img src="http://securitythoughts.files.wordpress.com/2009/08/fileinsight-2.jpg?w=570" alt="FileInsight - Shellcode.exe analysis" title="fileinsight-2"   class="size-full wp-image-97" /><p class="wp-caption-text">FileInsight - Shellcode.exe analysis</p></div></p>
<p><em>URLMON.DLL is a system DLL generally used by malwares to download files from online locations</em></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
The next step is to execute the &#8216;replace&#8217; functions which involve Regular Expressions to clean out the manipulated code.<br />
As an example below is the line of code that we currently have in our decoded output.</p>
<blockquote><p>rqeqG6Spq.setAttribute(&#8216;i#)@d!&#8217;.replace(/\(|\!|&amp;|\$|@|\^|\)|#/ig, &#8221;),rqeqG6Spq);</p></blockquote>
<p>Let&#8217;s take this code in detail:</p>
<table>
<tr>
<td>rqeqG6Spq</td>
<td>&#8211;&gt;</td>
<td>declared variable</td>
</tr>
<tr>
<td>setAttribute</td>
<td>&#8211;&gt;</td>
<td>the property of the variable rqeqG6Spq</td>
</tr>
<tr>
<td>/\(|\!|&amp;|\$|@|\^|\)|#/ig</td>
<td>&#8211;&gt;</td>
<td>Regular Expression</td>
<tr>
<td colspan="3">
(In JavaScript, to define a regex pattern, we define it between <strong>/&#8230;../</strong> .<br />
&#8216;<strong>g</strong>&#8216; indicates <em>Global Match</em> and &#8216;<strong>i</strong>&#8216; is for <em>Case-Insensitive</em> search)
</td>
<tr>
<td>.replace()</td>
<td>&#8211;&gt;</td>
<td>is a JavaScript string manipulation function, which runs the regex on the &#8216;object&#8217; <strong>i#)@d!</strong></td>
</tr>
</table>
<p>After executing the replace() function, the output would look like this </p>
<blockquote><p>rqeqG6Spq.setAttribute(&#8216;id&#8217;,rqeqG6Spq);</p></blockquote>
<p>Similar replace operations are performed at all other places, till we get the final output as shown <a href="http://docs.google.com/View?id=dctvmpj6_32fhwmwdfz">here</a></p>
<p>NOTE: Your Anti-Malware may issue an alert when you try to visit the above link. I have modified the malicious URL a bit so the script won&#8217;t move ahead.</p>
<p>We are now at a stage where we can make a few observations on what the JavaScript does and how it works.<br />
The original malicious domain is found to be <strong>http://3c8.ru:8080/welcome.php</strong> .This domain serves the malware payload.<br />
The script tries to exploit a vulnerability in ActiveX which allows it to download and execute a malicious binary.<br />
I haven&#8217;t had the chance to go deeper into the execution of the malware But once I get the time, I&#8217;ll look into analyzing the binary as well.</p>
<p>Before I end this long post, just a quick note that to automate this entire process, we can use an online tool called <strong><em><a href="http://wepawet.iseclab.org/index.php">wepawet</a></em></strong>, which is a service for detecting and analyzing web-based malware. It currently handles Flash and JavaScript files.<br />
You can find the result of the analysis of our malicious page at <a href="http://wepawet.iseclab.org/view.php?hash=07fc283602731721a97f196c3ab19092&amp;type=js">http://wepawet.iseclab.org/view.php?hash=07fc283602731721a97f196c3ab19092&amp;type=js</a><br />
It provides for a comprehensive analysis. </p>
<p>Also, do check out the VirusTotal scan results for the obfuscated and deobfuscated Javascript<br />
<a href="http://www.virustotal.com/analisis/2cd3069c412cac7b1159d20070503ee91238f1e4682a5b90b003b29a569c9291-1251527312">Obfuscated Detection rate is 2/41</a><br />
<a href="http://www.virustotal.com/analisis/218209456d7c0dc654596eab91b8cf0127dbbe1642eef9f56a3366021835d504-1251527404">De-obfuscated Detection rate is 14/41</a></p>
<p>I  guess that&#8217;s it. Hope you liked this basic tutorial. Do leave your feedback in the comments section below</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securitythoughts.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securitythoughts.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securitythoughts.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securitythoughts.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securitythoughts.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securitythoughts.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securitythoughts.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securitythoughts.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securitythoughts.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securitythoughts.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securitythoughts.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securitythoughts.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securitythoughts.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securitythoughts.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=65&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securitythoughts.wordpress.com/2009/08/28/deobfuscating-javascript-malware/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8c514cc5e42c466959b19f6782a39a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">securitythoughts</media:title>
		</media:content>

		<media:content url="http://securitythoughts.files.wordpress.com/2009/08/js_unpack_1.jpg" medium="image">
			<media:title type="html">js_unpack_1</media:title>
		</media:content>

		<media:content url="http://securitythoughts.files.wordpress.com/2009/08/js_decoded-php-charset-1.jpg?w=600" medium="image">
			<media:title type="html">js_decoded-php-charset-1</media:title>
		</media:content>

		<media:content url="http://securitythoughts.files.wordpress.com/2009/08/shellcode-2-exe_2.jpg" medium="image">
			<media:title type="html">shellcode-2-exe_2</media:title>
		</media:content>

		<media:content url="http://securitythoughts.files.wordpress.com/2009/08/fileinsight-2.jpg" medium="image">
			<media:title type="html">fileinsight-2</media:title>
		</media:content>
	</item>
		<item>
		<title>Hakin9 magazine contest</title>
		<link>http://securitythoughts.wordpress.com/2009/08/27/hakin9-magazine-contest/</link>
		<comments>http://securitythoughts.wordpress.com/2009/08/27/hakin9-magazine-contest/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 06:19:19 +0000</pubDate>
		<dc:creator>Wasim Halani</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[hakin9]]></category>

		<guid isPermaLink="false">http://securitythoughts.wordpress.com/?p=63</guid>
		<description><![CDATA[Hakin9 is out with another contest. They&#8217;re giving out three latest issues of Hakin9 absolutely free. After the last contest, I received my copy of Hakin9 in about 10 days and the issue was awesome. I can&#8217;t wait to check out the contents of the upcoming issues. The current issue addresses advance hacking techniques like [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=63&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hakin9 is out with another contest. They&#8217;re giving out three latest issues of Hakin9 absolutely free.</p>
<p>After the <a href="http://securitythoughts.wordpress.com/2009/07/30/hakin9-best-it-security-magazine/">last contest</a>, I received my copy of Hakin9 in about 10 days and the issue was awesome. I can&#8217;t wait to check out the contents of the upcoming issues.</p>
<p>The current issue addresses advance hacking techniques like ASLR and Stack Canaries. The theme of the issue is &#8220;<a href="http://www.hakin9.org/prt/view/about-the-mag/issue/1063.html">21st Century Hacking Techniques</a>&#8220;</p>
<p><img src="http://www.hakin9.org//files/haking/Cover/hakin9_5_2009.jpg" alt="Issue 05/2009 of Hakin9 magazine" /></p>
<p>Head over to their website at <a href="http://www.hakin9.org/en">http://www.hakin9.org/en</a> to know more about the contest and the articles in the current issue.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securitythoughts.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securitythoughts.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securitythoughts.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securitythoughts.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securitythoughts.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securitythoughts.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securitythoughts.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securitythoughts.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securitythoughts.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securitythoughts.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securitythoughts.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securitythoughts.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securitythoughts.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securitythoughts.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=63&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securitythoughts.wordpress.com/2009/08/27/hakin9-magazine-contest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8c514cc5e42c466959b19f6782a39a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">securitythoughts</media:title>
		</media:content>

		<media:content url="http://www.hakin9.org//files/haking/Cover/hakin9_5_2009.jpg" medium="image">
			<media:title type="html">Issue 05/2009 of Hakin9 magazine</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Injection in Stored Procedures</title>
		<link>http://securitythoughts.wordpress.com/2009/08/26/sql-injection-in-stored-procedures/</link>
		<comments>http://securitythoughts.wordpress.com/2009/08/26/sql-injection-in-stored-procedures/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 12:08:19 +0000</pubDate>
		<dc:creator>Wasim Halani</dc:creator>
				<category><![CDATA[PenTest]]></category>
		<category><![CDATA[sql-injection]]></category>
		<category><![CDATA[stored-procedure]]></category>

		<guid isPermaLink="false">http://securitythoughts.wordpress.com/?p=58</guid>
		<description><![CDATA[My colleague Dhiraj Ranka wrote about a very interesting topic of SQL Injections. Though Stored Procedures provide certain protection from SQL injections, an improper implementation voids all such protections. Dhiraj has demonstrated an SQL injection in a Stored Procedure which has not been constructed properly. The crux of the issue lies in using the system [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=58&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My colleague <a href="http://dhirajranka.wordpress.com">Dhiraj Ranka</a> wrote about a very interesting topic of SQL Injections.<br />
Though Stored Procedures provide certain protection from SQL injections, an improper implementation voids all such protections.</p>
<p>Dhiraj has demonstrated an SQL injection in a Stored Procedure which has not been constructed properly. </p>
<p>The crux of the issue lies in using the system Stored Procedure sp_executesql which takes a string as parameter and executes it. The string is generally a SQL query. So the entire premise of using stored procedures to prevent query injections fails as the input is directly inserted into the SQL query.</p>
<p>Read the detailed example at <a href="http://dhirajranka.wordpress.com/2009/08/25/sql-injection-stored-procedure/">http://dhirajranka.wordpress.com/2009/08/25/sql-injection-stored-procedure/</a></p>
<p>Another interesting account of improper usage of Stored Procedure is demonstrated at<br />
<a href="http://palisade.plynt.com/issues/2006Jun/injection-stored-procedures/">http://palisade.plynt.com/issues/2006Jun/injection-stored-procedures/</a></p>
<p>Regards,</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securitythoughts.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securitythoughts.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securitythoughts.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securitythoughts.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securitythoughts.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securitythoughts.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securitythoughts.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securitythoughts.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securitythoughts.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securitythoughts.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securitythoughts.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securitythoughts.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securitythoughts.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securitythoughts.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=58&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securitythoughts.wordpress.com/2009/08/26/sql-injection-in-stored-procedures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8c514cc5e42c466959b19f6782a39a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">securitythoughts</media:title>
		</media:content>
	</item>
		<item>
		<title>Indian Honeynet Project (IHP) Launched</title>
		<link>http://securitythoughts.wordpress.com/2009/08/11/indian-honeynet-project-ihp-launched/</link>
		<comments>http://securitythoughts.wordpress.com/2009/08/11/indian-honeynet-project-ihp-launched/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 07:48:51 +0000</pubDate>
		<dc:creator>Wasim Halani</dc:creator>
				<category><![CDATA[Honeynet]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[malware-analysis]]></category>

		<guid isPermaLink="false">http://securitythoughts.wordpress.com/?p=54</guid>
		<description><![CDATA[The official India chapter of the Honeynet Project was launched some time back. I&#8217;ve joined in as a member as it is a very interesting project and will provide for many learning opportunities. I&#8217;ve even submitted a report on the initial setup and analysis that we&#8217;ve done at our office. You can check it out [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=54&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The official India chapter of the <a href="http://www.honeynet.org/">Honeynet Project</a> was launched some time back.</p>
<p>I&#8217;ve joined in as a member as it is a very interesting project and will provide for many learning opportunities.<br />
I&#8217;ve even submitted a report on the initial setup and analysis that we&#8217;ve done at our office. You can check it out at<br />
<a href="http://honeynet.org.in/projects_and_reports.htm">http://honeynet.org.in/projects_and_reports.htm</a></p>
<p>For further details about the initiative visit <a href="http://honeynet.org.in/index.htm">http://honeynet.org.in/index.htm</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securitythoughts.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securitythoughts.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securitythoughts.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securitythoughts.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securitythoughts.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securitythoughts.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securitythoughts.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securitythoughts.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securitythoughts.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securitythoughts.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securitythoughts.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securitythoughts.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securitythoughts.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securitythoughts.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securitythoughts.wordpress.com&amp;blog=7773210&amp;post=54&amp;subd=securitythoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securitythoughts.wordpress.com/2009/08/11/indian-honeynet-project-ihp-launched/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8c514cc5e42c466959b19f6782a39a2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">securitythoughts</media:title>
		</media:content>
	</item>
	</channel>
</rss>
