SlideShare ist ein Scribd-Unternehmen logo
1 von 51
OWASP Top 10




Finding and Exploiting AppSec Flaws

                                      1
Goals

    Understand common AppSec issues

    Be able to identify the OWASP Top 10 issues

    Understand what causes the issues




                                           2
                                           2
Why OWASP
•Free information and projects
•Defacto source for information on web security
•Vendor and technology neutral
•This is their mission




                                           3
                                           3
Terms

    HTTP Requests
    
        GET vs POST

    URI/URL

    Cookies

    Parameters

    SSL/TLS



                              4
                              4
Tools

    Scanners
    
        AppScan
    
        WebInspect
    
        N-Stalker
    
        Skipfish
    
        W3AF
    
        More at:
        http://projects.webappsec.org/w/page/13246988/W
        eb%20Application%20Security%20Scanner%20List

                                                5
                                                5
Tools

    Intercepting proxies
    
        Burp Suite
    
        Web Scarab
    
        Paros Proxy
    
        Zed Attack Proxy




                                   6
                                   6
Tools

    Browser Plugins
    
        TamperData
    
        Web Developer
    
        Firebug
    
        Proxy Switcher




                                 7
                                 7
The Top 10
Injection
Broken Authentication and Session Management
Cross-Site Scripting (XSS)
Insecure Direct Object References
Security Misconfiguration




                                      8
                                      8
The Top 10 (continued)
Sensitive Data Exposure
Missing Function Level Access Control
Cross-Site Request Forgery
Using Known Vulnerable Components
Unvalidated Redirects and Forwards




                                        9
                                        9
Scope of Attacks

    Client Side
    
        Attack the end user and end user network




    Server Side
    
        Attack the infrastructure




                                                   10
                                                   10
Causes of Vulnerabilities

    Improper input sanitization

    Programming errors

    Logic errors

    Configuration errors

    Missing security updates




                                     11
                                     11
Injection

    Result from improper input sanitization

    Multiple types
    
        SQL
    
        LDAP
    
        XPATH
    
        OS
    
        ...



                                              12
                                              12
SQL Injection

    Two types
    
        Vanilla (or “normal” or “first order”)
    
        Blind

    Results from directly inserting user supplied
    data into a SQL Query




                                                 13
                                                 13
SQL Queries
SELECT * FROM events WHERE id='$id'

    Developer expects $id to be an integer like 3

    What if $id is 3' or '1'='1

    Or 3' union select name, password, role from
    users; --




                                             14
                                             14
How to find

    Check all inputs to see if you can create an
    error message
    
        Single quote '
    
        Double quote “
    
        SQL comments
    
        SQL verbs




                                              15
                                              15
How to find

    If errors are trapped you have to look for
    differences between query results
    
        Unbalanced vs balanced quotes
    
        SQL errors
    
        ...




                                                 16
                                                 16
Demo
http://192.168.203.152/demo/comments.php




                                       17
                                       17
Try it
https://challenge.subversiveresearch.org/index.php




                                          18
                                          18
Broken Authentication and Session
          Management

    Logic, programming or configuration errors

    Exposes password or tokens

    Allows users to act as another user
    
        Horizontal
    
        Vertical




                                            19
                                            19
Cause

    Logic errors

    Security through obscurity

    Enforcing permissions on the wrong portion of
    the application




                                            20
                                            20
How to find

    Try to access functionality that your user
    shouldn't have access to

    Modify user identifying information




                                                 21
                                                 21
Demo
http://192.168.203.152/demo/badlogin.php




                                           22
                                           22
Cross-Site Scripting (XSS)

    Results from improper input sanitization

    Client side attack

    Two types
    
        Reflected
    
        Stored




                                               23
                                               23
Cause
Direct use of user supplied input:



echo(“Hello $_POST['name']”);




                                     24
                                     24
How to find

    Check all inputs to see if dangerous characters
    are properly escaped or deleted
    
        Text fields
    
        Hidden variables
    
        Cookies
    
        etc

    Proper escaping varies depending on your
    context


                                             25
                                             25
Demo
http://192.168.203.152/demo/xss.php


http://192.168.203.152/demo/xss-prevented.php




                                        26
                                        26
Try it
Reflected:
https://challenge.subversiveresearch.org/


Stored:
https://challenge.subversiveresearch.org/image.php?i




                                            27
                                            27
Insecure Direct Object References

    Results from improper input validation

    Directly refer to variables used in business logic
    
        Account numbers
    
        Prices
    
        File names
    
        etc




                                               28
                                               28
How to find

    Check for parameter names that reference
    business logic

    Modify parameters to see how they affect what
    data is presented to you or calculated values




                                           29
                                           29
Demo
http://192.168.203.152/demo/idor.php




                                       30
                                       30
Security Misconfiguration

    Improper configurations




                                     31
                                     31
How to find
•Vulnerability scanners
•System audit




                               32
                               32
Sensitive Data Exposure

    Improper storage of sensitive data
    
        Authentication data
    
        Credit card data
    
        SSNs

    Fail to encrypt sensitive data in transit
    
        No SSL/TLS
    
        More than just web traffic

    Unnecessary data returned to the client

                                                33
                                                33
How to find

    Improper storage of sensitive data
      
          Look at data you retrieved from other attacks
      
          Audits of the systems are more effective

    Fail to encrypt sensitive data in transit
      
          Look at the URL
      
          Capture traffic
      
          Man in the middle if necessary



                                                     34
                                                     34
Missing Function Level Access
                Control

    Logic error on protecting links/functions

    Often vertical access control




                                                35
                                                35
How to find

    If you have multiple accounts at different
    privilege levels try to access content for a
    higher privilege level as a lower privilege user

    Guess common page names
    
        Admin.[php|asp|html|...]
    
        Console.[php|asp|html|...]




                                               36
                                               36
Demo
http://192.168.203.152/demo/login.php




                                        37
                                        37
Try it
https://challenge.subversiveresearch.org/manage.php




                                         38
                                         38
Cross-Site Request Forgery (CSRF)

    Confused deputy attack

    Make a user make a request for you




                                         39
                                         39
How to find

    Look for actions that only depend on cookie
    values and well-known or public data

    Even if you have to guess a value, make sure
    the value is actually non-predictable




                                            40
                                            40
Demo
http://192.168.203.152/demo/xsrf.php




                                       41
                                       41
Try it
https://challenge.subversiveresearch.org/manage.php


https://challenge.subversiveresearch.org/image.php?i




                                          42
                                          42
Using Known Vulnerable
                Components

    Framework or third party components contain
    vulnerabilities
      
          Missing patches
      
          0-days




                                           43
                                           43
How to find
•Vulnerability Scanners
•Server headers/banners




                             44
                             44
Unvalidated Redirects and Forwards

    Improper validation of forwarding or redirect
    links

    Useful in phishing or drive by attacks

    Betrays a user's trust in a site




                                              45
                                              45
How to find

    Look for URLs or URL fragments in parameters
    and modify these




                                          46
                                          46
Demo
http://192.168.203.152/demo/login.php




                                        47
                                        47
Try it
https://challenge.subversiveresearch.org/image.php?i




                                          48
                                          48
In the news

    SQL Injection
      
          Anonymous and Lulzsec
      
          Sony et al

    Insecure Direct Object Access
      
          Citibank




                                    49
                                    49
What next
Vulnerable web applications
•   Damn Vulnerable Web Application
•   Bad Store
•   Hacme Bank|Casino|Books|Travel|...
•   Webmaven
•   Buggy Bank
•   ...

                                         50
                                         50
Questions?
brian.l.johnson@gmail.com


@brianljohnson




                              51
                              51

Weitere ähnliche Inhalte

Was ist angesagt?

From 0 to Spring Security 4.0
From 0 to Spring Security 4.0From 0 to Spring Security 4.0
From 0 to Spring Security 4.0robwinch
 
RSA Europe 2013 OWASP Training
RSA Europe 2013 OWASP TrainingRSA Europe 2013 OWASP Training
RSA Europe 2013 OWASP TrainingJim Manico
 
JavaEE Security
JavaEE SecurityJavaEE Security
JavaEE SecurityAlex Kim
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Brian Huff
 
Developing With JAAS
Developing With JAASDeveloping With JAAS
Developing With JAASrahmed_sct
 
Shreeraj-Hacking_Web_2
Shreeraj-Hacking_Web_2Shreeraj-Hacking_Web_2
Shreeraj-Hacking_Web_2guest66dc5f
 
Hacking 101 (Henallux, Owasp Top 10, WebGoat, Live Demo)
Hacking 101 (Henallux, Owasp Top 10, WebGoat, Live Demo) Hacking 101 (Henallux, Owasp Top 10, WebGoat, Live Demo)
Hacking 101 (Henallux, Owasp Top 10, WebGoat, Live Demo) Nitroxis Sprl
 
Rahul-Analysis_of_Adversarial_Code
Rahul-Analysis_of_Adversarial_CodeRahul-Analysis_of_Adversarial_Code
Rahul-Analysis_of_Adversarial_Codeguest66dc5f
 
Stronger Authentication with Biometric SSO
Stronger Authentication with Biometric SSOStronger Authentication with Biometric SSO
Stronger Authentication with Biometric SSORamesh Nagappan
 

Was ist angesagt? (11)

From 0 to Spring Security 4.0
From 0 to Spring Security 4.0From 0 to Spring Security 4.0
From 0 to Spring Security 4.0
 
iOS Masque Attack
iOS Masque AttackiOS Masque Attack
iOS Masque Attack
 
RSA Europe 2013 OWASP Training
RSA Europe 2013 OWASP TrainingRSA Europe 2013 OWASP Training
RSA Europe 2013 OWASP Training
 
JavaEE Security
JavaEE SecurityJavaEE Security
JavaEE Security
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)
 
Developing With JAAS
Developing With JAASDeveloping With JAAS
Developing With JAAS
 
Web application
Web applicationWeb application
Web application
 
Shreeraj-Hacking_Web_2
Shreeraj-Hacking_Web_2Shreeraj-Hacking_Web_2
Shreeraj-Hacking_Web_2
 
Hacking 101 (Henallux, Owasp Top 10, WebGoat, Live Demo)
Hacking 101 (Henallux, Owasp Top 10, WebGoat, Live Demo) Hacking 101 (Henallux, Owasp Top 10, WebGoat, Live Demo)
Hacking 101 (Henallux, Owasp Top 10, WebGoat, Live Demo)
 
Rahul-Analysis_of_Adversarial_Code
Rahul-Analysis_of_Adversarial_CodeRahul-Analysis_of_Adversarial_Code
Rahul-Analysis_of_Adversarial_Code
 
Stronger Authentication with Biometric SSO
Stronger Authentication with Biometric SSOStronger Authentication with Biometric SSO
Stronger Authentication with Biometric SSO
 

Ähnlich wie DC612 Day - Web Application Security: OWASP Top 10

Common Web Application Attacks
Common Web Application Attacks Common Web Application Attacks
Common Web Application Attacks Ahmed Sherif
 
Owasp top 10 & Web vulnerabilities
Owasp top 10 & Web vulnerabilitiesOwasp top 10 & Web vulnerabilities
Owasp top 10 & Web vulnerabilitiesRIZWAN HASAN
 
Secure by Default Web Applications
Secure by Default Web ApplicationsSecure by Default Web Applications
Secure by Default Web ApplicationsRobert Munteanu
 
Sania: Syntactic and Semantic Analysis for Automated Testing against SQL Inje...
Sania: Syntactic and Semantic Analysis for Automated Testing against SQL Inje...Sania: Syntactic and Semantic Analysis for Automated Testing against SQL Inje...
Sania: Syntactic and Semantic Analysis for Automated Testing against SQL Inje...Yuji Kosuga
 
MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...
MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...
MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...Quek Lilian
 
OWASP App Sec US - 2010
OWASP App Sec US - 2010OWASP App Sec US - 2010
OWASP App Sec US - 2010Aditya K Sood
 
Sql injections (Basic bypass authentication)
Sql injections (Basic bypass authentication)Sql injections (Basic bypass authentication)
Sql injections (Basic bypass authentication)Ravindra Singh Rathore
 
Web Application Scanning 101
Web Application Scanning 101Web Application Scanning 101
Web Application Scanning 101Sasha Nunke
 
Using Splunk for Information Security
Using Splunk for Information SecurityUsing Splunk for Information Security
Using Splunk for Information SecuritySplunk
 
Using Splunk for Information Security
Using Splunk for Information SecurityUsing Splunk for Information Security
Using Splunk for Information SecurityShannon Cuthbertson
 
Introduction to Web Application Penetration Testing
Introduction to Web Application Penetration TestingIntroduction to Web Application Penetration Testing
Introduction to Web Application Penetration TestingRana Khalil
 
WEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSE
WEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSEWEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSE
WEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSEAjith Kp
 
SecTor '09 - When Web 2.0 Attacks!
SecTor '09 - When Web 2.0 Attacks!SecTor '09 - When Web 2.0 Attacks!
SecTor '09 - When Web 2.0 Attacks!Rafal Los
 
Alert logic anatomy owasp infographic
Alert logic anatomy owasp infographicAlert logic anatomy owasp infographic
Alert logic anatomy owasp infographicCMR WORLD TECH
 
Web Application Penetration Tests - Vulnerability Identification and Details ...
Web Application Penetration Tests - Vulnerability Identification and Details ...Web Application Penetration Tests - Vulnerability Identification and Details ...
Web Application Penetration Tests - Vulnerability Identification and Details ...Netsparker
 
13th Symposium of Association of Anti Virus Asia Researchers (AAVAR 2010) con...
13th Symposium of Association of Anti Virus Asia Researchers (AAVAR 2010) con...13th Symposium of Association of Anti Virus Asia Researchers (AAVAR 2010) con...
13th Symposium of Association of Anti Virus Asia Researchers (AAVAR 2010) con...Aditya K Sood
 

Ähnlich wie DC612 Day - Web Application Security: OWASP Top 10 (20)

Common Web Application Attacks
Common Web Application Attacks Common Web Application Attacks
Common Web Application Attacks
 
Owasp top 10 & Web vulnerabilities
Owasp top 10 & Web vulnerabilitiesOwasp top 10 & Web vulnerabilities
Owasp top 10 & Web vulnerabilities
 
Secure by Default Web Applications
Secure by Default Web ApplicationsSecure by Default Web Applications
Secure by Default Web Applications
 
Sania: Syntactic and Semantic Analysis for Automated Testing against SQL Inje...
Sania: Syntactic and Semantic Analysis for Automated Testing against SQL Inje...Sania: Syntactic and Semantic Analysis for Automated Testing against SQL Inje...
Sania: Syntactic and Semantic Analysis for Automated Testing against SQL Inje...
 
MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...
MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...
MS Innovation Day: A Lap Around Web Application Vulnerabilities by MVP Walter...
 
OWASP App Sec US - 2010
OWASP App Sec US - 2010OWASP App Sec US - 2010
OWASP App Sec US - 2010
 
Sql injections (Basic bypass authentication)
Sql injections (Basic bypass authentication)Sql injections (Basic bypass authentication)
Sql injections (Basic bypass authentication)
 
Web Application Scanning 101
Web Application Scanning 101Web Application Scanning 101
Web Application Scanning 101
 
Owasp top 10
Owasp top 10Owasp top 10
Owasp top 10
 
Using Splunk for Information Security
Using Splunk for Information SecurityUsing Splunk for Information Security
Using Splunk for Information Security
 
Using Splunk for Information Security
Using Splunk for Information SecurityUsing Splunk for Information Security
Using Splunk for Information Security
 
Do it-yourself-audits
Do it-yourself-auditsDo it-yourself-audits
Do it-yourself-audits
 
Introduction to Web Application Penetration Testing
Introduction to Web Application Penetration TestingIntroduction to Web Application Penetration Testing
Introduction to Web Application Penetration Testing
 
TS-5358
TS-5358TS-5358
TS-5358
 
TS-5358
TS-5358TS-5358
TS-5358
 
WEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSE
WEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSEWEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSE
WEB APPLICATION VULNERABILITIES: DAWN, DETECTION, EXPLOITATION AND DEFENSE
 
SecTor '09 - When Web 2.0 Attacks!
SecTor '09 - When Web 2.0 Attacks!SecTor '09 - When Web 2.0 Attacks!
SecTor '09 - When Web 2.0 Attacks!
 
Alert logic anatomy owasp infographic
Alert logic anatomy owasp infographicAlert logic anatomy owasp infographic
Alert logic anatomy owasp infographic
 
Web Application Penetration Tests - Vulnerability Identification and Details ...
Web Application Penetration Tests - Vulnerability Identification and Details ...Web Application Penetration Tests - Vulnerability Identification and Details ...
Web Application Penetration Tests - Vulnerability Identification and Details ...
 
13th Symposium of Association of Anti Virus Asia Researchers (AAVAR 2010) con...
13th Symposium of Association of Anti Virus Asia Researchers (AAVAR 2010) con...13th Symposium of Association of Anti Virus Asia Researchers (AAVAR 2010) con...
13th Symposium of Association of Anti Virus Asia Researchers (AAVAR 2010) con...
 

DC612 Day - Web Application Security: OWASP Top 10