Make your apps better and safer! Take a point-by-point trek through the Open Web Application Security Project's top 10 web application vulnerabilities and learn how to defend against each.
### Let me count the ways... ### <script type=”text/javascript”> var data = {“users”: [{“id”: 1, “name”: “fred</script> <script>browser.pwn()</script> ”}]; // ... </script>
### Let me count the ways... ### <script type=”text/javascript”> var data = {“users”: [{“id”: 1, “name”: “fred</script> <!-- wtf? ok, keep parsing tag soup --> <script>browser.pwn()</script><!-- sweet! let’s run this --> ”}]; // ... </script> <!-- yeah, whatever -->
before destructive actions or accessing sensitive data. • Encrypt session cookies • (SSL or HMAC) • Multiple factors — something you know + something you have.
or change cookies sent by domain2 • Scripts from domain1 can’t make AJAX requests to domain2 • Doesn’t prevent DOM changes, like JSONP or injecting <img src=””>
<form> attacks # - Token is stored server-side and changes for each page request. # - Tokens expire after a few minutes <form> … <input type=”hidden” name=”csrftoken” value=”ab19acdefccabe”/> … </form>
AppSec in the world don’t matter if underlying server is wide open. • Or if you use broken Open Source apps. • Failure to understand & use platform security limits. • (firewalls, file permissions, etc.)
crypto algorithms (BEAST and CRIME), bad certificate setups. • Also browser-related: secure cookies need to stay secure. • Use whynopadlock.com and Firebug to make sure all sensitive requests go over HTTPS
Flag!) • Don’t break the law :) • Write vulnerable code and write tests to demonstrate the problem. • Help with code reviews • Phone a friend! (Or a consultant)