<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: owasp</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/owasp.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2018-08-06T22:02:39+00:00</updated><author><name>Simon Willison</name></author><entry><title>OWASP Top 10 2007-2017: The Fall of CSRF</title><link href="https://simonwillison.net/2018/Aug/6/owasp-csrf/#atom-tag" rel="alternate"/><published>2018-08-06T22:02:39+00:00</published><updated>2018-08-06T22:02:39+00:00</updated><id>https://simonwillison.net/2018/Aug/6/owasp-csrf/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://nvisium.com/blog/2017/11/30/owasp-top-10-2007-2017-the-fall-of-csrf.html"&gt;OWASP Top 10 2007-2017: The Fall of CSRF&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
I was surprised to learn recently that CSRF didn’t make it into the 2017 OWASP Top 10 security vulnerabilities (after featuring almost every year since the list started). The credited reason is that web frameworks do a good enough job protecting against CSRF by default that it’s no longer a top-ten problem. Defaults really do matter.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/csrf"&gt;csrf&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/owasp"&gt;owasp&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/security"&gt;security&lt;/a&gt;&lt;/p&gt;



</summary><category term="csrf"/><category term="owasp"/><category term="security"/></entry><entry><title>OWASP: XSS Prevention Cheat Sheet</title><link href="https://simonwillison.net/2009/Jan/24/xss/#atom-tag" rel="alternate"/><published>2009-01-24T23:58:44+00:00</published><updated>2009-01-24T23:58:44+00:00</updated><id>https://simonwillison.net/2009/Jan/24/xss/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.owasp.org/index.php?title=XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet"&gt;OWASP: XSS Prevention Cheat Sheet&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Comprehensive set of rules for avoiding XSS—there’s a bit more to it than just escaping all output variables, since you have to take markup context in to account.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/markup"&gt;markup&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/owasp"&gt;owasp&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/security"&gt;security&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/xss"&gt;xss&lt;/a&gt;&lt;/p&gt;



</summary><category term="markup"/><category term="owasp"/><category term="security"/><category term="xss"/></entry><entry><title>Hashing client-side data</title><link href="https://simonwillison.net/2003/Feb/8/hashingClientsideData/#atom-tag" rel="alternate"/><published>2003-02-08T23:53:25+00:00</published><updated>2003-02-08T23:53:25+00:00</updated><id>https://simonwillison.net/2003/Feb/8/hashingClientsideData/#atom-tag</id><summary type="html">
    &lt;p&gt;Via &lt;a href="http://radio.weblogs.com/0103807/2003/02/08.html#a1323" title="PHP and OWASP Security"&gt;Scott&lt;/a&gt;, a clever &lt;acronym title="PHP: Hypertext Preprocessor"&gt;PHP&lt;/acronym&gt; technique for ensuring data sent to the browser as a cookie or hidden form variable isn't tampered with by the user:&lt;/p&gt;

&lt;blockquote cite="http://www.sklar.com/page/article/owasp-top-ten"&gt;&lt;p&gt;
If you're expecting to receive data in a cookie or a hidden form field that you've previously sent to a client, make sure it hasn't been tampered with by sending a hash of the data and a secret word along with the data. Put the hash in a hidden form field (or in the cookie) along with the data. When you receive the data and the hash, re-hash the data and make sure the new hash matches the old one.
&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;A further explanation and example code can be found in &lt;a href="http://www.sklar.com/page/article/owasp-top-ten"&gt;PHP and the OWASP Top Ten Security Vulnerabilities&lt;/a&gt;, a handy article describing how &lt;acronym title="PHP: Hypertext Preprocessor"&gt;PHP&lt;/acronym&gt; coders can combat the top ten web application security problems highlighted by a recent report from &lt;a href="http://www.owasp.org/"&gt;OWASP&lt;/a&gt;. Incidentally, &lt;acronym title="The Open Web Application Security Project"&gt;OWASP&lt;/acronym&gt; still haven't fixed the cross site scripting vulnerability &lt;a href="http://www.owasp.org/%3Cscript%3Ealert(%22boo%22)%3C/script%3E"&gt;on their own site&lt;/a&gt;, discovered by &lt;a href="http://tom.me.uk/blog/"&gt;Tom Gilder&lt;/a&gt; several weeks ago.&lt;/p&gt;

&lt;p&gt;Incidentally, while the hashing method is clever and should be nice and secure I personally advocate not sending the user &lt;em&gt;any&lt;/em&gt; information unless absolutely necessary - use sessions and store sensitive data on the server instead. I suppose you could always use the hash to add an extra layer of security to the session identifier though.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/hashing"&gt;hashing&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/owasp"&gt;owasp&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/php"&gt;php&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/scott-johnson"&gt;scott-johnson&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/security"&gt;security&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="hashing"/><category term="owasp"/><category term="php"/><category term="scott-johnson"/><category term="security"/></entry><entry><title>OWASP Security guide</title><link href="https://simonwillison.net/2002/Nov/24/owaspGuide/#atom-tag" rel="alternate"/><published>2002-11-24T21:19:55+00:00</published><updated>2002-11-24T21:19:55+00:00</updated><id>https://simonwillison.net/2002/Nov/24/owaspGuide/#atom-tag</id><summary type="html">
    &lt;p&gt;The &lt;a href="http://www.owasp.org/"&gt;Open Web Application Security Project&lt;/a&gt; (&lt;acronym title="Open Web Application Security Project"&gt;OWASP&lt;/acronym&gt;) have a &lt;a href="http://www.owasp.org/guide/" title="About the OWASP Guide"&gt;free guide&lt;/a&gt; to building secure web applications, which covers a large range of common problems such as cross site scripting and &lt;acronym title="Structured Query Language"&gt;SQL&lt;/acronym&gt; injection vulnerabilities. The report is a 60 page &lt;acronym title="Portable Document Format"&gt;PDF&lt;/acronym&gt; and although I haven't had time to go through it yet it looks like an excellent read.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/owasp"&gt;owasp&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/security"&gt;security&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sql-injection"&gt;sql-injection&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="owasp"/><category term="security"/><category term="sql-injection"/></entry></feed>