<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Admin Blog &#187; Web Application Security</title>
	<atom:link href="http://www.webadminblog.com/index.php/category/security/web-app-sec/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webadminblog.com</link>
	<description>Real Web Admins.  Real World Experience.</description>
	<lastBuildDate>Thu, 22 Jul 2010 16:18:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Static Application Vulnerability Testing: Binary Scanning vs Source Code Scanning</title>
		<link>http://www.webadminblog.com/index.php/2010/07/22/static-application-vulnerability-testing-binary-scanning-vs-source-code-scanning/</link>
		<comments>http://www.webadminblog.com/index.php/2010/07/22/static-application-vulnerability-testing-binary-scanning-vs-source-code-scanning/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 16:16:56 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Software and Tools]]></category>
		<category><![CDATA[Static Analysis]]></category>
		<category><![CDATA[Web Application Security]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[black]]></category>
		<category><![CDATA[box]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[SaaS]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[static]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[versus]]></category>
		<category><![CDATA[vulnerability]]></category>
		<category><![CDATA[white]]></category>

		<guid isPermaLink="false">http://www.webadminblog.com/?p=474</guid>
		<description><![CDATA[I had a meeting yesterday with a vendor who sells a SaaS solution for binary application vulnerability testing. They tell a very interesting story of a world where dynamic testing ("black box") takes place alongside static testing ("white box") to give you a full picture of your application security posture. They even combine the results [...]]]></description>
			<content:encoded><![CDATA[<p>I had a meeting yesterday with a vendor who sells a SaaS solution for binary application vulnerability testing.  They tell a very interesting story of a world where dynamic testing ("black box") takes place alongside static testing ("white box") to give you a full picture of your application security posture.  They even combine the results with some e-Learning aspects so that developers can research the vulnerabilities in the same place they go to find them.  In concept, this sounds fantastic, but I quickly turned into a skeptic and as I dug deeper into the details I'm not sure I like what I found.</p>
<p>I wanted to make sure I fully understood what was going on under the hood here so I started asking questions about the static testing and how it works.  They've got a nice looking portal where you name your application, give it a version, assign it to a group of developers, and point it to your compiled code (WAR, EAR, JAR, etc).  Once you upload your binaries, their system basically runs a disassembler on it to get it into assembly code.  It's then at this level that they start looking for vulnerabilities.  They said that this process takes about 3 days initially and then maybe 2 days after the first time because they are able to re-use some data about your application.  Once complete, they say they are able to provide you a report detailing your vulnerabilities and how to fix them.</p>
<p>The thing that immediately struck me as worth noting here was the 2-3 day turnaround.  This means that our developers would need to wait a fairly substantial amount of time before getting any feedback on the vulnerability status of their code.  In a world full of Agile development, 2-3 days is a lifetime.  Compare that to static source code testing where you get actionable results at compile time.  The edge here definitely goes to source code testing as I believe most people would prefer the near-instant gratification.</p>
<p>The next thing worth noting was that they are taking binary files and disassembling them in order to find vulnerabilities.  This lends itself to one major issue which is how can you determine with any accuracy the line number of a particular vulnerability written in let's say Java from assembly code generated by disassembling the binaries.  By default, it's simply not possible.  This vendor claimed that they can by adding in some debug strings at compile time, but even then I'd contend that you're not going to get much.  I'm guessing they have some heuristics that are able to tell what function generated a set of assembly code, but I'm extremely skeptical that they can do anything with variable names, custom code functions, etc.  I've seen some source code scanners, on the other hand, that not only tell you what line of code is affected, but are able to give you an entire list of parameters that have been consequently affected by that vulnerability.  The edge here definitely goes to source code testing.</p>
<p>The main benefit that I can see with binary testing vs source code testing is that we can test code that we didn't write.  Things like APIs, third-party applications, open source, etc are all things that we now have visibility into.  The only problem here is that while we now can see the vulnerabilities in this software, they are unfortunately all things that we can't directly influence change in, unless we want to send our developers off to work on somebody else's software.  I'd argue that scanning for vulnerabilities in that type of code is their responsibility, not ours.  Granted, it'd be nice to have validation that there aren't vulnerabilities there that we're exposing ourselves to by uptaking it, but in all honesty are we really going to take the time to scan somebody else's work?  Probably not.  The edge here goes to binary testing with the caveat being that it's in something that I frankly don't care as much about.</p>
<p>This isn't the complete list of pros and cons by any means.  It's just me voicing in writing some concerns that I had about the technology while talking to this particular vendor.  In my opinion, the benefits of doing source code testing far outweigh any benefits that we could get from testing compiled binary files.  What do you think about the benefits of one versus the other?  I'd certainly love for someone to try to change my mind here and show me where the real value lies in binary testing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webadminblog.com/index.php/2010/07/22/static-application-vulnerability-testing-binary-scanning-vs-source-code-scanning/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A XSS Vulnerability in Almost Every PHP Form I&#8217;ve Ever Written</title>
		<link>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/</link>
		<comments>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 02:30:16 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Web Application Security]]></category>
		<category><![CDATA[cross]]></category>
		<category><![CDATA[cross-site]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php_self]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[vulnerability]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://www.webadminblog.com/?p=401</guid>
		<description><![CDATA[I've spent a lot of time over the past few months writing an enterprise application in PHP.  Despite what some people may say, I believe that PHP is as secure or insecure as the developer who is writing the code.  Anyway, I'm at the point in my development lifecycle where I decided that it was [...]]]></description>
			<content:encoded><![CDATA[<p>I've spent a lot of time over the past few months writing an enterprise application in PHP.  Despite what some people may say, I believe that PHP is as secure or insecure as the developer who is writing the code.  Anyway, I'm at the point in my development lifecycle where I decided that it was ready to run an application vulnerability scanner against it.  What I found was interesting and I think it's worth sharing with you all.</p>
<p>Let me preface this by saying that I'm the guy who gives the training to our developers on the OWASP Top 10, writing secure code, etc.  I'd like to think that I have a pretty good handle on programming best practices, input validation, and HTML encoding.  I built all kinds of validation into this application and thought that the vulnerability scan would come up empty.  For the most part I was right, but there was one vulnerability, one flaw in particular, that found it's way into every form in my application.  In fact, I realized that I've made this exact same mistake in almost every PHP form that I've ever written.  Talk about a humbling experience.</p>
<p>So here's what happened.  I created a simple page with a form where the results of that form are submitted back to the page itself for processing.  Let's assume it looks something like this:</p>
<pre>&lt;<a href="http://december.com/html/4/element/html.html">html</a>&gt;
 &lt;<a href="http://december.com/html/4/element/body.html">body</a>&gt;
  &lt;?php
  if (isset($_REQUEST['submitted']) &amp;&amp; $_REQUEST['submitted'] == '1') {
    echo "Form submitted!";
  }
  ?&gt;
  &lt;<a href="http://december.com/html/4/element/form.html">form</a> action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;"&gt;
   &lt;<a href="http://december.com/html/4/element/input.html">input</a> type="hidden" name="submitted" value="1" /&gt;
   &lt;<a href="http://december.com/html/4/element/input.html">input</a> type="submit" value="Submit!" /&gt;
  &lt;/<a href="http://december.com/html/4/element/form.html">form</a>&gt;
 &lt;/<a href="http://december.com/html/4/element/body.html">body</a>&gt;
&lt;/<a href="http://december.com/html/4/element/html.html">html</a>&gt;
</pre>
<p>It looks fairly straightforward, right?  The problem has to do with that $_SERVER['PHP_SELF'] variable.  The intent here is that PHP will display the path and name of the current page so that the form knows to submit back to the same page.  The problem is that $_SERVER['PHP_SELF'] can actually be manipulated by the user.  Let's say as the user I change the URL from http://www.webadminblog.com/example.php to http://www.webadminblog.com/example.php"&gt;&lt;script&gt;alert('xss');&lt;/script&gt;.  This will end the form action part of the code and inject a javascript alert into the page.  This is the very definition of cross site scripting.  I can't believe that with as long as I've been writing in PHP and as  long as I've been studying application security, I've never realized this.  Fortunately, there are a couple of different ways to fix this.  First, you could use the HTML entities or HTML special character functions to sanitize the user input like this:</p>
<p>htmlentities($_SERVER['PHP_SELF]);</p>
<p>htmlspecialchars($_SERVER['PHP_SELF]);</p>
<p>This fix would still allow the user to manipulate the URL, and thus, what is displayed on the page, but it would render the javascript invalid.  The second way to fix this is to use the script name variable instead like this:</p>
<p>$_SERVER['SCRIPT_NAME'];</p>
<p>This fix would just echo the full path and filename of the current file.    Yes, there are other ways to fix this.  Yes, my code example above for the XSS exploit doesn't do anything other than display a javascript alert.  I just wanted to draw attention to this issue because if it's found it's way into my code, then perhaps it's found it's way into yours as well.  Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webadminblog.com/index.php/2010/02/23/a-xss-vulnerability-in-almost-every-php-form-ive-ever-written/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Techniques in Attacking and Defending XML/Web Services</title>
		<link>http://www.webadminblog.com/index.php/2009/11/13/techniques-in-attacking-and-defending-xmlweb-services/</link>
		<comments>http://www.webadminblog.com/index.php/2009/11/13/techniques-in-attacking-and-defending-xmlweb-services/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 20:55:06 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[OWASP AppSec DC 2009]]></category>
		<category><![CDATA[Web Application Security]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[attacking]]></category>
		<category><![CDATA[defend]]></category>
		<category><![CDATA[defending]]></category>
		<category><![CDATA[services]]></category>
		<category><![CDATA[techniques]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.webadminblog.com/?p=344</guid>
		<description><![CDATA[This presentation was by Jason Macy and Mamoon Yunus of Crosscheck Networks - Forum Systems.  It wins the award (the one I just made up) for being the most vendor-oriented presentation at the conference.  Not that it wasn't an interesting presentation, but their solution to defend against most of the attacks was "Use an XML [...]]]></description>
			<content:encoded><![CDATA[<p>This presentation was by Jason Macy and Mamoon Yunus of Crosscheck Networks - Forum Systems.  It wins the award (the one I just made up) for being the most vendor-oriented presentation at the conference.  Not that it wasn't an interesting presentation, but their solution to defend against most of the attacks was "Use an XML Gateway" (guess what Forum Systems sells?) and the attacks were all presented using the CrossCheck SOAPSonar tool.  I realize that being a vendor they probably have more knowledge than most in the field, but being an Open Source conference, you'd think they would have demonstrated using a free/open tool (SOAPUI?) and talked more about non-hardware solutions to fix the issues.  My notes from the session are below:</p>
<p><span style="text-decoration: underline;"><strong>Agenda</strong></span></p>
<ol>
<li>Introduction to XML/Web Services Threats</li>
<li>Techniques for Defending XML Threats</li>
<li>XML Attack Examples and Classification</li>
<li>Review sample attacks</li>
</ol>
<p><span style="text-decoration: underline;"><strong>Introduction to XML Threats</strong></span></p>
<ul>
<li>Explicit Attacks
<ul>
<li>Forced Disruption</li>
<li>Information Theft</li>
<li>Vendor Discovery</li>
</ul>
</li>
<li>Implicit Vulnerability
<ul>
<li>Perimeter Breach (embeeded virus, malware)</li>
<li>Infrastructure Malfunction (parser and data processing failures)</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>New Attack Vectors</strong></span></p>
<ul>
<li>Protocol Firewalls are blind to XML</li>
<li>Malware and virus delivered via SOAP attachments</li>
<li>WSDL exposes schema and message structure</li>
<li>Injection attacks exposed via XML parameters</li>
<li>Data replay attacks</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Security Testing - Base Requirements</strong></span></p>
<ul>
<li>Security Framework
<ul>
<li>Sign, ENcrypt, Decrypt, SSL</li>
</ul>
</li>
<li>Identity Framework
<ul>
<li>Basic auth, SSL auth, WS-Security token auth</li>
</ul>
</li>
<li>Parameter Injection
<ul>
<li>Database or file driven</li>
<li>Permutations for security, identity, and SOAP/XML</li>
</ul>
</li>
<li>Concurrent Client Simultaneous Loading
<ul>
<li>Denial of Service Testing</li>
</ul>
</li>
<li>SOAP with Attachments
<ul>
<li>Malware and Virus testing</li>
</ul>
</li>
<li>Dynamic XSD Mutation
<ul>
<li>Derive SOAP vulnerability profile from WSDL schema</li>
</ul>
</li>
</ul>
<p><span id="more-344"></span></p>
<p><span style="text-decoration: underline;"><strong> XML Security Gateway - Base Requirements</strong></span></p>
<ul>
<li>Certified PKI Infrastructure (DOD PKI)
<ul>
<li>X509 Path validation</li>
<li>Sign/verify, SSL initiation, SSL termination</li>
</ul>
</li>
<li>Certified Security Architecture (FIPS)
<ul>
<li>Key management and storage</li>
<li>Physical security device</li>
</ul>
</li>
<li>Transaction Privacy
<ul>
<li>Encryption, decryption, SSL</li>
</ul>
</li>
<li>Transaction Integrity
<ul>
<li>Digital signature, signature verification, schema validation</li>
</ul>
</li>
<li>Transaction Accountability
<ul>
<li>Archiving, logging, reporting, and monitoring</li>
</ul>
</li>
<li>Transaction Threat Mitigation
<ul>
<li>Intrusion detection and prevention</li>
<li>Rate-based rules, size-based rules, anti-virus detection, pattern recognition</li>
<li>Structural integrity, protocol adherence, athorization attempts</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>XML Attack Examples and Classification</strong></span></p>
<ol>
<li>SQL Injection Attack</li>
<li>Denial of Service Attack</li>
<li>XSD Mutation Attack</li>
</ol>
<p><span style="text-decoration: underline;"><strong>XML Web Services SQL Injection Attack Example</strong></span></p>
<ul>
<li>How to Attack
<ul>
<li>Construct SQL escape sequences</li>
<li>Construct SQL 1=1 query</li>
<li>Inject into XML node values</li>
</ul>
</li>
<li>Discovered Exposure
<ul>
<li>Sensitive data loss</li>
<li>Database corruption</li>
</ul>
</li>
<li>Used "SOAPSonar" tool to load WSDL and send responses</li>
</ul>
<p><span style="text-decoration: underline;"><strong>SQL Injection - XML Gateway Secured</strong></span></p>
<ul>
<li>How to Defend
<ul>
<li>Deploy XML Gateway</li>
<li>Enable pattern scanning IDP rules</li>
<li>Configure response message size and complexity limits</li>
</ul>
</li>
<li>Advantages
<ul>
<li>Prevent Data Loss</li>
<li>Alert and Quarantine Attempted Breaches</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>XML Web Services based Denial of Service Attack</strong></span></p>
<ul>
<li>How to Attack
<ul>
<li>Loading client with concurrent simultaneous threads</li>
<li>Coercive parsing attack</li>
</ul>
</li>
<li>Discovered Exposure
<ul>
<li>Unlimited message flow</li>
<li>Unfair service SLA distribution</li>
<li>Back-end CPU and I/O Saturation</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Denial of Service - XML Gateway Secured</strong></span></p>
<ul>
<li>How to Defend
<ul>
<li>Deploy XML gateway</li>
<li>Set allowed transaction rates (Group, user, or IP)</li>
</ul>
</li>
<li>Advantages
<ul>
<li>Message flow limited to specified rate</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Another Example: Denial of Service through Coercive Parsing</strong></span></p>
<ul>
<li>Sending malformed XML data (removing the "&gt;" end tag) creates increased time to parse a request</li>
</ul>
<p><span style="text-decoration: underline;"><strong>XML Web Services Based XSD Mutation Attack</strong></span></p>
<ul>
<li>How to Attack
<ul>
<li>Obtain WSDL</li>
<li>Derive message structure and types from WSDL schema</li>
<li>Send SOAP message mutations based on schema</li>
</ul>
</li>
<li>Discovered Exposure
<ul>
<li>Code paths not handled for exceptions</li>
<li>Stack traces returned with implementation details</li>
<li>Application failure</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>XSD Mutation Attack - XML Gateway Secured</strong></span></p>
<ul>
<li>How to Defend
<ul>
<li>Deploy XML Gateway</li>
<li>Enforce inbound message structure and type validation</li>
<li>Cleanse outbound data (stack traces, sensitive data)</li>
</ul>
</li>
<li>Advantages
<ul>
<li>Reduce parser impact on web service</li>
<li>Remove vendor and implementation details in response</li>
<li>Protect application layer code paths on web service</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>XSD Mutation - Secured</strong></span></p>
<ol>
<li>Deploy specialized XML Gateways - Packet firewalls and HTML application firewalls are insufficient</li>
<li>Validate XML against a robust schema</li>
<li>Tighten Schema: restrict unbounded strings, etc</li>
<li>Enforce XML specific detection rules (node depth, recursive payloads)</li>
</ol>
<p><span style="text-decoration: underline;"><strong>Best Practices for Countermeasures</strong></span></p>
<ul>
<li>Information Control - Outbound
<ul>
<li>Restrict SOAP Faults</li>
<li>Protect Sensitive Information</li>
<li>Audit Transaction Flows</li>
</ul>
</li>
<li>Information Control - Inbound
<ul>
<li>Tighten Payloads</li>
<li>Enforce SLA</li>
<li>Disallow SQL, virus, malicious code</li>
</ul>
</li>
<li>Use Web Services Penetration Testing Product</li>
<li>Deploy XML web Services Gateway</li>
<li>Deploy Centralized XML Security</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.webadminblog.com/index.php/2009/11/13/techniques-in-attacking-and-defending-xmlweb-services/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>OWASP Top 10 &#8211; 2010</title>
		<link>http://www.webadminblog.com/index.php/2009/11/13/owasp-top-10-2010/</link>
		<comments>http://www.webadminblog.com/index.php/2009/11/13/owasp-top-10-2010/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 16:25:53 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[OWASP AppSec DC 2009]]></category>
		<category><![CDATA[Web Application Security]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[broken]]></category>
		<category><![CDATA[critical]]></category>
		<category><![CDATA[cross]]></category>
		<category><![CDATA[direct]]></category>
		<category><![CDATA[forgery]]></category>
		<category><![CDATA[forwards]]></category>
		<category><![CDATA[injection]]></category>
		<category><![CDATA[insecure]]></category>
		<category><![CDATA[Management]]></category>
		<category><![CDATA[misconfiguration]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[owasp]]></category>
		<category><![CDATA[redirects]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[request]]></category>
		<category><![CDATA[risks]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[top 10]]></category>
		<category><![CDATA[unvalidated]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://www.webadminblog.com/?p=336</guid>
		<description><![CDATA[This presentation was by Dave WIchers, COO of Aspect Security and an OWASP Board Member.  My notes are below: What's Changed? It's about Risks, not just vulnerabilities New title is: "The Top 10 Most Critical Web Application Security Risks" OWASP Top 10 Risk Rating Methodology Based on the OWASP Risk Rating Methodology, used to prioritize [...]]]></description>
			<content:encoded><![CDATA[<p>This presentation was by Dave WIchers, COO of Aspect Security and an OWASP Board Member.  My notes are below:</p>
<p><span style="text-decoration: underline;"><strong>What's Changed?</strong></span></p>
<ul>
<li>It's about Risks, not just vulnerabilities
<ul>
<li>New title is: "The Top 10 Most Critical Web Application Security Risks"</li>
</ul>
</li>
<li>OWASP Top 10 Risk Rating Methodology
<ul>
<li>Based on the OWASP Risk Rating Methodology, used to prioritize Top 10</li>
</ul>
</li>
<li>2 Risks Added, 2 Dropped
<ul>
<li>Added: A6 - Security Misconfiguration
<ul>
<li>Was A10 in 2004 Top 10: Insecure Configuration Management</li>
</ul>
</li>
<li>Added: A8 - Unvalidated Redirects and Forwards
<ul>
<li>Relatively common and VERY dangerous flaw that is not well know</li>
</ul>
</li>
<li>Removed: A3 - Malicious File Execution
<ul>
<li>Primarily a PHP flaw that is dropping in prevalence</li>
</ul>
</li>
<li>Removed: A6 - Information Leakage and Improper Error Handling
<ul>
<li>A very prevalent flaw, that does not introduce much risk (normally)</li>
</ul>
</li>
</ul>
</li>
</ul>
<ol>
<li><strong>A1- </strong><strong>Injection: </strong>Tricking an application into including unintended commands in the data sent to an interpreter. (http://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet)</li>
<li><strong>A2 - Cross Site Scripting (XSS):</strong> Raw data from attacker is sent to an innocent user's browser.  For large chunks of user supplied HTML, use OWASP's AntiSamy to sanitize this HTML to make it safe.  (http://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet)</li>
<li><strong>A3 - Broken Authentication and Session Management:</strong> Means credentials have to go with every request.  Should use SSL for everything requiring authentication.</li>
<li><strong>A4 - Insecure Direct Object Reference:</strong> This is part of enforcing proper "Authorization", along with A7 - Failure to Restrict URL Access.</li>
<li><strong>A5 - Cross Site Request Forgery (CSRF):</strong> An attack where the victim's browser is tricked into issuing a command to a vulnerable web application.  Vulnerability is caused by browsers automatically including user authentication data with each request.  (Check out OWASP CSRFGuard, OWASP CSRFTester, http://www.owasp.org/index.php/CSRF_Prevention_Cheat_Sheet)</li>
<li><strong>A6 - Security Misconfiguration:</strong> All through the network and platform.  Don't forget the development environment.  Think of all the places your source code goes.  All credentials should change in production.</li>
<li><strong>A7 - Failure to Restrict URL Access:</strong> This is part of enforcing proper "authorization", along with A4 - Insecure Direct Object References.</li>
<li><strong>A8 - Unvalidated Redirects and Forwards:</strong> Web application redirects are very common and frequently include user supplied parameters in the destination URL.  If they aren't validated, attacker can send victim to a site of their choice.</li>
<li><strong>A9 - Insecure Cryptographic Storage:</strong> Storing sensitive data insecurely.  Failure to identify all sensitive data.  Failure to identify all the places that this sensitive data gets stored.  Failure to properly protect this data in every location.</li>
<li><strong>A10 - Insufficient Transport Layer Protection</strong></li>
</ol>
<p><span style="text-decoration: underline;"><strong>OWASP Top 10 Risk Rating Methodology</strong></span></p>
<ul>
<li>Attack Vector (How hard for an attacker to use this flaw - 1 (Easy), 2 (Average), 3 (Difficult))</li>
<li>Weakness Prevalence (How often is it found - 1 (Widespread), 2 (Common), 3 (Uncommon))</li>
<li>Weakness Detectability (How hard is it for an attacker to find the flaw - 1 (Easy),  2 (Average), 3 (Difficult))</li>
<li>Technical Impact (1 (Severe), 2 (Moderate), 3 (Minor))</li>
</ul>
<p>This is generic across the internet, not specific to any organization.</p>
<p>Started a new "Prevention Cheatsheet Series" that the Top 10 references (XSS, SQL Injection, Transport Layer Security, CSRF, Direct Object Reference).</p>
<p>What is actually being released is RC1 of the Top 10 and they are encouraging people to provide comments through the end of the year and then use that feedback to post the final Top 10 in January 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webadminblog.com/index.php/2009/11/13/owasp-top-10-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing the Core JEE Patterns</title>
		<link>http://www.webadminblog.com/index.php/2009/11/13/securing-the-core-jee-patterns/</link>
		<comments>http://www.webadminblog.com/index.php/2009/11/13/securing-the-core-jee-patterns/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 14:45:24 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[OWASP AppSec DC 2009]]></category>
		<category><![CDATA[Web Application Security]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[best]]></category>
		<category><![CDATA[core]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[JEE]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[practices]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[securing]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[strategies]]></category>

		<guid isPermaLink="false">http://www.webadminblog.com/?p=332</guid>
		<description><![CDATA[This presentation was by Rohit Sethi, the Project Leader for the Secure Pattern Analysis Project at OWASP and he works at Security Compass, a security analysis and training company.  My notes from the session are below: Before anyone starts building complex systems, they need to design. We create threat models on completed designs. What about [...]]]></description>
			<content:encoded><![CDATA[<p>This presentation was by Rohit Sethi, the Project Leader for the Secure Pattern Analysis Project at OWASP and he works at Security Compass, a security analysis and training company.  My notes from the session are below:</p>
<ul>
<li>Before anyone starts building complex systems, they need to design.</li>
<li>We create threat models on completed designs.</li>
<li>What about during design?</li>
<li>Book: "Core J2EE Patterns Best Practices and Design Strategies"</li>
<li>If you use J2EE development, chances are you're using patterns documented here</li>
<li>Core J2EE patterns are used extensively</li>
<li>Patterns are used in JSF, Velocity, Struts, Tapestry, Spring, and Proprietary Frameworks</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Example: Project: Analyze Patterns</strong></span></p>
<p>Use to Implement:</p>
<ul>
<li>Synchronization Tokens as Anti-CSRF Mechanism</li>
<li>Page-level authorizations</li>
</ul>
<p>Avoid:</p>
<ul>
<li>XSLT and Xpath vulnerabilities</li>
<li>XML Denial of Service</li>
<li>Disclosure of information in SOAP faults</li>
<li>Publishing WSDL files</li>
<li>Unhandled commands</li>
<li>Unauthorized commands</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Project Goals</strong></span></p>
<ul>
<li>Analyze patterns for security pitfalls to avoid</li>
<li>Determine how patterns can implement security controls</li>
<li>Provide advice portable to most frameworks</li>
</ul>
<p>A security pattern is not the same as a security analysis of a pattern.</p>
<p><span style="text-decoration: underline;"><strong>Uses</strong></span></p>
<ul>
<li>Designing new web application frameworks (make the next generation of frameworks secure by default)</li>
<li>Designing new apps that use the patterns</li>
<li>Source code review of existing apps</li>
<li>Runtime assessment of existing apps</li>
<li>Integrate with threat modeling of new or existing apps</li>
</ul>
<p><span style="text-decoration: underline;"><strong>You can help:</strong></span></p>
<ul>
<li>Tell developers</li>
<li>Improve the analysis</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Next Steps?</strong></span></p>
<ul>
<li>Add code review and examples to the existing pattern book</li>
<li>Look at other pattern books to see if there are other patterns that we should analyze</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Our Dream</strong></span></p>
<ul>
<li>New web application framework idea + Design-time security analysis = Secure-by-default web application framework</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.webadminblog.com/index.php/2009/11/13/securing-the-core-jee-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Threat Modeling</title>
		<link>http://www.webadminblog.com/index.php/2009/11/12/threat-modeling/</link>
		<comments>http://www.webadminblog.com/index.php/2009/11/12/threat-modeling/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 22:55:55 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[OWASP AppSec DC 2009]]></category>
		<category><![CDATA[Web Application Security]]></category>
		<category><![CDATA[modeling]]></category>
		<category><![CDATA[threat]]></category>

		<guid isPermaLink="false">http://www.webadminblog.com/?p=322</guid>
		<description><![CDATA[This presentation was by John Steven, the NoVA Chapter Lead and Senior Director of Advanced Technology Consulting at Cigital, Inc.   He notes that this is not that MS thing, it is not going to help you find XSS, and is not going to help you with Risk Management.  My notes are below: Don't use threat [...]]]></description>
			<content:encoded><![CDATA[<p>This presentation was by John Steven, the NoVA Chapter Lead and Senior Director of Advanced Technology Consulting at Cigital, Inc.   He notes that this is not that MS thing, it is not going to help you find XSS, and is not going to help you with Risk Management.  My notes are below:</p>
<p>Don't use threat modeling to help you with the things you already have checklists for.</p>
<p>Do this because you want to understand the intersection of your stakeholder's goals and the architecture.</p>
<p><span style="text-decoration: underline;"><strong>What is a Threat?</strong></span></p>
<ul>
<li>An agent who attacks you?</li>
<li>An attack?</li>
<li>An attack's consequence?</li>
<li>A risk?</li>
</ul>
<p>What is a Threat Model</p>
<ul>
<li>Depiction of
<ul>
<li>The system's attack surface</li>
<li>Threats who can attack the system</li>
<li>Assets threats may compromise</li>
</ul>
</li>
<li>Some leverage risk management practices
<ul>
<li>Estimate probability of attack</li>
<li>Weight impact of successful attack</li>
</ul>
</li>
</ul>
<p>Threat</p>
<ul>
<li>Capability
<ul>
<li>Access ot the system</li>
<li>Able to reverse engineer binaries</li>
<li>Able to sniff the network</li>
</ul>
</li>
<li>Skill Level
<ul>
<li>Experienced hacker</li>
<li>Script kiddie</li>
<li>Insiders</li>
</ul>
</li>
<li>Resources and Tools
<ul>
<li>Simple manual execution</li>
<li>Distributed bot army</li>
<li>Well-funded organization</li>
<li>Access to private information</li>
</ul>
</li>
<li>Threats help
<ul>
<li>Encourage thorough throught about how intentions for misuse</li>
<li>Determine "out of bounds" scenarios</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Threat Modeling as a Process</strong></span></p>
<ul>
<li>Know thy enemy and how they attack you (who, what, how, why, impact, mitigation)</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Threat Modeling - High-level Process</strong></span></p>
<ol>
<li>Diagram Structure</li>
<li>Identify Assets</li>
<li>Identify Threats</li>
<li>Stitch Threats onto Structure</li>
<li>Enumerate Doomsday Scenarios</li>
<li>Document Misuse/Abuse</li>
<li>Enumerate Attack Vectors</li>
<li>Iterate</li>
</ol>
<p><span style="text-decoration: underline;"><strong>1. Diagram the Software</strong></span></p>
<ul>
<li>Different methods of diagraming (likes the whiteboard the best)</li>
</ul>
<p><span style="text-decoration: underline;"><strong>1.1  - Anchor in Software Architecture</strong></span></p>
<p>Consider where attacks occur</p>
<p>Top-down</p>
<ul>
<li>Enumerate business objects
<ul>
<li>Sensitive data</li>
<li>Privileged functionality</li>
</ul>
</li>
</ul>
<p>Bottom-up</p>
<ul>
<li>Enumerate application entities
<ul>
<li>Sensitive data</li>
<li>Privileged functionality</li>
</ul>
</li>
</ul>
<p>Look for</p>
<ul>
<li>Middleware</li>
<li>Open source</li>
<li>Frameworks</li>
</ul>
<p><span style="text-decoration: underline;"><strong>1.2 - Identify Application Attack Surface</strong></span></p>
<ul>
<li>Are there different privilege levels?</li>
<li>Connectivity between services and processes</li>
</ul>
<p><span style="text-decoration: underline;"><strong>1.3 - Annotate with Design Patterns</strong></span></p>
<ul>
<li>Are there pieces that whitebox testings is unable to analyze?</li>
<li>What types of frameworks is the application using?</li>
<li>Where are there command patterns?</li>
<li>Where is there an inversion of control?</li>
</ul>
<p><span style="text-decoration: underline;"><strong>1.4 - Consider Patterns' Responsibilities</strong></span></p>
<ul>
<li>Document specific standards for implementing each responsibility</li>
<li>List out each pattern, piece of app, and associated standards</li>
</ul>
<p><strong>1.5 - Enumerate Potential Failures in Design Elements</strong></p>
<p><span style="text-decoration: underline;"><strong>1.6 - Find Key Structural Componenets</strong></span></p>
<p>Component diagrams show critical choke points for security controls</p>
<p><span style="text-decoration: underline;"><strong>1.7 - Identify Frameworks</strong></span></p>
<p>Showing frameworks indicates where important service contracts exist 'up' and 'down'</p>
<p><strong>1.8 - Explicitly Identify Controls</strong></p>
<p><span style="text-decoration: underline;"><strong>2 - Identify Assets</strong></span></p>
<p><span style="text-decoration: underline;"><strong>2.1 - Identify Critical Data Assets</strong></span></p>
<ul>
<li>Do I have PII?</li>
<li>Things that proxy for PII like sessions?</li>
</ul>
<p><strong>2.2 - Identify Interfaces as Proxies for Data</strong></p>
<p><span style="text-decoration: underline;"><strong>2.3 - Identify Assets flow through the System</strong></span></p>
<ul>
<li>Assets exist not only in rest, but also flow through the system</li>
<li>Think about where there are points you could stop the data from going</li>
</ul>
<p><strong>2.4 - Identify Critical Application Entities</strong></p>
<p><span style="text-decoration: underline;"><strong>2.5 - Identify 'Intermediate' Asset Objectives</strong></span></p>
<p>Identify:</p>
<ul>
<li>Sensitive data</li>
<li>Privileged function</li>
</ul>
<p>Look out for:</p>
<ul>
<li>Proxies, facades, etc</li>
<li>Services</li>
<li>UI vs implementation</li>
<li>Aggressive caching scheme</li>
</ul>
<p><span style="text-decoration: underline;"><strong>2.6 - Identify Equivalence-classes</strong></span></p>
<ul>
<li>In essence an escalation of privilege connector</li>
<li>Ex: Putting username and password and password reset questions on the same page puts them on the same equivalence-class without reauthentication and defeats the security control</li>
</ul>
<p><span style="text-decoration: underline;"><strong>3 - Identify Threat Agents</strong></span></p>
<p><span style="text-decoration: underline;"><strong>3.1 - Anchor Threats in Use Cases</strong></span></p>
<ul>
<li>What is the dumbest things that a user can do?</li>
<li>What is the most malicious thing a user can do?</li>
</ul>
<p><span style="text-decoration: underline;"><strong>4.1 - Identity Principal Resolution</strong></span></p>
<ul>
<li>Arrows indicate resolution of principal/assertion propagation</li>
</ul>
<p><strong>4.2 - Place Threats on Diagram</strong></p>
<p><span style="text-decoration: underline;"><strong>4.3 - Show Authorization in Structure</strong></span></p>
<ul>
<li>Coloration shows authorization by role</li>
<li>Color modules by who you would need to be to access them and look where the colors change</li>
<li>Has never NOT found a vulnerability for John</li>
</ul>
<p><span style="text-decoration: underline;"><strong>5 - Enumerate Doomsday Impacts</strong></span></p>
<p><span style="text-decoration: underline;"><strong>5.1 - Assign Threats Malicious Intent</strong></span></p>
<ul>
<li>What is each Threat's motivation?</li>
<li>What would drive escalation?</li>
<li>Why would each try beyond the first hurdle?</li>
</ul>
<p><strong>5.2 - Instanstiate Doomsday Attack</strong></p>
<p><span style="text-decoration: underline;"><strong>6.1 - Add in Misuse Cases</strong></span></p>
<p>Convert Actors to Threats</p>
<ul>
<li>Abuse - Make actors behave stupidly</li>
<li>Misuse - Make actors deviant/evil</li>
</ul>
<p><strong>6.2 - 'Cache' Misuse in a 'Cookbook'</strong></p>
<p><span style="text-decoration: underline;"><strong>7 - Enumerate Attack Vectors</strong></span></p>
<p><strong>7.1 - Pilfer technology-specific security standards</strong></p>
<p><strong>7.2 - Pilfer community resources</strong></p>
<p><strong>7.3 - Pass technology-specific resources as your own</strong></p>
<ul>
<li>When testing finds an attack:
<ul>
<li>First, decide if its impact warrants further exploration</li>
<li>Are additional impacts possible?</li>
<li>Consider what conceptual goals the attack supports</li>
<li>Then consider who could launch the attack against the application</li>
</ul>
</li>
</ul>
<ul>
<li>After analysis converges, iterate secure design</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.webadminblog.com/index.php/2009/11/12/threat-modeling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OWASP Live CD: An open environment for Web Application Security</title>
		<link>http://www.webadminblog.com/index.php/2009/11/12/owasp-live-cd-an-open-environment-for-web-application-security/</link>
		<comments>http://www.webadminblog.com/index.php/2009/11/12/owasp-live-cd-an-open-environment-for-web-application-security/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 21:45:43 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[OWASP AppSec DC 2009]]></category>
		<category><![CDATA[Web Application Security]]></category>
		<category><![CDATA[cd]]></category>
		<category><![CDATA[live]]></category>
		<category><![CDATA[livecd]]></category>
		<category><![CDATA[owasp]]></category>

		<guid isPermaLink="false">http://www.webadminblog.com/?p=313</guid>
		<description><![CDATA[General Goals Going Forward Showcase great OWASP projects Provide the best, freely distributable application security tools/documents Ensure that the tools provided are easy to use as possible Continue to document how to use the tools and how the modules were created Align the tools with the OWASP Testing Guide v3 to provide maximum coverage Awesome [...]]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration: underline;"><strong>General Goals Going Forward<br />
</strong></span></p>
<ul>
<li>Showcase great OWASP projects</li>
<li>Provide the best, freely distributable application security tools/documents</li>
<li>Ensure that the tools provided are easy to use as possible</li>
<li>Continue to document how to use the tools and how the modules were created</li>
<li>Align the tools with the OWASP Testing Guide v3 to provide maximum coverage</li>
<li>Awesome training environment</li>
</ul>
<p>330,081 total downloads as of 10/5/2009</p>
<p>~5,094 GB of bandwidth since launch (7/2008)</p>
<p>Most downloads in 1 month = 81,607 (3/2009)</p>
<p><span style="text-decoration: underline;"><strong>Available Tools: 26 "Significant"</strong></span></p>
<ul>
<li>Web Scarab</li>
<li>Web Goat</li>
<li>CAL9000</li>
<li>JBroFuzz</li>
<li>WSFuzzer</li>
<li>Wapiti</li>
<li>Burp Suite</li>
<li>Paro</li>
<li>Spike Proxy</li>
<li>Rat Proxy</li>
<li>w3af</li>
<li>Grendel Scan</li>
<li>Nikto</li>
<li>nmap</li>
<li>Zenmap</li>
<li>sqlmap</li>
<li>SQL Brute</li>
<li>Metasploit</li>
<li>....</li>
</ul>
<p><span style="text-decoration: underline;"><strong>OWASP Documents</strong></span></p>
<ul>
<li>Testing Guide v2 &amp; v3</li>
<li>CLASP</li>
<li>Top 10 for 2007</li>
<li>Top 10 for Java Enterprise Edition</li>
<li>AppSec FAQ</li>
<li>Books (CLASP, Top 10 2007, Top 10 + Testing + Legal, WebGoat and Web Scarab, Guide 2.0, Code Review)</li>
<li>WASC Threat Classification</li>
<li>OSTTMM</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Where are we going?</strong></span></p>
<ul>
<li>Project Tindy (Live CD installed to a virtual hard drive, persistence, VMware, VirtualBox, and Paralles)</li>
<li>Project Aqua Dog (OWASP Live CD on a USB drive, VM install + VM engine + USB drive = mobile app sec platform, currently testing, Qemu is the current VM engine)</li>
<li>Much easier URL - AppSecLive.org</li>
<li>Community site around OWASP Live CD</li>
<li>Online Tool DB (331+ tools)</li>
<li>New release will be based on Ubuntu instead of SLAX</li>
<li>Create .deb packages for every tool</li>
<li>Create a repository for packages</li>
<li>Add dependency info to packages</li>
<li>Brings the 26,000+ existing packages to the Live CD</li>
<li>More fun cool stuff like Wubi (install Ubuntu onto an existing windows desktop to be able to dual-boot without repartitioning windows)</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Design Goals</strong></span></p>
<ul>
<li>Easy for users to keep updated</li>
<li>Easy for project lead to keep updated</li>
<li>Easy to produce releases (every 6 months)
<ul>
<li>Crank out new .debs when new tool releases</li>
<li>Continually updating repository</li>
</ul>
</li>
<li>Focused on just application security - not general pen testing
<ul>
<li>Both dynamic and static tools</li>
<li>Developer tools also</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>OWASP Education Project</strong></span></p>
<ul>
<li>Natural ties between these projects
<ul>
<li>Already being used for training classes</li>
<li>Need to coordinate efforts to make sure critical pieces aren't missing form the OWASP Live CD</li>
<li>Training environment could be customized for a particular class thanks to the individual modules
<ul>
<li>Student gets to take the environment home</li>
</ul>
</li>
<li>As more modules come online, even more potential for cross pollination</li>
<li>Builder tools/docs only expand its reach</li>
<li>Kiosk mode?</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Crazy Pie in the Sky Idea</strong></span></p>
<ul>
<li>.deb package + auto update + categories = CD profiles</li>
<li>Allows someone to customize the OWASP Live CD to their needs</li>
<li>Example Profiles:
<ul>
<li>Whitebox testing</li>
<li>Blackbox testing</li>
<li>Static analysis</li>
<li>Targe specific (Java, .Net)</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>What have you done for me lately?</strong></span></p>
<ul>
<li>For Testers/QA testers
<ul>
<li>Wide array of tools, preconfigured and ready to go</li>
<li>Nice "jump kit" to keep in your laptop bag</li>
<li>Great platform to test or learn the tools</li>
</ul>
</li>
<li>For App Sec Professionals
<ul>
<li>Both dynamic and static tool coverage</li>
<li>Ability to customize the job your on</li>
</ul>
</li>
<li>For Trainers
<ul>
<li>Ready to go environment for students</li>
<li>Ability to customize for the class</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Get Involved</strong></span></p>
<ul>
<li>Join the mailing list</li>
<li>Post on hte AppSecLive.org forums</li>
<li>Download an ISO or VM
<ul>
<li>Complain or praise, suggest improvements</li>
<li>Submit a bug to the Google Code site</li>
</ul>
</li>
<li>Create a deb package of a tool
<ul>
<li>How I create the debs will be documented, command by command and I'll answer questions gladly</li>
</ul>
</li>
<li>Suggest missing tools, docs, or links</li>
<li>Do a screencast of one of the tools being used on the OWASP Live CD</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Learn More</strong></span></p>
<ul>
<li>Google "OWASP Live CD"</li>
<li>Download &amp; Community Site (http://AppSecLive.org)</li>
</ul>
<p>Everything is stored in /opt/owasp</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webadminblog.com/index.php/2009/11/12/owasp-live-cd-an-open-environment-for-web-application-security/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The ESAPI Web Application Firewall</title>
		<link>http://www.webadminblog.com/index.php/2009/11/12/the-esapi-web-application-firewall/</link>
		<comments>http://www.webadminblog.com/index.php/2009/11/12/the-esapi-web-application-firewall/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 20:55:54 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[OWASP AppSec DC 2009]]></category>
		<category><![CDATA[Web Application Security]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[esapi]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[owasp]]></category>
		<category><![CDATA[waf]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.webadminblog.com/?p=309</guid>
		<description><![CDATA[This presentation was by Arshan Dabirsiaghi and was about the OWASP ESAPI Web Application Firewall (WAF) project.  My notes are below: WAF Fallacies (at least in regards to OWASP ESAPI WAF) WAFs add attack surface WAFs can create culture problems WAFs can't fix business logic vulnerabilities WAFs are way too expensive WAFs complicate networks Why [...]]]></description>
			<content:encoded><![CDATA[<p>This presentation was by Arshan Dabirsiaghi and was about the OWASP ESAPI Web Application Firewall (WAF) project.  My notes are below:</p>
<p><span style="text-decoration: underline;"><strong>WAF Fallacies (at least in regards to OWASP ESAPI WAF)</strong></span></p>
<ul>
<li>WAFs add attack surface</li>
<li>WAFs can create culture problems</li>
<li>WAFs can't fix business logic vulnerabilities</li>
<li>WAFs are way too expensive</li>
<li>WAFs complicate networks</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Why fix in ESAPI WAF vs Fix in code?</strong></span></p>
<ul>
<li>Changing in ESAPI WAF is just a text file</li>
<li>Shorter gap between time discovered and WAF fix vs code fix</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Advantages of WAF</strong></span></p>
<ul>
<li>Performance - Only your rules are checked, plus state is already managed by the app server</li>
<li>Capability - being closer to the app lets us do more</li>
<li>Process - Rules are closer to application owner, shortening discovery-to-patch time, also fix-to-patch-removal time</li>
</ul>
<p>Principle: Make common tasks easy, uncommon tasks possible</p>
<p>General virtual patching functionality is easy to understand</p>
<p>Ability to write custom script rules as well "bean-shell-rules"<br />
Fixing Injection Flaws is easy</p>
<p>Can fix business logic flaws with the WAF (missing authentication, missing functional access control, missing data layer access control)</p>
<p>Can add "outbound" security as well</p>
<ul>
<li>Add anti-clickjacking header</li>
<li>Set uniform content-type</li>
<li>Add HttpOnly flag</li>
<li>Add secure flag</li>
<li>Detect outbound information</li>
<li>Replace outbound information</li>
</ul>
<p>Takes advantage of early failing to make rules as optimized as possible</p>
<p>Now we see the tool demonstrated with several different vulnerabilities in a real-world application (JForum):</p>
<ul>
<li>Cross-Site Scripting Flaw (JForum XSS flaw is unable to be fixed with a WAF because of dynamic URLs)</li>
<li>Unchecked Redirect</li>
<li>Add HttpOnly</li>
<li>Add anti-clickjacking header</li>
<li>Privilege escalation</li>
</ul>
<p><span style="text-decoration: underline;"><strong>3 Different WAF Modes</strong></span></p>
<ul>
<li>Log</li>
<li>Block</li>
<li>Redirect</li>
</ul>
<p>Latency with all of the rules turned on is about 5%.  With selected rules is closer to 0%.  Basically an order of n magnitude where n is the number of rules enabled.  Comes out to milliseconds.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webadminblog.com/index.php/2009/11/12/the-esapi-web-application-firewall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Defending Yourself: Integrating Real Time Defenses into Online Applications</title>
		<link>http://www.webadminblog.com/index.php/2009/11/12/defending-yourself-integrating-real-time-defenses-into-online-applications/</link>
		<comments>http://www.webadminblog.com/index.php/2009/11/12/defending-yourself-integrating-real-time-defenses-into-online-applications/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 19:55:53 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[OWASP AppSec DC 2009]]></category>
		<category><![CDATA[Web Application Security]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[appsensor]]></category>
		<category><![CDATA[coates]]></category>
		<category><![CDATA[defenses]]></category>
		<category><![CDATA[detection]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[waf]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.webadminblog.com/?p=307</guid>
		<description><![CDATA[This presentation was by Michael Coates, the AppSensor Project Lead.  Michael works as a Senior Application Security Engineer at Aspect Security.  AppSensor is a real time defense system with the goal being to protect an application by detecting who is bad and getting rid of them before they do bad things.  My notes from this [...]]]></description>
			<content:encoded><![CDATA[<p>This presentation was by Michael Coates, the AppSensor Project Lead.  Michael works as a Senior Application Security Engineer at Aspect Security.  AppSensor is a real time defense system with the goal being to protect an application by detecting who is bad and getting rid of them before they do bad things.  My notes from this session are below:</p>
<p><span style="text-decoration: underline;"><strong>Agenda</strong></span></p>
<ul>
<li>AppSensor Project</li>
<li>Malicious Attackers</li>
<li>Application Worms</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Detecting Attacks the Right Way</strong></span></p>
<ul>
<li>Integration
<ul>
<li>Detect INSIDE the application</li>
<li>Understand business logic</li>
</ul>
</li>
<li>Effectiveness
<ul>
<li>Minimal false positives</li>
<li>Immediate response</li>
</ul>
</li>
<li>Effort
<ul>
<li>Automatic detection</li>
<li>No manual work required</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Detection Outside the Application (WAF)<br />
</strong></span></p>
<ul>
<li>Application context not available</li>
<li>No concept of access violations</li>
<li>Custom application + Generic Solution != success</li>
<li>Ex: Changing the account ID in /viewAccount?id=1002</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Inside the Application is Best</strong></span></p>
<ul>
<li>Understand application &amp; business context</li>
<li>Integration with authentication &amp; user store</li>
</ul>
<p><span style="text-decoration: underline;"><strong>How Does AppSensor Protect the App?</strong></span></p>
<ul>
<li>Take many requests for an attacker to find a vulnerability</li>
<li>Takes fewer requests by AppSensor to determine that the user is malicious</li>
</ul>
<p><span style="text-decoration: underline;"><strong>AppSensor is Faster than Attacker</strong></span></p>
<ul>
<li>User identified as malicious and blocked before a vulnerability is found</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Categories of Detection</strong></span></p>
<ul>
<li>Request</li>
<li>Authentication</li>
<li>Access Control</li>
<li>Session</li>
<li>Input</li>
<li>Encoding</li>
<li>Command Injection</li>
<li>File IO</li>
<li>User Trend</li>
<li>System Trend</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Attack Detection: Real vs Cyber World</strong></span></p>
<ul>
<li>Why do bank robbers get caught?</li>
<li>Why don't hackers get caught?</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Let's Change Things - Applications Should...</strong></span></p>
<ul>
<li>Detect attacks</li>
<li>Understand normal use vs suspicious use</li>
<li>Instantly identify attackers</li>
<li>Shutdown attackers in real time</li>
<li>Modify application accessibility for defense</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Detecting Malicious Users</strong></span></p>
<ul>
<li>Many malicious attacks are obvious and not "user error"
<ul>
<li>POST when expecting GET</li>
<li>Tampering with headers</li>
<li>Submissions of XSS attack</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Detecting Malicious Users</strong></span></p>
<ul>
<li>Bypassing client side input validation</li>
<li>Transaction using functionality not visible to user role</li>
<li>Multiple access control violations</li>
<li>Change of user agent midsession</li>
<li>Double encoded data</li>
</ul>
<p><span style="text-decoration: underline;"><strong>The Code</strong></span></p>
<ul>
<li>Leverages ESAPI!</li>
<li>3 lines to setup AppSensor</li>
<li>2 lines per AppSensor detection point</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Setting up AppSensor</strong></span></p>
<ol>
<li>Configure response action object (log logout, account lock)</li>
<li>Create AppSensorIntrusionDetector with response action object</li>
<li>Set ESAPI intrusion detector</li>
</ol>
<p><span style="text-decoration: underline;"><strong>Defining Response Policies</strong></span></p>
<ul>
<li>ESAPI.properties file</li>
<li>Define
<ul>
<li>Threshold count</li>
<li>Interval of events</li>
<li>Response action</li>
<li>Per exception type or aggregate</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>2 Lines to Use AppSensor</strong></span></p>
<ol>
<li>Check for "maliciousness"</li>
<li>Create new AppSensorException</li>
</ol>
<p><span style="text-decoration: underline;"><strong>Understanding the Intrusion Exception</strong></span></p>
<p>new AppSensorIntrusion Exception(</p>
<ul>
<li>request.getServletPath(),</li>
<li>"ACE1",</li>
<li>"User Message",</li>
<li>"Direct object tampering with ..."</li>
</ul>
<p>);</p>
<p><span style="text-decoration: underline;"><strong>AppSensor vs Scanners</strong></span></p>
<ul>
<li>Tools attempt 10,000s of generic attacks</li>
<li>AppSensor stops automated scans nearly instantly</li>
</ul>
<p><span style="text-decoration: underline;"><strong>AppSensor vs Human Attackers</strong></span></p>
<ul>
<li>Very difficult for attacker</li>
<li>Requires advanced obfuscation for each attack</li>
<li>Multiple probes == detection</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Application Worms on the Rise</strong></span></p>
<ul>
<li>Twitter Worm</li>
<li>MySpace Samy WOrm</li>
<li>Huge damages for site
<ul>
<li>Remediation</li>
<li>Cleanup</li>
<li>Bad PR</li>
<li>Infected Users</li>
</ul>
</li>
<li>Leverage XSS and CSRF</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Detecting/Preventing an Application Worm</strong></span></p>
<ul>
<li>Can you find/fix all XSS?</li>
<li>Pattern matching easily foiled</li>
<li>Block the common factor!
<ul>
<li>Worms use XSS and CSRF for propagation</li>
<li>1000% usage increase -&gt; problem</li>
<li>Our example: updateProfile, updateStatus, updateName</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Case Study: Samy</strong></span></p>
<ul>
<li>MySpace Application Worm</li>
<li>XSS worm embedded in User Profile</li>
<li>Exponential Growth of Samy's friends</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Samy vs AppSensor</strong></span></p>
<ul>
<li>AppSensor detects uptick in addFriend usage</li>
<li>Compares against trended info</li>
<li>Automatic response initiated
<ul>
<li>Alert admin +200% add friend usage</li>
<li>Alerts admin 2nd time +500% add friend usage</li>
<li>Automatically shuts down add friend feature</li>
</ul>
</li>
<li>Result
<ul>
<li>Worm contained</li>
<li>Add friend temporarily disabled</li>
<li>Site stays up</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Benefits of Trend Monitoring</strong></span></p>
<ul>
<li>Detection of
<ul>
<li>Application worms</li>
<li>Scripted attacks/probing</li>
<li>CSRF attacks</li>
</ul>
</li>
<li>Alerting of excessive activity</li>
<li>Selective feature shutdown for overall stability</li>
</ul>
<p><span style="text-decoration: underline;"><strong>AppSensor in Action</strong></span></p>
<ul>
<li>Demo social networking app</li>
<li>Defended with AppSensor trend monitoring</li>
</ul>
<p><span style="text-decoration: underline;"><strong>What's Under the Hood?</strong></span></p>
<ul>
<li>REST communication between AppSensor &amp; App</li>
<li>Support Response Actions (warn user, logout user, disable user, etc)</li>
</ul>
<p><span style="text-decoration: underline;"><strong>AppSensor Brain</strong></span></p>
<ul>
<li>Drools - Rule Based System</li>
<li>Support for complex rule sets - much more than just counting feature usage</li>
<li>Evaluates objects in Drools memory</li>
</ul>
<p><span style="text-decoration: underline;"><strong>The Exploit</strong></span></p>
<ul>
<li>XSS infects victim's "Status" with worm</li>
<li>CSRF adds victim as friend of Charlie</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Defend with AppSensor</strong></span></p>
<ul>
<li>AppSensor Policy
<ul>
<li>Notify admin if events &gt; 5</li>
<li>Disable service if events &gt; 10</li>
</ul>
</li>
<li>AppSensor notices anomaly - alerts admin</li>
<li>After 10 events AppSensor disables just that feature of the site</li>
<li>Users protected, worm contained, site stays up</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Trend Monitoring Benefits</strong></span></p>
<ul>
<li>Auto detection of attacks</li>
<li>...</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.webadminblog.com/index.php/2009/11/12/defending-yourself-integrating-real-time-defenses-into-online-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Development Issues within AJAX Applications: How to Divert Threats</title>
		<link>http://www.webadminblog.com/index.php/2009/11/12/development-issues-within-ajax-applications-how-to-divert-threats/</link>
		<comments>http://www.webadminblog.com/index.php/2009/11/12/development-issues-within-ajax-applications-how-to-divert-threats/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 19:05:00 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[OWASP AppSec DC 2009]]></category>
		<category><![CDATA[Web Application Security]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[asynchronous]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[issues]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[threats]]></category>
		<category><![CDATA[vulnerabilities]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.webadminblog.com/?p=305</guid>
		<description><![CDATA[This presentation was by Lars Ewe, CTO of Cenzic on AJAX applications and trying to explore the different implications of running AJAX in your environment.  My notes are below: Agenda What is AJAX? AJAX and Web App Security AJAX and Test Automation Vulnerability Examples: XSS, CSRF, &#38; JavaScript Hijacking AJAX Best Security Practices Demo Q&#38;A [...]]]></description>
			<content:encoded><![CDATA[<p>This presentation was by Lars Ewe, CTO of Cenzic on AJAX applications and trying to explore the different implications of running AJAX in your environment.  My notes are below:</p>
<p><span style="text-decoration: underline;"><strong>Agenda</strong></span></p>
<ul>
<li>What is AJAX?</li>
<li>AJAX and Web App Security</li>
<li>AJAX and Test Automation</li>
<li>Vulnerability Examples: XSS, CSRF, &amp; JavaScript Hijacking</li>
<li>AJAX Best Security Practices</li>
<li>Demo</li>
<li>Q&amp;A</li>
</ul>
<p><span style="text-decoration: underline;"><strong>What is AJAX?</strong></span></p>
<ul>
<li>Asynchronous JavaScript And XML</li>
<li>AJAX allows for a new generation of more dynamic, more interactive, faster Web 2.0 applications</li>
<li>AJAX leverages existing technologies, such as DHTML, CSS&lt; DOM, JSON, and the (a)synchronous XMLHTTPRequest (XHR)</li>
<li>Not just a set of technologies, but a new Web application development approach and methodology</li>
<li>XHR allows for (a)synchronous server requests without the need for a full page reload</li>
<li>XHR "downstream" payload can be
<ul>
<li>XML, JSON, HTML/JavaScript snippets, plain text, serialized data, basically pretty much anything...</li>
</ul>
</li>
<li>Responses often get further processed using JavaScript and result in dynamic web page content changes through DOM modifications</li>
</ul>
<p><span style="text-decoration: underline;"><strong>AJAX Code Example</strong></span></p>
<p><code>xhr = new XMLHttprequest();<br />
xhr.open("GET", AJAX_call?foo-bar, true);<br />
xhr.onreadystatechange = processResponse;<br />
xhr.send(null);<br />
function processResponse() {<br />
if (xhr.readyState == 4) {<br />
if (request.status == 200) {<br />
response = xhr.responseText;<br />
...<br />
}<br />
}<br />
}</code></p>
<p><span style="text-decoration: underline;"><strong>XHR and the Same Origin Policy</strong></span></p>
<ul>
<li>Same origin policy is a key browser security mechanism
<ul>
<li>To prevent any cross-domain data leakage, etc</li>
<li>With JavaScript it doesn't allow JavaScript from origin A to access content/data from origin B</li>
<li>Origin refers to the domain name, port, and protocol</li>
</ul>
</li>
<li>In the case of XHR, the same origin policy does not allow for any cross-domain XHR requests
<ul>
<li>Developers often don't like this at all!</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Common Cross Domain Workarounds</strong></span></p>
<p>Cross-domain access is often still implemented by various means, such as:</p>
<ul>
<li>Open / Application (server-based) proxies</li>
<li>Flash &amp; Java Applets (depending on crossdomain.xml)
<ul>
<li>Ex: FlashXMLHttpRequest by Julien Couvreur</li>
</ul>
</li>
<li>RESTful web service with JavaScript callback and JSON response
<ul>
<li>EX: JSONscriptRequest by Jason Levitt</li>
</ul>
</li>
</ul>
<p><span style="text-decoration: underline;"><strong>AJAX Frameworks</strong></span></p>
<ul>
<li>AJAX frameworks are often categorized as either "Client" or "Proxy/Server" framework</li>
<li>"Proxy/Server" frameworks sometimes result in unintended method/functionality exposure</li>
<li>Beware of any kind of "Debugging mode" (Ex: Direct Web Remoting (DWR) debug=true)</li>
<li>Remember: Attackers can easily "fingerprint" AJAX frameworks</li>
<li>Beware of JavaScript Hijacking
<ul>
<li>Don't use HTTP GET for "upstream"</li>
<li>Prefix "downstream" JavaScript with "while(1);"</li>
</ul>
</li>
</ul>
<p style="padding-left: 30px;"><span style="text-decoration: underline;"><strong>AJAX and Web App Security</strong></span></p>
<ul>
<li>AJAX potentially increases the attack surface
<ul>
<li>More "hidden" calls mean more potential security holes</li>
</ul>
</li>
<li>AJAX developers sometimes pay less attention to security, due to it's "hidden" nature
<ul>
<li>Basically the old mistake of security by obscurity</li>
</ul>
</li>
<li>AJAX developers sometimes tend to rely on client side validation
<ul>
<li>An approach that is just as flawed with or without AJAX</li>
</ul>
</li>
<li>Mash-up calls/functionality are often less secure by design
<ul>
<li>3rd party APIs (Ex: feeds, blogs, search APIs, etc) are often designed with ease of use, not security in mind</li>
<li>Mash-ups often lack clear security boundaries (who validates, who filters, who encodes/decodes, etc)</li>
<li>Mash-ups often result in untrusted cross-domain access workarounds</li>
</ul>
</li>
<li>AJAX sometimes promotes dynamic code (JavaScript) execution of untrusted response data</li>
</ul>
<p><span style="text-decoration: underline;"><strong>AJAX / Web 2.0 and Test Automation</strong></span></p>
<ul>
<li>Spidering is more complex than just processing ANCHOR HREF's; various events need to be simulated (Ex: mouseover, keydown, keyup, onclick, onfocus, onblur, etc)</li>
<li>Timer events and dynamic DOM changes need to be observed</li>
<li>Use of non-standard data formats for both requests and responses make injection and detection hard to automate</li>
<li>Page changes after XHR requests can sometimes be delayed</li>
<li>In short, you need to have browser like behavior (JavaScript engine, DOM &amp; event management, etc)</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Cross-Site Scripting (XSS)</strong></span></p>
<ul>
<li>AJAX is changing the game a little bit since the script tag may already be there, just need to look for JSON or JavaScript snippets to inject yourself into</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Cross-Site Request Forgery (CSRF)</strong></span></p>
<ul>
<li>Want to send a token for AJAX requests as well</li>
</ul>
<p><span style="text-decoration: underline;"><strong>JavaScript Hijacking</strong></span></p>
<ul>
<li>Attacker code (override Array constructor)</li>
<li>Render the JavaScript on the wire useless to anyone who doesn't have access to the code itself</li>
<li>The attacker cannot sanitize the JavaScript since they do not have access to the code</li>
</ul>
<p><span style="text-decoration: underline;"><strong>AJAX Best Security Practices</strong></span></p>
<p>Pretty much all the usual Web app security best practices apply:</p>
<ul>
<li>Analyze and know your security boundaries and attack surfaces</li>
<li>Beware of reliance on client-side security measures</li>
<li>Assume the worst case scenario for all 3rd party interations
<ul>
<li>3rd parties can inherently not be trusted!</li>
</ul>
</li>
<li>Be extremely careful when circumventing same origin policy</li>
<li>Avoid/limit the use of dynamic code/eval()</li>
<li>Beware of JavaScript Hijacking</li>
<li>Implement anti-CSRF defenses</li>
</ul>
<ul>
<li></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.webadminblog.com/index.php/2009/11/12/development-issues-within-ajax-applications-how-to-divert-threats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
