<?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>The Hacker Diary</title>
	<atom:link href="http://www.thehackerdiary.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thehackerdiary.com</link>
	<description></description>
	<lastBuildDate>Thu, 23 Feb 2012 14:50:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mute Screamer (PHPIDS for WordPress)</title>
		<link>http://www.thehackerdiary.com/it-security/network-security/mute-screamer-phpids-for-wordpress/</link>
		<comments>http://www.thehackerdiary.com/it-security/network-security/mute-screamer-phpids-for-wordpress/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 14:46:38 +0000</pubDate>
		<dc:creator>ncolyer</dc:creator>
				<category><![CDATA[IDS]]></category>
		<category><![CDATA[Network Security]]></category>
		<category><![CDATA[ids]]></category>
		<category><![CDATA[network security]]></category>
		<category><![CDATA[phpids]]></category>

		<guid isPermaLink="false">http://www.thehackerdiary.com/?p=41</guid>
		<description><![CDATA[The last time I posted was about PHPIDS. &#160; Today I wanted to talk about the WordPress port of PHPIDS called Mute Screamer.   WordPress is an extremely insecure platform. I use it because I didn't have the time or feel like putting the effort into writing my own CMS. Before you "shame on you" I audited [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>The last time I posted was about PHPIDS.</p>
<p>&nbsp;</p>
<p>Today I wanted to talk about the WordPress port of PHPIDS called Mute Screamer.   WordPress is an extremely insecure platform. I use it because I didn't have the time or feel like putting the effort into writing my own CMS. Before you "shame on you" I audited my installation for injections and installed PHPIDS so that I would at least get notifications if compromised. I do offsite backup with an account that only has the ability to write the backup. Anywho, I had some dialog with the gentlemen who is ported PHPIDS to WordPress.</p>
<p>Here is our Q&amp;A.</p>
<p>Q: Who is the moniker that is Ampt?</p>
<p><span style="color: #ff0000;">A: My name is Luke Gallagher, just this dev you know.</span></p>
<p>&nbsp;</p>
<p>Q: Do you have a website or blog?</p>
<p><span style="color: #ff0000;">A: You can find my website at <a href="http://notfornoone.com/"><span style="color: #ff0000;">http://notfornoone.com</span></a></span></p>
<p>&nbsp;</p>
<p>Q: What do you do for a living?</p>
<p><span style="color: #ff0000;">A: I am currently working as a developer for a small design studio, my work at the moment involves working with the web stack.</span></p>
<p>&nbsp;</p>
<p>Q: How did you get into computers?</p>
<p><span style="color: #ff0000;">A: We got our first computer when I was about 12 and I just had figure out how it worked.</span></p>
<p>&nbsp;</p>
<p>Q: How did you first hear of PHPIDS?</p>
<p><span style="color: #ff0000;">A: I first heard about the PHPIDS project when I started following a few security related blogs, I think it was via <a href="http://www.thespanner.co.uk/"><span style="color: #ff0000;">thespanner.co.uk</span></a></span></p>
<p>&nbsp;</p>
<p>Q: How long will you maintain the Mute Screamer project?</p>
<p><span style="color: #ff0000;">A: I can't really say how long I will maintain it for, as long as I am interested and passionate about the project I will be involved.</span></p>
<p>&nbsp;</p>
<p>Q: Is anyone else contributing to the project?</p>
<p><span style="color: #ff0000;">A: There is no one else contributing at the moment. I hope there will be, other people bring new ideas and new perspectives that you may not have even considered. If anyone is interested you can find the project on github: <a href="https://github.com/ampt/mute-screamer"><span style="color: #ff0000;">https://github.com/ampt/mute-screamer</span></a></span></p>
<p>&nbsp;</p>
<p>Q: Was there any surprises in the process of generating the wordpress plugin?</p>
<p><span style="color: #ff0000;">A: Finding out that WordPress did not provide an elegant way to do something. For example implementing the automatic updates from phpids.org was a little hackish, but this was actually a good thing becuase I was able to fix something in WordPress and make it better while working on Mute Screamer.</span></p>
<div class="shr-publisher-41"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.thehackerdiary.com/it-security/network-security/mute-screamer-phpids-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TDL3 The Worst Best Rookit Ever</title>
		<link>http://www.thehackerdiary.com/it-security/malware/tdl3-the-worst-best-rookit-ever/</link>
		<comments>http://www.thehackerdiary.com/it-security/malware/tdl3-the-worst-best-rookit-ever/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 21:33:16 +0000</pubDate>
		<dc:creator>ncolyer</dc:creator>
				<category><![CDATA[IT Security]]></category>
		<category><![CDATA[Malware]]></category>
		<category><![CDATA[Rootkits]]></category>
		<category><![CDATA[Computer Repair]]></category>
		<category><![CDATA[GRLDR]]></category>
		<category><![CDATA[Mark Russinovich]]></category>
		<category><![CDATA[Rootkit]]></category>
		<category><![CDATA[TDL3]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.thehackerdiary.com/?p=46</guid>
		<description><![CDATA[Occasionally, I do computer repair. At one point it was my primary source of income after I quit a job where I wasn't valued as an employee. (I am sure we've all been there once.) In my many years of doing computer repairs, I occasionally would run into that one piece of malware that would [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><strong>Occasionally, I do computer repair.</strong></p>
<p><strong><br />
</strong></p>
<div id="attachment_49" class="wp-caption alignnone" style="width: 372px"><a href="http://www.nicholascolyer.com/thehackerdiary/wp-content/uploads/2010/12/smash-and-break-computer-pc-monitor-with-keyboard12.jpg"><img class="size-full wp-image-49" title="whoops" src="http://www.nicholascolyer.com/thehackerdiary/wp-content/uploads/2010/12/smash-and-break-computer-pc-monitor-with-keyboard12.jpg" alt="" width="362" height="284" /></a><p class="wp-caption-text">I fixed that computer in 5 seconds flat.</p></div>
<p>At one point it was my primary source of income after I quit a job where I wasn't valued as an employee. (I am sure we've all been there once.) In my many years of doing computer repairs, I occasionally would run into that one piece of malware that would throw a wrench in the spokes and just make me stop dead in my tracks. Whether it was in awe of innovation or frustration in removal, there have been those few moments where I just had to step back and re-evaluate my troubleshooting methodology, adjust my dropped jaw or walk away before I made smash smash like bam-bam.  The last time I had a moment like that happened when I had my first rootkit run-in 2 to 3 years ago. If you don't know what a rootkit is ( are you living under a rock???) <a href="http://en.wikipedia.org/wiki/Rootkit" target="_blank">read here</a>. It was after a few years elapsed from <a title="Greg Hoglund" href="http://en.wikipedia.org/wiki/Greg_Hoglund">Greg Hoglund's</a> NT based rootkit. It's cited as the first rootkit for NT systems but I believe otherwise as there is always someone who beat you to innovation- if you want to call it that. You know, kind of like how Alexander Graham Bell and Tesla were gamed on for credit by Thomas Edison for various inventions- but I digress. The community evolved over night and some of the more elitist computer repair community saw the rootkit as a mythical creature that just couldn't exist (whether by cognitive dissonance or otherwise) and went the route of the ostrich with it's head in the sand until it couldn't be ignored anymore.</p>
<p><a href="http://www.nicholascolyer.com/thehackerdiary/wp-content/uploads/2010/12/house_on_fire.jpg"><img class="alignnone size-full wp-image-50" title="house_on_fire" src="http://www.nicholascolyer.com/thehackerdiary/wp-content/uploads/2010/12/house_on_fire.jpg" alt="" width="560" height="420" /></a></p>
<p>Then it happened. An arrogrant Sony/BMG wrote some DRM software that caused quite a ruckus and shook things up while propelling the term "rootkit" into the media spotlight like so many Britney Spear's head shaving incidents: Sony included a rootkit on music cds as a means to combat piracy with much fail. The rootkit served to enable malware writers to cloak objects from windows with little effort and thus the class action lawsuits started rolling in like seaweed after a hurricane as a new era of malicious code got some traction.</p>
<p><strong>Yesterday  (</strong>♫ <strong>Virus removal was such an easy game to play </strong>♫<strong>)<br />
</strong></p>
<p>Yesterday (well this post has been drafted for a week or so- not quite yesterday anymore), I had the moment I spoke of above where I had to re-evaluate my methodology. I have seen some pretty ridiculous infections in my time but this one takes the cake as of December 14, 2010- the worst piece of malware I have ever had the displeasure of removing but credit for innovation. The customer dropped the PC off on a Friday. Generally, with my experience I can fix almost any issue inside of 20mins to an hour depending  on the pc's specs and infection severity. Mostly, the issues I see are of the spyware/malware/trojan series and are easy to remedy. This include your occasional rootkit.</p>
<p><strong><br />
</strong></p>
<p><strong>Troubleshooting</strong></p>
<p>Generally when I am fixing computers I ask a line of questions to deduce how much the customer is computer savy, if they know enough to get themselves in trouble, then ask about the symptoms. Based on their responses you can usually make an educated guess of what you are dealing with and what tools you will be focusing on using to fix the pc. When I troubleshoot a system, the very first thing I do is boot the machine up and see how it behaves. Can I replicate the symptoms that the customer described? If I can then I am on the right track. If not, then perhaps the problem is intermittent, customer gave bad information, problem is different than as described or a combination of all of the above.</p>
<p>As a rule of thumb, I NEVER EVER, I really mean NEVER EVER using any removable writable media when working on a system. It is amateur, irresponsible and common place for many shoddy computer repairmen/repairwomen. Rather, I will burn CD's with my toolkit and the most up-to-date revisions. (Thanks be to scripting and wget.)</p>
<p>The troubleshooting work-flow is generally as follows (AND I DO MEAN VERY GENERAL):</p>
<ul>
<li>Boot machine normally. Observe. Replicate symptoms? Disable system restore.(If password protected backup SAM and remediate password in PE environment. restore when finished fixing machine)</li>
<li>Google symptoms for known issues but don't waste time on anything but exact string matches. (works 20% of the time)</li>
<li>Run combofix</li>
<li>Boot machine from PE Environment / Hirens BootCD</li>
<li>mount registry hive for OS</li>
<li>Run autoruns to see what is on the startup, it's location, etc.</li>
<li> Google suspicious entries</li>
<li>Disable suspicious entries without false positive info.</li>
<li>Disable all non-microsoft startup items.</li>
<li>Scan machine for viruses/malware with third party utilities</li>
<li>Boot machine in safe mode with networking.</li>
<li>run combofix again</li>
<li>Run Autoruns - check startup entries, Process Explorer - check hooked dll's and Tcpview - currently active connections --- to monitor for strange activities.</li>
<li>Restart normally.</li>
<li>Run Autoruns, Process Explorer and Tcpview to monitor for strange activities. Look for removed startup entries back on startup.</li>
<li>Cleanup pc, defrag and update all AV and Windows Updates after taking System Restore snapshot.</li>
<li>Return to customer.</li>
</ul>
<p>This generally succeeds in fixing 98% of the issues that I run into with computers. When I tried to run procexp.exe it would instantly terminate. Hmmm.</p>
<p>Now, if it had of ran, I would have see that the context switch delta on atapi.sys was awfully high because of TDL3 among other anomalies but I am getting ahead of myself. I thought I might have not double clicked it, so I click again twice and get an error that I don't have permissions to run this executable. Okay, probably a dirty malware dll that has an MD5 on my utility and is blocking it accordingly. I run HxD and hex edit a section of plain-text to alter the MD5 of the executable and rename it. Once again it appears to have started but quit. I attempt to run again and... can you guess the error message? Correct, I do not have permissions to run this executable.</p>
<p>For about 5 seconds I stopped and thought about what I might have missed.</p>
<p>I run cacls and change the permission on the utility to everyone. It runs once then the permission error occurs again.</p>
<p>From this I deduce that my phantom malware is observing what system dll's are getting called by the utility and terminating the utility based on those calls then changing permissions on the executable. This is getting to be a complete pain in the ass whereas I normally would have been home free and now it is apparent that I am dealing with something a little more "advanced" then my run of the mill malware.</p>
<p><strong>It's time to change tactics. </strong></p>
<p>Knowing that there is a low likely hood that I will be able to run some of my more advanced utilities, I try anyway. I theorize that some of this more advanced activity is related to a rootkit and I run GMER and Rootkit Unhooker.</p>
<p>And that is when I discover the name of the rootkit via google. TDL3. After removing the associated driver and restoring order in the operating system there is one last surprise waiting for me.</p>
<p>GRLDR is missing or cannot be found.</p>
<p>Wouldn't you know it, the rootkit create it's own MBR that then bootstraps the OS. Only, it's much more cooler and technical than that.</p>
<p>You can find a full dissection of <a href="http://rootbiez.blogspot.com/2009/11/rootkit-tdl3-why-so-serious-lets-put.html" target="_blank">TDL3 here</a>.</p>
<p>To fix the last part of this rootkit you need to restore the MBR. Run fixboot and fixmbr and you'll be home free.</p>
<div class="shr-publisher-46"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.thehackerdiary.com/it-security/malware/tdl3-the-worst-best-rookit-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Priority Domain Availability Notice&#8221;</title>
		<link>http://www.thehackerdiary.com/domain-2/scam/priority-domain-availability-notice/</link>
		<comments>http://www.thehackerdiary.com/domain-2/scam/priority-domain-availability-notice/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 15:08:32 +0000</pubDate>
		<dc:creator>ncolyer</dc:creator>
				<category><![CDATA[Domain]]></category>
		<category><![CDATA[ICANN]]></category>
		<category><![CDATA[Scam]]></category>
		<category><![CDATA[Squatting]]></category>
		<category><![CDATA[1206AM.com]]></category>
		<category><![CDATA[Ads]]></category>
		<category><![CDATA[Advertisements]]></category>
		<category><![CDATA[Arthur Simmon]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[InTrust Domain]]></category>

		<guid isPermaLink="false">http://www.thehackerdiary.com/?p=55</guid>
		<description><![CDATA[Domain Scams Domain scamming has been around since ICANN started and was a "legitimate business" for some time where squatters would do all kinds of stuff morally and ethically in question. For example, a business would lapse on their domain name registration and the squatter would register the lapsed domain name and hold the business at ransom. So I [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><h1><strong>Domain Scams</strong></h1>
<p>Domain scamming has been around since <a href="http://en.wikipedia.org/wiki/ICANN" target="_blank">ICANN</a> started and was a "legitimate business" for some time where squatters would do all kinds of stuff morally and ethically in question. For example, a business would lapse on their domain name registration and the squatter would register the lapsed domain name and <a href="http://en.wikipedia.org/wiki/Cybersquatting" target="_blank">hold the business at ransom</a>.</p>
<p>So I got a funny email this morning and I thought I would share it.</p>
<div id="attachment_56" class="wp-caption aligncenter" style="width: 735px"><a href="http://www.nicholascolyer.com/thehackerdiary/wp-content/uploads/2010/12/Screen-shot-2010-12-19-at-9.50.59-AM.png"><img class="size-full wp-image-56  " title="arthur simmons scammer" src="http://www.nicholascolyer.com/thehackerdiary/wp-content/uploads/2010/12/Screen-shot-2010-12-19-at-9.50.59-AM.png" alt="intrust domains, 1206AM.COM" width="725" height="439" /></a><p class="wp-caption-text">Hmmmm, I believe you. . . Not.</p></div>
<p>Folks, if you own a similar domain to one listed in an email scam use the common sense to say "this is obviously a scam on some level". A quick google finds even the most basic information and tell tale signs such as the <a href="http://blog.onlymyemail.com/arthur-simmons-intrust-domains-bogus-domain-marketing/" target="_blank">article here</a>.</p>
<p>The lesson here is that if you think you're going to get screwed, don't bend over willing.</p>
<p>Arthur Simmon, InTrust Domain, 1206AM.com are scammy. Steer clear!</p>
<div class="shr-publisher-55"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.thehackerdiary.com/domain-2/scam/priority-domain-availability-notice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Layout 2.0</title>
		<link>http://www.thehackerdiary.com/uncategorized/layout-2-0/</link>
		<comments>http://www.thehackerdiary.com/uncategorized/layout-2-0/#comments</comments>
		<pubDate>Sun, 12 Dec 2010 01:37:55 +0000</pubDate>
		<dc:creator>ncolyer</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.thehackerdiary.com/?p=35</guid>
		<description><![CDATA[In the coming months I'll finally get around to skinning this blog appropriately and getting away from this template. I have a few projects in the pipe-line and I am slowly making progress on all of them. Between prototyping a pet project I will reveal in the future (have to register the company name and [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>In the coming months I'll finally get around to skinning this blog appropriately and getting away from this template. I have a few projects in the pipe-line and I am slowly making progress on all of them. Between prototyping a pet project I will reveal in the future (have to register the company name and the product name) and working on the domain for my own personal website, I'll get it finished at some point. For now though, enjoy this antiquated, bland layout.</p>
<div class="shr-publisher-35"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.thehackerdiary.com/uncategorized/layout-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPIDS</title>
		<link>http://www.thehackerdiary.com/it-security/network-security/phpids/</link>
		<comments>http://www.thehackerdiary.com/it-security/network-security/phpids/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 07:38:54 +0000</pubDate>
		<dc:creator>ncolyer</dc:creator>
				<category><![CDATA[IDS]]></category>
		<category><![CDATA[IPS]]></category>
		<category><![CDATA[IT Security]]></category>
		<category><![CDATA[Network Security]]></category>
		<category><![CDATA[NIDS]]></category>
		<category><![CDATA[NIPS]]></category>
		<category><![CDATA[add_slashes]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[my_real_escape_string]]></category>
		<category><![CDATA[phpbb3]]></category>
		<category><![CDATA[phpids]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[sql injection]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[user pruning]]></category>

		<guid isPermaLink="false">http://www.thehackerdiary.com/?p=32</guid>
		<description><![CDATA[Well, well. It certainly has been a while since I've had any really meaningful posts. The truth is that I have been super busy working, studying or being lazy and playing Call of Duty: Black Ops. You know, 'Tango sucka!!" At any rate, I've neglected to post on my blog for quite some time so [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Well, well.</p>
<p>It certainly has been a while since I've had any really<a href="http://thehackerdiary.nicholascolyer.com/?p=15" target="_blank"> meaningful posts</a>. The truth is that I have been super busy working, studying or being lazy and playing Call of Duty: Black Ops. You know, 'Tango sucka!!"</p>
<p>At any rate, I've neglected to post on my blog for quite some time so I figured why not post about <a href="http://php-ids.org/" target="_blank">what I am working on currently.</a></p>
<p><strong>Mein Kampf ("My Struggle" for the uninitiated)</strong></p>
<p>I run a <a href="http://www.phpbb.com/" target="_blank">phpbb3 bulletin board system</a> (not going to mention it here) and one of the struggles I deal with are the unknown hacks that malicious people in the darkest corners of the internet use to create un-approved users in the board db and post spam, steal email accounts to spam later or just be general jerks.</p>
<p><a href="http://www.nicholascolyer.com/thehackerdiary/wp-content/uploads/2010/12/Screen-shot-2010-12-05-at-3.22.40-PM.png"><img class="alignnone size-large wp-image-33" title="hax" src="http://www.nicholascolyer.com/thehackerdiary/wp-content/uploads/2010/12/Screen-shot-2010-12-05-at-3.22.40-PM-1024x359.png" alt="" width="717" height="251" /></a></p>
<p>Actual screen shot from phpbb3 administration console. Note that the joined date is showing October 11th 2007, 12AM. Those users were created in the db on June 4th 2010 at 9:00pm. Very sneaky although amateur as user pruning would have removed these accounts next time it ran. The hack performed did not specify post counts and recent posts in the database and as a result user pruning takes a look and says "Who hasn't posted in X amount of days?" then prunes everyone who hasn't. (Prune means deletes the accounts or deactivates them depending on your forum's individual settings.)</p>
<p>The solution up to this point has been to ban <a href="http://aplawrence.com/Words/2004_09_25.html"><em>APNIC</em>, LAPNIC, RIPE</a> via htaccess and constantly update revisions of phpbb3. Basically, a determination is made like this:</p>
<p>"Your not from the United States? No entry for you."</p>
<p>This reduced the spam issues I was having drastically in addition to not completely scaring me away from phpbb3 for insecurity. I also disabled new user requests since I personally know everyone on the board. This way it's invitation only no exceptions. My concern however is with the other fraction of ruffians hammering away from their computers in the United States or overseas kiddies proxying through US computers/botnets to do nefarious things. I see it everyday in my profession as I monitor intrusion attempts and attacks on networks.</p>
<p>I asked myself the other day if a guy who's profession is in the information security sector gets his WordPress hacked or his bulletin board system is defaced, does that make him bad at his job? Do others look down on him?</p>
<p><span style="font-size: 13.3333px;">The truth is that, it happens. I've been fairly lucky thus far but the inevitability is that compromises can and will occur. The answer depends on whether or not there are known good backups, layered security and adherence to policy. What I mean by adherence to policy: no weak passwords, password cycling, log checking, etc.</span></p>
<p><span style="font-size: 13.3333px;">For everything else, there is phpids.</span></p>
<p><span style="font-size: 13.3333px;"><br />
</span></p>
<p><strong>Enter PHPIDS </strong></p>
<p>PHPIDS acts as a filter over input that will do regular expressions and treating on that input then flag suspicious tags,  keywords, etc and take action according to your configuration. Using php.ini and pre-append you can setup phpids pretty quickly. The project has good support through the forums and a pretty loyal following of the most hardcore security guru's to average Joe.</p>
<p>Initially, false positives were a problem, but that was easily remedied by utilizing the white listing function adding the post and pm message fields.</p>
<p>This is a really great tool for the developers out there who have security concerns and would like to do something about them. Even with the "proper" sanitization of user supplied input, your adding of an additional layer of security that will keep you aware of one-off's and steady attacks as well as the newest attacks that might circumvent the common methodology.</p>
<div class="shr-publisher-32"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.thehackerdiary.com/it-security/network-security/phpids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Repairing A Flat Iron ( Thermal Fuse Fun! )</title>
		<link>http://www.thehackerdiary.com/hardware/repairing-a-flat-iron-thermal-fuse-fun/</link>
		<comments>http://www.thehackerdiary.com/hardware/repairing-a-flat-iron-thermal-fuse-fun/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 16:20:00 +0000</pubDate>
		<dc:creator>ncolyer</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Household Items]]></category>
		<category><![CDATA[Repair]]></category>
		<category><![CDATA[Broken Flat Iron]]></category>
		<category><![CDATA[Flat Iron]]></category>
		<category><![CDATA[Flat Iron Repair]]></category>
		<category><![CDATA[flat iron thermal cutoff]]></category>
		<category><![CDATA[flat iron thermal fuse]]></category>
		<category><![CDATA[GVP]]></category>
		<category><![CDATA[How To Repair a broken Flat Iron]]></category>
		<category><![CDATA[Nicholas Colyer]]></category>
		<category><![CDATA[Repair CHI]]></category>
		<category><![CDATA[SEFUSE]]></category>
		<category><![CDATA[SF226E]]></category>
		<category><![CDATA[Thermal fuse]]></category>

		<guid isPermaLink="false">http://www.nicholascolyer.com/thehackerdiary/?p=19</guid>
		<description><![CDATA[Ch-Ch-Ch-Chi---AH! My fiance mentioned this morning that her imitation "Chi" was borked' after less then a year of use. For those of you who aren't in the know ( aka male ), the Chi is a highly regarded flat-iron that many women claim are known to be reliable. Where's that scientific data when you need [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://1.bp.blogspot.com/_cDmJ7CKEZqQ/SmfTXH1jggI/AAAAAAAAAEg/aWwhB4gXhp4/s1600-h/chia-cow.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5361486275601990146" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 396px; height: 339px;" src="http://1.bp.blogspot.com/_cDmJ7CKEZqQ/SmfTXH1jggI/AAAAAAAAAEg/aWwhB4gXhp4/s400/chia-cow.jpg" border="0" alt="" /></a></p>
<div style="text-align: center;"><span style="font-size: 180%;"><span style="font-weight: bold;">Ch-Ch-Ch-Chi---AH!</span><br />
</span></div>
<p>My fiance mentioned this morning that her imitation "Chi" was borked' after less then a year of use.</p>
<blockquote><p>For those of you who aren't in the know ( aka male ), the Chi is a highly regarded flat-iron that many women claim are known to be reliable.</p></blockquote>
<p>Where's that scientific data when you need it eh?</p>
<p>When I bought the generic flat iron for my fiance, I did so because I couldn't justify the expense of a CHI. ( It just figures that I drive a Honda S2000 ). Anyways, I was able to repair the flat iron and I have detailed how to perform the repair below.</p>
<p><span style="color: #ff0000; font-weight: bold;">WARNING / DISCLAIMER:</span> <span style="color: #ff0000; font-weight: bold;">If you don't know what a soldering gun is or better yet don't have one, steer clear of  performing this repair. Bottom line is I am not responsible what-so-ever for your actions. By continuing beyond this point you agree to the above terms.</span></p>
<p>Great, so I see you agree. Let's get to it.</p>
<p>The problem at hand with most flat irons "breaking" is that once the thermal fuse goes (ie. Excessive heat from being left on all day / overnight / etc), the circuit is open, the ceramic plates will not heat and you will have a broken flat iron.</p>
<p><span style="font-weight: bold;">Tools:</span></p>
<p>Wire Crimps or a Soldering Iron &amp; Electrical Solder<br />
Phillips screwdriver<br />
Thermal Cutoff Fuse (depends on Iron. See details below)<br />
Volt Meter <span style="font-weight: bold;"> </span></p>
<p><a href="http://4.bp.blogspot.com/_cDmJ7CKEZqQ/SmfSqjygktI/AAAAAAAAAEQ/JZqqNWsw5lY/s1600-h/IMG_0349.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5361485510011294418" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 300px; height: 400px;" src="http://4.bp.blogspot.com/_cDmJ7CKEZqQ/SmfSqjygktI/AAAAAAAAAEQ/JZqqNWsw5lY/s400/IMG_0349.JPG" border="0" alt="" /></a><br />
<span style="font-weight: bold;"> </span></p>
<p>Troubleshooting</p>
<p>To begin, we need to confirm that the issue is the thermal cutoff fuse. The thermal cutoff fuse is a little electrical component fuse that will open the circuit when a certain temperature is exceeded.</p>
<p>This is what it looks like:</p>
<div style="text-align: center;"><a href="http://3.bp.blogspot.com/_cDmJ7CKEZqQ/SmfHnIsJzrI/AAAAAAAAAEA/8FYa0lj4XZc/s1600-h/gvp.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5361473356569366194" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 269px;" src="http://3.bp.blogspot.com/_cDmJ7CKEZqQ/SmfHnIsJzrI/AAAAAAAAAEA/8FYa0lj4XZc/s400/gvp.jpg" border="0" alt="" /></a><span style="font-size: 78%;"><span style="font-size: 85%;">looks pretty innocuous right?</span></p>
<p></span></div>
<p>Taking apart the imitation CHI is fairly simple and straight forward. As you get it apart you'll find that the ceramic plate has a plastic backing that slips on and in the space between the thermal fuse is housed. In the picture below, you can see the thermal fuse inside a protective (plastic??) housing with thermal paste pressed against the back plate. In the picture below, I have taken of the plastic backing and exposed the thermal fuse.</p>
<p><a href="http://3.bp.blogspot.com/_cDmJ7CKEZqQ/SmfJxNDVXdI/AAAAAAAAAEI/k6LGL3K3p9M/s1600-h/IMG_0352.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5361475728562281938" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_cDmJ7CKEZqQ/SmfJxNDVXdI/AAAAAAAAAEI/k6LGL3K3p9M/s400/IMG_0352.JPG" border="0" alt="" /></a></p>
<p>To test the fuse, I set my volt meter for continuity and tested the thermal fuse. As you can see below, no continuity.</p>
<p><a href="http://3.bp.blogspot.com/_cDmJ7CKEZqQ/SmfSzjzjxQI/AAAAAAAAAEY/9yRQaBTcqB8/s1600-h/IMG_0353.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5361485664634520834" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 300px; height: 400px;" src="http://3.bp.blogspot.com/_cDmJ7CKEZqQ/SmfSzjzjxQI/AAAAAAAAAEY/9yRQaBTcqB8/s400/IMG_0353.JPG" border="0" alt="" /></a><br />
From here you need to identify what the flat irons thermal fuse specifications are by reading the part number and googling it. In my case, the thermal fuse was available at the local Radio Shack.<br />
I soldered it it and was good to go. <span style="font-weight: bold;">My thermal fuse was SEFUSE SF226E rated for 227°C, 10A and 250V~.</span></p>
<p><span style="font-weight: bold; color: #ff0000;">IMPORTANT!!!</span></p>
<p>My soldering gun is battery powered and is just below what the fuse is rated however I would recommend using crimps instead as an extremely hot soldering iron will destroy the fuse before your wife / girlfriend / mother get's a chance to use it.</p>
<p><span style="font-weight: bold;">UPDATE:</span> Over at <a href="http://joedotcom.com/2009/05/16/attempting-to-repair-a-chi-flatiron/">JoeDotCom.Com</a> there is a great write up on fixing a switch of a flat iron.</p>
<p>Tell me what you think?</p>
<div class="shr-publisher-19"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.thehackerdiary.com/hardware/repairing-a-flat-iron-thermal-fuse-fun/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>AutoIT &#8211; Automate Your Workplace!</title>
		<link>http://www.thehackerdiary.com/software/automation/autoit-automate-your-workplace/</link>
		<comments>http://www.thehackerdiary.com/software/automation/autoit-automate-your-workplace/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 17:40:00 +0000</pubDate>
		<dc:creator>ncolyer</dc:creator>
				<category><![CDATA[AutoIT]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Hex Editor Neo]]></category>

		<guid isPermaLink="false">http://www.nicholascolyer.com/thehackerdiary/?p=18</guid>
		<description><![CDATA[I am a HUGE fan of AutoIt. I have used AutoIt to automate joining a computer to wireless networks as well as data entry from excel to 3rd party program's because of how rapidly you can program and how little you need to know prior. Recently, I discovered a hex editor ("Hex Editor Neo") that [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I am a HUGE fan of AutoIt.</p>
<p>I have used AutoIt to automate joining a computer to wireless networks as well as data entry from excel to 3rd party program's because of how rapidly you can program and how little you need to know prior.</p>
<p>Recently, I discovered a hex editor ("Hex Editor Neo") that supports a "patterning" feature which allows you to enter a hex code with a description of what it is and a coloring scheme which it will then apply to all occurrences in your current open executable. In my case, I wanted to load a color patterning scheme for all IL opcode instances for easier identification. I was able to find a list and move that data into excel.</p>
<p>Then, I recorded a macro with AutoIT and imported those opcodes into Hex Editor Neo.</p>
<p>Tell me what you think?</p>
<div class="shr-publisher-18"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.thehackerdiary.com/software/automation/autoit-automate-your-workplace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.HACK, .NET, .NET Reflector</title>
		<link>http://www.thehackerdiary.com/software/dot-net/dot-hack-dot-net-dot-net-reflector/</link>
		<comments>http://www.thehackerdiary.com/software/dot-net/dot-hack-dot-net-dot-net-reflector/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 16:59:00 +0000</pubDate>
		<dc:creator>ncolyer</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Decompilers]]></category>
		<category><![CDATA[Hacker Tools]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[.NET Reflector]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[CIL]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[MC++]]></category>
		<category><![CDATA[MSIL]]></category>
		<category><![CDATA[Nicholas Colyer]]></category>
		<category><![CDATA[Red Gate]]></category>
		<category><![CDATA[Reverse Engineering .NET]]></category>
		<category><![CDATA[Visual Basic]]></category>

		<guid isPermaLink="false">http://www.nicholascolyer.com/thehackerdiary/?p=17</guid>
		<description><![CDATA[As someone who is developing an application using the .NET framework, I didn't put much thought into code obfuscation. My priority is to accomplish a specific task; A functional product. Now I am not going to lie, I never much looked into the inner workings of .NET since I was never intrigued by it. For [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://3.bp.blogspot.com/_cDmJ7CKEZqQ/SjvS586CiTI/AAAAAAAAADw/jC7iq-YpwUg/s1600-h/dotNET_Logo_270x142.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5349100875476535602" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 270px; height: 142px;" src="http://3.bp.blogspot.com/_cDmJ7CKEZqQ/SjvS586CiTI/AAAAAAAAADw/jC7iq-YpwUg/s400/dotNET_Logo_270x142.jpg" border="0" alt="" /></a><br />
As someone who is developing an application using the .NET framework, I didn't put much thought into code obfuscation. My priority is to accomplish a specific task; A functional product.<br />
Now I am not going to lie, I never much looked into the inner workings of .NET since I was never intrigued by it. For the most part, I had a general idea.</p>
<p>Today, I researched a bit on how it worked and in this post focused more on how it broke down.</p>
<p>Downloading the SDK for .NET proved to provided some rather valuable tools for exploring the technology. I don't have much time so I will speak specifically of IL DASM ( MSIL Disassembler) which when opening an un-packed .NET executable, will take apart the assemblies for that application. Before I get ahead of myself, let me focus on clarifying something first. MSIL stands for Microsoft Intermediate Language ( <a href="http://en.wikipedia.org/wiki/Common_Intermediate_Language">formerly as I read Wikipedia this is now referred to as CIL or Common Intermediate Language</a>) which is a set of CPU-independent instructions that can be converted to native code. If you are a developer you probably know this, I am a novice and did not.</p>
<p>What this means to me or you is that it's a simple task to de-compile to source code from an executable.</p>
<p><a href="http://4.bp.blogspot.com/_cDmJ7CKEZqQ/Sjvn12AT97I/AAAAAAAAAD4/tdhuMGOgLjk/s1600-h/SNAG-001.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5349123894648502194" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 313px;" src="http://4.bp.blogspot.com/_cDmJ7CKEZqQ/Sjvn12AT97I/AAAAAAAAAD4/tdhuMGOgLjk/s400/SNAG-001.jpg" border="0" alt="" /></a><span style="font-size: 78%;">( Pictured above is a commercial application written in .NET that couldn't even put up a fight. Trademarks and name specific's have been blocked for intellectual property reasons. )</span></p>
<p>I'd expand on IL DASM more but there is a tool much better suited for the job and it's called <a href="http://reflector.red-gate.com/download.aspx">.NET Reflector</a>.</p>
<p><a href="http://reflector.red-gate.com/download.aspx">.NET Reflector</a> is more user friendly and it does something a little extra special. <a style="font-weight: bold;" href="http://reflector.red-gate.com/download.aspx">.NET Reflector</a><span style="font-weight: bold;"> </span><span style="font-weight: bold;">allows you to convert from CIL Language to Visual Basic, C#, Visual Basic, Delphi, MC++ and Chrome live and on the fly.</span></p>
<p>You can see this behavior exhibited in the video below:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/IGauZQcp0g0&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/IGauZQcp0g0&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>As you can see, we have great flexibility to take apart a .NET application and view source code with less effort than reverse engineering an application with a debugger and translating machine code. Additionally, with the <a href="http://sebastien.lebreton.free.fr/reflexil/">Reflexil addon</a> we can even change some aspects of the application.</p>
<p>It's really opened my eyes that source code is so easy to create from a .NET application and the problem hinges solely on the medium in which it's compiled, .NET.</p>
<p>Tell me what you think?</p>
<div class="shr-publisher-17"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.thehackerdiary.com/software/dot-net/dot-hack-dot-net-dot-net-reflector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A False Sense of Security: An Explanation Of Terms</title>
		<link>http://www.thehackerdiary.com/it-security/a-false-sense-of-security-an-explanation-of-terms/</link>
		<comments>http://www.thehackerdiary.com/it-security/a-false-sense-of-security-an-explanation-of-terms/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 15:13:00 +0000</pubDate>
		<dc:creator>ncolyer</dc:creator>
				<category><![CDATA[Anti-Virus]]></category>
		<category><![CDATA[Compressing Executables]]></category>
		<category><![CDATA[Debuggers]]></category>
		<category><![CDATA[Decompilers]]></category>
		<category><![CDATA[Hacker Tools]]></category>
		<category><![CDATA[Hex Editors]]></category>
		<category><![CDATA[IT Security]]></category>
		<category><![CDATA[Packing Executables]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Techniques]]></category>
		<category><![CDATA[XORing]]></category>
		<category><![CDATA[Anti virus]]></category>
		<category><![CDATA[Defeating AntiVirus]]></category>
		<category><![CDATA[Defeating AV]]></category>
		<category><![CDATA[EXE Packing]]></category>
		<category><![CDATA[Manually Packing Executable]]></category>
		<category><![CDATA[Morphine]]></category>
		<category><![CDATA[Packers]]></category>
		<category><![CDATA[Packing]]></category>
		<category><![CDATA[UPX]]></category>
		<category><![CDATA[Virus]]></category>
		<category><![CDATA[Virus Total]]></category>
		<category><![CDATA[Viruses]]></category>
		<category><![CDATA[VirusTotal]]></category>

		<guid isPermaLink="false">http://www.nicholascolyer.com/thehackerdiary/?p=16</guid>
		<description><![CDATA[UPDATE: If you came here looking for more information about UPX, NETCAT and PACKING executables, see the third part of my series on Defeating AV. When posting the conclusion of my antivirus study, I glazed over some core concepts and definitions of terms I was using because I wanted to complete the post. This post [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><h3><strong><span style="color: #ff6600;">UPDATE: If you came here looking for more information about UPX, NETCAT and PACKING executables, see the third part of my <a href="http://www.thehackerdiary.com/?p=15" target="_blank">series on Defeating AV</a>.</span></strong></h3>
<p><span style="font-weight: bold;">When posting the conclusion of my antivirus study, I glazed over some core concepts and definitions of terms I was using because I wanted to complete the post. </span></p>
<p>This post is for those of you who's heads were spinning in that post.</p>
<p><span style="font-weight: bold; color: red;">Executable</span><br />
An executable is a program. A program is a collections or group of functions that accomplish specific tasks as designed. For instances, internet explorer is a program that allows you to browse the web.</p>
<p><span style="font-weight: bold; color: red;">Executable Compression (UPX for example) </span><br />
Executable compression is similar to a self-extracting Winzip archive except in terms of an application itself. Primarily, it's use is to shrink file size.</p>
<p><span style="font-weight: bold; color: red;">EXE Packing</span><br />
Packing is the process of taking an executable and making it's code un-decipherable but still executable by an operation system. This process can be done a few ways and is generally accomplished with the use of a 3rd party program such as Aspack, Armadillo or any other industry standard. These commercial packing programs are used by game developers, software engineers and other industry professionals to thwart hackers from cracking thier applications and releasing them on P2P networks. Unfortunately, anything that can be done to an executable can be un-done as there is always a finite point of entry and people who are exceptionally good at reverse engineering.</p>
<p><span style="font-weight: bold; color: red;">Manually Packing Executable</span><br />
Manually packing an executable is something more advanced. This is the process by which one develops a custom encryption routine and applies that routine to an executable (like we did in my previous post following instructions from google.)</p>
<p><span style="font-weight: bold; color: red;">Morphine</span><br />
Morphine is an aptly named executable developed to cloak nefarious application from AV. In it's hayday Morphine would trounce AntiVirus solutions with no problem. It's use coupled with UPX would leave the most common virus or trojan executable undetected by AntiVirus and additionally, it still serves to this date to mask packed malware from AntiVirus solutions.</p>
<p><span style="font-weight: bold; color: red;">Batch Script</span><br />
Batch scripting is built right into windows. It allows for automation of operations a user would normally have to follow through with manually. In my previous post, I used a batch script to automate running NetCat through a UPX packer and then through Morphine. I specified the input and output path in variables at the top of our script, then prompted for the imagebase address from LordPE and set a variable from that input so Morphine could do it's work on our executable.</p>
<p><span style="font-weight: bold; color: red;">LordPE</span><br />
LordPE is yet something else I glazed over. LordPE is a tool when working with executables that allows for absolute control and easy execution of advanced operations. The sum of which is more complex and convoluted to describe in a single post. Perhaps some other day?</p>
<p>Tell me what you think?</p>
<div class="shr-publisher-16"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.thehackerdiary.com/it-security/a-false-sense-of-security-an-explanation-of-terms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A False Sense of Security : AntiVirus Part III</title>
		<link>http://www.thehackerdiary.com/it-security/a-false-sense-of-security-antivirus-part-iii/</link>
		<comments>http://www.thehackerdiary.com/it-security/a-false-sense-of-security-antivirus-part-iii/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 19:27:00 +0000</pubDate>
		<dc:creator>ncolyer</dc:creator>
				<category><![CDATA[Anti-Virus]]></category>
		<category><![CDATA[Compressing Executables]]></category>
		<category><![CDATA[Hacker Tools]]></category>
		<category><![CDATA[IT Security]]></category>
		<category><![CDATA[Packing Executables]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Techniques]]></category>
		<category><![CDATA[XORing]]></category>
		<category><![CDATA[Anti virus]]></category>
		<category><![CDATA[David Rook]]></category>
		<category><![CDATA[Debugger]]></category>
		<category><![CDATA[Defeating AntiVirus]]></category>
		<category><![CDATA[Defeating AV]]></category>
		<category><![CDATA[EXE Packing]]></category>
		<category><![CDATA[Hex Editor]]></category>
		<category><![CDATA[Hiew]]></category>
		<category><![CDATA[Malware]]></category>
		<category><![CDATA[Manually Packing Executable]]></category>
		<category><![CDATA[Morphine]]></category>
		<category><![CDATA[Ollydbg]]></category>
		<category><![CDATA[UPX]]></category>
		<category><![CDATA[Virus Total]]></category>
		<category><![CDATA[VirusTotal]]></category>
		<category><![CDATA[Windasm32]]></category>

		<guid isPermaLink="false">http://www.nicholascolyer.com/thehackerdiary/?p=15</guid>
		<description><![CDATA[Previously, we touched on the concept that AV is not infallible as you would be lead to believe by advertisers. This post is the continuation of that study. PART III continued from here To begin, I decided to compress NetCat with UPX. The syntax and flags used were as follows: "upx C:\NetCat\nc.exe --best --ultra-brute --compress-icons=3 [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><span style="font-size: 85%;"><span style="font-size: 130%;"><span style="font-weight: bold;"><a href="http://thehackerdiary.blogspot.com/2009/06/false-sense-of-security-antivirus-part.html">Previously</a>, we touched on the concept that AV is not infallible as you would be lead to believe by advertisers. This post is the continuation of that study. </span></span></span></p>
<p><span style="font-size: 180%;"><span style="font-weight: bold;">PART III</span></span></p>
<p>continued from <a href="http://thehackerdiary.blogspot.com/2009/06/false-sense-of-security-antivirus-part_11.html">here</a></p>
<p>To begin, I decided to compress NetCat with <a href="http://upx.sourceforge.net/">UPX</a>. The syntax and flags used were as follows:</p>
<p><a href="http://3.bp.blogspot.com/_cDmJ7CKEZqQ/SjKu8Qzp2aI/AAAAAAAAADQ/FFewqu9tDgk/s1600-h/SNAG-000.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5346528057969203618" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 116px;" src="http://3.bp.blogspot.com/_cDmJ7CKEZqQ/SjKu8Qzp2aI/AAAAAAAAADQ/FFewqu9tDgk/s400/SNAG-000.jpg" border="0" alt="" /></a><br />
"<span style="font-weight: bold;">upx C:\NetCat\nc.exe --best --ultra-brute --compress-icons=3 --strip-relocs=1</span>"</p>
<p>Now that it has been compressed, let's take a look at<a href="http://www.virustotal.com/analisis/7379c5f5989be9b790d071481ee4fdfaeeb0dc7c4566cad8363cb016acc8145e-1244832731"> the virgin executable's virus total scan</a> first to find out what AV's detected it.</p>
<p>From the results, we see that these <span style="font-weight: bold;">21 </span>different AntiVirus solutions were the only ones to detect our <span style="font-weight: bold;">UNPACKED </span>executable. Technically, NetCat is not a virus or malware but the potential for it to be used as such exists; as a result of this it should be flagged by all and an optional detection in their configurations.</p>
<p>Now that it's been packed, I decided to see if our simple one time packing of the executable would be sufficient to hide from any of our antivirus solutions, <span style="color: #000000;">so I uploaded it to Virus Total expecting to have 21 total detections once more</span><span style="color: #000000;">. </span></p>
<p><a href="http://www.virustotal.com/analisis/1f0805709863b934ef238218aa686bd071b3aa28e667eee0ab27a5c0241df933-1244837152"><span style="font-size: 180%;"><span style="font-weight: bold;">I was wrong.</span></span></a></p>
<p>Out of our list of AV's,<span style="font-weight: bold;"> <span style="color: #ff0000;">only 15 detected NetCat as it was before </span>and 1 just flagged that it was packed not even detecting the real threat. </span></p>
<p>But were not done yet are we? Dig in, it's only going to get messier from here.</p>
<p>I decided to write a batch file that would process the executable sequentially through <a href="http://upx.sourceforge.net/">UPX</a> compression and something I haven't touched on until right now called "Morphine".</p>
<p><a href="http://2.bp.blogspot.com/_cDmJ7CKEZqQ/SjR66ELXXiI/AAAAAAAAADY/-cNxIO-KAe0/s1600-h/batch.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5347033795568033314" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 446px; height: 327px;" src="http://2.bp.blogspot.com/_cDmJ7CKEZqQ/SjR66ELXXiI/AAAAAAAAADY/-cNxIO-KAe0/s400/batch.jpg" border="0" alt="" /></a><br />
The actual code for the batch was:</p>
<blockquote style="color: #ff0000;"><p>@ECHO OFF<br />
REM:  Variables<br />
REM:************************<br />
SET INPUT=C:\HackTools\NetCat\nc.exe<br />
SET OUTPUT=C:\Users\Admin\Desktop\nc.exe</p>
<p>@echo.<br />
@echo     ******************************************<br />
@echo     *    Compressing Executable with UPX     *<br />
@echo     ******************************************<br />
@echo.</p>
<p>C:\HackTools\Packers\upx\upx --best --ultra-brute --compress-icons=3 --strip-relocs=1 %INPUT% -o %OUTPUT%</p>
<p>@echo.<br />
@echo     ******************************************<br />
@echo   ***   Opening LordPE to Obtain Imagebase   ***<br />
@echo     ******************************************<br />
@echo.</p>
<p>start "%ProgramFiles%\Internet Explorer\IEXPLORE.EXE" "C:\HackTools\exetools\LordPE\LordPE.exe"</p>
<p>@ECHO Path of executable is %OUTPUT%<br />
@echo.<br />
@echo.<br />
@echo.</p>
<p>:imagebase<br />
set IMAGEBASE=<br />
set /P IMAGEBASE=Type input: %=%<br />
if "%IMAGEBASE%"=="" goto input<br />
echo Your input was: %IMAGEBASE%</p>
<p>Pause</p>
<p>@echo.<br />
@echo.<br />
@echo.<br />
@echo     ******************************************<br />
@echo     *  Morphine is crypting the executable   *<br />
@echo     ******************************************<br />
@echo.<br />
@echo.<br />
@echo.</p>
<p>C:\HackTools\Packers\Morphine\morphine.exe -b:%IMAGEBASE% -o:%OUTPUT% %OUTPUT%</p>
<p>PAUSE</p></blockquote>
<p>Morphine which has been around for quite some time in the underground blackhat hacker circles, is used to make executables "KAV undetectable". I downloaded a dated version of Morphine in hopes that a 2004 release of the tool would have been reverse engineered by AV companies and easily unpacked to reveal the executable being masked. KAV (which is short for Kaspersky Antivirus) is apparently used as the benchmark of detection when it comes to masking malware by the underground of virus and remote access trojan writers. Floating in IRC (Internet Relay Chat) chatrooms and researching for this post in google, I find numerous posts referencing Kaspersky as the antivirus to beat and as such my expectations of it's performance are naturally higher than that of the others.</p>
<p>It was time to process our executable.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/XWM07Sjin_o&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/XWM07Sjin_o&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>As you can see from the video above, I run our batch script which compresses our executable then packs our executable with Morphine. Then I upload it to <a href="http://www.virustotal.com/analisis/6076e17a6434f4e9eb13762769079ea3bb4fad0977e9f26c662e304936e13ddd-1244954061">Virus Total and take a look at the results</a>.</p>
<p><a href="http://2.bp.blogspot.com/_cDmJ7CKEZqQ/SjSFWaSCZbI/AAAAAAAAADg/thQ6e1UOxD0/s1600-h/avscan.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5347045277654214066" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 274px; height: 400px;" src="http://2.bp.blogspot.com/_cDmJ7CKEZqQ/SjSFWaSCZbI/AAAAAAAAADg/thQ6e1UOxD0/s400/avscan.jpg" border="0" alt="" /></a><br />
As you can see, the majority of antivirus solutions are only detecting that the file has been packed and some even identify the packer. Few detect the true identity of our executable, which is NetCat.</p>
<p>This is a double edged sword.</p>
<p>On one hand we are being flagged which is good, but on the other hand if we cannot identify the true identity of an executable and are subverted by packing, then we may subject to its true intentions. Additionally, we have false positives of different viruses by some av's.</p>
<p>We have seen that Morphine is for the most part detected now and unfortunately only a handful of Antivirus solutions even identify our masked executable as NetCat. But we must keep in mind we did not have a 100% detection ratio and additionally we used a tool that was dated. To me it is un-acceptable for any Antivirus to not detect Morphine after this much elapsed time. Just think to yourself, what happens when we use the most current releases?</p>
<p>Since I am not part of the underground group of people who specialize in these activities, I frankly don't know where to go to get the latest release. I am sure with some crafty googling I could find it but I don't need to at this point. If a tool that is 5-6 years old can still mask an executable, it's not a stretch to assume the most current release slips under the radar as well, which brings me to the last and final stage in this demonstration.</p>
<p>From the research I had done, I found that many virus and trojan writers wrote their OWN packing/encrypting routines to mask their malware leaving Morphine out of the equation altogether. This is a HUGE problem for AV and you. If your AV doesn't have a signature to compare with there will be no detection.</p>
<p><span style="font-size: 180%;"><span style="font-weight: bold;">Packing It Myself</span></span></p>
<p>I decided to finish this post by attempting to pack an executable myself based on information gleaned from google and google I did. I searched google with this search string "exe packing" and clicked the first result with skepticism.</p>
<p><span style="font-size: 180%;"><span style="font-weight: bold; color: #ff0000;">In 30 seconds or less, I had enough information from google to not only write my own encrypting routine but mask NetCat from 31 out of 39 AntiVirus solutions!!!!!!!!!</span></span></p>
<p>Following the instructions from google result <a href="http://davidiorg.blogspot.com/2008/06/exe-packing-hard-way.html">http://davidiorg.blogspot.com/2008/06/exe-packing-hard-way.html</a>, I was able to evade 31 out of 39 antivirus solutions.</p>
<p><span style="font-style: italic;">NOTE: David has a pretty clear explanation on his site that someone who has intermediate knowledge of the topic could easily understand and execute.</span></p>
<p><a href="http://www.virustotal.com/analisis/ecb2690d6455cd14fce06465a2cc12054bfe5ddfcf6aaed262e7e0233019d397-1244958083">The results of packing netcat are chilling</a>.</p>
<p><a href="http://2.bp.blogspot.com/_cDmJ7CKEZqQ/SjSV7-tgnxI/AAAAAAAAADo/_l3a79mEZBQ/s1600-h/6-14-2009+2-13-40+AM.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5347063515274321682" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 251px; height: 400px;" src="http://2.bp.blogspot.com/_cDmJ7CKEZqQ/SjSV7-tgnxI/AAAAAAAAADo/_l3a79mEZBQ/s400/6-14-2009+2-13-40+AM.jpg" border="0" alt="" /></a><br />
As you can see, with little effort and google, <span style="color: #cc0000; font-size: 180%;"><span style="font-weight: bold;">I was able to successfully bypass all but 8 AntiVirus solutions.</span></span> <span style="font-weight: bold;">Few of those solutions which were mainstream and advertised even had a detection let alone identified NetCat.</span></p>
<p><span style="font-size: 180%;"><span style="font-weight: bold;">Conclusion and Q &amp; A</span></span></p>
<p>When I started this post, I decidedly set out to expose that of which I already knew to be true. I didn't expect however that a google would give me enough information to pack netcat and evade that many av solutions with little know-how or effort especially since the information posted was done so in 2008. Antivirus solutions need to reinvent the wheel and get with the times if they are to survive in the wild wild west ages of the internet.</p>
<p><span style="font-weight: bold; color: #ff0000;">What antivirus is the best for me to use?</span></p>
<p>In my opinion there are a couple different solutions available that I would recommend. I personally use AntiVir XP which is free for non-commercial use. Kaspersky from what I have seen in hacking forums researching, shows the highest level of visibility in that it's very good at thwarting coders; which is why it appears to be the standard to beat. <span style="font-weight: bold;">However, the results of manually packing the executable did not look favorably on Kaspersky so I really don't know what to think about KAV</span>. Additionally, KAV may have intentionally not detected netcat as netcat can be used for good or bad. Sophos also appears to have high visibility and NOD32 is allegedly the best hueristical scanner available however NOD32 failed to catch NetCat... Intentional?</p>
<p><span style="font-weight: bold; color: #ff0000;">My company uses XXX Anti Virus and we've never had any issues. How is your "study" relevant? </span></p>
<p><span style="font-weight: bold;">Rootkits</span>. The idea that if your not showing symptoms you can't be infected is a fallacy that many believe. Blackhat hackers aren't you average novice banging away at their keyboard 2:30 in the morning, rather they silently continue to monitor and steal information without you ever knowing any different. This is more dangerous than a conventional threat because a virus or trojan will rear it's ugly head eventually and you will take the nessesary precautions to protect your credit/identity/credentials/etc. A rootkit is similar to a trojan except it's a completely silent killer that modifies it's host operations system. It does this in such a manner that it's exceptionally hard to find or detect and often the best policy is to completely wipe the system.</p>
<p><span style="font-size: 100%;"><span style="font-weight: bold; color: #ff0000;">What else can I do to protect myself?</span></span></p>
<p>Read. Read as much as you can about how viruses and malware work. Become familiar with common methods and common viruses. Monitor or subscribe to hacker publications.</p>
<p><span style="color: #ff0000;"><strong>I didn't understand some of the terms you used.</strong></span></p>
<p>Go here -&gt; <a href="http://thehackerdiary.blogspot.com/2009/06/false-sense-of-security-explanation-of.html">A Glossary of Terms!</a></p>
<p><a href="http://thehackerdiary.blogspot.com/2009/06/false-sense-of-security-explanation-of.html"><br />
</a><br />
Tell me what you think of my results.</p>
<div class="shr-publisher-15"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.thehackerdiary.com/it-security/a-false-sense-of-security-antivirus-part-iii/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

