SlideShare a Scribd company logo
1 of 38
Download to read offline
OWASP API Security Top 10
OWASP API Security Top 10
Erez Yalon
Director of Security Research
Checkmarx
OWASP API Top 10 project lead
Dmitry Sotnikov
Vice President of Cloud Platform
42Crunch
OWASP API Top 10 contributor
Traditional vs. Modern
Traditional
Application
Modern
Application
OWASP API Security Top 10
• A1 : Broken Object Level Authorization
• A2 : Broken Authentication
• A3 : Excessive Data Exposure
• A4 : Lack of Resources & Rate Limiting
• A5 : Missing Function Level Authorization
• A6 : Mass Assignment
• A7 : Security Misconfiguration
• A8 : Injection
• A9 : Improper Assets Management
• A10 : Insufficient Logging & Monitoring
A1: Broken Object Level Authorization
T-Mobile API Breach (2017)
• API behind a web portal
• Phone numbers as IDs
• Was exploited in the wild (e.g.
“SIM swap”)
https://www.vice.com/en_us/article/7xkyyz/t-mobile-customer-data-bug-hackers-no-excuse
A1: Mitigation
• Implement authorization checks with user policies and hierarchy
• Don’t rely on IDs sent from client. Use IDs stored in the session object.
• Check authorization each time there is a client request to access database
• Use random non-guessable IDs (UUIDs)
A2: Broken Authentication
Balboa hot tubs (2018)
• The mobile app controlling the hot tub is
invoking the hot tub’s API over the internet
• The APIs are “protected” with a shared
hardcoded password
• Each hot tub comes with an unprotected WiFi
hotspot
• The APIs use the WiFi hotspot ID as the device
identifier
https://apisecurity.io/issue-14-hacked-hot-tubs-airlines-trading-sites-json-encoding-best-practices/
A2: Mitigation
• Check all possible ways to authenticate to all APIs
• Password reset APIs and one-time links also allow users to get
authenticated and should be protected just as seriously
• Use standard authentication, token generation, password storage, MFA
• Use short-lived access tokens
• Authenticate your apps (so you know who is talking to you)
• Use stricter rate-limiting for authentication, implement lockout policies and
weak password checks
A3: Excessive Data Exposure
Uber account takeover (2019)
1. Error message leaking user UUID
Request
Response
https://apisecurity.io/issue-49-uber-account-takeover-leaky-get-api/
2. Make a request with the UUID
Uber account takeover (2019)
Request
https://apisecurity.io/issue-49-uber-account-takeover-leaky-get-api/
Uber account takeover (2019)
Response
(173 lines!!!)
https://apisecurity.io/issue-49-uber-account-takeover-leaky-get-api/
3. Receive tons of user data including mobile app authentication token
A3: Mitigation
• Never rely on client to filter data
• Review all responses and adapt responses to what the API consumers really
need
• Define schemas of all the API responses
• Don’t forget about error responses
• Identify all the sensitive or PII info and justify its use
• Enforce response checks to prevent accidental data and exception leaks
A4: Lack of Resources & Rate Limiting
Instagram account takeover (2019)
• Used password reset API
• Passcode expires in 10 minutes
• Rate limiting 200 / minute / IP
• 5000 cloud VMs can enumerate all 6-digit codes
• AWS/GCP cost ~ $150
Requesting passcode
POST /api/v1/users/lookup/
Host: i.instagram.com
q=mobile_number&
device_id=android-device-id
Verify passcode
POST /api/v1/accounts
/account_recovery_code_verify/
Host: i.instagram.com
recover_code=123456&
device_id=android-device-id
https://apisecurity.io/issue-40-instagram-7-eleven-zipato/
A4: Mitigation
• Rate limiting
• Payload size limits
• Rate limits specific to API methods, clients, addresses
• Checks on compression ratios
• Limits on container resources
A5: Missing Function Level Authorization
Gator kids smartwatches (2019)
• Simple request of User[Grade] value from 1 to
0 enabled management of all smartwatches
https://apisecurity.io/issue-18-security-audits-for-your-api-contracts-google-limits-gmail-api-access/
A5: Mitigation
• Don’t rely on app to enforce admin access
• Deny all access by default
• Only allow operation to users that belong to the appropriate group or role
• Properly design and test authorization
A6: Mass Assignment
Harbor (2019)
POST /api/users
{“username”:”test”,”email”:”test123@gmai.com”
,”realname”:”no
name”,”password”:”Password1u0021″,”comment”:
null,
“has_admin_role”:true}
https://apisecurity.io/issue-50-harbor-api-vulnerability-dangers-crud-apis/
• Making yourself an admin
A6: Mitigation
• Don’t automatically bind incoming data and internal objects
• Explicitly define all the parameters and payloads you are expecting
• For object schemas, use the readOnly set to true for all properties that can
be retrieved via APIs but should never be modified
• Precisely define at design time the schemas, types, patterns you will accept
in requests and enforce them at runtime
A7: Security Misconfiguration
Equifax
• Unpatched Apache Struts
• Lack of control of Content-Type HTTP header content
• Hackers penetrated by sending a crafted header with injection
https://apisecurity.io/issue-41-tinder-and-axway-breached-equifax-fined/
A7: Mitigation
• Repeatable hardening and patching processes
• Automated process to locate configuration flaws
• Disable unnecessary features
• Restrict administrative access
• Define and enforce all outputs including errors
A8: Injection
Samsung SmartThings Hub (2018)
• SmartThings Hub is able to communicate with cameras
• /credentials API can be used to set credentials for remote server
authentication
• Data is saved in SQLite database
• JSON keys with ; allowed to execute arbitrary queries
# using curl from inside the hub, but the same request could be sent using a SmartApp
$ sInj='","_id=0 where 1=2;insert into camera values (123,replace(substr(quote(zeroblob((10000 + 1) /
2)), 3, 10000), "0", "A"),1,1,1,1,1,1,1,1,1,1,1,1,1,1);--":"'
$ curl -X POST 'http://127.0.0.1:3000/credentials' -d
"{'s3':{'accessKey':'','secretKey':'','directory':'','region':'','bucket':'','sessionToken':'${sInj}'},'
videoHostUrl':'127.0.0.1/'}"
$ curl -X DELETE "http://127.0.0.1:3000/cameras/123"
https://www.talosintelligence.com/reports/TALOS-2018-0556/
A8: Mitigation
• Never trust your API consumers, even if internal
• Strictly define all input data: schemas, types, string patterns - and enforce
them at runtime
• Validate, filter, sanitize all incoming data
• Define, limit, and enforce API outputs to prevent data leaks
A9: Improper Assets Management
JustDial (2019)
• India’s largest local search service
• Had old unused unprotected API
• It was connected to live database
• Was leaking 100 mln users’ data
https://apisecurity.io/issue-28-breaches-tchap-shopify-justdial/
A9: Mitigation
• Inventory all API hosts
• Limit access to anything that should not be public
• Limit access to production data. Segregate access to production and non-
production data.
• Implement additional external controls such as API firewalls
• Properly retire old versions or backport security fixes
• Implement strict authentication, redirects, CORS, etc.
A10: Insufficient Logging & Monitoring
7-Elevel Japan: 7Pay
• Payment app
• Password reset allowed email change if
personal details were supplied
• Attackers used API to try combinations of
info for various Japanese citizens
• $510K was stolen from 900 customers
• The company only noticed after too many
users complained
https://apisecurity.io/issue-40-instagram-7-eleven-zipato/
A10: Mitigation
• Log failed attempts, denied access, input validation failures, any failures in
security policy checks
• Ensure that logs are formatted to be consumable by other tools
• Protect logs as highly sensitive
• Include enough detail to identify attackers
• Avoid having sensitive data in logs - If you need the information for
debugging purposes, redact it partially.
• Integrate with SIEMs and other dashboards, monitoring, alerting tools
Additional Resources
• Details:
OWASP API Security Top 10
• PDF:
OWASP API Sec cheat sheet
• Participate:
GitHub Project
• Get news and updates:
APIsecurity.io
• Commercial API sec tools:
42Crunch
dmitry@42crunch.com | @DSotnikov | 42crunch.com | APIsecurity.io
Thank You!

More Related Content

What's hot

APISecurity_OWASP_MitigationGuide
APISecurity_OWASP_MitigationGuide APISecurity_OWASP_MitigationGuide
APISecurity_OWASP_MitigationGuide Isabelle Mauny
 
Introduction to Web Application Penetration Testing
Introduction to Web Application Penetration TestingIntroduction to Web Application Penetration Testing
Introduction to Web Application Penetration TestingAnurag Srivastava
 
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
 
Application Security Architecture and Threat Modelling
Application Security Architecture and Threat ModellingApplication Security Architecture and Threat Modelling
Application Security Architecture and Threat ModellingPriyanka Aash
 
Learn to pen-test with OWASP ZAP
Learn to pen-test with OWASP ZAPLearn to pen-test with OWASP ZAP
Learn to pen-test with OWASP ZAPPaul Ionescu
 
OWASP Top 10 Proactive Controls
OWASP Top 10 Proactive ControlsOWASP Top 10 Proactive Controls
OWASP Top 10 Proactive ControlsKaty Anton
 
HTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versionsHTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versionsneexemil
 
SSRF For Bug Bounties
SSRF For Bug BountiesSSRF For Bug Bounties
SSRF For Bug BountiesOWASP Nagpur
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Moataz Kamel
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) securityNahidul Kibria
 
API Security Best Practices & Guidelines
API Security Best Practices & GuidelinesAPI Security Best Practices & Guidelines
API Security Best Practices & GuidelinesPrabath Siriwardena
 
APIsecure 2023 - Android Applications and API Hacking, Gabrielle Botbol
APIsecure 2023 - Android Applications and API Hacking, Gabrielle BotbolAPIsecure 2023 - Android Applications and API Hacking, Gabrielle Botbol
APIsecure 2023 - Android Applications and API Hacking, Gabrielle Botbolapidays
 
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
 

What's hot (20)

API Security Lifecycle
API Security LifecycleAPI Security Lifecycle
API Security Lifecycle
 
APISecurity_OWASP_MitigationGuide
APISecurity_OWASP_MitigationGuide APISecurity_OWASP_MitigationGuide
APISecurity_OWASP_MitigationGuide
 
Introduction to Web Application Penetration Testing
Introduction to Web Application Penetration TestingIntroduction to Web Application Penetration Testing
Introduction to Web Application Penetration Testing
 
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...
 
Application Security
Application SecurityApplication Security
Application Security
 
Application Security Architecture and Threat Modelling
Application Security Architecture and Threat ModellingApplication Security Architecture and Threat Modelling
Application Security Architecture and Threat Modelling
 
API Security Fundamentals
API Security FundamentalsAPI Security Fundamentals
API Security Fundamentals
 
OWASP Top Ten
OWASP Top TenOWASP Top Ten
OWASP Top Ten
 
Learn to pen-test with OWASP ZAP
Learn to pen-test with OWASP ZAPLearn to pen-test with OWASP ZAP
Learn to pen-test with OWASP ZAP
 
OWASP Top 10 Proactive Controls
OWASP Top 10 Proactive ControlsOWASP Top 10 Proactive Controls
OWASP Top 10 Proactive Controls
 
HTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versionsHTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versions
 
Api security-testing
Api security-testingApi security-testing
Api security-testing
 
SSRF For Bug Bounties
SSRF For Bug BountiesSSRF For Bug Bounties
SSRF For Bug Bounties
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) security
 
API Security Best Practices & Guidelines
API Security Best Practices & GuidelinesAPI Security Best Practices & Guidelines
API Security Best Practices & Guidelines
 
APIsecure 2023 - Android Applications and API Hacking, Gabrielle Botbol
APIsecure 2023 - Android Applications and API Hacking, Gabrielle BotbolAPIsecure 2023 - Android Applications and API Hacking, Gabrielle Botbol
APIsecure 2023 - Android Applications and API Hacking, Gabrielle Botbol
 
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)
 
How Secure Are Your APIs?
How Secure Are Your APIs?How Secure Are Your APIs?
How Secure Are Your APIs?
 
SSRF workshop
SSRF workshop SSRF workshop
SSRF workshop
 

Similar to OWASP API Security Top 10 - API World

OWASP API Security Top 10 - Austin DevSecOps Days
OWASP API Security Top 10 - Austin DevSecOps DaysOWASP API Security Top 10 - Austin DevSecOps Days
OWASP API Security Top 10 - Austin DevSecOps Days42Crunch
 
APIsecure 2023 - API First Hacking, Corey Ball, Author of Hacking APIs
APIsecure 2023 - API First Hacking, Corey Ball, Author of Hacking APIsAPIsecure 2023 - API First Hacking, Corey Ball, Author of Hacking APIs
APIsecure 2023 - API First Hacking, Corey Ball, Author of Hacking APIsapidays
 
5 step plan to securing your APIs
5 step plan to securing your APIs5 step plan to securing your APIs
5 step plan to securing your APIs💻 Javier Garza
 
Fragments-Plug the vulnerabilities in your App
Fragments-Plug the vulnerabilities in your AppFragments-Plug the vulnerabilities in your App
Fragments-Plug the vulnerabilities in your AppAppsecco
 
[WSO2 Integration Summit San Francisco 2019] Protecting API Infrastructures —...
[WSO2 Integration Summit San Francisco 2019] Protecting API Infrastructures —...[WSO2 Integration Summit San Francisco 2019] Protecting API Infrastructures —...
[WSO2 Integration Summit San Francisco 2019] Protecting API Infrastructures —...WSO2
 
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...apidays
 
The API Primer (OWASP AppSec Europe, May 2015)
The API Primer (OWASP AppSec Europe, May 2015)The API Primer (OWASP AppSec Europe, May 2015)
The API Primer (OWASP AppSec Europe, May 2015)Greg Patton
 
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...apidays
 
apidays LIVE Paris - Protecting financial grade API: adopting the right secur...
apidays LIVE Paris - Protecting financial grade API: adopting the right secur...apidays LIVE Paris - Protecting financial grade API: adopting the right secur...
apidays LIVE Paris - Protecting financial grade API: adopting the right secur...apidays
 
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...apidays
 
How Secure Is Your Secure API?
How Secure Is Your Secure API?How Secure Is Your Secure API?
How Secure Is Your Secure API?Colin McGovern
 
API Security Best Practices and Guidelines
API Security Best Practices and GuidelinesAPI Security Best Practices and Guidelines
API Security Best Practices and GuidelinesWSO2
 
Protecting Microservices APIs with 42Crunch API Firewall
Protecting Microservices APIs with 42Crunch API FirewallProtecting Microservices APIs with 42Crunch API Firewall
Protecting Microservices APIs with 42Crunch API Firewall42Crunch
 
INTERFACE by apidays 2023 - Something Old, Something New, Colin Domoney, 42Cr...
INTERFACE by apidays 2023 - Something Old, Something New, Colin Domoney, 42Cr...INTERFACE by apidays 2023 - Something Old, Something New, Colin Domoney, 42Cr...
INTERFACE by apidays 2023 - Something Old, Something New, Colin Domoney, 42Cr...apidays
 
API Security - OWASP top 10 for APIs + tips for pentesters
API Security - OWASP top 10 for APIs + tips for pentestersAPI Security - OWASP top 10 for APIs + tips for pentesters
API Security - OWASP top 10 for APIs + tips for pentestersInon Shkedy
 
Layered API Security: What Hackers Don't Want You To Know
Layered API Security: What Hackers Don't Want You To KnowLayered API Security: What Hackers Don't Want You To Know
Layered API Security: What Hackers Don't Want You To KnowAaronLieberman5
 
APIdays Paris 2019 - API Security Tips for Developers by Isabelle Mauny, 42Cr...
APIdays Paris 2019 - API Security Tips for Developers by Isabelle Mauny, 42Cr...APIdays Paris 2019 - API Security Tips for Developers by Isabelle Mauny, 42Cr...
APIdays Paris 2019 - API Security Tips for Developers by Isabelle Mauny, 42Cr...apidays
 
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
 
Keamanan Digital dan Privasi di Masa Pandemi-Taro Lay (Director-Kalama Cyber)
Keamanan Digital dan Privasi di Masa Pandemi-Taro Lay (Director-Kalama Cyber)Keamanan Digital dan Privasi di Masa Pandemi-Taro Lay (Director-Kalama Cyber)
Keamanan Digital dan Privasi di Masa Pandemi-Taro Lay (Director-Kalama Cyber)DicodingEvent
 

Similar to OWASP API Security Top 10 - API World (20)

OWASP API Security Top 10 - Austin DevSecOps Days
OWASP API Security Top 10 - Austin DevSecOps DaysOWASP API Security Top 10 - Austin DevSecOps Days
OWASP API Security Top 10 - Austin DevSecOps Days
 
APIsecure 2023 - API First Hacking, Corey Ball, Author of Hacking APIs
APIsecure 2023 - API First Hacking, Corey Ball, Author of Hacking APIsAPIsecure 2023 - API First Hacking, Corey Ball, Author of Hacking APIs
APIsecure 2023 - API First Hacking, Corey Ball, Author of Hacking APIs
 
5 step plan to securing your APIs
5 step plan to securing your APIs5 step plan to securing your APIs
5 step plan to securing your APIs
 
Fragments-Plug the vulnerabilities in your App
Fragments-Plug the vulnerabilities in your AppFragments-Plug the vulnerabilities in your App
Fragments-Plug the vulnerabilities in your App
 
[WSO2 Integration Summit San Francisco 2019] Protecting API Infrastructures —...
[WSO2 Integration Summit San Francisco 2019] Protecting API Infrastructures —...[WSO2 Integration Summit San Francisco 2019] Protecting API Infrastructures —...
[WSO2 Integration Summit San Francisco 2019] Protecting API Infrastructures —...
 
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...
 
The API Primer (OWASP AppSec Europe, May 2015)
The API Primer (OWASP AppSec Europe, May 2015)The API Primer (OWASP AppSec Europe, May 2015)
The API Primer (OWASP AppSec Europe, May 2015)
 
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
 
apidays LIVE Paris - Protecting financial grade API: adopting the right secur...
apidays LIVE Paris - Protecting financial grade API: adopting the right secur...apidays LIVE Paris - Protecting financial grade API: adopting the right secur...
apidays LIVE Paris - Protecting financial grade API: adopting the right secur...
 
Hacker vs AI
Hacker vs AI Hacker vs AI
Hacker vs AI
 
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...
 
How Secure Is Your Secure API?
How Secure Is Your Secure API?How Secure Is Your Secure API?
How Secure Is Your Secure API?
 
API Security Best Practices and Guidelines
API Security Best Practices and GuidelinesAPI Security Best Practices and Guidelines
API Security Best Practices and Guidelines
 
Protecting Microservices APIs with 42Crunch API Firewall
Protecting Microservices APIs with 42Crunch API FirewallProtecting Microservices APIs with 42Crunch API Firewall
Protecting Microservices APIs with 42Crunch API Firewall
 
INTERFACE by apidays 2023 - Something Old, Something New, Colin Domoney, 42Cr...
INTERFACE by apidays 2023 - Something Old, Something New, Colin Domoney, 42Cr...INTERFACE by apidays 2023 - Something Old, Something New, Colin Domoney, 42Cr...
INTERFACE by apidays 2023 - Something Old, Something New, Colin Domoney, 42Cr...
 
API Security - OWASP top 10 for APIs + tips for pentesters
API Security - OWASP top 10 for APIs + tips for pentestersAPI Security - OWASP top 10 for APIs + tips for pentesters
API Security - OWASP top 10 for APIs + tips for pentesters
 
Layered API Security: What Hackers Don't Want You To Know
Layered API Security: What Hackers Don't Want You To KnowLayered API Security: What Hackers Don't Want You To Know
Layered API Security: What Hackers Don't Want You To Know
 
APIdays Paris 2019 - API Security Tips for Developers by Isabelle Mauny, 42Cr...
APIdays Paris 2019 - API Security Tips for Developers by Isabelle Mauny, 42Cr...APIdays Paris 2019 - API Security Tips for Developers by Isabelle Mauny, 42Cr...
APIdays Paris 2019 - API Security Tips for Developers by Isabelle Mauny, 42Cr...
 
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
 
Keamanan Digital dan Privasi di Masa Pandemi-Taro Lay (Director-Kalama Cyber)
Keamanan Digital dan Privasi di Masa Pandemi-Taro Lay (Director-Kalama Cyber)Keamanan Digital dan Privasi di Masa Pandemi-Taro Lay (Director-Kalama Cyber)
Keamanan Digital dan Privasi di Masa Pandemi-Taro Lay (Director-Kalama Cyber)
 

More from 42Crunch

Top API Security Issues Found During POCs
Top API Security Issues Found During POCsTop API Security Issues Found During POCs
Top API Security Issues Found During POCs42Crunch
 
REST API Security by Design with Azure Pipelines
REST API Security by Design with Azure PipelinesREST API Security by Design with Azure Pipelines
REST API Security by Design with Azure Pipelines42Crunch
 
Are You Properly Using JWTs?
Are You Properly Using JWTs?Are You Properly Using JWTs?
Are You Properly Using JWTs?42Crunch
 
WEBINAR: Positive Security for APIs: What it is and why you need it!
 WEBINAR: Positive Security for APIs: What it is and why you need it! WEBINAR: Positive Security for APIs: What it is and why you need it!
WEBINAR: Positive Security for APIs: What it is and why you need it!42Crunch
 
The Dev, Sec and Ops of API Security - NordicAPIs
The Dev, Sec and Ops of API Security - NordicAPIsThe Dev, Sec and Ops of API Security - NordicAPIs
The Dev, Sec and Ops of API Security - NordicAPIs42Crunch
 
The Dev, Sec and Ops of API Security - API World
The Dev, Sec and Ops of API Security - API WorldThe Dev, Sec and Ops of API Security - API World
The Dev, Sec and Ops of API Security - API World42Crunch
 
API Security in a Microservices World
API Security in a Microservices WorldAPI Security in a Microservices World
API Security in a Microservices World42Crunch
 
Applying API Security at Scale
Applying API Security at ScaleApplying API Security at Scale
Applying API Security at Scale42Crunch
 
APIDays Paris Security Workshop
APIDays Paris Security WorkshopAPIDays Paris Security Workshop
APIDays Paris Security Workshop42Crunch
 
Better API Security with Automation
Better API Security with Automation Better API Security with Automation
Better API Security with Automation 42Crunch
 
Advanced API Security Patterns
Advanced API Security PatternsAdvanced API Security Patterns
Advanced API Security Patterns42Crunch
 
SecDevOps for API Security
SecDevOps for API SecuritySecDevOps for API Security
SecDevOps for API Security42Crunch
 
42crunch-API-security-workshop
42crunch-API-security-workshop42crunch-API-security-workshop
42crunch-API-security-workshop42Crunch
 
Why you need API Security Automation
Why you need API Security AutomationWhy you need API Security Automation
Why you need API Security Automation42Crunch
 
API Security: the full story
API Security: the full storyAPI Security: the full story
API Security: the full story42Crunch
 

More from 42Crunch (15)

Top API Security Issues Found During POCs
Top API Security Issues Found During POCsTop API Security Issues Found During POCs
Top API Security Issues Found During POCs
 
REST API Security by Design with Azure Pipelines
REST API Security by Design with Azure PipelinesREST API Security by Design with Azure Pipelines
REST API Security by Design with Azure Pipelines
 
Are You Properly Using JWTs?
Are You Properly Using JWTs?Are You Properly Using JWTs?
Are You Properly Using JWTs?
 
WEBINAR: Positive Security for APIs: What it is and why you need it!
 WEBINAR: Positive Security for APIs: What it is and why you need it! WEBINAR: Positive Security for APIs: What it is and why you need it!
WEBINAR: Positive Security for APIs: What it is and why you need it!
 
The Dev, Sec and Ops of API Security - NordicAPIs
The Dev, Sec and Ops of API Security - NordicAPIsThe Dev, Sec and Ops of API Security - NordicAPIs
The Dev, Sec and Ops of API Security - NordicAPIs
 
The Dev, Sec and Ops of API Security - API World
The Dev, Sec and Ops of API Security - API WorldThe Dev, Sec and Ops of API Security - API World
The Dev, Sec and Ops of API Security - API World
 
API Security in a Microservices World
API Security in a Microservices WorldAPI Security in a Microservices World
API Security in a Microservices World
 
Applying API Security at Scale
Applying API Security at ScaleApplying API Security at Scale
Applying API Security at Scale
 
APIDays Paris Security Workshop
APIDays Paris Security WorkshopAPIDays Paris Security Workshop
APIDays Paris Security Workshop
 
Better API Security with Automation
Better API Security with Automation Better API Security with Automation
Better API Security with Automation
 
Advanced API Security Patterns
Advanced API Security PatternsAdvanced API Security Patterns
Advanced API Security Patterns
 
SecDevOps for API Security
SecDevOps for API SecuritySecDevOps for API Security
SecDevOps for API Security
 
42crunch-API-security-workshop
42crunch-API-security-workshop42crunch-API-security-workshop
42crunch-API-security-workshop
 
Why you need API Security Automation
Why you need API Security AutomationWhy you need API Security Automation
Why you need API Security Automation
 
API Security: the full story
API Security: the full storyAPI Security: the full story
API Security: the full story
 

Recently uploaded

SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 

Recently uploaded (20)

SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 

OWASP API Security Top 10 - API World

  • 2. OWASP API Security Top 10 Erez Yalon Director of Security Research Checkmarx OWASP API Top 10 project lead Dmitry Sotnikov Vice President of Cloud Platform 42Crunch OWASP API Top 10 contributor
  • 4. OWASP API Security Top 10 • A1 : Broken Object Level Authorization • A2 : Broken Authentication • A3 : Excessive Data Exposure • A4 : Lack of Resources & Rate Limiting • A5 : Missing Function Level Authorization • A6 : Mass Assignment • A7 : Security Misconfiguration • A8 : Injection • A9 : Improper Assets Management • A10 : Insufficient Logging & Monitoring
  • 5. A1: Broken Object Level Authorization
  • 6. T-Mobile API Breach (2017) • API behind a web portal • Phone numbers as IDs • Was exploited in the wild (e.g. “SIM swap”) https://www.vice.com/en_us/article/7xkyyz/t-mobile-customer-data-bug-hackers-no-excuse
  • 7. A1: Mitigation • Implement authorization checks with user policies and hierarchy • Don’t rely on IDs sent from client. Use IDs stored in the session object. • Check authorization each time there is a client request to access database • Use random non-guessable IDs (UUIDs)
  • 9. Balboa hot tubs (2018) • The mobile app controlling the hot tub is invoking the hot tub’s API over the internet • The APIs are “protected” with a shared hardcoded password • Each hot tub comes with an unprotected WiFi hotspot • The APIs use the WiFi hotspot ID as the device identifier https://apisecurity.io/issue-14-hacked-hot-tubs-airlines-trading-sites-json-encoding-best-practices/
  • 10. A2: Mitigation • Check all possible ways to authenticate to all APIs • Password reset APIs and one-time links also allow users to get authenticated and should be protected just as seriously • Use standard authentication, token generation, password storage, MFA • Use short-lived access tokens • Authenticate your apps (so you know who is talking to you) • Use stricter rate-limiting for authentication, implement lockout policies and weak password checks
  • 11. A3: Excessive Data Exposure
  • 12. Uber account takeover (2019) 1. Error message leaking user UUID Request Response https://apisecurity.io/issue-49-uber-account-takeover-leaky-get-api/
  • 13. 2. Make a request with the UUID Uber account takeover (2019) Request https://apisecurity.io/issue-49-uber-account-takeover-leaky-get-api/
  • 14. Uber account takeover (2019) Response (173 lines!!!) https://apisecurity.io/issue-49-uber-account-takeover-leaky-get-api/ 3. Receive tons of user data including mobile app authentication token
  • 15. A3: Mitigation • Never rely on client to filter data • Review all responses and adapt responses to what the API consumers really need • Define schemas of all the API responses • Don’t forget about error responses • Identify all the sensitive or PII info and justify its use • Enforce response checks to prevent accidental data and exception leaks
  • 16. A4: Lack of Resources & Rate Limiting
  • 17. Instagram account takeover (2019) • Used password reset API • Passcode expires in 10 minutes • Rate limiting 200 / minute / IP • 5000 cloud VMs can enumerate all 6-digit codes • AWS/GCP cost ~ $150 Requesting passcode POST /api/v1/users/lookup/ Host: i.instagram.com q=mobile_number& device_id=android-device-id Verify passcode POST /api/v1/accounts /account_recovery_code_verify/ Host: i.instagram.com recover_code=123456& device_id=android-device-id https://apisecurity.io/issue-40-instagram-7-eleven-zipato/
  • 18. A4: Mitigation • Rate limiting • Payload size limits • Rate limits specific to API methods, clients, addresses • Checks on compression ratios • Limits on container resources
  • 19. A5: Missing Function Level Authorization
  • 20. Gator kids smartwatches (2019) • Simple request of User[Grade] value from 1 to 0 enabled management of all smartwatches https://apisecurity.io/issue-18-security-audits-for-your-api-contracts-google-limits-gmail-api-access/
  • 21. A5: Mitigation • Don’t rely on app to enforce admin access • Deny all access by default • Only allow operation to users that belong to the appropriate group or role • Properly design and test authorization
  • 24. A6: Mitigation • Don’t automatically bind incoming data and internal objects • Explicitly define all the parameters and payloads you are expecting • For object schemas, use the readOnly set to true for all properties that can be retrieved via APIs but should never be modified • Precisely define at design time the schemas, types, patterns you will accept in requests and enforce them at runtime
  • 26. Equifax • Unpatched Apache Struts • Lack of control of Content-Type HTTP header content • Hackers penetrated by sending a crafted header with injection https://apisecurity.io/issue-41-tinder-and-axway-breached-equifax-fined/
  • 27. A7: Mitigation • Repeatable hardening and patching processes • Automated process to locate configuration flaws • Disable unnecessary features • Restrict administrative access • Define and enforce all outputs including errors
  • 29. Samsung SmartThings Hub (2018) • SmartThings Hub is able to communicate with cameras • /credentials API can be used to set credentials for remote server authentication • Data is saved in SQLite database • JSON keys with ; allowed to execute arbitrary queries # using curl from inside the hub, but the same request could be sent using a SmartApp $ sInj='","_id=0 where 1=2;insert into camera values (123,replace(substr(quote(zeroblob((10000 + 1) / 2)), 3, 10000), "0", "A"),1,1,1,1,1,1,1,1,1,1,1,1,1,1);--":"' $ curl -X POST 'http://127.0.0.1:3000/credentials' -d "{'s3':{'accessKey':'','secretKey':'','directory':'','region':'','bucket':'','sessionToken':'${sInj}'},' videoHostUrl':'127.0.0.1/'}" $ curl -X DELETE "http://127.0.0.1:3000/cameras/123" https://www.talosintelligence.com/reports/TALOS-2018-0556/
  • 30. A8: Mitigation • Never trust your API consumers, even if internal • Strictly define all input data: schemas, types, string patterns - and enforce them at runtime • Validate, filter, sanitize all incoming data • Define, limit, and enforce API outputs to prevent data leaks
  • 31. A9: Improper Assets Management
  • 32. JustDial (2019) • India’s largest local search service • Had old unused unprotected API • It was connected to live database • Was leaking 100 mln users’ data https://apisecurity.io/issue-28-breaches-tchap-shopify-justdial/
  • 33. A9: Mitigation • Inventory all API hosts • Limit access to anything that should not be public • Limit access to production data. Segregate access to production and non- production data. • Implement additional external controls such as API firewalls • Properly retire old versions or backport security fixes • Implement strict authentication, redirects, CORS, etc.
  • 35. 7-Elevel Japan: 7Pay • Payment app • Password reset allowed email change if personal details were supplied • Attackers used API to try combinations of info for various Japanese citizens • $510K was stolen from 900 customers • The company only noticed after too many users complained https://apisecurity.io/issue-40-instagram-7-eleven-zipato/
  • 36. A10: Mitigation • Log failed attempts, denied access, input validation failures, any failures in security policy checks • Ensure that logs are formatted to be consumable by other tools • Protect logs as highly sensitive • Include enough detail to identify attackers • Avoid having sensitive data in logs - If you need the information for debugging purposes, redact it partially. • Integrate with SIEMs and other dashboards, monitoring, alerting tools
  • 37. Additional Resources • Details: OWASP API Security Top 10 • PDF: OWASP API Sec cheat sheet • Participate: GitHub Project • Get news and updates: APIsecurity.io • Commercial API sec tools: 42Crunch
  • 38. dmitry@42crunch.com | @DSotnikov | 42crunch.com | APIsecurity.io Thank You!