Download presentation
Presentation is loading. Please wait.
Published byFelicity Lamb Modified over 9 years ago
1
OWASP Top 10 from a developer’s perspective John Wilander, OWASP/Omegapoint, IBWAS’10
2
John Wilander consultant at Omegapoint in Sweden Researcher in application security Co-leader OWASP Sweden Certified Java Programmer
3
OWASP Top 10 Top web application security risks 2010 OWASP
4
1. Injection 2. Cross-Site Scripting (XSS) 3. Broken Authentication and Session Management 4. Insecure Direct Object References 5. Cross-Site Request Forgery (CSRF) 6. Security Misconfiguration 7. Insecure Cryptographic Storage 8. Failure to Restrict URL Access 9. Insufficient Transport Layer Protection 10. Unvalidated Redirects and Forwards OWASP
5
1. Injection 2. Cross-Site Scripting (XSS) 3. Broken Authentication and Session Management 4. Insecure Direct Object References 5. Cross-Site Request Forgery (CSRF) 6. Security Misconfiguration 7. Insecure Cryptographic Storage 8. Failure to Restrict URL Access 9. Insufficient Transport Layer Protection 10. Unvalidated Redirects and Forwards OWASP
6
Injection... the good old, boring stuff OWASP
7
sql = "SELECT * FROM users WHERE firstName = '" + fname + "' AND surName = '" + sname + "'"; OWASP
8
sql = "SELECT * FROM users WHERE firstName = '" + fname + "' AND surName = '" + sname + "'"; OWASP
9
fname = ’ OR 1=1-- sname = blabla OWASP
10
sql = "SELECT * FROM users WHERE firstName = '" + ’OR 1=1-- + "' AND surName = '" + blabla + "'";
11
SELECT * FROM users WHERE firstName = '' OR 1=1-- ' AND surName = 'blabla' OWASP
12
SELECT * FROM users OWASP
13
Input Validation? OWASP
14
fname = John sname = Wilander Accept: A-Za-z OWASP
15
fname = Luís sname = Grangeia Accept: A-Za-zí OWASP
16
fname = João sname = Franco Accept: A-Za-zíã OWASP
17
fname = {some name} sname = {some name} Accept: A-Za-zíãåäöüû.......... OWASP
18
fname = {some name} sname = {some name} Accept: \p{L} OWASP
19
fname = Oliver sname = O’Heir Accept: \p{L} OWASP
20
fname = Oliver sname = O’Heir Accept: \p{L}’ OWASP
21
fname = Fredrik sname = Jägare-Lilja Accept: \p{L}’ OWASP
22
fname = Fredrik sname = Jägare-Lilja Accept: \p{L}’- OWASP
23
fname = John Eric sname = Wilander Accept: \p{L}’- OWASP
24
fname = ’OR ‘a’ IS NOT NULL-- sname = blabla Accept: \p{L}’- OWASP
25
But... ’OR ‘a’ IS NOT NULL-- is not a name! OWASP
26
PreparedStatement preparedStmt = connection.prepareStatement( ”SELECT a, b FROM table WHEREc = ?”);preparedStmt.setInt(1, column);ResultSet resultset = preparedStmt.executeQuery(); OWASP
27
PreparedStatement preparedStmt = connection.prepareStatement( ”SELECT a, b FROM table WHEREc = ?”);preparedStmt.setInt(1, column);ResultSet resultset = preparedStmt.executeQuery(); OWASP
28
PreparedStatement preparedStmt = connection.prepareStatement( ”SELECT a, b FROM table WHEREc = ?”);preparedStmt.setInt(1, column);ResultSet resultset = preparedStmt.executeQuery(); OWASP
29
XSS... much more exciting! OWASP
31
Is... a name? OWASP
32
Just filter, huh? ¼script¾alert(¢XSS¢)¼/script¾ OWASP
33
org.owasp antisamy 1.4 OWASP AntiSamy OWASP
34
Content Security Policy X-Content-Security-Policy: allow 'self'; OWASP
35
Session Management... just a quick one OWASP
36
HTTP Stateless GET http://www.site.com/ HTTP/1.1 HTTP/1.1 200 OK OWASP
37
HTTP Stateless GET http://www.site.com/ HTTP/1.1 HTTP/1.1 200 OK OWASP
38
Hold Your Sessions Session ID in URL www.site.com/ … ;sessionid=1234 Session ID in hidden form fields Session ID in cookie Set-Cookie: sessionID=”1234” … OWASP
39
HTTP + Session GET http://www.site.com/ HTTP/1.1 HTTP/1.1 200 OK OWASP
40
HTTP + Session GET http://www.site.com/ HTTP/1.1 HTTP/1.1 200 OK Cookie Monster ©2009 Sesame Workshop OWASP
41
About Cookies Enduser owns the cookies don’t trust cookies backend don’t hide anything in them JavaScript (thus XSS) can read cookies use httpOnly attribute Cookies are sent for all requests use secure attribute OWASP
42
Insecure Direct Object Reference just a quick one OWASP
43
http://site.com/cms?file=report524.pdfhttp://site.com/cms?file=report524.pdfhttp://site.com/cms?file=../../../../../../../../../etc/passwd OWASP
44
Filter ”../” huh?..%2F(URL encoding)%2E%2E%2F(URL encoding)Li4v(Base64 encoding)%002E%002E%002F(Unicode)”..\” often the same meaning as ”../”..%5C(URL encoding)%2E%2E%5C(URL encoding)Li5c(Base64 encoding)%002E%002E%005C(Unicode) OWASP
45
OWASP ESAPI Access Reference Map Browse r URL Access Ref Map WS DB FS file=456772456772 report524.pdf OWASP
46
CSRF... my current favorite! OWASP
47
What’s on your mind? POS T OWASP
48
I love OWASP! What’s on your mind? POS T OWASP
49
I love OWASP! What’s on your mind? POS T John: I love OWASP! OWASP
50
What’s on your mind? POS T OWASP
51
What’s on your mind? I hate OWASP! What’s on your mind? POS T OWASP
52
What’s on your mind? I hate OWASP! What’s on your mind? POS T OWASP
53
What’s on your mind? I hate OWASP! What’s on your mind? POS T John: I hate OWASP! OWASP
54
What’s on your mind? POS T John: I hate OWASP! $(document).ready(function() { $('#form').submit(); }); OWASP
55
Insufficient Transport Layer Protection OWASP
58
https://login.facebook.com/login.php?login_attempt=1 OWASP
59
Moxie’s SSL Strip Terminates SSL Changes https to http Normal https to the server Acts as client OWASP
60
Moxie’s SSL Strip Secure cookie? Encoding, gzip? Cached content? Sessions? Strip the secure attribute off all cookies. Strip all encodings in the request. Strip all if-modified-since in the request. Redriect to same page, set-cookie expired OWASP
61
OWASP Transport Layer Protection Cheat Sheet http://www.owasp.org/index.php/Transport_Layer_Protect ion_Cheat_Sheet OWASP
62
Unvalidated Redirects and Forwards... phising all the way home! OWASP
63
Return Path et al www.site.com/login?returnPath=www.site.com/sec ure?page=3 OWASP
64
Return Path et al www.site.com/login?returnPath=www.attacker.com OWASP
65
Return Path et al www.site.com/login? returnPath=bit.ly/Kl89GT OWASP
66
ESAPI sendRedirect() http://owasp-esapi-java.googlecode.com /svn/trunk_doc/latest/org/owasp/esapi/HTTPUtilities.html sendRedirect(HttpServletResponse, String) OWASP
67
1. Injection 2. Cross-Site Scripting (XSS) 3. Broken Authentication and Session Management 4. Insecure Direct Object References 5. Cross-Site Request Forgery (CSRF) 6. Security Misconfiguration 7. Insecure Cryptographic Storage 8. Failure to Restrict URL Access 9. Insufficient Transport Layer Protection 10. Unvalidated Redirects and Forwards OWASP
68
john.wilander@owasp.org Twitter: @johnwilander Blog: appsandsecurity.blogspot.com OWASP
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.