Web 2.0 Security ApacheCon US 2008

Description

Web Application Security With/Despite Web 2.0

Reviews
Shared by: Ilya Tchak
Stats
views:
158
rating:
not rated
reviews:
0
posted:
11/16/2008
language:
English
pages:
0
Traditional Model Web Application Security With/Despite Web 2.0 Christian Wenz christian.wenz@arrabiata.de Controller Server Model View Client Ajax Model Server Server XSS // Problem • Cross-Site Scripting (XSS) • (Old) Problem: Dynamic data is sent to the client – without validation • The following content can be dangerous – HTML – CSS – JavaScript Model Controller Client View XSS // New Dangers • XSS everywhere – XML – RSS – HTTP Headers –… • Validate all incoming data! • Validate in all dynamic files! – Including REST-y web service APIs; not only Ajax applications may use them! XSS // More Dangers • Fancy XSS – XSS without JavaScript – Advanced JavaScript – Attacks using embedded media • Filter using a whitelist approach, not blacklist! 1 CSRF // Problem • Cross Site Request Forgeries (CSRF) • Problem: HTTP requests do not always happen voluntarily (3) Requests page CSRF // Countermeasures • As user – Logout whenever possible, as soon as possible – Do not visit unknown sites – Apart from that almost no chance to prevent attacks • As developer – Request login before „critical“ operations – Include secret/random token in forms – Use random names for form elements Other web site (2) Sends JavaScript Victim (client) (1) Requests page Attacker (web site) SQL Injection // Problem • SQL Injection • (Old) Problem: Dynamic data is used in SQL statements – without validation • The list of attacks does not end with ' OR ''=' ! SQL Injection // Bad Ideas • • • • • Filter for „1=1“ Filter for ' Filter for /* Filter for -What's next?! • Again: No blacklist, but whitelist – Or database-specific escape functions/methods – Or even better: Prepared statements (if supported) SQL Injection // Fancy attacks • • • • • • Prompting error messages UNION attacks Blind SQL attacks Using built-in functionality Second-order attacks DoS attacks XML // Attacks • XPath Injection • Dynamic data used in XPath statements • Feeding Web Services with invalid XML • Nasty entities • … 2 Ajax // JavaScript attacks • JavaScript Hijacking • Vulnerable: GET requests that retrieve JSON information • Malicious JavaScript code overrides constructors, enabling to incercept and steal (or modify) JSON data • http://www.fortifysoftware.com/servlet/ downloads/public/JavaScript_Hijacking.pdf Ajax // Countermeasures • Require POST for server APIs • Demand a certain HTTP header (e.g. Content-type: application/json) • Don't get me started on mashups! Automation // CAPTCHAs • Completely Automated Turing Test to Tell Computers and Humans Apart • Turing tests: Decide whether the communication partner is a person or a machine • Mostly, an image with text/numbers • ASCII and audio CAPTCHAs also exist CAPTCHAs // Countermeasures • Implementation bugs • Cheap workers • Horny surfers Because! // Conclusion • There is no 100% security – But you should try • Rule #1: Validate all input • Rule #2: Escape all output • Ajax applications do not always generate new attacks, but allow more entry points • Better paranoid than offline ™ • Questions? Thank You! • E-Mail: christian.wenz@arrabiata.de • Blog: http://www.hauser-wenz.de/blog/ • Website: http://www.arrabiata.de/ 3

Related docs
ApacheCon_US_2009_Program_Guide
Views: 3  |  Downloads: 0
Web 2.0 Research
Views: 1348  |  Downloads: 209
Web 2.0
Views: 51  |  Downloads: 5
Google OpenSocial Web 2.0 Expo Presentation 2008
Views: 232  |  Downloads: 23
Web 2.0 Weekly - Nov. 17, 2009
Views: 71  |  Downloads: 1
Free Web 2.0 Manual
Views: 696  |  Downloads: 64
09-04-21 Web 2.0 Weekly
Views: 510  |  Downloads: 0
Web 2.0 Weekly - June 2, 2009
Views: 72  |  Downloads: 4
web forms 2.0
Views: 210  |  Downloads: 42
web 2.0 applications
Views: 107  |  Downloads: 33
Web 2.0 Tools and Applications
Views: 613  |  Downloads: 101
Web 2.0 � What is it and why do we care
Views: 49  |  Downloads: 15
premium docs
Other docs by Ilya Tchak
RoshKippurMenu
Views: 13  |  Downloads: 0
Data Center
Views: 17  |  Downloads: 0
Torah Reflections for Yom Kippur
Views: 14  |  Downloads: 0
Yom Teruah 1
Views: 26  |  Downloads: 0
2009-09-19 SHABBAT ANNOUNCEMENTS
Views: 12  |  Downloads: 0
Brian Lee Randone murders Felicia Tang Lee
Views: 293  |  Downloads: 1
PDF
Views: 43  |  Downloads: 1
MegaView Brochure Andrew
Views: 30  |  Downloads: 0
Web 2.0 Frameworks
Views: 196  |  Downloads: 26
Mortal Kombat vs. DC Universe
Views: 4984  |  Downloads: 4
Better Web Experience with ASP.NET
Views: 408  |  Downloads: 123