tag:blogger.com,1999:blog-70235835692071990662026-03-19T21:11:35.091-10:00ManicodeMusings on Software Engineering and Application Security from Jim ManicoJim Manicohttp://www.blogger.com/profile/14447468633342290543[email protected]Blogger89125tag:blogger.com,1999:blog-7023583569207199066.post-43238450040633713682014-07-14T12:05:00.002-10:002019-11-23T11:16:12.296-10:00OWASP Top Ten Proactive Controls<div dir="ltr" style="text-align: left;" trbidi="on">
<pre wrap=""><span style="font-family: "trebuchet ms" , sans-serif;">Jim Bird (<a href="mailto:[email protected]">[email protected]</a>) just completed a 10-post blog series on the various OWASP Top Ten Proactive Controls. These articles have been cross-posted up on DZone and Java Code Geeks. Two of the posts (on logging, surprisingly, and on including security in requirements) have made "Big Links" on DZone so far and have been syndicated. The posts have already reached a couple of thousand developers and growing, so that's a good thing!
Here are the complete set of links:
Parameterize Database Queries
<a href="http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-to-make-your-app.html">http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-to-make-your-app.html</a>
Encoding Data
<a href="http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-to-make-your-app_9.html">http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-to-make-your-app_9.html</a>
Validate Input
<a href="http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-to-make-your-app_11.html">http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-to-make-your-app_11.html</a>
</span></pre>
<pre wrap=""></pre>
<pre wrap=""><span style="font-family: "trebuchet ms" , sans-serif;">Access Control
<a href="http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-to-make-your-app_16.html">http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-to-make-your-app_16.html</a>
Authentication Controls
<a href="http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-as-developer-to.html">http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-as-developer-to.html</a>
</span></pre>
<pre wrap=""></pre>
<pre wrap=""><span style="font-family: "trebuchet ms" , sans-serif;">Protect Data and Privacy
<a href="http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-as-developer-to_23.html">http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-as-developer-to_23.html</a>
Logging and Intrusion Detection
<a href="http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-as-developer-to_30.html">http://swreflections.blogspot.ca/2014/06/10-things-you-can-do-as-developer-to_30.html</a>
Secure Frameworks: Leverage other people's code (Carefully)
<a href="http://swreflections.blogspot.ca/2014/07/10-things-you-can-do-as-developer-to.html">http://swreflections.blogspot.ca/2014/07/10-things-you-can-do-as-developer-to.html</a>
Start with Requirements:
<a href="http://swreflections.blogspot.ca/2014/07/10-things-you-can-do-as-developer-to_7.html">http://swreflections.blogspot.ca/2014/07/10-things-you-can-do-as-developer-to_7.html</a>
Design Security In:
<a href="http://swreflections.blogspot.ca/2014/07/10-things-you-can-do-to-as-developer-to.html">http://swreflections.blogspot.ca/2014/07/10-things-you-can-do-to-as-developer-to.html</a></span></pre>
<pre wrap=""></pre>
<pre wrap=""></pre>
<pre wrap=""><span style="font-family: "trebuchet ms" , sans-serif;">Great work, Jim Bird!</span></pre>
<pre wrap=""><span style="font-family: "trebuchet ms" , sans-serif;">Aloha,</span></pre>
<pre wrap=""><span style="font-family: "trebuchet ms" , sans-serif;">Jim Manico</span></pre>
</div>
Jim Manicohttp://www.blogger.com/profile/14447468633342290543[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-83241772333223390592013-12-13T13:03:00.002-10:002013-12-13T13:03:14.809-10:00Reflections on Password Complexity<div dir="ltr" style="text-align: left;" trbidi="on">
<pre wrap=""><span style="font-family: Arial, Helvetica, sans-serif;">Michael Coates started an interesting thread on the OWASP Leaders list about password policy complexity guidance. <a href="http://lists.owasp.org/pipermail/owasp-leaders/2013-December/010492.html">http://lists.owasp.org/pipermail/owasp-leaders/2013-December/010492.html</a></span></pre>
<pre wrap=""><span style="font-family: Arial, Helvetica, sans-serif;">
</span></pre>
<pre wrap=""><span style="font-family: Arial, Helvetica, sans-serif;">I think that password policy overall is a failure and we indeed need to update our guidance on this topic.
Password length is the most important mathematical aspect to password policy, so passphrases seem like a good idea. But if your passphrase is a known sentence from a book, or just a collection of dictionary words - then the benefit decreases significantly. Here are some interesting articles that discuss this problem to some degree from the perspective of offline password cracking.
<a class="moz-txt-link-freetext" href="http://arstechnica.com/security/2013/08/thereisnofatebutwhatwemake-turbo-charged-cracking-comes-to-long-passwords/">http://arstechnica.com/security/2013/08/thereisnofatebutwhatwemake-turbo-charged-cracking-comes-to-long-passwords/</a>
<a class="moz-txt-link-freetext" href="http://dashburst.com/bible-hackers-password-cracking/">http://dashburst.com/bible-hackers-password-cracking/</a>
<a class="moz-txt-link-freetext" href="https://bitcointalk.org/index.php?topic=85862.25;wap2">https://bitcointalk.org/index.php?topic=85862.25;wap2</a>
Jeffrey Walton suggested to me that one of the most important aspects to a good password policy is to <b class="moz-txt-star">not</b> allow users to use commonly used passwords; even passwords that fit your corporate password policy. For example, the password Password1! probably would be accepted by most corporate password policies, but it's a dangerously bad and commonly used password. Hackers conduct "reverse brute force attacks" where they take a commonly used but supposedly strong password, and make one attempt against a large list of accounts. This and other reasons have prompted some banks to enforce strong policies on usernames!
I feel like the use of <i>Password Managers</i> is one of the key aspects to secure user password management. I know of several mid-size companies who have or are starting to enforce their use. Bob Lord, the Director of Security at Twitter, has led the charge of enforcing this on the entire Twitter staff. I think this move is a big win for Twitters internal security. </span></pre>
<pre wrap="">
</pre>
<pre wrap=""><span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://news.softpedia.com/news/Hack-in-the-Box-13-Twitter-s-Bob-Lord-Forces-New-Employees-to-Use-Password-Managers-344699.shtml">http://news.softpedia.com/news/Hack-in-the-Box-13-Twitter-s-Bob-Lord-Forces-New-Employees-to-Use-Password-Managers-344699.shtml</a>
Last, any password advice needs to push multi-factor. Poorly misquoting John Steven (as well as taking his quote out of context), "Using passwords to protect your account will help you as much as motorcycle helmets will protect you at high speed."</span></pre>
</div>
Jim Manicohttp://www.blogger.com/profile/14447468633342290543[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-68857577306375896122013-01-14T19:36:00.001-10:002013-01-14T19:37:50.613-10:00SecAppDev 2013, 4-8 March, Leuven, Belgium<div dir="ltr" style="text-align: left;" trbidi="on">
Dear all,
<br />
<br />
We are pleased to announce SecAppDev Leuven 2013, an intensive one-week course in secure application development. The course is organized by secappdev.org, a non-profit organization that aims to broaden security awareness in the development community and advance secure software engineering practices. The course is a joint initiative with KU Leuven
and Solvay Brussels School of Economics and Management.<br />
<br />
SecAppDev 2013 is the 9th edition of our widely acclaimed course, attended by an international audience from a broad range of industries including financial services, telecom, consumer electronics and media and taught by leading software security experts including<br />
<ul style="text-align: left;">
<li>Prof. dr. ir. Bart Preneel who heads COSIC, the renowned crypto lab. </li>
<li>Ken van Wyk, co-founder of the CERT Coordination Center and widely acclaimed author and lecturer. </li>
<li>Dr. Steven Murdoch of the University of Cambridge Computer Laboratory's security group, well known for his research in anonymity and banking system security. </li>
<li>Jim Manico, an OWASP board member. </li>
<li>John Steven, a sought-after architect for high-performance, scalable JEE systems. </li>
</ul>
When we ran our first annual course in 2005, emphasis was on awareness and security basics, but as the field matured and a thriving security training market developed, we felt it was not appropriate to compete as a non-profit organization. Our focus has hence shifted to providing a platform for leading-edge and experimental material from thought leaders in academia and industry. We look toward academics to provide research results that are ready to break into the mainstream and attract people with an industrial background to try out new content and formats.<br />
<br />
The course takes place from March 4th to 8th in the Faculty Club,
Leuven, Belgium.
<br />
<br />
For more information visit the web site: <a class="moz-txt-link-freetext" href="http://secappdev.org/">http://secappdev.org</a>.<br />
<br />
<ul style="text-align: left;">
<li>Places are limited, so do not delay registering to avoid disappointment.</li>
<li>Registration is on a first-come, first-served basis.</li>
<li>A 25% discount is available for Early Bird registration until January 15th.</li>
<li>Alumni, public servants and independents receive a 50% discount.</li>
</ul>
<br />
I hope that we will be able to welcome you or your colleagues to our course.<br />
<br />
Kind regards,
<br />
<br />
Lieven
<br />
<div class="moz-txt-sig">
<span class="moz-txt-tag">-- </span>Lieven Desmet
<br />
<a class="moz-txt-link-freetext" href="http://secappdev.org/">http://secappdev.org</a></div>
</div>
Jim Manicohttp://www.blogger.com/profile/14447468633342290543[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-31191258009127461192013-01-04T14:57:00.003-10:002013-01-09T11:01:34.236-10:00Handling Untrusted JSON Safely<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
JSON (JavaScript Object Notation) is quickly becoming the de-facto way to transport structured text data over the Web, a job also performed by XML. JSON is a limited subset of the object literal notation inherent to JavaScript, so you can think of JSON as just a part of the JavaScript language. As a limited subset of JavaScript object notation, JSON objects can represent simple name-value pairs as well as lists of values.<br />
<br />
BUT with JSON comes JavaScript and with JavaScript comes the potential for JavaScript Injection, the most critical type of <a href="https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)">Cross Site Scripting (XSS)</a>.<br />
<br />
Just like XML, JSON data needs to be parsed to be utilized in software. The two major locations within a Web application architecture where JSON needs to be parsed are in the browser client-side and in application code on the server.<br />
<br />
Parsing JSON can be a dangerous procedure if the JSON text contains <a href="https://www.owasp.org/index.php/Injection_Theory#Untrusted_Data">untrusted data</a>. For example, if you parse untrusted JSON in a browser using the JavaScript "eval" function, and the untrusted JSON text itself contains JavaScript code itself, the code will execute during parse time.<br />
<br />
From <a href="http://www.json.org/js.html">http://www.json.org/js.html</a><br />
<blockquote class="tr_bq">
"To convert a JSON text into an object, you can use the eval() function. eval() invokes the JavaScript compiler. Since JSON is a proper subset of JavaScript, the compiler will correctly parse the text and produce an object structure. The text must be wrapped in parens to avoid tripping on an ambiguity in JavaScript's syntax.<br />
var myObject = eval('(' + myJSONtext + ')'); </blockquote>
<blockquote class="tr_bq">
The eval function is very fast. However, it can compile and execute any JavaScript program, so there can be security issues."</blockquote>
So, the essential question is: <i><u>How can programmers and applications parse untrusted JSON safely?</u></i><br />
<br />
<b>Parsing JSON safely, <i>Client Side</i></b><br />
<br />
The most common safe way to parse JSON safely in a modern browser is to utilize the <a href="http://msdn.microsoft.com/en-us/library/ie/cc836466(v=vs.94).aspx">JSON.parse</a> method inherent to JavaScript. Here is a good reference that describes the state of <a href="http://caniuse.com/#search=JSON.parse">JSON.parse browser support</a>. And for legacy browsers that do not support native JSON parsing, there is always <a href="https://github.com/douglascrockford/JSON-js">Douglas Crockfords JSON parsing library for legacy browsers</a>.<br />
<br />
Parsing JSON in the browser is often the result of an asynchronous request returning JSON to the browser. Another technique that is becoming more common is to embed JSON directly in a Web page server side, and then to parse and render that JSON in the browser. The mechanism of embedding JSON safely in a Web page is described here:<br />
<br />
<a href="https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet#RULE_.233.1_-_HTML_escape_JSON_values_in_an_HTML_context_and_read_the_data_with_JSON.parse">https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet#RULE_.233.1_-_HTML_escape_JSON_values_in_an_HTML_context_and_read_the_data_with_JSON.parse</a><br />
<br />
Step 1 includes embedded JSON on a web page safely through HTML Entity Encoding:<br />
<br />
<blockquote class="tr_bq">
<span style="display:none" id="init_data"><br />
<%= data.to_json %> <-- data is HTML escaped --><br />
</span></blockquote>
<br />
Step 2 and 3 includes decoding the JSON data and then parsing it safely.</div>
<br />
<blockquote class="tr_bq">
<script><br />
// unescapes the content of the span<br />
var jsonText = document.getElementById('init_data').innerHTML; <br />
// parse untrusted JSON safely<br />
var initData = JSON.parse(jsonText);<br />
</script></blockquote>
<br />
<b>Parsing JSON safely, <i>Server Side</i></b><br />
<br />
It's important to use a formal JSON parser when handling untrusted JSON on the server. For example, Java Programmers can utilize the <a href="https://www.owasp.org/index.php/OWASP_JSON_Sanitizer">OWASP JSON Sanitizer</a> for Java. The OWASP JSON Sanitizer project aspires to accomplish the following goals.<br />
<blockquote class="tr_bq">
"Given JSON-like content, converts it to valid JSON. </blockquote>
<blockquote class="tr_bq">
This can be attached at either end of a data-pipeline to help satisfy Postel's principle: </blockquote>
<blockquote class="tr_bq">
<i>Be conservative in what you do, be liberal in what you accept from others</i> </blockquote>
<blockquote class="tr_bq">
<u>Applied to JSON-like content from others, it will produce well-formed JSON that should satisfy any parser you use.</u> </blockquote>
<blockquote class="tr_bq">
<u>Applied to your output before you send, it will coerce minor mistakes in encoding and make it easier to embed your JSON in HTML and XML.</u>"</blockquote>
The OWASP JSON Sanitizer project was created by and is maintained by Mike Samuel, an esteemed member of the Google Application Security Team. For more information on the OWASP JSON Sanitizer, please visit the <a href="http://code.google.com/p/json-sanitizer/">OWASP JSON Sanitizer Google Code page</a>.<br />
<br />
<br />
I hope this article helps you on your way to safer parsing of JSON in your applications. Please drop me a line if you have any questions at <a href="mailto:[email protected]">[email protected].</a><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiePGcBRHHhd6YfAsS6S9OwvfGdR3tpXrs5HOFBUtQjcOyXlJ11pDJZX1vxCfBHrt_K6YB-Ky9AgR0TJ1ZbgEfCGlp8n4h9ojjM-wwrNH540vA_nyLhiGhwENDcR_gPro-j2HHxKSnBYhrX/s1600/Jim+Professional.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiePGcBRHHhd6YfAsS6S9OwvfGdR3tpXrs5HOFBUtQjcOyXlJ11pDJZX1vxCfBHrt_K6YB-Ky9AgR0TJ1ZbgEfCGlp8n4h9ojjM-wwrNH540vA_nyLhiGhwENDcR_gPro-j2HHxKSnBYhrX/s200/Jim+Professional.png" width="174" /></a></div>
<br />
Jim Manico is the VP of Security Architecture for WhiteHat Security, a web security firm. Jim is also a board member for the OWASP foundation where he manages and participates in several projects.<br />
<br />
<br />
<br />
<br /></div>
Jim Manicohttp://www.blogger.com/profile/14447468633342290543[email protected]2tag:blogger.com,1999:blog-7023583569207199066.post-3969615411504450572011-02-13T09:34:00.012-10:002011-02-23T13:47:12.194-10:00Taming the Beast<div>The recent cross-platform numerical parsing DOS bug has been named the "<a href="http://www.theregister.co.uk/2011/02/09/java_floating_point_bug_fixed/">Mark of the Beast</a>". Some claim that this bug was first reported <a href="http://mail.openjdk.java.net/pipermail/core-libs-dev/2011-February/005798.html">as early as 2001</a>.<br /><br />This is a significant bug in (at least) <a href="http://www.exploringbinary.com/why-volatile-fixes-the-2-2250738585072011e-308-bug/comment-page-1/#comment-4645">PHP</a> and Java. Similar issues have effected <a href="http://www.ruby-lang.org/en/news/2009/06/09/dos-vulnerability-in-bigdecimal/">Ruby</a> in the past. This bug has left a number of servers, web frameworks and custom web applications vulnerable to easily exploitable Denial of Service.<br /></div><br />Oracle has <a href="http://www.theregister.co.uk/2011/02/09/java_floating_point_bug_fixed/">patched this vuln</a> but there are several non-Oracle JVM's that have yet to release a patch. Tactical patching may be prudent for environment.<br /><div><br />Here are three filters that may help you tame this beast of a bug.<br /></div><div><br />1) Ryan Barnett deployed a series of mod security rules and documented several options here <a href="http://blog.spiderlabs.com/2011/02/java-floating-point-dos-attack-protection.html">http://blog.spiderlabs.com/2011/02/java-floating-point-dos-attack-protection.html</a><br /></div><div><br />2) <a href="http://blogs.adobe.com/asset/2011/02/year-of-the-snail.html">Bryan Sullivan from Adobe came up with the following Java-based blacklist filter</a>. This rule is actually quite accurate in *rejecting input* in the DOSable JVM numeric range. This fix, while simple, does indeed reject a series of normally good values.<br /></div><div><br /></div><div>public static boolean containsMagicDoSNumber(String s) {</div><div> return s.replace(".", "").contains("2225073858507201");</div><div>}</div><div><br /></div>3) The following data sanitization code came from <a href="http://blog.fortify.com/blog/2011/02/08/Double-Trouble">Brian Chess at HP/Fortify</a>. This approach detects the evil range before trying to call parseDouble and returns the IEEE official value for any double in this most evil range ( 2.2250738585072014E-308 ).<div><br /></div><div>private static BigDecimal bigBad;</div><div>private static BigDecimal smallBad;</div><div><br /></div><div>static {</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>BigDecimal one = new BigDecimal(1);</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>BigDecimal two = new BigDecimal(2);</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>BigDecimal tiny = one.divide(two.pow(1022));</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>// 2^(-1022) 2^(-1076)</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>bigBad = tiny.subtract(one.divide(two.pow(1076))); </div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>//2^(-1022) 2^(-1075)</div><div> <span class="Apple-tab-span" style="white-space: pre;"> </span>smallBad = tiny.subtract(one.divide(two.pow(1075))); </div><div>}</div><div><br /></div>public static Double parseSafeDouble(String input) throws InvalidParameterException {<br /><br /> if (input == null) throw new InvalidParameterException("input is null");<br /> <br /> BigDecimal bd;<br /> try {<br /> bd = new BigDecimal(input);<br /> } catch (NumberFormatException e) {<br /> throw new InvalidParameterException("cant parse number");<br /> }<br /> <br /> if (bd.compareTo(smallBad) >= 0 && bd.compareTo(bigBad) <= 0) {<br /> // if you get here you know you're looking at a bad value. The final<br /> // value for any double in this range is supposed to be the following safe # <br /> //return safe number<br /> System.out.println("BAD NUMBER DETECTED - returning 2.2250738585072014E-308");<br /> return new Double("2.2250738585072014E-308");<br /> }<br /><br /> //safe number, return double value<br /> return bd.doubleValue();<br />}Unknown[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-34243496997937285012011-01-09T08:14:00.002-10:002011-01-09T08:19:45.345-10:00Touchpoints and BSIMM hurt AppSec<div class="comment"> <p>Conjecture: <span style="font-style: italic;">BSIMM and Touchpoints are harmful to developers and organizations seeking cost effective application security based risk reduction</span>. <br /></p> <p>Let’s start with the flaws of Touchpoints:<br /></p> <p>1. Touchpoints make security separate from development<br />2. Touchpoints are all verification, not build secure apps<br />3. Touchpoints are only SDLC (one app), not full boar appsec program planning across an entire application portfolio<br />4. Touchpoints makes security a cost, not an opportunity for improvement in other aspects of software dev<br />5. Touchpoints are negative vulnerability focused, not positive controls centric thinking<br />6. Touchpoints are basically hacking ourselves secure, not assurance evidence based<br />7. Touchpoints are trivial in the sense that they are just a concept with no backing... just a picture and a book. No meat!<br />8. Touchpoints are designed to sell tools - not totally, but somewhat<br />9. Touchpoints are not free and open (creative commons anyone?)</p> <p>BSIMM continues with this tradition.</p> <p>Does your organization really care if the software you are writing is secure, or is it a burden and a chore? No amount of process will fix not caring. BSIMM does almost nothing to create a culture of good security practices for developers. It’s again, 80% verification activities. It extends the tradition of the Touchpoints model which was 100% verification. </p> <p>BSIMM and touchpoints do not go down and dirty to figure out how to actually make software secure.<br /></p><p>And frankly, that’s what the entire world really needs right now. </p> </div>Unknown[email protected]2tag:blogger.com,1999:blog-7023583569207199066.post-77233461089736755832010-06-30T16:44:00.004-10:002011-03-04T17:54:49.916-10:00Injection-safe templating languages<div>The state of the art for Cross Site Scripting (XSS) software engineering defense is, of course, contextual output encoding. This involves manually escaping/encoding each piece of user data within the right context of a HTML document. The best programmer-centric OWASP resource around XSS defense can be found here: <a href="http://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet">http://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet </a></div><div><br /></div><div>However, manually escaping user data can be a complex, error prone and time consuming process - especially if you are battling DOM based XSS vulns. We need a more efficient way. We need our frameworks to automatically defend against XSS so programmers can focus on innovation and functionality.</div><div><br /></div><div><b><u>The future of XSS defense is HTML templating languages that are injection-safe by default.</u></b></div><div><br /></div><div>Thanks to Mike Samuel from Google's AppSec team for pointing these projects out to me.</div><div><br /></div><div>First we have GXP : <a href="http://code.google.com/p/gxp/">http://code.google.com/p/gxp/</a> . It's an older Google offering that is much closer structurally to JSP and so possibly a better option for someone who has a bunch of broken JSPs and wants to migrate piecemeal to a better system.</div><div><br /></div><div> </div><div>There are also Java libraries like <a href="http://gxp.googlecode.com/svn/trunk/javadoc/com/google/gxp/html/HtmlClosure.html">http://gxp.googlecode.com/svn/trunk/javadoc/com/google/gxp/html/HtmlClosure.html</a> - this Library throws exceptions that are captured in the java type system which makes auditing them and logging and assertions around them fairly easy. They've done a really bad job documenting and advocating GXP but it's very well thought out, easy to use, and feature complete. <a href="https://docs.google.com/a/google.com/present/view?id=dcbpz3ck_8gphq8bdt">https://docs.google.com/a/google.com/present/view?id=dcbpz3ck_8gphq8bdt</a> is the best intro.</div><div><br /></div><div>Another angle on the problem of generating safe HTML is<a href="http://google-caja.googlecode.com/svn/changes/mikesamuel/string-interpolation-29-Jan-2008/trunk/src/js/com/google/caja/interp/index.html"> http://google-caja.googlecode.com/svn/changes/mikesamuel/string-interpolation-29-Jan-2008/trunk/src/js/com/google/caja/interp/index.html</a> which talks about ways to redefine string interpolation in languages like perl and PHP.</div><div><br /></div><div>Marcel Laverdet from Facebook is trying another tack for PHP with his XHP scheme : <a href="http://www.facebook.com/notes/facebook-engineering/xhp-a-new-way-to-write-php/294003943919">http://www.facebook.com/notes/facebook-engineering/xhp-a-new-way-to-write-php/294003943919</a> . Rasmus has publicly been very skeptical of XHP, but I think a lot of his criticisms were a result of conflating XHP with other Facebook PHP schemes, such as precompilation to C and the like.</div><div><br /></div><div>And course, there is the Google Auto-Escape project to keep a close eye on. It was first announced on March 31st of 2009. <a href="http://googleonlinesecurity.blogspot.com/2009/03/reducing-xss-by-way-of-automatic.html">http://googleonlinesecurity.blogspot.com/2009/03/reducing-xss-by-way-of-automatic.html</a></div><div><br /></div><div><b><u>Today, we need to manually output encode each piece of user driven data that we display. Perhaps tomorrow, our frameworks will do that work for us.</u></b></div><div><br /></div>Unknown[email protected]1tag:blogger.com,1999:blog-7023583569207199066.post-60053968979317314082010-03-30T16:03:00.003-10:002010-03-30T16:06:39.111-10:00Shure SM-7BThank you to OWASP for this new studio-quality microphone, a Shure SM-7B. It's an incredible piece of equipment that makes my life a lot easier - and takes up a lot less space in my very crowded computer area.<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAJOtpgjJb1HCpi2Gi0PyLB58hprReqeNEP7gfQUzTQ4IUukf37C34Nc8MEw3YdZ-LjRaNUNCpfHIm1DkAEwzy95qpqfA0xMYBUNXVCz3Us4YMnHIkRKpOwKm_CoUKCrqywPeUvEBv5ICR/s1600/shure-sm7b.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 184px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAJOtpgjJb1HCpi2Gi0PyLB58hprReqeNEP7gfQUzTQ4IUukf37C34Nc8MEw3YdZ-LjRaNUNCpfHIm1DkAEwzy95qpqfA0xMYBUNXVCz3Us4YMnHIkRKpOwKm_CoUKCrqywPeUvEBv5ICR/s200/shure-sm7b.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5454612886435756658" /></a><br /><div>I have quite a few podcasts on deck - including a 5 show batch to be released in sync with the Top Ten release!</div><div><br />Thanks all.<br /><br />Aloha,</div><div>Jim</div>Unknown[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-25307340066991193322010-01-21T13:07:00.014-10:002010-01-29T02:33:52.589-10:00How bad is it?<div><b>Thank you to <a href="mailto:[email protected]">John Menerick</a> and <a href="mailto:[email protected]">Ben Nagy</a> for entertaining my questions on the Daily Dave list.</b></div><div><b><br /></b></div><div><b>Q: Is the recent ie6 0-day anything special?</b></div><div><br /></div><div>John: Not really. Not as special as the NT <-> Win 7 issue recently highlighted.</div><div><br /></div><div><b>Q: How many similar 0-days are for sale on the black market?</b></div><div><br /></div><div>John: Quite a few.<br /><br />Ben: I'd love to see your basis for this assertion. I'm not saying that in the "I don't believe you" sense, only in the "everyone always says that but nobody ever puts up any facts" sense.<br /></div><div><br /></div><div><b>Q: What is the rate/difficulty for discovery of new windows-based 0-days for the common MS and Adobe products that are installed on almost every corporate client? (I heard Dave mention that discovery is getting more difficult)? </b></div><div><br /></div><div>John: Not terribly difficult for someone who is dedicated. Then again, my idea of difficult is much different from the avg. person<br /><br />Ben: I think that while finding 0-days might be 'not terribly difficult', selecting and properly weaponising useful 0-days from the masses of dreck your fuzzer spits out IS difficult - at least in my experience. There was some discussion of the 'too many bugs' problem on this list previously and I know several of the other fuzzing guys are currently researching the same area. Of course you'd explain this to your 'avg. person', as well as explaining that the skillset for finding bugs is not necessarily the same as the skillset for writing reliable exploits for them, and that 'dedication' may not sufficiently substitute for either.<br /></div><div><br /></div><div><div><a href="mailto:[email protected]">Lurene Grenier</a>: I really feel that the "selecting good crashes" problem is not that hard to overcome if you have a proper bucketing system, and the ability to do just a bit of auto-triage at crash time. For example, the fuzzer I use now both separates crashes by what it perceives to be the base issue at hand, and provides a brief notes file with some information about the crash and what is controlled. This requires just a bit of sense in providing fuzzed input, and very little smarts on the part of the debugger. I really think the next step is automating that brain-jutsu; much of it is hard to keep in your head, but not hard to do in code.</div><div><br /></div><div>Using this output, it's pretty easy to spend a lazy morning with your coffee grepping the notes files for the sorts of things you usually find to be reliably exploitable. From there you can call in your 30 ninjas and have at.</div><div><br /></div><div>Creating reliable exploits is for sure the hardest part, but once you've done the initial work on a program, the next few exploits in it are of course more quickly and easily done.</div><div><br /></div><div>As for the thought experiment, I think that the benefit of the top four researchers is that they've trained themselves over a long period of time (and with passion) to have a very good set of pattern-recognition tools which they call instincts. They know how to get crashes, and they know having seen one crash what's likely to find more. They know how to think about a process to get proper execution, and they're rewarded by success emotionally which makes the lesson learned this time around stick for when they need it again.</div><div><br /></div><div>I honestly think that there is more pattern recognition "muscle-memory" type skill involved in RE, bug hunting, and exploit dev than pure mechanical process, which is why the numbers are so</div><div>skewed. It's like taking 4 native speakers of a language (who love to read!) and 100 students of general linguistics with a zillion dollars. Who will read a book in the language faster?</div></div><div><br /></div><div><b>Q: How easy is discovery for someone with resources like the Chinese government?</b></div><div><br /></div><div>John: Much simpler.<br /><br />Ben: Setting aside the previous point that discovery is only the start, I think it's instructive to consider which elements of the process scale well with money.<br /><br />Finding the bugs: You need a fuzzing infrastructure that scales - running peach on one laptop with 30 ninjas standing around it with IDA Pro open is not going to work. Also consider tracking what you've already tested, tracking the results, storing all the crashes, blah blah blah. This does scale well with money, but it's an area that not as many people have looked at as I would like.<br /><br />Seeing which bugs are exploitable: Using a naive approach, this scales horribly poorly with money - non-linearly, to put it mildly. There are only so many analysts you will be able to hire that have enough smarts to look at a non-trivial bug and correctly determine its exploitability. You only have to look at some of the Immunity guys' (hi Kostya) records with turning bugs that other people had discarded as DoS or "Just Too Hard" into tight exploits. Even for ninjas, it's slow. There is research being done into doing 'some' of this process automatically (well, I'm doing some, and I know a couple of other guys are too, so that counts), but I don't know of anyone that has a great result in the area yet - I'd love to be corrected.<br /><br />Creating nice, reliable exploits: I'd assert that this is like the previous point, but even harder. To be honest, it's not really my thing, so probably one of the people that write exploits for a living would be better to comment, but from talking to those kind of guys, it's often a very long road from 'woo we control ebx' to reliable exploitation, especially against modern OSes and modern software that has lots of stuff built in to make your life harder. I don't know how much of the process can really be automated - I mean there are some nice things like the (old now) EEREAP and newer windbg extensions from the Metasploit guys that will find you jump targets according to parameters and so forth, but up until now I was labouring under the impression that a lot of it remains brain-jitsu, which is hard to scale linearly with money.<br /><br />So, while I think that 'simpler' is certainly unassailable, I would need more than a two word assertion to be convinced that it is 'much' simpler. If you give one team a million dollars and 100 people selected at random from the top 10% graduating computer science and you give the other team their pick of any 4 researchers in the world and 3 imacs, whom does the smart money think will produce more weapons grade 0day after 6 months?<br /><br />(No it's not a fair comparison. It's a thought experiment.)<br /><br />Food for thought, perhaps, since sound bites need little care and feeding.<br /></div><div><br /></div><div><b>Q: How bad is it really?</b></div><div><br /></div><div>John: Look at the CVSSv2 score and adjust it to the environments where you determine "how bad it is." It could be much worse.</div><div><br /></div><div><b>Q: I suspect we are just looking at one grain of sand in a beach of 0-days....</b></div><div><br /></div><div>John: Correct. No one wants to let everyone else know what cards they hold in their hand, the tools in their toolbox, etc....</div>Unknown[email protected]1tag:blogger.com,1999:blog-7023583569207199066.post-76755797903375887162009-12-23T12:57:00.004-10:002009-12-23T18:05:27.385-10:00If I were cyberczar(Read to the tune of "Rage Against the Machine : Killing in the Name")<br /><br />1) I would defeat SQL Injection. This would be a multi-phased plan focusing on programmer tools and programmer training. The main use of any Federal funding I could secure would be to build the worlds best open source SQL Escaping library so legacy code could be retrofitted.<br /><br />2) I would lobby the Fed's to create a new branch of the military. ARMY - NAVY - AIRFORCE - CYBERFORCE - MARINES. The problem is that big, and we are losing the game.<br /><br />3) I would take copious notes from day 1. This is a thankless job with heaps of responsibility and absolutely no power. Might as well get a good book deal out of the experience.Unknown[email protected]2tag:blogger.com,1999:blog-7023583569207199066.post-37648794681952810552009-11-22T00:30:00.006-10:002009-11-22T01:04:09.542-10:00OWASP Top 5 rc1 released!I'm very impressed with the latest <a href="http://www.owasp.org/index.php/File:OWASP_T10_-_2010_rc1.pdf">OWASP Top 10 2010 release candidate</a> . But if a 10 item list is to long for you in this era of 140 character tweets, I present to you the unauthorized <a href="http://www.thefreedictionary.com/reductionistic">reductionistic</a> OWASP Top 5.<div><br /></div><div>And the OWASP Top 5 is:<br /><div><br /></div><div>1) Injection Flaws</div><div>2) Broken Authentication</div><div>3) Broken Access Control</div><div>4) Broken Encryption</div><div>5) Security Misconfiguration</div><div><br /></div><div>The <a href="http://goodwitchbadwitch.files.wordpress.com/2009/07/monkies-hear-see-speak-no-evil.jpg">OWASP Top 5 team</a> felt that A2 (XSS) could be considered to be another kind of injection problem. Like most injection flaws, XSS is controlled by contextual encoding.</div><div><br /></div><div>A4 (Direct Object Reference), A5 (CSRF), A6 (Failure to Restrict URL Access) and A8 (Unvalidated Redirects and Forwards) could be considered to be classes of access control/authorization flaws. I think that A4/A6/A8 all easily fit into the access control category. But CSRF as just an access control problem? Yes! Authentication validates WHO you are. Authorization/Access Control validates WHAT can you do. CSRF tokens are just a piece of that task/activity validation.</div><div><div><br /></div><div>A9 (Insecure Cryptographic Storage) and A10 (Insufficient Transport Layer Security) are 2 sides of the same data-encryption-lifecycle. </div><div><br /></div><div>Hat's off to the OWASP Top Ten team. This brief reductionism is just a form of OWASP Top 10 flattery! :)</div></div><div><br /></div><div><div><br /></div><div><br /></div></div></div>Unknown[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-11228937206160880962009-11-14T23:58:00.002-10:002009-11-15T00:00:59.423-10:00Hardware SecurityA recent article in "Foreign Affairs" magazine titled "Securing the Information Highway" (co-authored by General Clarke and Peter Levin) caught my attention. Interesting stuff. Focuses on hardware security.<br /><br /><a href="http://www.foreignaffairs.com/articles/65499/wesley-k-clark-and-peter-l-levin/securing-the-information-highway">http://www.foreignaffairs.com/articles/65499/wesley-k-clark-and-peter-l-levin/securing-the-information-highway</a><br /><br />Their basic thesis is that there is just no way possible to stop the threat of "electronic infiltration, data theft, and hardware sabotage" and that securing the nation infrastructure is "neither cost effective or technically feasible".<br /><br />They suggest:<br /><br />1) Risk Management : "US must develop an integrated strategy that addresses ... the sprawling communications network to the individual chips inside computers"<br />2) Diversification of the country's digital infrastructure<br />3) Secure the hardware supply chain<br /><br />Worthwhile read.Unknown[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-37891245020977478022009-08-17T13:47:00.003-10:002009-08-17T13:51:01.056-10:00justifying the focus on insider threat<span class="Apple-style-span" style="font-family:arial;"><span class="Apple-style-span" style="font-size:medium;"><span class="Apple-style-span" style="color: rgb(255, 255, 255);">Thank you to </span></span></span><span class="Apple-style-span" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="Apple-style-span" style="white-space: nowrap; "><span class="Apple-style-span" style="font-family:arial;"><span class="Apple-style-span" style="font-size:medium;"><span class="Apple-style-span" style="color: rgb(255, 255, 255);">Mat Caughron at </span></span></span></span><span class="Apple-style-span" style="font-family:arial;"><span class="Apple-style-span" style="font-size:medium;"><a href="mailto:[email protected]"><span class="Apple-style-span" style="color: rgb(255, 255, 255);">[email protected]</span></a></span></span><span class="Apple-style-span" style="font-family:arial;"><span class="Apple-style-span" style="font-size:medium;"><a href="mailto:[email protected]"><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><wbr>m</span></a><span class="Apple-style-span" style="color: rgb(255, 255, 255);"> for authoring this most excellent blog entry.</span></span></span></span><div><span class="Apple-style-span" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family:arial;font-size:13px;"><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><br /></span></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family:arial;font-size:13px;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; "><span class="Apple-style-span" style="color: rgb(255, 255, 255);">It is common to have the insider threat dismissed as a scare tactic or<br />worst-case-scenario and I believe this is a mistake.<br /><br />We are all about the business value of risk.<br /><br />Most enterprise companies have to protect themselves from malicious<br />insiders at all times and this affects the design of their software,<br />specifically the need for least privilege and generally all<br />requirements surrounding logging and internal controls. My thinking<br />is that if you want to have a seat at the table during the beginning<br />phases of the software development life cycle, it is best to master<br />the concerns and business needs imposed by this type of risk.<br /><br />Granted, our industry seems to generate snake oil by the barrel, which<br />is all the more reason for us to take these threats seriously and<br />calmly seek publicly documented data on real cases.<br /><br />Indeed, one would hope the information security professional is<br />someone who helps to establish the boundaries of trust in systems<br />being built, not someone who vacuums up the pieces of broken projects,<br />however well such housekeeping pays.<br /><br /><br />Some references not yet mentioned in this thread:<br /><br />Report from 1999 by NSTISSAM:<br /> </span><a href="http://www.cnss.gov/Assets/pdf/nstissam_infosec_1-99.pdf" target="_blank" style=""><span class="Apple-style-span" style="color: rgb(255, 255, 255);">http://www.cnss.gov/Assets/</span><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><wbr>pdf/nstissam_infosec_1-99.pdf</span></a><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><br />Focus is on mechanisms more than specific incidents though a few are mentioned.<br /><br />U^S3 report with Carnegie Mellon on insider threat, focus on<br />infrastructure and financial services industries, dated 2004/05/08:<br /> </span><a href="http://www.secretservice.gov/ntac/its_report_050516.pdf" target="_blank" style=""><span class="Apple-style-span" style="color: rgb(255, 255, 255);">http://www.secretservice.gov/</span><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><wbr>ntac/its_report_050516.pdf</span></a><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><br /> </span><a href="http://www.secretservice.gov/ntac/its_report_040820.pdf" target="_blank" style=""><span class="Apple-style-span" style="color: rgb(255, 255, 255);">http://www.secretservice.gov/</span><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><wbr>ntac/its_report_040820.pdf</span></a><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><br /> </span><a href="http://www.treasury.gov/usss/ntac/gov%20ExecSummary%202008_0108.pdf" target="_blank" style=""><span class="Apple-style-span" style="color: rgb(255, 255, 255);">http://www.treasury.gov/usss/</span><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><wbr>ntac/gov%20ExecSummary%202008_</span><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><wbr>0108.pdf</span></a><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><br />Each sampling set is around 50 incidents or less.<br /><br />Department of Energy is grappling with this as the disruptions from<br />insiders could be high impact:<br /> </span><a href="http://www.cio.energy.gov/documents/Tues_1400_SalonII_Randall.pdf" target="_blank" style=""><span class="Apple-style-span" style="color: rgb(255, 255, 255);">http://www.cio.energy.gov/</span><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><wbr>documents/Tues_1400_SalonII_</span><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><wbr>Randall.pdf</span></a><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><br /><br />Belani / Wilson web application incident response and forensics<br />considers insider threats with two great examples:<br /> </span><a href="http://www.blackhat.com/presentations/bh-usa-06/BH-US-06-Willis.pdf" target="_blank" style=""><span class="Apple-style-span" style="color: rgb(255, 255, 255);">www.blackhat.com/</span><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><wbr>presentations/bh-usa-06/BH-US-</span><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><wbr>06-Willis.pdf</span></a><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><br />Also presented in Seattle at an OWASP chapter meeting.<br /><br />None of these reports, however, can compare in detail to the data set<br />of the Privacy Rights Clearinghouse' chronological list of data<br />breaches.<br /> </span><a href="http://www.privacyrights.org/ar/ChronDataBreaches.htm" target="_blank" style=""><span class="Apple-style-span" style="color: rgb(255, 255, 255);">http://www.privacyrights.org/</span><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><wbr>ar/ChronDataBreaches.htm</span></a><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><br /><br />Until about 2006, the PRC list identified inside threat incidents as<br />"Dishonest insider." After that, the number of employee instigated<br />events is described with greater detail but is therefore harder to<br />search. A quick look here should be enough to convince most on this<br />webappsec list that the impact from insider threats is not<br />insignificant.<br /><br />As software security professionals, we can help to mitigate insider<br />threat problems and our value in doing so should not be<br />underestimated.<br /><br />The commonplace nature of OWASP-top-ten type flaws should not prevent<br />us from acknowledging their utility in the hands of a malicious<br />employee, developer, manager, etc.</span><span><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><br /><br /></span><span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="font-size:large;"><span class="Apple-style-span" style=""><span class="Apple-style-span" style="color: rgb(255, 255, 255);">Mat Caughron CISSP<br />(408) 910-1266</span></span></span></span></span></span><span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="font-size:large;"><span class="Apple-style-span" style=""><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><br /></span></span></span></span></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(136, 136, 136); font-family:arial;font-size:13px;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="font-size:large;"><span class="Apple-style-span" style=""><span class="Apple-style-span" style="color: rgb(255, 255, 255);">[email protected]</span></span></span></span><span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="font-size:large;"><span class="Apple-style-span" style=""><span class="Apple-style-span" style="color: rgb(255, 255, 255);"><wbr>m</span></span></span></span></span><br /></span></div>Unknown[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-49902309706912685592009-08-09T11:41:00.003-10:002009-08-09T11:46:02.996-10:00When to use OWASP AntiSamy?<style></style><div><a href="http://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project">OWASP AntiSamy</a> is a software engineering tool that allows a programmer to verify user-driven HTML/CSS input against a whitelist policy to ensure that is does not contain XSS.<br /><br />But when do you use it?<br /><br /></div> <div> </div> <div>1) If you accept "normal text data" from a user, then </div> <div> a) (input validation) Use the ESAPI validator for input valiation (functions OTHER than getValidSafeHTML)</div> <div> b) (output encoding) Use the ESAPI encoding library for contextual output encoding when displaying dynamic data in a web browser</div> <div> 1. encodeForHTML</div> <div> 2. encodeForJavascript</div> <div> 3. encodeForHTMLEntity</div> <div> 4. encodeForCSS</div> <div> </div> <div><br />2) If you accept HTML from a user, you need to use AntiSamy</div> <div> a) (input validation) You must validate and CHANGE (make it safer) HTML that you accept from a user with AntiSamy (which can be called via ESAPI - getValidSafeHTML)</div> <div> b) (output translation) You can optionally use AntySamy for output translation (it does not encode; it only makes HTML "safer")</div> <div> 1. This is crucial when you have legacy HTML in your data storage mechanism that may still contain XSS</div> <div> </div>Unknown[email protected]5tag:blogger.com,1999:blog-7023583569207199066.post-13862847099938785332009-08-08T21:56:00.001-10:002009-08-08T21:59:07.768-10:00Real world cookie length limitsDaniel Stenberg <[email protected]> recently posted some interesting test code and browser results to [email protected] describing the maximum amount of data that can be stored in a cookie:<br /><br />****<br /><br />... I just went ahead and wrote a CGI script that redirects to itself and grows a <br />cookie and stores its length in a URL field like "cookie.cgi?len=200" until <br />the length in the URL and the actual cookie length no longer matches.<br /><br />Here's a few results from various browsers:<br /><br /><span style="font-family: courier new;">Firefox 3.0.12: 4000</span><br /><span style="font-family: courier new;">Firefox 3.5: 4000</span><br /><span style="font-family: courier new;">curl 7.19.5: 4999</span><br /><span style="font-family: courier new;">IE 8: 5000</span><br /><span style="font-family: courier new;">Opera 10.00 beta: 4000</span><br /><span style="font-family: courier new;">Android 1.5 browser: 4000</span><br /><span style="font-family: courier new;">Chrome 3.0.195.6: 4000</span><br /><span style="font-family: courier new;">Wget 1.11.4: 7000[*]</span><br /><span style="font-family: courier new;">mobile safari (iphone): 8000</span><br /><span style="font-family: courier new;">lynx 2.8.7dev.9: 4000</span><br /><br />I think we can safely say that most browsers support at least 4000 characters <br />cookie contents.<br /><br />[*] = this reports "500 Internal Server Error" on 8000, which I don't<br />understand why but haven't bothered much more about.<br /><br />The test is live here: <a href="http://daniel.haxx.se/test/longcookie.cgi">http://daniel.haxx.se/test/longcookie.cgi</a> Feel free to<br />use it if you want to try out other browsers, without torturing it of course!<br /><br />And the perl script that runs it looks like this:<br /><br />require "CGI.pm";<br /><br />$len = CGI::param('len');<br />$c = CGI::cookie('data');<br /><br />print "Content-Type: text/html\n";<br /><br />if($len == length($c)) {<br /> $c .= "A" x 1000;<br /> $len += 1000;<br /> print "Set-Cookie: data=$c\n";<br /><br /> print "Location: longcookie.cgi?len=$len\n";<br /> print "\nmoo\n";<br />}<br />else {<br /> printf "\nMax cookie length: %d\n", length($c);<br />}Unknown[email protected]6tag:blogger.com,1999:blog-7023583569207199066.post-18188136021099238812009-07-18T12:33:00.006-10:002009-07-20T09:12:05.696-10:00Open letter to the Struts 1.x team on AUTOCOMPLETE<span class="Apple-style-span" style="border-collapse: collapse; white-space: pre-wrap;font-family:Arial;" ><span class="Apple-style-span" style="font-size:medium;">I'm a big fan of Struts 1.3.x. I currently use Struts 1.3.10, the latest release of the 1.x Struts line.</span></span><div><span class="Apple-style-span" style="font-family:Arial;"><span class="Apple-style-span" style="border-collapse: collapse; white-space: pre-wrap;"><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; white-space: pre-wrap;font-family:Arial;" ><span class="Apple-style-span" style="font-size:medium;">I would like the ability to disable autocomplete in an HTML form. Sadly (from a security perspective), most every browser enables autocomplete by default. We need to explicitly attribute our form html with <b>autocomplete="off"</b> - in both the form and form element tags of HTML 4.01+ pages. This is a very basic security protection. Wanting to prevent the browser from caching credit card numbers, PII and other critical user data is a no-brainier; appsec 101.</span></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; white-space: pre-wrap;font-family:Arial;" ><span class="Apple-style-span" style="font-size:medium;"> </span></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; white-space: pre-wrap;font-family:Arial;" ><span class="Apple-style-span" style="font-size:medium;">Now, the recent 1.3.10 release made a great stride in this direction. Finally for the first time the main Struts 1.3.x branch </span><a href="https://issues.apache.org/struts/browse/STR-2810"><span class="Apple-style-span" style="font-size:medium;">supports the autocomplete tag</span></a><span class="Apple-style-span" style="font-size:medium;"> (which defensive coders need - just to disable this feature via html!). </span><b><span class="Apple-style-span" style="font-size:medium;">But it's still not enabled by default in Struts! </span></b><span class="Apple-style-span" style="font-size:medium;"> I need to modify the struts tld xml file in order to enable the autocomplete form and form element attribute; which takes me off the main branch of Struts 1.3.x. </span></span></div><div><span class="Apple-style-span" style="font-family:Arial;"><span class="Apple-style-span" style="border-collapse: collapse; white-space: pre-wrap;"><br /></span></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; white-space: pre-wrap;font-family:Arial;" ><span class="Apple-style-span" style="font-size:medium;">I implore you to </span><a href="https://issues.apache.org/struts/browse/STR-3189"><span class="Apple-style-span" style="font-size:medium;">consider enabling autocomplete by default,</span></a><span class="Apple-style-span" style="font-size:medium;"> so we can turn it off - without having to customize our version of struts 1.3.x! The best security is "secured by default", and this request moves us in that direction. </span></span></div><div><span class="Apple-style-span" style="font-family:Arial;"><span class="Apple-style-span" style="border-collapse: collapse; white-space: pre-wrap;"><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></div><div><span class="Apple-style-span" style="font-family:Arial;"><span class="Apple-style-span" style="border-collapse: collapse; white-space: pre-wrap;"><span class="Apple-style-span" style="font-size:medium;">Jim Manico</span></span></span></div><div><span class="Apple-style-span" style="font-family:Arial;"><span class="Apple-style-span" style="border-collapse: collapse; white-space: pre-wrap;"><span class="Apple-style-span" style="font-size:medium;">OWASP, Intrinsic Security Working Group</span></span></span></div>Unknown[email protected]3tag:blogger.com,1999:blog-7023583569207199066.post-694417254722635942009-06-28T22:54:00.009-10:002009-06-28T23:57:48.497-10:00ESAPI Logging<div>The OWASP ESAPI Logging interface is a security-centric but thin abstraction on top of traditional high-performance logging API's. There are both Log4j and native Java Logging default ESAPI logging implementations. The Log4j implementation is especially mature.</div><div><br /></div><div>The logging interface of the OWASP ESAPI library pre-defines 4 types of log files entries specific to the glory of security monitoring.</div><div><br /></div><div><div><span class="Apple-style-span" style="font-size:small;">public static final EventType ....</span></div><div><span class="Apple-style-span" style="font-size:small;">SECURITY_SUCCESS = new EventType( "SECURITY SUCCESS", true);</span></div><div><span class="Apple-style-span" style="font-size:small;">SECURITY_FAILURE = new EventType( "SECURITY FAILURE", false);<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">EVENT_SUCCESS = new EventType( "EVENT SUCCESS", true);<br /></span></div><div><span class="Apple-style-span" style="font-size:small;">EVENT_FAILURE = new EventType( "EVENT FAILURE", false);</span></div><div><br /></div><div>Attributing every log entry with a security type is fundamental to ESAPI. Your implementation of ESAPI can extend or change this list if desired. <br /></div><div><br /></div></div><div>ESAPI also supports a hierarchy of logging levels which can be configured at runtime to determine the severity of events that are logged, so that those log entries below the current threshold that are discarded. This is a common logging API feature and includes the following severity levels (fatal, error, warning, info, debug, trace). </div><div><br /></div><div>The ESAPI team considered simply adding a security severity level to Log4J, but decided that was not enough. We wanted to force a programmer to tag <span class="Apple-style-span" style="font-style: italic;">every </span>log entry as a security event (or not), regardless of severity level. We did not add yet another logging abstraction to your life lightly.</div><div><br /></div><div>The reference implementations also includes the following protections:</div><div><ul><li>encodes any CRLF characters included in log data in order to prevent log injection attacks<br /></li><li>optionally encodes HTML characters into the HTML entity to protect web based log viewing software<br /></li><li>provides a mechanism to log session ids referentially so that sessions can be tracked in log files without exposing real session identifiers that could be used to hijack active sessions<br /></li><li>provides a mechanism to automatically log HTTP post/get variables while allowing for masking of passwords and other security-critical information that should not be logged</li></ul></div><div>Much of this is configurable in ESAPI.properties </div><div><br /></div><div><div><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';">ESAPI.Logger=org.owasp.esapi.reference.Log4JLogFactory</span></span></span><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';">#ESAPI.Logger=org.owasp.esapi.reference.JavaLogFactory</span></span></span><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';">Specify your application name if you wish to log it. </span></span></span><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';">Logger.ApplicationName=ARMS</span></span></span><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"># If you use an HTML log viewer that does not properly HTML escape </span></span></span><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"># log data, you can set LogEncodingRequired to true</span></span></span><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';">Logger.LogEncodingRequired=false</span></span></span><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';">Logger.LogApplicationName=false</span></span></span><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';">Logger.LogServerIP=false</span></span></span><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"># LogFileName, the name of the logging file. Provide a full directory path (e.g., C:\\ESAPI\\ESAPI_logging_file) if you</span></span></span><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"># want to place it in a specific directory.</span></span></span><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';">Logger.LogFileName=ARMS_ESAPI_LOGFILE</span></span></span><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></span><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;"><span class="Apple-style-span" style="font-family:'courier new';"># MaxLogFileSize, the max size (in bytes) of a single log file before it cuts over to a new one (default is 10,000,000)</span></span></span><br /><span class="Apple-style-span" style=" "><span class="Apple-style-span" style="font-size:x-small;">Logger.MaxLogFileSize=10000000</span></span><span class="Apple-style-span" style="font-size:x-small;"><br /></span></div></div><div><br /></div><div><br /></div><div>So now you want to (securely) log. Right on. Simply specify a logger in each class that requires logging:</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">private final Logger logger = ESAPI.getLogger(SimpleESAPIFilter.class.getName());</span></div><div><br /></div><div>And log away!</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">logger.error(Logger.SECURITY_FAILURE, "session has expired, log out user");</span><br /></div><div><br /></div><div>Here is an example of a log entry from one of my projects at Aspect. I'm not deploying on a cluster, yet, so I supressed the server IP, port and appName via ESAPI.properties.</div><div><span class="Apple-style-span" style="font-weight: bold;"><br /></span></div><div><span class="Apple-style-span" style="font-weight: bold;"><div><span class="Apple-style-span" style=" font-weight: normal; font-size:10px;">2009-06-29 05:48:25,281 WARN IntrusionDetector SECURITY FAILURE Anonymous:0@unknown:unknown Incorrect password provided for dave</span><br /><span class="Apple-style-span" style=" font-weight: normal; font-size:10px;">org.owasp.esapi.errors.ValidationException: Login failed</span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at com.aspectsecurity.arms.web.SimpleESAPIFilter.doFilter(SimpleESAPIFilter.java:149)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)</span></span><br /><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;"> </span></span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style=" ;font-size:10px;">at java.lang.Thread.run(Thread.java:595)</span></span><br /><span class="Apple-style-span" style=" font-weight: normal; font-size:10px;">2009-06-29 05:48:25,281 ERROR com.aspectsecurity.arms.web.actions.ARMSBaseAction EVENT SUCCESS Anonymous:0@unknown:270186 ENTRY POINT FOR ALL ACTIONS: 1246268905281</span><br /><span class="Apple-style-span" style=" font-weight: normal; font-size:10px;">2009-06-29 05:48:25,281 ERROR com.aspectsecurity.arms.service.HibernateAccessController SECURITY SUCCESS Anonymous:0@unknown:270186 START assertAuthorizedForAction : action=com.aspectsecurity.arms.web.actions.user.LoginSubmitAction</span><br /><span class="Apple-style-span" style=" font-weight: normal; font-size:10px;">2009-06-29 05:48:25,281 ERROR com.aspectsecurity.arms.service.HibernateAccessController SECURITY SUCCESS Anonymous:0@unknown:270186 ACCESS GRANTED assertAuthorizedForAction completeActionName=com.aspectsecurity.arms.web.actions.user.LoginSubmitAction IS NOT MANAGED, SO ALLOW GLOBAL ACCESS</span><br /></div><div><span class="Apple-style-span" style="font-weight: normal;"><br /></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><br /></span></div></span></div>Unknown[email protected]10tag:blogger.com,1999:blog-7023583569207199066.post-4566411653775795842009-06-25T00:00:00.003-10:002009-06-25T00:03:22.668-10:00One file to secure them all<div><div>Can you imagine having a WebAppSec program for your company that standardized on a open source secure code library, which was vetted by many smart people, and had several supporting tools available that could be used to ensure its use? I can....<br /></div><div style="text-align: center;"><br /></div><div>Jeff is getting close to releasing ESAPI 2.0. I was checking out the new ESAPI default configuration file, checking in a little bit of cleanup, and was very taken aback by all of the rich appsec defense categories that it covers.</div><div style="text-align: center;"><br /></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Properties file for OWASP Enterprise Security API (ESAPI)</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># You can find more information about ESAPI</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># http://www.owasp.org/index.php/ESAPI</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># WARNING: Operating system protection should be used to lock down the .esapi</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># resources directory and all the files inside. Note that if you are using file-based</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># implementations that some files may need to be read-write as they get</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># updated dynamically.</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Before using, be sure to update the MasterKey and MasterSalt as described below.</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#===========================================================================</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># ESAPI Configuration</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># ESAPI is designed to be easily extensible. You can use the reference implementation</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># or implement your own providers to take advantage of your enterprise's security</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># infrastructure. The functions in ESAPI are referenced using the ESAPI locator, like:</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># ESAPI.encryptor().encrypt( "Secret message" );</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Below you can specify the classname for the provider that you wish to use in your</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># application. The only requirement is that it implement the appropriate ESAPI interface.</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># This allows you to switch security implementations in the future without rewriting the</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># entire application.</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># DefaultAccessController requires ESAPI-AccessControlPolicy.xml in .esapi directory</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">ESAPI.AccessControl=org.owasp.esapi.reference.accesscontrol.DefaultAccessController</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># FileBasedAuthenticator requires users.txt file in .esapi directory</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">ESAPI.Authenticator=org.owasp.esapi.reference.FileBasedAuthenticator</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">ESAPI.Encoder=org.owasp.esapi.reference.DefaultEncoder</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">ESAPI.Encryptor=org.owasp.esapi.reference.JavaEncryptor</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">ESAPI.Executor=org.owasp.esapi.reference.DefaultExecutor</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">ESAPI.HTTPUtilities=org.owasp.esapi.reference.DefaultHTTPUtilities</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">ESAPI.IntrusionDetector=org.owasp.esapi.reference.DefaultIntrusionDetector</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Log4JFactory Requires log4j.xml or log4j.properties in classpath - http://www.laliluna.de/log4j-tutorial.html</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">ESAPI.Logger=org.owasp.esapi.reference.Log4JLogFactory</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#ESAPI.Logger=org.owasp.esapi.reference.JavaLogFactory</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">ESAPI.Randomizer=org.owasp.esapi.reference.DefaultRandomizer</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">ESAPI.Validator=org.owasp.esapi.reference.DefaultValidator</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#===========================================================================</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># ESAPI Authenticator</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Authenticator.AllowedLoginAttempts=3</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Authenticator.MaxOldPasswordHashes=13</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Authenticator.UsernameParameterName=username</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Authenticator.PasswordParameterName=password</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># RememberTokenDuration (in days)</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Authenticator.RememberTokenDuration=14</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Session Timeouts (in minutes)</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Authenticator.IdleTimeoutDuration=20</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Authenticator.AbsoluteTimeoutDuration=120</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#===========================================================================</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># ESAPI Encryption</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># The ESAPI Encryptor provides basic cryptographic functions with a simplified API.</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># To get started, generate a new key using java -classpath esapi.jar org.owasp.esapi.reference.JavaEncryptor</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># There is not currently any support for key rotation, so be careful when changing your key and salt as it</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># will invalidate all signed, encrypted, and hashed data.</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># WARNING: Not all combinations of algorithms and key lengths are supported.</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># If you choose to use a key length greater than 128 (and you should), you must download the</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># unlimited strength policy files and install in the lib directory of your JRE/JDK.</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># See http://java.sun.com/javase/downloads/index.jsp for more information.</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Encryptor.MasterKey=pJhlri8JbuFYDgkqtHmm9s0Ziug2PE7ovZDyEPm4j14=</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Encryptor.MasterSalt=SbftnvmEWD5ZHHP+pX3fqugNysc=</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># AES is the most widely used and strongest encryption algorithm</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Encryptor.EncryptionKeyLength=256</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Encryptor.EncryptionAlgorithm=AES</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Do not use DES except in a legacy situation</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#Encryptor.EncryptionKeyLength=56</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#Encryptor.EncryptionAlgorithm=DES</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># TripleDES is considered strong enough for most purposes</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#Encryptor.EncryptionKeyLength=168</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#Encryptor.EncryptionAlgorithm=DESede</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Encryptor.HashAlgorithm=SHA-512</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Encryptor.HashIterations=1024</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Encryptor.DigitalSignatureAlgorithm=DSA</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Encryptor.DigitalSignatureKeyLength=1024</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Encryptor.RandomAlgorithm=SHA1PRNG</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Encryptor.CharacterEncoding=UTF-8</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#===========================================================================</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># ESAPI HttpUtilties</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># The HttpUtilities provide basic protections to HTTP requests and responses. Primarily these methods </span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># protect against malicious data from attackers, such as unprintable characters, escaped characters,</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># and other simple attacks. The HttpUtilities also provides utility methods for dealing with cookies,</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># headers, and CSRF tokens.</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Default file upload location (remember to escape backslashes with \\)</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">HttpUtilities.UploadDir=C:\\ESAPI\\testUpload</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Force HTTP only on all cookies in ESAPI SafeRequest</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">HttpUtilities.ForceHTTPOnly=false</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># File upload configuration</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">HttpUtilities.ApprovedUploadExtensions=.zip,.pdf,.doc,.docx,.ppt,.pptx,.tar,.gz,.tgz,.rar,.war,.jar,.ear,.xls,.rtf,.properties,.java,.class,.txt,.xml,.jsp,.jsf,.exe,.dll</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">HttpUtilities.MaxUploadFileBytes=500000000</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Using UTF-8 throughout your stack is highly recommended. That includes your database driver,</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># container, and any other technologies you may be using. Failure to do this may expose you</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># to Unicode transcoding injection attacks. Use of UTF-8 does not hinder internationalization.</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">HttpUtilities.ResponseContentType=text/html; charset=UTF-8</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#===========================================================================</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># ESAPI Executor</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Executor.WorkingDirectory=C:\\Windows\\Temp</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Executor.ApprovedExecutables=C:\\Windows\\System32\\cmd.exe,C:\\Windows\\System32\\runas.exe</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#===========================================================================</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># ESAPI Logging</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Set the application name if these logs are combined with other applications</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Logger.ApplicationName=ESAPITest</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># If you use an HTML log viewer that does not properly HTML escape log data, you can set LogEncodingRequired to true</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Logger.LogEncodingRequired=false</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># LogFileName, the name of the logging file. Provide a full directory path (e.g., C:\\ESAPI\\ESAPI_logging_file) if you</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># want to place it in a specific directory.</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Logger.LogFileName=ESAPI_logging_file</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># MaxLogFileSize, the max size (in bytes) of a single log file before it cuts over to a new one (default is 10,000,000)</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Logger.MaxLogFileSize=10000000</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#===========================================================================</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># ESAPI Intrusion Detection</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Each event has a base to which .count, .interval, and .action are added</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># The IntrusionException will fire if we receive "count" events within "interval" seconds</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># The IntrusionDetector is configurable to take the following actions: log, logout, and disable</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># (multiple actions separated by commas are allowed e.g. event.test.actions=log,disable</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Custom Events</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Names must start with "event." as the base</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Use IntrusionDetector.addEvent( "test" ) in your code to trigger "event.test" here</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">IntrusionDetector.event.test.count=2</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">IntrusionDetector.event.test.interval=10</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">IntrusionDetector.event.test.actions=disable,log</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Exception Events</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># All EnterpriseSecurityExceptions are registered automatically</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Call IntrusionDetector.getInstance().addException(e) for Exceptions that do not extend EnterpriseSecurityException</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Use the fully qualified classname of the exception as the base</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># any intrusion is an attack</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">IntrusionDetector.org.owasp.esapi.errors.IntrusionException.count=1</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">IntrusionDetector.org.owasp.esapi.errors.IntrusionException.interval=1</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">IntrusionDetector.org.owasp.esapi.errors.IntrusionException.actions=log,disable,logout</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># for test purposes</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">IntrusionDetector.org.owasp.esapi.errors.IntegrityException.count=10</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">IntrusionDetector.org.owasp.esapi.errors.IntegrityException.interval=5</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">IntrusionDetector.org.owasp.esapi.errors.IntegrityException.actions=log,disable,logout</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># rapid validation errors indicate scans or attacks in progress</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># org.owasp.esapi.errors.ValidationException.count=10</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># org.owasp.esapi.errors.ValidationException.interval=10</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># org.owasp.esapi.errors.ValidationException.actions=log,logout</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># sessions jumping between hosts indicates session hijacking</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.count=2</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.interval=10</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.actions=log,logout</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#===========================================================================</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># ESAPI Validation</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># The ESAPI validator does many security checks on input, such as canonicalization</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># and whitelist validation. Note that all of these validation rules are applied *after*</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># canonicalization. Double-encoded characters (even with different encodings involved,</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># are never allowed.</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># To use:</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># First set up a pattern below. You can choose any name you want, prefixed by the word</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># "Validation." For example:</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Validation.Email=^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\\.[a-zA-Z]{2,4}$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># </span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Then you can validate in your code against the pattern like this:</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Validator.getInstance().getValidDataFromBrowser( "Email", input );</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Validator.getInstance().isValidDataFromBrowser( "Email", input );</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">#</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.SafeString=^[\p{L}\p{N}.]{0,1024}$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.Email=^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\\.[a-zA-Z]{2,4}$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.IPAddress=^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.URL=^(ht|f)tp(s?)\\:\\/\\/[0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*(:(0-9)*)*(\\/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'\\/\\\\\\+=&%\\$#_]*)?$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.CreditCard=^(\\d{4}[- ]?){3}\\d{4}$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.SSN=^(?!000)([0-6]\\d{2}|7([0-6]\\d|7[012]))([ -]?)(?!00)\\d\\d\\3(?!0000)\\d{4}$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Validators used by ESAPI</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.AccountName=^[a-zA-Z0-9]{3,20}$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.SystemCommand=^[a-zA-Z\\-\\/]{0,64}$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.RoleName=^[a-z]{1,20}$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.Redirect=^\\/test.*$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Global HTTP Validation Rules</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Values with Base64 encoded data (e.g. encrypted state) will need at least [a-zA-Z0-9\/+=]</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPScheme=^(http|https)$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPServerName=^[a-zA-Z0-9_.\\-]*$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPParameterName=^[a-zA-Z0-9_]{0,32}$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPParameterValue=^[a-zA-Z0-9.\\-\\/+=_ ]*$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPCookieName=^[a-zA-Z0-9\\-_]{0,32}$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPCookieValue=^[a-zA-Z0-9\\-\\/+=_ ]*$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPHeaderName=^[a-zA-Z0-9\\-_]{0,32}$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPHeaderValue=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ]*$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPContextPath=^[a-zA-Z0-9.\\-_]*$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPPath=^[a-zA-Z0-9.\\-_]*$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPQueryString=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ](1,50)$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPURI=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ]*$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPURL=^.*$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.HTTPJSESSIONID=^[A-Z0-9]{10,30}$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';"># Validation of file related input</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.FileName=^[a-zA-Z0-9!@#$%^&{}\\[\\]()_+\\-=,.~'` ]{0,255}$</span></span></div><div><span class="Apple-style-span" style="font-size: x-small;"><span class="Apple-style-span" style="font-family: 'courier new';">Validator.DirectoryName=^[a-zA-Z0-9:\\\\!@#$%^&{}\\[\\]()_+\\-=,.~'` ]{0,255}$</span></span></div></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSoTxxcMDxW5u5e-pyw8WFOu0PRA-WqijR45mRLIKSUkjlWzQZQ_Pwh-BxvtclaYRGyBl6I9-hjnVXT90WN85gb_-hVkS2kl82EFgyEm9uDI1jvQqzQMZeo5QBN7uq5Yo_ftmd5UpMVY8/s1600-h/35999.jpg"></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSoTxxcMDxW5u5e-pyw8WFOu0PRA-WqijR45mRLIKSUkjlWzQZQ_Pwh-BxvtclaYRGyBl6I9-hjnVXT90WN85gb_-hVkS2kl82EFgyEm9uDI1jvQqzQMZeo5QBN7uq5Yo_ftmd5UpMVY8/s1600-h/35999.jpg"></a>Unknown[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-21626215262696871042009-06-17T13:18:00.004-10:002009-06-18T20:32:15.704-10:00OWASP Podcast #26 - April News part 2<style></style><div style="font-family: arial;"><style></style><div><span style="font-size:85%;"><span style="font-weight: bold;">I just pushed OWASP Podcast #26 live</span>. We had <span style="">Tom Brennan (White Hat Security), </span></span><span style="font-size:85%;"><span style="">Alex Smolen (Foundstone), </span></span><span style="font-size:85%;"><span style="">Jeff Williams (Aspect) and Andre Gironda (The "House" of AppSec) on the show - a very mixed group with different perspectives.<br /><br /></span></span></div> <div> </div><span style="font-size:85%;"><span style="">Download options and show notes are here </span><a href="http://www.owasp.org/index.php/Podcast_26">http://www.owasp.org/index.php/Podcast_26</a><span style=""> or just grab the mp3 <a href="http://www.owasp.org/download/jmanico/owasp_podcast_26.mp3">http://www.owasp.org/download/jmanico/owasp_podcast_26.mp3</a><br /><br /></span></span> <div> </div> <div><span style="font-size:85%;">PS : <span style="">We discussed the following articles:<br /></span></span></div> <dl><dt><span style="font-size:85%;">4/16 <a class="external free" title="http://www.informit.com/articles/article.aspx?p=1338343" href="http://www.informit.com/articles/article.aspx?p=1338343" rel="nofollow">http://www.informit.com/articles/article.aspx?p=1338343</a><br /></span></dt><dd><span style="font-size:85%;"><a class="external free" title="http://www.cigital.com/justiceleague/2009/04/16/software-security-2008/" href="http://www.cigital.com/justiceleague/2009/04/16/software-security-2008/" rel="nofollow">http://www.cigital.com/justiceleague/2009/04/16/software-security-2008/</a> Gary McGraw uses statistics to show that Software (Application) Security has come of age </span></dd><dt><span style="font-size:85%;">4/17 <a class="external free" title="http://research.zscaler.com/2009/04/we-used-to-laugh-at-xss.html" href="http://research.zscaler.com/2009/04/we-used-to-laugh-at-xss.html" rel="nofollow">http://research.zscaler.com/2009/04/we-used-to-laugh-at-xss.html</a><br /></span></dt><dd><span style="font-size:85%;">Michael Sutton discusses history of XSS from Defcon 10 (2002) to the present day (Twitter worm)<br /></span></dd><dt><span style="font-size:85%;">4/17 <a class="external free" title="http://jeremiahgrossman.blogspot.com/2009/04/software-security-grew-to-nearly-500m.html" href="http://jeremiahgrossman.blogspot.com/2009/04/software-security-grew-to-nearly-500m.html" rel="nofollow">http://jeremiahgrossman.blogspot.com/2009/04/software-security-grew-to-nearly-500m.html</a><br /></span></dt><dd><span style="font-size:85%;">Jeremiah uses McDonalds and Mortons as comparatives for black-box vs. white-box security testing<br /></span></dd><dt><span style="font-size:85%;">4/17 <a class="external free" title="http://jeremiahgrossman.blogspot.com/2009/04/website-threats-and-their-capabilities.html" href="http://jeremiahgrossman.blogspot.com/2009/04/website-threats-and-their-capabilities.html" rel="nofollow">http://jeremiahgrossman.blogspot.com/2009/04/website-threats-and-their-capabilities.html</a><br /></span></dt><dd><span style="font-size:85%;">OWASP Catalyst announced<br /></span></dd><dt><span style="font-size:85%;">4/20 <a class="external free" title="http://paco.to/?p=305" href="http://paco.to/?p=305" rel="nofollow">http://paco.to/?p=305</a><br /></span></dt><dd><span style="font-size:85%;">Paco lists 5 reasons for software certifications<br /></span></dd><dt><span style="font-size:85%;">4/20 <a class="external free" title="http://labs.securitycompass.com/index.php/2009/04/20/security-analysis-of-core-j2ee-design-patterns/" href="http://labs.securitycompass.com/index.php/2009/04/20/security-analysis-of-core-j2ee-design-patterns/" rel="nofollow">http://labs.securitycompass.com/index.php/2009/04/20/security-analysis-of-core-j2ee-design-patterns/</a><br /></span></dt><dd><span style="font-size:85%;">Rohit Sethi of SecurityCompass posts a blog post on a new Security Compass Labs blog about "Security Analysis of Core Java Enterprise Patterns"<br /></span></dd><dt><span style="font-size:85%;">4/21 <a class="external free" title="http://docs.google.com/Doc?id=dd7x5smw_16hdd34ggz" href="http://docs.google.com/Doc?id=dd7x5smw_16hdd34ggz" rel="nofollow">http://docs.google.com/Doc?id=dd7x5smw_16hdd34ggz</a><br /></span></dt><dd><span style="font-size:85%;">mario heiderich posts some results of browser fuzzing on extraneous characters in tags<br /></span></dd><dt><span style="font-size:85%;">4/22 <a class="external free" title="http://plynt.com/blog/2009/04/how-frequently-should-an-appli/" href="http://plynt.com/blog/2009/04/how-frequently-should-an-appli/" rel="nofollow">http://plynt.com/blog/2009/04/how-frequently-should-an-appli/</a><br /></span></dt><dd><span style="font-size:85%;">The Plynt blog asks the question, "How frequently shoud Applications be Tested?"<br /></span></dd><dt><span style="font-size:85%;">4/24 <a class="external free" title="http://www.troopers09.org/content/e3/e445/index_eng.html" href="http://www.troopers09.org/content/e3/e445/index_eng.html" rel="nofollow">http://www.troopers09.org/content/e3/e445/index_eng.html</a></span> </dt><dd><span style="font-size:85%;">Wendel Guglielmetti Henrique from Trustwave and Sandro Gauchi of EnableSecurity spoke at TROOPERS09 in Munch about "The Truth of Web Application Firewalls: what the vendors do NOT want you to know" </span></dd><dt><span style="font-size:85%;">4/27 <a class="external free" title="http://tacticalwebappsec.blogspot.com/2009/04/scanner-and-waf-data-sharing.html" href="http://tacticalwebappsec.blogspot.com/2009/04/scanner-and-waf-data-sharing.html" rel="nofollow">http://tacticalwebappsec.blogspot.com/2009/04/scanner-and-waf-data-sharing.html</a></span> </dt><dd><span style="font-size:85%;">Ryan Barnett gives guidance on how best to make VA+WAF work together </span></dd><dt><span style="font-size:85%;">4/27 <a class="external free" title="http://www.owasp.org/index.php/Category:OWASP_PCI_Project" href="http://www.owasp.org/index.php/Category:OWASP_PCI_Project" rel="nofollow">http://www.owasp.org/index.php/Category:OWASP_PCI_Project</a><br /></span></dt><dd><span style="font-size:85%;">Ed Bellis and Trey Ford start a PCI effort to ensure their activities uniformly meet PCI requirements, and for those getting started - to aid in building a website security strategy that also ensures sustainable PCI compliance. </span></dd></dl></div>Unknown[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-33251778374076648522009-06-12T02:23:00.005-10:002009-06-17T13:21:30.166-10:00OWASP Podcast #24 - April News part 1OWASP Podcast #24 - Part 1 of the OWASP Newscast for April 2009 - is now live!<br /><br />OWASP Podcast #24 features Alex Smolen, Andre Gironda and Jeff Williams. Andre did all of the extensive copy editor work. We cover a variety of Web App Sec articles found <a href="http://www.owasp.org/index.php/Podcast_24">here</a>. The show lasts about 40 minutes.<br /><br />To listen to <a href="https://www.owasp.org/index.php/Podcast_24">OWASP Podcast #24</a> you can <a href="http://www.owasp.org/download/jmanico/owasp_podcast_24.mp3">download the mp3 file directly</a>, <a href="http://www.owasp.org/download/jmanico/podcast.xml">subscribe to the RSS feed</a>, <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=300769012">subscribe directly to iTunes</a>!<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-izjdf_CuwIex6pVco43V4OgrFVmE-pHWmovglNqQXNDuF0finySOagbzl3rJygYROodQiSOUxtH3VqjnEfhe6zygtb-rvdRBjFAPZWxS0BWLB8asDQXYIQgCOAEpks_cUEzGLKLC16ye/s1600-h/owasp2.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-izjdf_CuwIex6pVco43V4OgrFVmE-pHWmovglNqQXNDuF0finySOagbzl3rJygYROodQiSOUxtH3VqjnEfhe6zygtb-rvdRBjFAPZWxS0BWLB8asDQXYIQgCOAEpks_cUEzGLKLC16ye/s400/owasp2.jpg" alt="" id="BLOGGER_PHOTO_ID_5334894701436908466" border="0" /></a>Unknown[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-13308249321199669972009-06-08T12:11:00.007-10:002009-06-08T14:26:15.692-10:00Has WHS jumped the shark?<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu8YBarBWkTQ_eI2Cty_nqHB9itOxGRo3WrhcTqCvN-If2yJK2Q5x8p0B_V_qNfSmXOyn5qZh034qqU_M1loKV6po4KSokK4oWtkaHlfCfXC0yxo8_skGpX6kbdkekAq1dcUswEHnvlDSY/s1600-h/200px-Fonzie_jumps_the_shark.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 168px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu8YBarBWkTQ_eI2Cty_nqHB9itOxGRo3WrhcTqCvN-If2yJK2Q5x8p0B_V_qNfSmXOyn5qZh034qqU_M1loKV6po4KSokK4oWtkaHlfCfXC0yxo8_skGpX6kbdkekAq1dcUswEHnvlDSY/s400/200px-Fonzie_jumps_the_shark.PNG" alt="" id="BLOGGER_PHOTO_ID_5345084542210325170" border="0" /></a><br />Does the "<span class="subHD1"><a href="http://www.whitehatsec.com/home/services/certified.html">WhiteHat Website Security Certification Program</a>" </span>demonstrate that WHS has <a href="http://en.wikipedia.org/wiki/Jumping_the_shark">jumped the proverbial shark</a>?<br /><br />25% or more of WHS's customers demanded a logo program of this nature, says Jeremiah Grossman, CTO of WHS. Customer demand is not something to ignore lightly.<br /><br />By the same token, website logo programs of this nature have a dubious past, at best.<br /><br />Take McAfee's "Hack Safe" program as an obvious example. The level of negative press that the "Hacker Safe" program has generated to date is outstanding.<br /><br /><span style="font-style: italic;">McAfee 'Hacker Safe' cert sheds more cred. Rubber stamp factory exposed</span><br /><a href="http://www.theregister.co.uk/2008/04/29/mcafee_hacker_safe_sites_vulnerable/">http://www.theregister.co.uk/2008/04/29/mcafee_hacker_safe_sites_vulnerable/</a><br /><br /><span style="font-style: italic;">More bad news for McAfee, HackerSafe certification</span><br /><a href="http://blogs.zdnet.com/security/?p=1068">http://blogs.zdnet.com/security/?p=1068</a><br /><br /><span style="font-style: italic;">Hackersafe? Not so much.</span><br /><a href="http://holisticinfosec.org/video/HS_ISSA/ISSA_Regional_HackerSafe.html">http://holisticinfosec.org/video/HS_ISSA/ISSA_Regional_HackerSafe.html</a><br /><br />Russ McGee had a very interesting blog post that was favorable to WHS's new website cert program.<br /><div class="chat in"><div class="msg 1st"><a href="http://holisticinfosec.blogspot.com/2009/05/whitehats-trustmark-program-as-game.html">http://holisticinfosec.blogspot.com/2009/05/whitehats-trustmark-program-as-game.html</a>. In the comment section, Jeremiah states:<br /><br /><span style="font-style: italic;">I think it's also fair to say that what we're offering is more of a "Trust mark" than "Security mark." We do not want lay claim as to the implied security of a website, or the lack thereof. Doing so is a very slippery slope. If our mark does that it is not our intent and we are open to ideas on how best to clarify its true meaning. </span><br /><br /><span style="font-style: italic;">To answer your question, only Sentinel customers may display our mark -- which does not come cheaply as compared to others. Organizations who use the Sentinel Service are those who really care about security and the mark should represent that.</span><br /><br />and <a href="http://www.whitehatsec.com/home/services/certified.html">http://www.whitehatsec.com/home/services/certified.html</a> states:<br /><br /><span style="font-style: italic;">The “website security by WhiteHat Security” mark allows Sentinel subscribers to assure their site visitors that the WhiteHat Sentinel Services is being actively deployed to safeguard confidential data from security breaches and hacker attacks</span><br /><br /><span style="font-style: italic;"></span>Jeremiah was faced with a rather difficult choice : upset his customer, or upset some in the security community.<br /><br /><span style="font-weight: bold;">But I must call this a "security fail" for for time being. </span><br /><br />a) This cert is not claiming that the website is secure<br />b) This cert claims that Whitehat Security is the web security service provider, only<br />c) This cert is consumer based; it's meant for the consumer not the security pro<br />d) A security-ignorant consumer (the masses) will incorrectly conclude that the website IS secure based on seeing the WHS certification logo, even thou WHS is not making that claim<br /><br /></div></div>We need more in-depth verification and more process, not less. Projects like the <a href="http://www.owasp.org/index.php/ASVS">OWASP Application Security Verification Standard</a> meets that challenge head-on.<br /><br /><a href="http://manicode.blogspot.com/2009/06/owasp-asvs-release-version-published.html">http://manicode.blogspot.com/2009/06/owasp-asvs-release-version-published.html</a><br /><br />PS: So in a few years, when we have a "Aspect Assured" logo, please give me a hard time. :)Unknown[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-23481712475534215052009-06-08T09:36:00.004-10:002009-06-08T14:31:41.498-10:00OWASP ASVS Release Version published<div><span style="font-family:Consolas;"><span style="font-size:85%;"><span class="126444412-03062009"></span></span></span> </div>Release quality OWASP projects are the level of quality of professional tools and documents.<br /><br />Application Security Verification Standards are specifications produced by OWASP in cooperation with secure applications developers and verifiers worldwide for the purpose of accelerating the deployment of secure Web applications. First published in 2008 as a result of an OWASP Summer of Code grant and meetings with a small group of early adopters, the ASVS documents have become widely referenced and implemented. Further development of ASVS occurs through mailing list discussions and occasional workshops, and suggestions for improvement are welcome. You can download it here (<a href="http://www.owasp.org/index.php/ASVS">http://www.owasp.org/index.php/ASVS</a>).<br /><br />For more information, please contact us. <a href="mailto:[email protected]">Mike Boberski</a>, <a href="mailto:[email protected]">Jeff Williams</a>, and <a href="mailto:[email protected]">Dave Wichers</a> are the primary authors.Unknown[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-86342092171348129022009-06-01T00:00:00.005-10:002009-06-02T10:23:04.282-10:00OWASP Podcast #23 - Dr. Boaz Gelbord<div><span style=";font-family:Arial;font-size:85%;" >OWASP Podcast #23, an interview with Dr. Boaz Gelbord - is now live! <a href="http://www.owasp.org/download/jmanico/owasp_podcast_23.mp3">http://www.owasp.org/download/jmanico/owasp_podcast_23.mp3</a><br /><br />Boaz is the co-author of the <a href="http://www.owasp.org/images/b/b2/OWASP_SSB_Project_Report_March_2009.pdf">OWASP Security Spending Benchmarks Project</a>.<br /><br /></span></div> <div> </div>RSS: <a href="http://www.owasp.org/download/jmanico/podcast.xml">http://www.owasp.org/download/jmanico/podcast.xml</a><br />iTunes: <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=300769012">http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=300769012</a>Unknown[email protected]0tag:blogger.com,1999:blog-7023583569207199066.post-78068541445418384202009-05-26T12:12:00.012-10:002010-08-18T08:36:35.926-10:00'Sound' Analysis by Dave Wichers( This blog post was authored by <a href="mailto://[email protected]">[email protected]</a> )<br /><br />I recently attended the NSA High Confidence Software & Systems (HCSS) Conference and noticed that many tool vendors and researchers working on static and dynamic analysis were using a new term called <span style="font-weight: bold;"><u>sound analysis</u></span>, which means, ‘no false negatives’. In other words, a ‘sound’ analysis won’t miss any of the types of flaws it is looking for. It might have some false positives.<br /><br />Bill Scherlis, one of the speakers, defined this as: “In a <span style="font-weight: bold;">sound analysis</span>, as distinct from heuristic analysis, we do not produce false negatives. If there is a defect of a particular variety, our sound analysis will find it. I’ll note that a sound analysis may have false positives. The mathematics generally preclude the possibility of having it both ways. But in practice we don’t get many false positives. But the main point is to avoid false negatives, to not miss a diagnosis. We may occasionally over-diagnose but we will never miss a diagnosis.”<br /><br />I like the idea of this, but I have never heard any of the vendors in our space claim sound analysis for anything they look for. I did see one vendor there that claimed they could provide sound analysis for buffer overflows. The company was Kestrel Technology. They define soundness as: <a href="http://www.kestreltechnology.com/about/sound.php">http://www.kestreltechnology.com/about/sound.php</a><br /><br />So, if you hear of any code scanning vendor claim they provide ‘sound’ analysis, I’d be interested in hearing about it. [email protected]<br /><br /><span style="font-weight: bold;">- Dave Wichers</span><br /><br />PS: Because Kestrel does ‘sound’ analysis, they are able to report the kinds of positive information I would love to see from a tool. In my presentation, I had the following security facts label (updated based on Jeff’s original idea 5+ years ago). Imagine tools in our space reporting what I have listed in gray … Wouldn’t that be nice :-)<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://manico.net/blogpics/contents.jpg"><br /></a><br />PPS: I don’t think this is an attack ‘against’ the tools. I think there are two points here:<br />1) Sound analysis vs. best we can do with current state of the art (and even sound analysis can improve with less false positives).<br />2) And separately, tools reporting what they have found that’s good, rather just what is bad. However, if tools aren’t doing ‘sound’ analysis, they will be reluctant to report goodness, since they can’t find/report everything that’s relevant (and are thus unsound) :)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYMAGj2vapLEpHdeQAE946uSnstuArtunRZncDtKCBTzcbg6Zd4JKhkaYDd65dMTGmOYNg3hOwgV9aX03FJ-wwE2krNvtDqujBLUAAfkuBPqqCkWytMktu99UO8WLu2iNgFuaQMXxTD6jP/s1600-h/test.jpg"><br /></a>Unknown[email protected]2tag:blogger.com,1999:blog-7023583569207199066.post-68814612928864005592009-05-26T00:19:00.001-10:002009-05-26T00:21:36.407-10:00OWASP Top 6 20096. OWASP Legal Project (Secure Software Contracts for Developers and their Clients) <a href="http://www.owasp.org/index.php/Category:OWASP_Legal_Project">http://www.owasp.org/index.php/Category:OWASP_Legal_Project</a><br /><br />5. OWASP Live CD! FREE TOOLS! <a href="http://www.owasp.org/index.php/Category:OWASP_Live_CD_Project">http://www.owasp.org/index.php/Category:OWASP_Live_CD_Project</a><br /><br />4. OWASP Application Security Verification Standard <a href="http://www.owasp.org/index.php/Category:OWASP_Application_Security_Verification_Standard_Project">http://www.owasp.org/index.php/Category:OWASP_Application_Security_Verification_Standard_Project</a><br /><br />3. OWASP Code Review Guide <a href="http://www.owasp.org/index.php/Category:OWASP_Code_Review_Project">http://www.owasp.org/index.php/Category:OWASP_Code_Review_Project</a><br /><br />2. OWASP Developers Guide <a href="http://www.owasp.org/index.php/Category:OWASP_Guide_Project">http://www.owasp.org/index.php/Category:OWASP_Guide_Project</a><br /><br />1. OWASP Coders Security Library for Java, PHP, .NET, ASP and Haskel (ESAPI - FOSS<br />Enterprise Security API) <a href="http://www.owasp.org/index.php/Category:OWASP_Enterprise_Security_API">http://www.owasp.org/index.php/Category:OWASP_Enterprise_Security_API </a>Unknown[email protected]0