<?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>Saiweb &#187; hacking</title>
	<atom:link href="http://www.saiweb.co.uk/category/hacking/feed" rel="self" type="application/rss+xml" />
	<link>http://www.saiweb.co.uk</link>
	<description>Ramblings of a Sys admin</description>
	<lastBuildDate>Mon, 06 Feb 2012 14:57:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WiFi recon using OSX native tools</title>
		<link>http://www.saiweb.co.uk/hacking/wifi-recon-using-osx-native-tools</link>
		<comments>http://www.saiweb.co.uk/hacking/wifi-recon-using-osx-native-tools#comments</comments>
		<pubDate>Fri, 23 Sep 2011 10:13:12 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[airport]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[pcap]]></category>
		<category><![CDATA[pentesting]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=1122</guid>
		<description><![CDATA[So you wanted to get your aircrak suite on under OSX, getting airodump etc to work I can tell you will be a nightmare (infact just dont use a VM with a USB wifi for that, however there is an alternative &#8230;), after a lot of searching there is a native tool under OSX that [...]]]></description>
			<content:encoded><![CDATA[<p>So you wanted to get your aircrak suite on under OSX, getting airodump etc to work I can tell you will be a nightmare (infact just dont use a VM with a USB wifi for that, however there is an alternative &#8230;), after a lot of searching there is a native tool under OSX that will let you cap packets, list networks etc.</p>
<p>Credit goes to <a href="http://forum.aircrack-ng.org/index.php?topic=293.msg34031#msg34031">d3in0s</a> for his awesome forum post.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br />99<br />100<br />101<br />102<br />103<br />104<br />105<br />106<br />107<br />108<br />109<br />110<br />111<br />112<br />113<br />114<br />115<br />116<br />117<br />118<br />119<br />120<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport<br />
Usage: airport &lt;interface&gt; &lt;verb&gt; &lt;options&gt;<br />
<br />
&nbsp; &nbsp; &lt;interface&gt;<br />
&nbsp; &nbsp; If an interface is not specified, airport will use the first AirPort interface on the system.<br />
<br />
&nbsp; &nbsp; &lt;verb is one of the following:<br />
&nbsp; &nbsp; prefs &nbsp; If specified with no key value pairs, displays a subset of AirPort preferences for<br />
&nbsp; &nbsp; &nbsp; &nbsp; the specified interface.<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; Preferences may be configured using key=value syntax. Keys and possible values are specified below.<br />
&nbsp; &nbsp; &nbsp; &nbsp; Boolean settings may be configured using 'YES' and 'NO'.<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; DisconnectOnLogout (Boolean)<br />
&nbsp; &nbsp; &nbsp; &nbsp; JoinMode (String)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Automatic<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Preferred<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ranked<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Recent<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Strongest<br />
&nbsp; &nbsp; &nbsp; &nbsp; JoinModeFallback (String)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Prompt<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JoinOpen<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KeepLooking<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DoNothing<br />
&nbsp; &nbsp; &nbsp; &nbsp; RememberRecentNetworks (Boolean)<br />
&nbsp; &nbsp; &nbsp; &nbsp; RequireAdmin (Boolean)<br />
&nbsp; &nbsp; &nbsp; &nbsp; RequireAdminIBSS (Boolean)<br />
&nbsp; &nbsp; &nbsp; &nbsp; RequireAdminNetworkChange (Boolean)<br />
&nbsp; &nbsp; &nbsp; &nbsp; RequireAdminPowerToggle (Boolean)<br />
&nbsp; &nbsp; &nbsp; &nbsp; WoWEnabled (Boolean)<br />
<br />
&nbsp; &nbsp; logger&nbsp; Monitor the driver's logging facility.<br />
<br />
&nbsp; &nbsp; sniff &nbsp; If a channel number is specified, airportd will attempt to configure the interface<br />
&nbsp; &nbsp; &nbsp; &nbsp; to use that channel before it begins sniffing 802.11 frames. Captures files are saved to /tmp.<br />
&nbsp; &nbsp; &nbsp; &nbsp; Requires super user privileges.<br />
<br />
&nbsp; &nbsp; debug &nbsp; Enable debug logging. A debug log setting may be enabled by prefixing it with a '+', and disabled<br />
&nbsp; &nbsp; &nbsp; &nbsp; by prefixing it with a '-'.<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; AirPort Userland Debug Flags<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DriverDiscovery<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DriverEvent<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Info<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SystemConfiguration<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UserEvent<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PreferredNetworks<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AutoJoin<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IPC<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Scan<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 802.1x<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Assoc<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Keychain<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RSNAuth<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WoW<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AllUserland - Enable/Disable all userland debug flags<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; AirPort Driver Common Flags<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DriverInfo<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DriverError<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DriverWPA<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DriverScan<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AllDriver - Enable/Disable all driver debug flags<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; AirPort Driver Vendor Flags<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VendorAssoc<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VendorConnection<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AllVendor - Enable/Disable all vendor debug flags<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; AirPort Global Flags<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LogFile - Save all AirPort logs to /var/log/airport.log<br />
<br />
&lt;options&gt; is one of the following:<br />
&nbsp; &nbsp; No options currently defined.<br />
<br />
Examples:<br />
<br />
Configuring preferences (requires admin privileges)<br />
&nbsp; &nbsp; sudo airport en1 prefs JoinMode=Preferred RememberRecentNetworks=NO RequireAdmin=YES<br />
<br />
Sniffing on channel 1:<br />
&nbsp; &nbsp; airport en1 sniff 1<br />
<br />
<br />
LEGACY COMMANDS:<br />
Supported arguments:<br />
&nbsp;-c[&lt;arg&gt;] --channel=[&lt;arg&gt;] &nbsp; &nbsp;Set arbitrary channel on the card<br />
&nbsp;-z &nbsp; &nbsp; &nbsp; &nbsp;--disassociate &nbsp; &nbsp; &nbsp; Disassociate from any network<br />
&nbsp;-I &nbsp; &nbsp; &nbsp; &nbsp;--getinfo &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Print current wireless status, e.g. signal info, BSSID, port type etc.<br />
&nbsp;-s[&lt;arg&gt;] --scan=[&lt;arg&gt;] &nbsp; &nbsp; &nbsp; Perform a wireless broadcast scan.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Will perform a directed scan if the optional &lt;arg&gt; is provided<br />
&nbsp;-x &nbsp; &nbsp; &nbsp; &nbsp;--xml &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Print info as XML<br />
&nbsp;-P &nbsp; &nbsp; &nbsp; &nbsp;--psk &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Create PSK from specified pass phrase and SSID.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;The following additional arguments must be specified with this command:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --password=&lt;arg&gt; &nbsp;Specify a WPA password<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --ssid=&lt;arg&gt; &nbsp; &nbsp; &nbsp;Specify SSID when creating a PSK<br />
&nbsp;-h &nbsp; &nbsp; &nbsp; &nbsp;--help &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Show this help<br />
Credit goes to &lt;a href=&quot;http://forum.aircrack-ng.org/index.php?PHPSESSID=osr5e11icl40hib1f57qkh0u35&amp;topic=293.msg34031#msg34031&quot;&gt;d3in0s post&lt;/a&gt; showing true forum awesomeness. <br />
<br />
&lt;code&gt;<br />
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I<br />
&nbsp; &nbsp; &nbsp;agrCtlRSSI: -40<br />
&nbsp; &nbsp; &nbsp;agrExtRSSI: 0<br />
&nbsp; &nbsp; agrCtlNoise: -92<br />
&nbsp; &nbsp; agrExtNoise: 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; state: running<br />
&nbsp; &nbsp; &nbsp; &nbsp; op mode: station <br />
&nbsp; &nbsp; &nbsp;lastTxRate: 54<br />
&nbsp; &nbsp; &nbsp; &nbsp; maxRate: 54<br />
lastAssocStatus: 0<br />
&nbsp; &nbsp; 802.11 auth: open<br />
&nbsp; &nbsp; &nbsp; link auth: wpa2-psk<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BSSID: &lt;removed&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SSID: &lt;removed&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MCS: -1<br />
&nbsp; &nbsp; &nbsp; &nbsp; channel: 6<br />
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SSID BSSID &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RSSI CHANNEL HT CC SECURITY (auth/unicast/group)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;removed&gt; &lt;removed&gt; -41 &nbsp;6 &nbsp; &nbsp; &nbsp; N &nbsp;-- WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)</div></td></tr></tbody></table></div>
<p>Doing a frame cap.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en1 sniff 6<br />
Capturing 802.11 frames on en1.</div></td></tr></tbody></table></div>
<p>You will see your airport icon changes to <a href="http://cdn.saiweb.co.uk/wp-content/uploads/2011/09/Screen-shot-2011-09-23-at-11.20.28.png"><img src="http://cdn.saiweb.co.uk/wp-content/uploads/2011/09/Screen-shot-2011-09-23-at-11.20.28.png" alt="" title="Screen shot 2011-09-23 at 11.20.28" width="45" height="24" class="aligncenter size-full wp-image-1126" /></a> now hit ctrl+c to stop the cap</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">^CSession saved to /tmp/airportSniff813ZrA.cap.</div></td></tr></tbody></table></div>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/hacking/wifi-recon-using-osx-native-tools" data-text="WiFi recon using OSX native tools" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fhacking%2Fwifi-recon-using-osx-native-tools&#038;text=WiFi%20recon%20using%20OSX%20native%20tools" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/hacking/wifi-recon-using-osx-native-tools/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wptouch redirection vulnerability</title>
		<link>http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability-2</link>
		<comments>http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability-2#comments</comments>
		<pubDate>Thu, 07 Jul 2011 12:05:52 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=1043</guid>
		<description><![CDATA[In theroy this: http://www.exploit-db.com/exploits/17423/ could be used to facilitate phishing, To patch this update to 1.9.28, and apply this patch: https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch UPDATE 07072011 .9.30 does not suffer from this exploit. Tweet]]></description>
			<content:encoded><![CDATA[<p>In theroy this: <a href="http://www.exploit-db.com/exploits/17423/">http://www.exploit-db.com/exploits/17423/</a> could be used to facilitate phishing, </p>
<p>To patch this update to 1.9.28, and apply this patch: https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch</p>
<p><strong>UPDATE 07072011</strong> .9.30 does not suffer from this exploit.</p>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability-2" data-text="wptouch redirection vulnerability" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fhacking%2Fwptouch-redirection-vulnerability-2&#038;text=wptouch%20redirection%20vulnerability" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wptouch redirection vulnerability</title>
		<link>http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability</link>
		<comments>http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability#comments</comments>
		<pubDate>Tue, 21 Jun 2011 10:46:15 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[17423]]></category>
		<category><![CDATA[edb]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[phishing]]></category>
		<category><![CDATA[wptouch]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=1044</guid>
		<description><![CDATA[In theory this: http://www.exploit-db.com/exploits/17423/ could be used to facilitate phishing, To patch this update to 1.9.28, and apply this patch: https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch 123cd /path/to/blog/wp-content/plugins/wptouch/ wget https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch patch &#60; wptouch-edb17423.patch update This: http://wordpress.org/news/2011/06/passwords-reset/ causes a 1.9.29 version to be rolled out. 1.9.29 is still vulnerable to this, the patch instructions above still work for 1.9.29 Tweet]]></description>
			<content:encoded><![CDATA[<p>In theory this: <a href="http://www.exploit-db.com/exploits/17423/">http://www.exploit-db.com/exploits/17423/</a> could be used to facilitate phishing, </p>
<p>To patch this update to 1.9.28, and apply this patch: <a href="https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch">https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch<br />
</a></p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd /path/to/blog/wp-content/plugins/wptouch/<br />
wget https://raw.github.com/Oneiroi/PenTesting/master/patches/wptouch-edb17423.patch<br />
patch &lt; wptouch-edb17423.patch</div></td></tr></tbody></table></div>
<p><strong>update</strong> This: <a href="http://wordpress.org/news/2011/06/passwords-reset/">http://wordpress.org/news/2011/06/passwords-reset/</a> causes a 1.9.29 version to be rolled out.</p>
<p><strong>1.9.29 is still vulnerable to this, the patch instructions above still work for 1.9.29</strong></p>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability" data-text="wptouch redirection vulnerability" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fhacking%2Fwptouch-redirection-vulnerability&#038;text=wptouch%20redirection%20vulnerability" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/hacking/wptouch-redirection-vulnerability/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloaking your web apps &#8211; The hooded Apache</title>
		<link>http://www.saiweb.co.uk/security/cloaking-your-web-apps-the-hooded-apache</link>
		<comments>http://www.saiweb.co.uk/security/cloaking-your-web-apps-the-hooded-apache#comments</comments>
		<pubDate>Mon, 25 Apr 2011 19:54:06 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=1008</guid>
		<description><![CDATA[Go ahead and run 1curl -I http://www.saiweb.co.uk You will get 12345678HTTP/1.1 200 OK Date: Mon, 25 Apr 2011 19:33:29 GMT Server: Apache Vary: Accept-Encoding,Cookie Cache-Control: max-age=3, must-revalidate WP-Super-Cache: Served supercache file from PHP Connection: close Content-Type: text/html; charset=UTF-8 As an attacker looking to hit a web app, one of the first things you&#8217;re going to [...]]]></description>
			<content:encoded><![CDATA[<p>Go ahead and run</p>
<p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">curl -I http://www.saiweb.co.uk</div></td></tr></tbody></table></div>
</p>
<p>You will get </p>
<p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">HTTP/1.1 200 OK<br />
Date: Mon, 25 Apr 2011 19:33:29 GMT<br />
Server: Apache<br />
Vary: Accept-Encoding,Cookie<br />
Cache-Control: max-age=3, must-revalidate<br />
WP-Super-Cache: Served supercache file from PHP<br />
Connection: close<br />
Content-Type: text/html; charset=UTF-8</div></td></tr></tbody></table></div>
</p>
<p>As an attacker looking to hit a web app, one of the first things you&#8217;re going to want to look into is what version of web server is running, in this case you can see this blog in fact runs apache &#8230; but there is not much else to go on here is there.</p>
<p>That&#8217;s intentional, and by manual configuration changes I have put in place, this is not the case of a default LAMP install, take for instance, this snippet from another website,</p>
<p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Server: Apache/2.2.16 (Debian)<br />
X-Powered-By: PHP/5.2.14</div></td></tr></tbody></table></div>
</p>
<p>This already has given me a wealth of information to go on and begin prepping an attack, I now know the site is running php version 5.2.14 Apache version 2.2.16 and that the underlying OS is Debian.</p>
<p>See the dilemma? your default roll outs are just declaring their running versions to anyone willing to listen, so lets make it a little more stealthy.</p>
<p>First and foremost if you are using php, edit your php.ini and set the following:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">expose_php = off</div></td></tr></tbody></table></div>
<p>Now head into your httpd.conf and set the following</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ServerTokens prod</div></td></tr></tbody></table></div>
<p>and</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ServerSignature off</div></td></tr></tbody></table></div>
<p>With these 3 simple steps all the headers will now return is Server: Apache this is the first step to shielding your app, I&#8217;ll be covering further steps as time allows.</p>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/security/cloaking-your-web-apps-the-hooded-apache" data-text="Cloaking your web apps &#8211; The hooded Apache" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fsecurity%2Fcloaking-your-web-apps-the-hooded-apache&#038;text=Cloaking%20your%20web%20apps%20%26%238211%3B%20The%20hooded%20Apache" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/security/cloaking-your-web-apps-the-hooded-apache/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Saying no to the YESMAN &#8211; Defense against Jasager</title>
		<link>http://www.saiweb.co.uk/hacking/saying-no-to-the-yesman-defense-against-jasager</link>
		<comments>http://www.saiweb.co.uk/hacking/saying-no-to-the-yesman-defense-against-jasager#comments</comments>
		<pubDate>Wed, 16 Mar 2011 17:52:21 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[defense]]></category>
		<category><![CDATA[jasager]]></category>
		<category><![CDATA[mitm]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=996</guid>
		<description><![CDATA[With work returning to &#8220;normal&#8221; levels I began digging through my backlog of seclist updates, errata updates and security related podcasts, One particular attack method has me concerned as a typical Paranoid Systems Admin, namely the one covered by Darren @ Hak5.org, Where combining jasager and airdrop-ng can allow you to easily set yourself up [...]]]></description>
			<content:encoded><![CDATA[<p>With work returning to &#8220;normal&#8221; levels I began digging through my backlog of seclist updates, errata updates and security related podcasts,</p>
<p>One particular attack method has me concerned as a typical Paranoid Systems Admin, namely the one covered by Darren @ Hak5.org,</p>
<p>Where combining jasager and airdrop-ng can allow you to easily set yourself up as a m.i.t.m transparently, so I began thinking how would you defend against such an attack, with most if not all wifi clients switching to jasager transparently without the user ever knowing, now remember this is all theory at this point it could be completely wrong, please leave feedback in the comments.</p>
<p>before I beging let&#8217;s make a couple of assumptions.</p>
<ol>
<li>You are the admin for your network</li>
<li>You are in control of all AP&#8217;s on your network</li>
</ol>
<p>If you can not confirm 1 &amp; 2 then you can land yourself in a whole heap of trouble, so think before you do please &#8230;</p>
<p>That said onto a possible defense scenario, making airdrop-ng work as a &#8220;shield&#8221;.</p>
<p>The main premise of airdrop is to send DeAuth packets forcing a wifi client to reconnect, Darren&#8217;s jasager + airdrop  podcast (&#8220;Airport wifi challenge&#8221;) used this in conjunction with jasager to force clients to reconnect but to jasager instead, essentially denying access to the real AP&#8217;s and masquerading as them using jasager.</p>
<p>With me so far?</p>
<ol>
<li>Client is connected to REAL Access Point</li>
<li>airdrop-ng sends DeAuth for all BSSIDs except jasager&#8217;s</li>
<li>Client Attempts to reconnect, jasager masquerades as the REAL AP</li>
<li>Client is now pwned.</li>
</ol>
<p>To re purpose airdrop-ng as a &#8220;shield&#8221;, we change step 2 above .</p>
<ol>
<li>Client is connected to REAL Access Point</li>
<li>airdrop-ng sends DeAuth for all BSSIDs except the REAL access point</li>
</ol>
<p>Now this does cause a problem for any genuine &#8220;pop up&#8221; wifi, such as the share functionality on mac osx, and  mobile hotspots (wifi 3g), but it is one possible method of defense.</p>
<p>If you have some theories related to detecting and defeating WiFi m.i.t.m attacks please let me know, I&#8217;d love to hear them,</p>
<p>I&#8217;ll work on getting a screencast for this up as soon as possible.</p>
<ul>
<li>this will not protect against BSSID / MAC spoofing,</li>
<li>this will only prevent against a rougue AP BSSID masquerading as your valid AP.</li>
<li>this will only work within range of your wifi device generating the DeAuth packets.</li>
<li>improper configuration could cause D.o.S of nearby REAL Ap&#8217;s and generaly piss people off.</li>
</ul>
<p><strong>Update 04/10/2011</strong> Seems that this project <a href="http://code.google.com/p/wifijammer/">wifijammer</a> can do exactly what I outlined above. via: <a href="http://hackaday.com/2011/10/04/wifi-jamming-via-deauthentication-packets">Hackaday</a><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/hacking/saying-no-to-the-yesman-defense-against-jasager" data-text="Saying no to the YESMAN &#8211; Defense against Jasager" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fhacking%2Fsaying-no-to-the-yesman-defense-against-jasager&#038;text=Saying%20no%20to%20the%20YESMAN%20%26%238211%3B%20Defense%20against%20Jasager" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/hacking/saying-no-to-the-yesman-defense-against-jasager/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dissecting the hack &#8211; psychz.net</title>
		<link>http://www.saiweb.co.uk/hacking/dissecting-the-hack-psychz-net</link>
		<comments>http://www.saiweb.co.uk/hacking/dissecting-the-hack-psychz-net#comments</comments>
		<pubDate>Wed, 25 Aug 2010 19:12:39 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[brute]]></category>
		<category><![CDATA[force]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[psychz]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=913</guid>
		<description><![CDATA[For some background you may want to read the Original Story leading to this write up. The first thing that caught my attention was the fact Logwatch was reported login failures in the order of 1000&#8242;s from unassigned.psychz.net without an accompanying fail2ban email notifying me the offender had been banned. And this as it would [...]]]></description>
			<content:encoded><![CDATA[<p>For some background you may want to read the <a href="http://www.saiweb.co.uk/hacking/when-fail2ban-fails-to-ban-dissecting-the-hack">Original Story</a> leading to this write up.</p>
<p>The first thing that caught my attention was the fact Logwatch was reported login failures in the order of 1000&#8242;s from unassigned.psychz.net without an accompanying fail2ban email notifying me the offender had been banned.</p>
<p>And this as it would turn out was because the attack was clearly intended to defeat such protection methods, this is due to the logged host being unassigned.psychz.net, when the authentication failure is logged, a reverse lookup is made within vsftpd to resolve the host this PTR record returns unassigned.psychz.net, and as such is written into the log.</p>
<p>fail2ban no uses regex to extract the host from the logs, and attempts to make a forward lookup on unassigned.psychz.net (A/CNAME records required) to resolve the ip address, and ban the offending ip, this is where things go awry.</p>
<p>psychz.net maintains their own DNS servers,</p>
<ol>
<li>DNS1.PSYCHZ.NET</li>
<li>DNS2.PSYCHZ.NET</li>
</ol>
<p>These provide a PTR but no A/CNAME record, as such fail2ban can not resolve an IP and the attacking ip is left to run their attack unhindered, see this log file: <a href="http://www.saiweb.co.uk/psychz-260710/fail2ban-grep.log">fail2ban name resolution failure log</a></p>
<p>The only way therefor to gain the attacking ip was to match the ftp connection times to those of the reported login failures using iptables to log all accesses to ftp, quickly get a count of connecting ip&#8217;s using:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">grep</span> kernel <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>messages <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $9}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/SRC=//'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span> <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span></div></td></tr></tbody></table></div>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">390 173.224.217.41</div></td></tr></tbody></table></div>
<p>A complete log can be found here: <a href="http://www.saiweb.co.uk/psychz-260710/iptables.log">iptables.log</a>, and a whois can be found here: <a href="http://cdn.saiweb.co.uk/wp-content/uploads/2010/08/whois.txt">whois.txt</a></p>
<p>Disclosure steps taken:</p>
<ol>
<li>26/07/10 psychz support informed given deadline of 09/08/10 for resolution</li>
<li>Same day standard reply of &#8220;thanks for contacting support we are looking into this&#8221; &#8230;</li>
<li>27/07/0 Attacks continue 173.224.208.0/20 network black holed as a result
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-s</span> 173.224.208.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">20</span> <span style="color: #660033;">-j</span> DROP</div></td></tr></tbody></table></div>
</li>
<li>09/08/10 deadline passes without update</li>
<li>25/08/10 this blog post published</li>
</ol>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/hacking/dissecting-the-hack-psychz-net" data-text="dissecting the hack &#8211; psychz.net" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fhacking%2Fdissecting-the-hack-psychz-net&#038;text=dissecting%20the%20hack%20%26%238211%3B%20psychz.net" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/hacking/dissecting-the-hack-psychz-net/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Data Mining &#8211; What hidden information do your photos contain?</title>
		<link>http://www.saiweb.co.uk/hacking/data-mining-what-hidden-information-do-your-photos-contain</link>
		<comments>http://www.saiweb.co.uk/hacking/data-mining-what-hidden-information-do-your-photos-contain#comments</comments>
		<pubDate>Mon, 09 Aug 2010 13:02:08 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[exif]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[mining.]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=921</guid>
		<description><![CDATA[Time was when a photo was just a captured moment in time, /end nostalgia Nowadays though what people do not realize is the shear amount of &#8220;extra&#8221; information is embedded in &#8220;that picture you just uploaded to flikr/facebook/photo bucket&#8221; especially if you are uploading from a &#8220;smart phone&#8221; as more and more people are now. [...]]]></description>
			<content:encoded><![CDATA[<p>Time was when a photo was just a captured moment in time, /end nostalgia</p>
<p>Nowadays though what people do not realize is the shear amount of &#8220;extra&#8221; information is embedded in &#8220;that picture you just uploaded to flikr/facebook/photo bucket&#8221; especially if you are uploading from a &#8220;smart phone&#8221; as more and more people are now.</p>
<p>Most photos now contain GPS data embedded in them, this information will survive a resize / upload process, at the time of writing images tested from Facebook appear to have the exif data stripped out (thumbs up for facebook maybe), and it appears php GD by default replaces all EXIF data with it&#8217;s own (bug maybe?).</p>
<p>For non sanitized images however you can discern a wealth of information such as:</p>
<ol>
<li>Make of camera</li>
<li>Model of camera</li>
<li>Software version</li>
<li>Unix timestamp of time taken</li>
<li>DateTime stamp of time taken</li>
<li>Focal length used</li>
<li>Shutter speed</li>
<li>if flash used</li>
</ol>
<p>And if GPS is embedded:</p>
<ol>
<li>Longitude</li>
<li>Latitude</li>
<li>Altitude</li>
<li>GPS timestamp</li>
<li>Direction facing when photo taken</li>
</ol>
<p>There is yet more data such as the colour profile used, and image resolutions, in my tests photos taken from my iPhone 4 were within 10 meters of where I was actually standing when I took the picture, and in which direction I was facing when I took them.</p>
<p><strong>So one more thing to note in your applications &#8220;data sanity&#8221; is to strip EXIF tags from uploaded images, lest your contributors private details be leaked from your application.</strong></p>
<p>For example:</p>
<ol>
<li>User uploads photo for competition</li>
<li>Site uses resized photo on competition page to allow visitor voting</li>
<li>malicious user, saves image from site (or just uses the copy from thier browser cache), gets gps data from photo</li>
<li>malicious user now knows exact whereabouts photo was taken aswell as the time.</li>
</ol>
<p>And it doesn&#8217;t have to be a malicious user, it could be anyone/anything, if you want to check your images for EXIF data you can use my tool here: <a href="http://www.saiweb.co.uk/tools/exif_data.php">http://www.saiweb.co.uk/tools/exif_data.php</a></p>
<p>No data is stored, and images are deleted immediately after processing, you use this at your own risk however, if you misuse the tool you accept all liability for the legal action to follow, you have been warned.<span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/hacking/data-mining-what-hidden-information-do-your-photos-contain" data-text="Data Mining &#8211; What hidden information do your photos contain?" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fhacking%2Fdata-mining-what-hidden-information-do-your-photos-contain&#038;text=Data%20Mining%20%26%238211%3B%20What%20hidden%20information%20do%20your%20photos%20contain%3F" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/hacking/data-mining-what-hidden-information-do-your-photos-contain/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When fail2ban fails to ban &#8211; Dissecting the hack</title>
		<link>http://www.saiweb.co.uk/hacking/when-fail2ban-fails-to-ban-dissecting-the-hack</link>
		<comments>http://www.saiweb.co.uk/hacking/when-fail2ban-fails-to-ban-dissecting-the-hack#comments</comments>
		<pubDate>Fri, 23 Jul 2010 10:23:52 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[brute]]></category>
		<category><![CDATA[dissecting]]></category>
		<category><![CDATA[fail2ban]]></category>
		<category><![CDATA[force]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=900</guid>
		<description><![CDATA[Most of the time when I review our log watches each morning I become enraged at the number of automated attacks, But ever so occasional I find one that frankly intrigues me. Today is just such an occasion where I have had multiple Brute force login attempts, the ingenious part is this attack has been [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the time when I review our log watches each morning I become enraged at the number of automated attacks,</p>
<p>But ever so occasional I find one that frankly intrigues me.</p>
<p>Today is just such an occasion where I have had multiple Brute force login attempts, the ingenious part is this attack has been designed to bypass tools such as fail2ban, blockhosts etc, and this is how</p>
<ol>
<li>Attack is launched from <strong></strong></li>
<li><strong></strong> has PTR set for <strong></strong></li>
<li>Failed login attempts record <strong></strong> due to reverse lookup</li>
<li>There is no A record, attacker maintains their own nameservers for the <strong></strong></li>
<li>fail2ban notes failed logins, attempts to resolve <strong></strong> to an IP but fails, due to missing A record</li>
<li> Attacker can continue brute force attempts unhindered by being banned</li>
</ol>
<p>I am still reading into how to counter this and will update this post as I figure out how to work around it, it&#8217;s a very sneaky and frankly quiet clever method of working around most automated blacklisting/banning tools.</p>
<p><strong>Update 1:</strong><br />
One method I am trialing is the &#8220;log target&#8221; feature of iptables, in an attempt to match login failure times to the iptables log, I&#8217;ll post back with results.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span> <span style="color: #660033;">-j</span> LOG</div></td></tr></tbody></table></div>
<p>Outputs</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Jul 23 11:45:57 132 kernel: IN=eth0 OUT= MAC=&lt;mac addr&gt; SRC=&lt;connecitng ip&gt; DST=&lt;server ip&gt; LEN=64 TOS=0x00 PREC=0x00 TTL=55 ID=47423 DF PROTO=TCP SPT=3865 DPT=21 WINDOW=65535 RES=0x00 SYN URGP=0 <br />
Jul 23 11:45:57 132 kernel: IN=eth0 OUT= MAC=&lt;mac addr&gt; SRC=&lt;connecitng ip&gt; DST=&lt;server ip&gt; LEN=52 TOS=0x00 PREC=0x00 TTL=55 ID=45370 DF PROTO=TCP SPT=3865 DPT=21 WINDOW=65535 RES=0x00 ACK URGP=0 <br />
Jul 23 11:45:57 132 kernel: IN=eth0 OUT= MAC=&lt;mac addr&gt; SRC=&lt;connecitng ip&gt; DST=&lt;server ip&gt; LEN=52 TOS=0x00 PREC=0x00 TTL=55 ID=46896 DF PROTO=TCP SPT=3865 DPT=21 WINDOW=65535 RES=0x00 ACK URGP=0 <br />
Jul 23 11:46:01 132 kernel: IN=eth0 OUT= MAC=&lt;mac addr&gt; SRC=&lt;connecitng ip&gt; DST=&lt;server ip&gt; LEN=63 TOS=0x00 PREC=0x00 TTL=55 ID=38502 DF PROTO=TCP SPT=3865 DPT=21 WINDOW=65535 RES=0x00 ACK PSH URGP=0 <br />
Jul 23 11:46:02 132 kernel: IN=eth0 OUT= MAC=&lt;mac addr&gt; SRC=&lt;connecitng ip&gt; DST=&lt;server ip&gt; LEN=52 TOS=0x00 PREC=0x00 TTL=55 ID=32551 DF PROTO=TCP SPT=3865 DPT=21 WINDOW=65535 RES=0x00 ACK URGP=0 <br />
Jul 23 11:46:02 132 kernel: IN=eth0 OUT= MAC=&lt;mac addr&gt; SRC=&lt;connecitng ip&gt; DST=&lt;server ip&gt; LEN=52 TOS=0x00 PREC=0x00 TTL=55 ID=59735 DF PROTO=TCP SPT=3865 DPT=21 WINDOW=65535 RES=0x00 ACK URGP=0 <br />
Jul 23 11:46:04 132 kernel: IN=eth0 OUT= MAC=&lt;mac addr&gt; SRC=&lt;connecitng ip&gt; DST=&lt;server ip&gt; LEN=66 TOS=0x00 PREC=0x00 TTL=55 ID=23116 DF PROTO=TCP SPT=3865 DPT=21 WINDOW=65535 RES=0x00 ACK PSH URGP=0 <br />
Jul 23 11:46:07 132 kernel: IN=eth0 OUT= MAC=&lt;mac addr&gt; SRC=&lt;connecitng ip&gt; DST=&lt;server ip&gt; LEN=52 TOS=0x00 PREC=0x00 TTL=55 ID=40246 DF PROTO=TCP SPT=3865 DPT=21 WINDOW=65535 RES=0x00 ACK URGP=0</div></td></tr></tbody></table></div>
<p><strong>Update 2: Defeating the hack</strong></p>
<p>Now granted this would be a lot worse had the attacking IP been dynamic, fortunatly in this case it&#8217;s not</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">grep</span> kernel <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>messages <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $9}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/SRC=//'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">uniq</span> <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span></div></td></tr></tbody></table></div>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">390 &nbsp; 173.XXX.XXX.XXX<br />
&nbsp; &nbsp; &nbsp; 4 195.XXX.XXX.XXX</div></td></tr></tbody></table></div>
<p>Ip&#8217;s have been masked to prevent anyone complaining or threatening legal action (again) for inferring you should block their ip / network range &#8230; and me firing off the obligatory &#8220;Well if you policed your own network I wouldn&#8217;t have to post this no would I&#8221; email, </p>
<p>Maybe I am just being Cynical in my &#8220;old&#8221; age &#8230;</p>
<p>Any how as you may have guess I&#8217;m black holing the ip with the 390 connection entries.</p>
<p><strong>Thanks</strong></p>
<p>Being as I spoke to a load of people during the course of this I realy can not remember who contributed what to this solution, so I&#8217;ll just have to thank you all let me know if you want a crediting link.</p>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/hacking/when-fail2ban-fails-to-ban-dissecting-the-hack" data-text="When fail2ban fails to ban &#8211; Dissecting the hack" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fhacking%2Fwhen-fail2ban-fails-to-ban-dissecting-the-hack&#038;text=When%20fail2ban%20fails%20to%20ban%20%26%238211%3B%20Dissecting%20the%20hack" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/hacking/when-fail2ban-fails-to-ban-dissecting-the-hack/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dissecting the hack &#8211; packed r57shell</title>
		<link>http://www.saiweb.co.uk/hacking/dissecting-the-hack-r57shell</link>
		<comments>http://www.saiweb.co.uk/hacking/dissecting-the-hack-r57shell#comments</comments>
		<pubDate>Wed, 26 May 2010 12:00:46 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[dissecting]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[r57]]></category>
		<category><![CDATA[r57shell]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=869</guid>
		<description><![CDATA[Before you read any further note, I will not be including the original hack file, simply due to peoples stupidity in putting this on a production environment to play with, if you use the code you do so at your own risk, and by reading this blog entry / using the code provided you agree [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>Before you read any further note, I will not be including the original hack file, simply due to peoples stupidity in putting this on a production environment to play with, if you use the code you do so at your own risk, and by reading this blog entry / using the code provided you agree to accept all liability upon yourself for your own actions. Don&#8217;t be an idiot.</strong></span></p>
<p>Around 10 days ago I came across this seemingly innocuous little file.</p>
<p>What I am going to cover in this entry is dissecting the &#8216;payload&#8217; and not so much the web app in question or methods used to compromise it,</p>
<p>Whereas I will not at this time provide the original file, I will provide you with the md5 and sha1 hashes of the file so you can check it&#8217;s not lurking on your systems:</p>
<p>md5: 9ee3e6523d154114460d320477a8665a<br />
sha1: 9c64fecea5620d70a716bbd74f6e89612a4a79c7</p>
<p>The bit we are interested in is the last line of the file:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><a href="http://www.php.net/eval"><span style="color: #990000;">eval</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/gzinflate"><span style="color: #990000;">gzinflate</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/base64_decode"><span style="color: #990000;">base64_decode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DATA'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Were you to run this line you would get</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><a href="http://www.php.net/eval"><span style="color: #990000;">eval</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/gzinflate"><span style="color: #990000;">gzinflate</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/base64_decode"><span style="color: #990000;">base64_decode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DATA2'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p><a href="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/sense-this-picture-makes-none.jpg"><img src="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/sense-this-picture-makes-none-240x300.jpg" alt="" title="sense-this-picture-makes-none" width="240" height="300" class="aligncenter size-medium wp-image-870" /></a></p>
<p>Confused yet? now I can appreciate the thinking behind packing a payload to avoid detection, but in this case the payload is packed 12 times, and no before you ask I did not manually run each returned statement to find this out. </p>
<p>Enter Python-Fu:</p>
<p><a href="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/getbritf.jpg"><img src="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/getbritf-236x300.jpg" alt="" title="getbritf" width="236" height="300" class="aligncenter size-medium wp-image-871" /></a></p>
<div class="codecolorer-container python default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span><br />
<span style="color: #808080; font-style: italic;"># saiweb.co.uk payload unpack script 26/05/2010</span><br />
<span style="color: #808080; font-style: italic;"># copy the eval(gzinflate()) line to payload.raw, place in same directory as this file.</span><br />
<br />
<span style="color: #483d8b;">&quot;&quot;&quot;<br />
Copyright (C) 2010 Buzz saiweb.co.uk.co.uk<br />
<br />
&nbsp; &nbsp; This program is free software: you can redistribute it and/or modify<br />
&nbsp; &nbsp; it under the terms of the GNU General Public License as published by<br />
&nbsp; &nbsp; the Free Software Foundation, either version 3 of the License, or<br />
&nbsp; &nbsp; (at your option) any later version.<br />
<br />
&nbsp; &nbsp; This program is distributed in the hope that it will be useful,<br />
&nbsp; &nbsp; but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
&nbsp; &nbsp; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &nbsp;See the<br />
&nbsp; &nbsp; GNU General Public License for more details.<br />
<br />
&nbsp; &nbsp; You should have received a copy of the GNU General Public License<br />
&nbsp; &nbsp; along with this program. &nbsp;If not, see &lt;http://www.gnu.org/licenses/&gt;.<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; Additional Terms as Per section 7<br />
<br />
&nbsp; &nbsp; Attribution:<br />
<br />
&nbsp; &nbsp; Redistribution/Reuse of this code is permitted under the GNU v3 license, as an additional term ALL code must carry the original Author(s) credit in comment form.<br />
&quot;&quot;&quot;</span><br />
<br />
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">base64</span><span style="color: #66cc66;">,</span> <span style="color: #dc143c;">zlib</span><span style="color: #66cc66;">,</span> <span style="color: #dc143c;">re</span><span style="color: #66cc66;">,</span> <span style="color: #dc143c;">sys</span><br />
<br />
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'Running ...'</span><br />
&nbsp; &nbsp; f <span style="color: #66cc66;">=</span> <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'payload.raw'</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; php <span style="color: #66cc66;">=</span> f.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; f.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; iteration <span style="color: #66cc66;">=</span> <span style="color: #ff4500;">0</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">search</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'eval<span style="color: #000099; font-weight: bold;">\(</span>gzinflate<span style="color: #000099; font-weight: bold;">\(</span>base64_decode<span style="color: #000099; font-weight: bold;">\(</span><span style="color: #000099; font-weight: bold;">\'</span>'</span><span style="color: #66cc66;">,</span>php<span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; iteration +<span style="color: #66cc66;">=</span> <span style="color: #ff4500;">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'Iteration: %d'</span> % iteration<br />
&nbsp; &nbsp; &nbsp; &nbsp; raw <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">sub</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'eval<span style="color: #000099; font-weight: bold;">\(</span>gzinflate<span style="color: #000099; font-weight: bold;">\(</span>base64_decode<span style="color: #000099; font-weight: bold;">\(</span><span style="color: #000099; font-weight: bold;">\'</span>'</span><span style="color: #66cc66;">,</span><span style="color: #483d8b;">''</span><span style="color: #66cc66;">,</span>php<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; raw <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">sub</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\'</span><span style="color: #000099; font-weight: bold;">\)</span><span style="color: #000099; font-weight: bold;">\)</span><span style="color: #000099; font-weight: bold;">\)</span>;'</span><span style="color: #66cc66;">,</span><span style="color: #483d8b;">''</span><span style="color: #66cc66;">,</span>raw<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; gstring <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">base64</span>.<span style="color: black;">b64decode</span><span style="color: black;">&#40;</span>raw.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; php <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">zlib</span>.<span style="color: black;">decompressobj</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">decompress</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'x<span style="color: #000099; font-weight: bold;">\x</span>9c'</span> + gstring<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#print payload</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#sys.exit()</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> php<br />
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ <span style="color: #66cc66;">==</span> <span style="color: #483d8b;">'__main__'</span>:<br />
&nbsp; &nbsp; main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></td></tr></tbody></table></div>
<p>Copy the first payload lines into a file named payload.raw, take the above code and copy it into a file named dissect.py.</p>
<p>When dissect.py is run you will get the following output:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">python .<span style="color: #000000; font-weight: bold;">/</span>dissect.py<br />
Running ...<br />
Iteration: <span style="color: #000000;">1</span><br />
Iteration: <span style="color: #000000;">2</span><br />
Iteration: <span style="color: #000000;">3</span><br />
Iteration: <span style="color: #000000;">4</span><br />
Iteration: <span style="color: #000000;">5</span><br />
Iteration: <span style="color: #000000;">6</span><br />
Iteration: <span style="color: #000000;">7</span><br />
Iteration: <span style="color: #000000;">8</span><br />
Iteration: <span style="color: #000000;">9</span><br />
Iteration: <span style="color: #000000;">10</span><br />
Iteration: <span style="color: #000000;">11</span><br />
Iteration: <span style="color: #000000;">12</span><br />
<span style="color: #000000; font-weight: bold;">&lt;</span>?php<br />
...</div></td></tr></tbody></table></div>
<p>As such you may want to run it using the following command:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">python .<span style="color: #000000; font-weight: bold;">/</span>dissect.py <span style="color: #000000; font-weight: bold;">&gt;</span> r57.php</div></td></tr></tbody></table></div>
<p><a href="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/ggwit.jpg"><img src="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/ggwit-257x300.jpg" alt="" title="ggwit" width="257" height="300" class="aligncenter size-medium wp-image-872" /></a></p>
<p>And what you will find after unpacking 12 times in total, the &#8220;payload&#8221; is the r57shell, this script is an information gathering tool and pseudo shell, meaning it will run any command on the host server that php can, providing in most cases ssh esq access to the exploited host, allowing you to do pretty much anything you wanted at this point, some of the features also include /etc/passwd /etc/shadow dumping, aswell as searching for a tirade of common file *.sql* admin* etc, it&#8217;s a one stop script for information gathering on a LAMP/WAMP based host.</p>
<p><strong><br />
Defense: modify php.ini to disable eval(), exec, shell_exec and all none essential functions.<br />
</strong></p>
<p>And of course, ensure your web apps are patched and up to date as well as the host they are running on. </p>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/hacking/dissecting-the-hack-r57shell" data-text="Dissecting the hack &#8211; packed r57shell" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fhacking%2Fdissecting-the-hack-r57shell&#038;text=Dissecting%20the%20hack%20%26%238211%3B%20packed%20r57shell" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/hacking/dissecting-the-hack-r57shell/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Venturing into micro controller programming</title>
		<link>http://www.saiweb.co.uk/hacking/venturing-into-micro-controller-programming</link>
		<comments>http://www.saiweb.co.uk/hacking/venturing-into-micro-controller-programming#comments</comments>
		<pubDate>Thu, 13 May 2010 08:38:46 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[teensy]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=864</guid>
		<description><![CDATA[Or, as one of my colleagues this morning said, firmware programming which in the literal sense of the word I suppose it is firmware. I&#8217;ve decided as some of my twitter followers may already know to produce a library / framework for the teensy arduino which is available from subversion here: http://svn.saiweb.co.uk/branches/teensy/trunk/ under the GPL [...]]]></description>
			<content:encoded><![CDATA[<p>Or, as one of my colleagues this morning said, firmware programming which in the literal sense of the word I suppose it is firmware.</p>
<p>I&#8217;ve decided as some of my <a href="http://twitter.com/Saiweb">twitter</a> followers may already know to produce a library / framework for the <a href="http://www.pjrc.com/teensy/index.html">teensy arduino</a> which is available from subversion here: <a href="http://svn.saiweb.co.uk/branches/teensy/trunk/">http://svn.saiweb.co.uk/branches/teensy/trunk/</a> under the GPL v3 license</p>
<p>At the time of writing I have worked through <a href="http://www.pjrc.com/teensy/tutorial2.html">this tutorial</a> on operating an RGB LED.</p>
<p>I&#8217;ve taken the examples an reworked them into a re-usable library incorporating a multitude of functions, </p>
<p><a href="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/IMG_0477.jpg"><img src="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/IMG_0477-150x150.jpg" alt="" title="Kit as it arrived" width="150" height="150" class="aligncenter size-thumbnail wp-image-865" /></a></p>
<p><a href="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/IMG_0478.jpg"><img src="http://cdn.saiweb.co.uk/wp-content/uploads/2010/05/IMG_0478-150x150.jpg" alt="" title="it LIVES!" width="150" height="150" class="aligncenter size-thumbnail wp-image-866" /></a></p>
<p>Being as I have all the parts to work through the full set of tutorials at pjrc, the library will be first updated to incorporate these examples, once complete I&#8217;ll be heading over to the HID programming aspect, and there will be a library for a plethora of &#8220;fun&#8221; applications <img src='http://cdn.saiweb.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/hacking/venturing-into-micro-controller-programming" data-text="Venturing into micro controller programming" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Fhacking%2Fventuring-into-micro-controller-programming&#038;text=Venturing%20into%20micro%20controller%20programming" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/hacking/venturing-into-micro-controller-programming/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Database Caching 22/69 queries in 0.086 seconds using apc
Object Caching 2103/2235 objects using apc
Content Delivery Network via Rackspace Cloud Files: cdn.saiweb.co.uk

Served from: www.saiweb.co.uk @ 2012-02-08 16:16:51 -->
