<?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>woFF</title>
	<atom:link href="http://woff.hu/feed/" rel="self" type="application/rss+xml" />
	<link>http://woff.hu</link>
	<description></description>
	<lastBuildDate>Tue, 08 Jun 2010 21:23:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>XSS? &#8211; javascript location object encoding in various browsers</title>
		<link>http://woff.hu/findings/xss-javascript-location-object/</link>
		<comments>http://woff.hu/findings/xss-javascript-location-object/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 20:27:46 +0000</pubDate>
		<dc:creator>woff</dc:creator>
				<category><![CDATA[Findings]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie8]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[urlencoding]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://woff.hu/?p=47</guid>
		<description><![CDATA[I thought it would be great to quickly share some interesting stuff I noticed about the way the different browsers handle the javascript location object, but first a few words about the object&#8217;s properties and what they contain: hash &#8211; everything after the # (anchor) in the URL host &#8211; the hostname and port hostname [...]]]></description>
			<content:encoded><![CDATA[<p>I thought it would be great to quickly share some interesting stuff I noticed about the way the different browsers handle the javascript location object, but first a few words about the object&#8217;s properties and what they contain:</p>
<ul>
<li>hash &#8211; everything after the # (anchor) in the URL</li>
<li>host &#8211; the hostname and port</li>
<li>hostname &#8211; the hostname</li>
<li>href &#8211; the full URL</li>
<li>pathname &#8211; path to the requested file</li>
<li>port, protocol &#8211; i think these speaks for themselfs</li>
<li>search &#8211; the query string (~GET parameters)</li>
<li>target &#8211; the url link&#8217;s target name</li>
</ul>
<p>What is so interesting about these parameters? Well it seems that the different browsers handle the values in them differently and if they are written back to the html with javascript (for example with document.write) they can easily lead to cross-site-scripting. Here is the summary about the parameters I found &#8220;interesting&#8221; (not encoded by the browser):</p>
<table style="width: 100%;" border="1" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<th></th>
<th>IE 8</th>
<th>Firefox 3.6.3</th>
<th>Chrome 4.1.249.1064</th>
<th>Opera 10.53</th>
</tr>
<tr>
<th style="text-align: left;">location.hash</th>
<td><span style="color: #800000;"><strong>not encoded</strong></span></td>
<td><strong><span style="color: #800000;">not encoded</span></strong></td>
<td><strong><span style="color: #800000;">not encoded</span></strong></td>
<td><strong><span style="color: #800000;">not encoded</span></strong></td>
</tr>
<tr>
<th style="text-align: left;">location.href</th>
<td><strong><span style="color: #800000;">not encoded</span></strong></td>
<td><span style="color: #008000;"><strong>encoded</strong></span></td>
<td><span style="color: #008000;"><strong><span style="color: #800000;">not encoded <span style="font-weight: normal;"><span style="color: #000000;">(the hash in it is not encoded)</span></span></span></strong></span></td>
<td><span style="color: #800000;"><strong>not encoded</strong></span> (the hash in it is not encoded)</td>
</tr>
<tr>
<th style="text-align: left;">location.search</th>
<td><strong><span style="color: #800000;">not encoded</span></strong></td>
<td><strong><span style="color: #008000;">encoded</span></strong></td>
<td><span style="color: #008000;"><strong>encoded</strong></span></td>
<td><span style="color: #008000;"><strong>encoded</strong></span></td>
</tr>
</tbody>
</table>
<p><span id="more-47"></span></p>
<p>I used the following simple html site to check the parameters:</p>
<blockquote>
<div id="_mcePaste">&lt;html&gt;</div>
<div>&lt;head&gt;</div>
<div id="_mcePaste">&lt;title&gt;location object XSS test&lt;/title&gt;</div>
<div id="_mcePaste">&lt;/head&gt;</div>
<div id="_mcePaste">&lt;body&gt;</div>
<div id="_mcePaste">&lt;script&gt;</div>
<div id="_mcePaste">document.write(&#8220;HASH: &#8220;+location.hash+&#8221;&lt;br&gt;&#8221;)</div>
<div id="_mcePaste">document.write(&#8220;HOST: &#8220;+location.host+&#8221;&lt;br&gt;&#8221;)</div>
<div id="_mcePaste">document.write(&#8220;HOSTNAME: &#8220;+location.hostname+&#8221;&lt;br&gt;&#8221;)</div>
<div id="_mcePaste">document.write(&#8220;HREF: &#8220;+location.href+&#8221;&lt;br&gt;&#8221;)</div>
<div id="_mcePaste">document.write(&#8220;PATHNAME: &#8220;+location.pathname+&#8221;&lt;br&gt;&#8221;)</div>
<div id="_mcePaste">document.write(&#8220;PORT: &#8220;+location.port+&#8221;&lt;br&gt;&#8221;)</div>
<div id="_mcePaste">document.write(&#8220;PROTOCOL: &#8220;+location.protocol+&#8221;&lt;br&gt;&#8221;)</div>
<div id="_mcePaste">document.write(&#8220;SEARCH: &#8220;+location.search+&#8221;&lt;br&gt;&#8221;)</div>
<div id="_mcePaste">document.write(&#8220;TARGET: &#8220;+location.target+&#8221;&lt;br&gt;&#8221;)</div>
<div id="_mcePaste">&lt;/script&gt;</div>
<div id="_mcePaste">&lt;/body&gt;</div>
<div id="_mcePaste">&lt;/html&gt;</div>
</blockquote>
<div>I opened the URL &#8220;inner_html_xss_01.html?&lt;b&gt;bold?&lt;/b&gt;#&lt;i&gt;italic?&lt;/i&gt;&#8221; and was looking for bold and italic texts (of course they could have been some nasty javascript calls as well).</div>
<p>For example the result on Firefox was:</p>
<div><a href="http://woff.hu/wp-content/uploads/2010/06/location_xss_test_firefox.jpg"><img class="alignnone size-full wp-image-48" title="location_xss_test_firefox" src="http://woff.hu/wp-content/uploads/2010/06/location_xss_test_firefox.jpg" alt="location object xss test firefox" width="600" height="287" /></a></div>
<p>On Internet Explorer 8:</p>
<div><a href="http://woff.hu/wp-content/uploads/2010/06/location_xss_test_ie8.jpg"><img class="alignnone size-full wp-image-49" title="location_xss_test_ie8" src="http://woff.hu/wp-content/uploads/2010/06/location_xss_test_ie8.jpg" alt="location object xss test ie8" width="600" height="343" /></a></div>
<p>I don&#8217;t know if this is intended in the different browsers, but one thing is sure: if it is avoidable try not to use javascript to work with changeable parameters or at least encode everything by hand as well <img src='http://woff.hu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p><em>I haven&#8217;t really played yet with parameter pathname and target, but I think it is possible to get similar results. The browsers act differently if the url comes from a link or is entered directly to the browser&#8230;  I will check these later and update the table&#8230;</em></p>
<p><em>I don&#8217;t think these are vulnerabilities in the browsers, but </em><span style="font-style: normal;"><em>in some (very limited) scenarios they</em><span style="font-style: normal;"><em> can be exploited, so I thought it worths a post. Don&#8217;t be afraid to comment <img src='http://woff.hu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </em></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://woff.hu/findings/xss-javascript-location-object/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SSH2 &#8220;MITM&#8221; like attack with JMITM2</title>
		<link>http://woff.hu/tools/ssh2-mitm-like-attack-with-jmitm2/</link>
		<comments>http://woff.hu/tools/ssh2-mitm-like-attack-with-jmitm2/#comments</comments>
		<pubDate>Wed, 26 May 2010 23:40:23 +0000</pubDate>
		<dc:creator>woff</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[arp spoofing]]></category>
		<category><![CDATA[jmitm2]]></category>
		<category><![CDATA[mitm]]></category>
		<category><![CDATA[ssh2]]></category>

		<guid isPermaLink="false">http://woff.hu/?p=33</guid>
		<description><![CDATA[First: the following attack is not a real (at least not a perfect) man-in-the-middle attack, since the target will get a warning about the altered SSH server footprint and the attacker needs to &#8220;hijack&#8221; the communication between the target and the SSH server (ARP cache poisoning for example&#8230;), but I think the tool deserves a [...]]]></description>
			<content:encoded><![CDATA[<p>First: the following attack is not a real (at least not a perfect) man-in-the-middle attack, since the target will get a warning about the altered SSH server footprint and the attacker needs to &#8220;hijack&#8221; the communication between the target and the SSH server (ARP cache poisoning for example&#8230;), but I think the tool deserves a note (all the credits for the software goes to <a title="David Gümbel" href="http://www.david-guembel.de/" target="_blank">David Gümbel</a>).</p>
<p><span id="more-33"></span></p>
<p>I remember, the first time I downloaded JMITM2 from <a href="http://www.david-guembel.de/index.php?id=6">http://www.david-guembel.de/index.php?id=6</a> I was sitting in a web cafe near to the university with a friend trying to &#8220;attack&#8221; each others SSH2 connection. Tonight I am alone, so I started two Damn Small Linux (DSL) in Virtualbox. One will be the SSH server (192.168.56.101), other will be the attacked client (192.168.56.102) and the host will be the attacker (192.168.56.1).</p>
<p>After starting the SSH server on 192.168.56.101 with the commands &#8220;sshstart&#8221; and &#8220;/etc/init.d/ssh start&#8221; and connecting to the service from the client machine (192.168.56.102) to get the RSA fingerprint it is time to prepare the attacker machine.</p>
<p>I will start with JMITM2 since it needs some configuring and arpspoof is pretty simple to use&#8230;</p>
<p>First we need to edit JMITM2&#8242;s bin/conf/server.xml file and change the &#8220;ListenAddress&#8221; to our IP (192.168.56.1 in this case) and &#8220;Port&#8221; to the standard SSH port (22).</p>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/jmitm2_server_xml.png"><img class="size-full wp-image-35 alignnone" title="jmitm2_server_xml" src="http://woff.hu/wp-content/uploads/2010/05/jmitm2_server_xml.png" alt="JMITM2 server.xml configuration" width="600" height="422" /></a></p>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/jmitm2_server_xml.png"></a>Now let&#8217;s edit the bin/runm.sh script and set the SSH server&#8217;s IP address (192.168.56.101) as the first parameter:</p>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/jmitm2_runm_sh.png"><img class="size-full wp-image-36 alignnone" title="jmitm2_runm_sh" src="http://woff.hu/wp-content/uploads/2010/05/jmitm2_runm_sh.png" alt="JMITM2 runm.sh configuration" width="600" height="62" /></a></p>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/jmitm2_runm_sh.png"></a>JMITM2 is set up, for arpspoof we just need a few iptables rules:</p>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/jmitm2_arpspoof.png"><img class="alignnone size-full wp-image-37" title="jmitm2_arpspoof" src="http://woff.hu/wp-content/uploads/2010/05/jmitm2_arpspoof.png" alt="jmitm2 - arpspoof" width="600" height="184" /></a></p>
<p>We need to spoof &#8220;two-ways&#8221; so two arpspoof will be running (the attacked machine must think we are the SSH server and normally the SSH server should think we are the attacked machine), so we should run &#8220;arpspoof -i vboxnet0 -t 192.168.56.101 192.168.56.102&#8243; as well.</p>
<p>After these steps when the target tries to connect to the SSH server he will connect to us (hopefully provide us a password <img src='http://woff.hu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) and we will build a new connection to the SSH server in his name (just like a proxy). Of course the situation is not that simple. When the attacked machine connects to us JMITM2 will start connecting to the SSH server and ask us if we accept the provided fingerprint (this is necessary only first time) &#8211; of course we accept it. JMITM2 sends a login prompt to the attacked machine, but the SSH client will warn the user, that the fingerprint sent by us is not the same as the &#8220;original&#8221; SSH server&#8217;s:</p>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/jmitm2_rsa_fingerprint_changed.png"><img class="alignnone size-full wp-image-39" title="jmitm2_rsa_fingerprint_changed" src="http://woff.hu/wp-content/uploads/2010/05/jmitm2_rsa_fingerprint_changed.png" alt="jmitm2 - rsa fingerprint changed" width="600" height="202" /></a></p>
<p>If the user &#8220;wants to continue connecting&#8221; (which he really should not!) we will get his/her credentials:</p>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/jmitm2_target_connected_results.png"><img title="jmitm2_target_connected_results" src="http://woff.hu/wp-content/uploads/2010/05/jmitm2_target_connected_results.png" alt="JMITM2 - got username and password for SSH2" width="600" height="364" /></a></p>
<p>(by the way as you can see JMITM2 generates a lot of output, &#8220;grep&#8221; is recommended <img src='http://woff.hu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</p>
<p>The session for the attacked user of course will work correctly, we will &#8220;proxy&#8221; every command and result.</p>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/jmitm2_target_connected.png"><img title="jmitm2_target_connected" src="http://woff.hu/wp-content/uploads/2010/05/jmitm2_target_connected.png" alt="JMITM2 - target connected" width="600" height="391" /></a></p>
<p>Some things to notice:</p>
<ul>
<li>the attack absolutely depends on the attacked user, if he doesn&#8217;t accept the changed RSA key fingerprint we are lost</li>
<li>maybe I was not careful enough, but JMITM2 builds the connection to the SSH server in our name (from our IP), so the attacker IP will be logged on the server&#8230;  I will check soon if this is how it is meant to work.</li>
<li>ARP spoofing is bad</li>
</ul>
<p>Maybe later I will play with the plugin features of JMITM2, I think there will be some more fun to discover.</p>
<p>// I welcome every comment or observation&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://woff.hu/tools/ssh2-mitm-like-attack-with-jmitm2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HSIYF Hacking Tournament #1</title>
		<link>http://woff.hu/events-cons/hsiyf-hacking-tournament-1/</link>
		<comments>http://woff.hu/events-cons/hsiyf-hacking-tournament-1/#comments</comments>
		<pubDate>Tue, 18 May 2010 22:24:29 +0000</pubDate>
		<dc:creator>woff</dc:creator>
				<category><![CDATA[Events/Cons]]></category>
		<category><![CDATA[contest]]></category>
		<category><![CDATA[hsiyf]]></category>
		<category><![CDATA[offsec]]></category>
		<category><![CDATA[penetration test]]></category>
		<category><![CDATA[tournament]]></category>

		<guid isPermaLink="false">http://woff.hu/?p=8</guid>
		<description><![CDATA[Background Not so long ago it turned out that Vadium (congratulations!) and me got a &#8220;shared&#8221; first place in &#8220;How Strong Is Your FU Hacking Tournament #1&#8243;, so I decided to archive my feelings, findings and the penetration test here. A few weeks before when I saw the above banner on offensive security&#8217;s blog I got [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/hsiyf_offsec.png"><img class="size-full wp-image-9 alignnone" title="hsiyf_offsec" src="http://woff.hu/wp-content/uploads/2010/05/hsiyf_offsec.png" alt="How Strong Is Your FU Hacking Tour - offensive security" width="300" /></a><br />
<strong>Not so long ago it turned out that Vadium (congratulations!) and me got a &#8220;shared&#8221; first place in &#8220;How Strong Is Your FU Hacking Tournament #1&#8243;, so I decided to archive my feelings, findings and the </strong><strong><a href="http://woff.hu/wp-content/uploads/2010/05/woff_hsiyf_report_final.pdf">penetration test</a></strong><strong> here.</strong></p>
<p><strong><span id="more-8"></span></strong></p>
<p>A few weeks before when I saw the above banner on <a href="http://www.offensive-security.com/backtrack/how-strong-is-your-fu/">offensive security&#8217;s blog</a> I got excited. Well I&#8217;m not a Jackie Chan fan, but I had a feeling that this must be something really good. Couple of minutes later I was registered and started to think about the things I had to do to prepare for the &#8220;hacking tournament&#8221;. I got a new version of Ubuntu on my computer and googled for security tools nearly every night for a week. I know&#8230; BackTrack is great, but I wanted to refresh my memories and look after some new tools.</p>
<p>As it turned out more than 1000 contestants got the mail with the required information to &#8220;start the fight&#8221;. The rules were simple:</p>
<ul>
<li>no denial of service (DoS) attacks</li>
<li>no disruptive attacks</li>
<li>no attacks against &#8220;non-target machines&#8221;</li>
</ul>
<p>There were three target machines, but to gain access to two of them the contestants had to hack their way through the &#8220;n00bfilter&#8221;. I really don&#8217;t want to repeat my &#8220;official&#8221; report here, if you are interested in every technical detail you can download the document from <a href="http://woff.hu/wp-content/uploads/2010/05/woff_hsiyf_report_final.pdf">here</a>, if you are interested in others reports you can grab them from <a href="http://www.information-security-training.com/news/hsiyf-runner-up-documentation/">here</a>. Of course there were no ultimate solutions, but these worked for me.</p>
<h3>n00bfilter</h3>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/n00bfilter_sum.jpg"><img class="alignnone size-full wp-image-10" title="n00bfilter_sum" src="http://woff.hu/wp-content/uploads/2010/05/n00bfilter_sum.jpg" alt="n00bfilter attack vectors - HSIYF" width="600" height="145" /></a><br />
As I said to gain the required access to the &#8220;internal&#8221; network the machine &#8220;n00bfilter&#8221; had to fall. First step was to enumerate the machine, run a portscan, grab some service banners if necessary. SSH and HTTP were open.<br />
After checking a default login page on the HTTP port I started trying some basic sql injection attacks to bypass the authentication. Some probes resulted in a warning page from the web application firewall (WAF) called &#8220;dotDefender&#8221; that it blocked my request. I tried some more advanced sql injections, but I always got the error message, so I moved my &#8220;cross-hairs&#8221; from the login page to the WAF. I checked some information about the software and it turned out, that the installed version is vulnerable to a <a href="http://www.exploit-db.com/exploits/10261">post authentication remote command execution vulnerability</a>.<br />
The web interface of the software was in the default directory, I got a Basic HTTP auth popup asking for my username and password. Actually the popup provided a valid username (admin) and the password was &#8220;manually bruteforced&#8221;&#8230; well, it was the word &#8220;password&#8221; (not too hard to find out indeed).</p>
<p>So I got a valid &#8220;Authorization&#8221; header, used it in a forged packet sent out against the target with Paros.<br />
<a href="http://woff.hu/wp-content/uploads/2010/05/n00bfilter_p1.jpg"><img class="alignnone size-full wp-image-11" title="n00bfilter_p1" src="http://woff.hu/wp-content/uploads/2010/05/n00bfilter_p1.jpg" alt="n00bfilter - HSIYF - remote command execution" width="600" height="160" /></a><br />
In fact before I sent the working packets I wanted to take a look on the admin interface of the WAF. It was a mistake&#8230; logging in triggered the firewall and I got banned for 5 minutes every time (ideal for some coffe and small-talk with the girlfriend <img src='http://woff.hu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ). But Paros got the result quickly&#8230; one search for the proof file (n00bSecret.txt) and one to &#8220;cat&#8221; its contents. After entering the proof into the tournaments control panel I was very surprised (and of course extremely happy) to see my nick show up first on the scoreboard.</p>
<h3>killthen00b</h3>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/killthen00b_sum.jpg"><img class="alignnone size-full wp-image-12" title="killthen00b_sum" src="http://woff.hu/wp-content/uploads/2010/05/killthen00b_sum.jpg" alt="killthen00b - attack vectors - HSIYF" width="600" height="70" /></a><br />
Despite the fact that the attack flow in the above image is very short and easy this machine had some interesting things to explore.</p>
<p>After running an nmap and analyzing the results I decided to go after the installed SurgeMail application. With google I found some exploits against it, but all of them needed a valid SMTP user and password. We were given with an FTP user and password, but a quick check confirmed that that user is not a valid SMTP user. Port 3389 was open, so i started rdesktop and tried to connect to the computer, in a sec a Windows 7 login screen showed up. Just to be sure I checked if the FTP user is able to log in here, the result was good, but not excellent&#8230; he is not in the &#8220;Remote Desktop Users&#8221; group (but this error message means that he is a valid local user and we know his password!).</p>
<p>I grabbed the installed FTP servers banner with netcat and found an excellent directory traversal attack against it on <a href="http://www.exploit-db.com/exploits/11973">explo.it</a>. Just to be sure I downloaded some config files, SurgeMails administrator (admin.dat) and user (nwauth.dat) database and found the cgi-bin of SurgeMail&#8217;s &#8220;WebMail&#8221;. Running john against the two SSHA hashes provided me one valid SMTP user (n00b with password pippo123). Since I found the cgi-bin directory and had a plan in my mind I didn&#8217;t launch SurgeMail related exploits against the server. Why not use metasploit to generate a reverse payload, upload it, run a meterpreter listener and execute the uploaded executable &#8220;through&#8221; a browser.</p>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/killthen00b_meterpreter.jpg"><img class="alignnone size-full wp-image-13" title="killthen00b_meterpreter" src="http://woff.hu/wp-content/uploads/2010/05/killthen00b_meterpreter.jpg" alt="killthen00b - meterpreter session - HSIYF" width="540" height="355" /></a><br />
<img src="file:///E:/wamp/www/woff/killthen00b_meterpreter.jpg" alt="" /></p>
<p>Yeah, it was that simple, the proof.txt was in the administrators desktop (and since we got NT AUTHORITY/SYSTEM it wasn&#8217;t problem to access it).</p>
<h3>ghost</h3>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/ghost_sum.jpg"><img class="alignnone size-full wp-image-14" title="ghost_sum" src="http://woff.hu/wp-content/uploads/2010/05/ghost_sum.jpg" alt="ghost - attack vectors - HSIYF" width="600" height="216" /></a><br />
For me this one was the nightmare at the beginning. I just couldn&#8217;t find anything to attack. Port 80 was only open, a dummy login page was available and thats it. I tried to silently portscan it, ran nikto, httprint&#8230; everything I knew. It looked like an IIS/ASP, but it wasn&#8217;t. Some default ASP files were found by nikto for example, but they were 0 byte long. So after deciding this is a linux and the webserver is apache 2.x I was stuck&#8230; no exploit, no input field to play with. I left the tournament for 10 hours to be with my friends, to celebrate a birthday and got back to finally find something new, which I should have found 12 hours before. A javascript on the test.asp page (which I just didn&#8217;t try manually&#8230;). From here it was just a few hours left to gain a root shell. Following the traces of the javascript I found another directory and a vulnerable PHP login script. Started my own webserver, rewrote a PHP shell script (to work correctly) and used the remote file inclusion vulnerability to include it.</p>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/ghost_php_shell.jpg"><img class="alignnone size-full wp-image-15" title="ghost_php_shell" src="http://woff.hu/wp-content/uploads/2010/05/ghost_php_shell.jpg" alt="ghost - php shell - HSIYF" width="600" height="325" /></a><br />
Using the PHP shell I uploaded and executed a reverse perl shell connecting to port 4567&#8230; just to have a more comfortable environment to hack.</p>
<p>I got www-data, but needed root&#8230; local privilege escalation would be ideal, but the kernel was pretty new, so after some check I gave up on the kernel and searched for another clue. I opened up<a href="http://securityfocus.com/">securityfocus.com</a> and started to look for vulnerabilities affecting Ubuntu (starting with the newest one). After some hours of searching I found an EXT4 vulnerability, the only problem was that I had to compile the exploit and do &#8220;su &#8211; root&#8221; (which requires TTY shell&#8230;). GCC was easily found on the target (/usr/bin/gcc-4.4) and to get around the &#8220;su: must be run from terminal&#8221; error message I used a simple python script.</p>
<p><a href="http://woff.hu/wp-content/uploads/2010/05/ghost_exploited.jpg"><img class="alignnone size-full wp-image-16" title="ghost_exploited" src="http://woff.hu/wp-content/uploads/2010/05/ghost_exploited.jpg" alt="ghost - local privilege escalation - HSIYF" width="516" height="575" /></a></p>
<h3>Summary and thanks</h3>
<p>It was fun, thanks for the challenges and congratulations to the contestants. Buherátoréknak meg külön grat a sebességért!</p>
]]></content:encoded>
			<wfw:commentRss>http://woff.hu/events-cons/hsiyf-hacking-tournament-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hello World!</title>
		<link>http://woff.hu/news/hello-world-2/</link>
		<comments>http://woff.hu/news/hello-world-2/#comments</comments>
		<pubDate>Tue, 18 May 2010 22:24:04 +0000</pubDate>
		<dc:creator>woff</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://woff.hu/?p=21</guid>
		<description><![CDATA[After due deliberation (and getting a shared first place in the HSIYF Hacking Tournament #1 &#8211; see the next post) I decided to start this site to have a place where I can share my ideas, developments and achievements in the IT security field with the public. Anything shared in this site is released by [...]]]></description>
			<content:encoded><![CDATA[<p>After due deliberation (and getting a shared first place in the  <a href="http://www.information-security-training.com/news/hsiyf-1-tournament-results/">HSIYF  Hacking Tournament #1</a> &#8211; see the next post) I decided  to start this site to have a place where I can share my ideas,  developments and achievements in the IT security field with the  public. <em>Anything shared in this site is released by me and there  isn&#8217;t any connection or liability that belongs to my current or any  previous eployer.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://woff.hu/news/hello-world-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

