SlideShare a Scribd company logo
7
Most read
11
Most read
16
Most read
API First Hacking
#whoami
Corey Ball
@hAPI_hacker
• 13+ years in IT & Cyber
• Senior Manager Pentest Consulting, Moss Adams
• Author of Hacking APIs (No Starch Press, 2022)
• Founder and Chief Hacking Officer, APIsec University
- APIsecU (https://apisecu.com/)
• OWASP API Security Project Contributor
Free API Penetration Testing Course + Book Giveaway
Overview
Today I will explain why the following are true.
• APIs are a leading attack vector
• Organizations are confident in their insecure APIs
• Web app scanning tools are insufficient for API testing
• Specific testing is required to earn confidence in API Security
Classic Hacking Process
1. Call me lazy, but the classic kill chain is a lot of work
2. Gain access
3. Pivot through the network to find data
4. Exfiltrate data
The Hacking Process with APIs
1. Use Vulnerable API
2. Find Weakness
3. Exploit
4. The path of least resistance
1 - Thanks Dan Barahona, APIsec University
APIs are a leading Attack Vector
• Examples!
Optus Quotes
• "Some experts say [Optus] may be the worst data breach in Australia's history"
• "Optus chief executive ... called it a "sophisticated attack", saying the company has very
strong cybersecurity."
• The Australian Cyber Security Minister ...
• Optus chief executive responded, "We have multiple layers of protection. So it is not the case
of having some sort of completely exposed APIs [software interfaces] sitting out there".
Source: https://www.bbc.com/news/world-australia-63056838
Confidently inSecure APIs
APIsecure 2023 - API First Hacking, Corey Ball, Author of Hacking APIs
Noname 2022 Survey Results
• 71% of respondents report confidence in their API protection
• 67% of respondents are confident that their DAST and SAST tools are capable of testing APIs
Meanwhile...
• 76% experienced an API security incident in the last 12 months
Credit: https://nonamesecurity.com/press/new-research-reveals-disconnect-between-api-protection-
and-api-security-incidents
Common Web App Tools Techniques are Ineffective Against APIs
1. Definition of False-Negative
Automated Scans At Worst
Automated Scans At Best
Test the Gaps!
Authorized API Testing
- Create resources as UserA and attempt to Create, Read, Update, Delete as UserB
- Create resources as GroupA and attempt to Create, Read, Update, Delete as GroupB
- Make sure that users are only able to alter object properties that belong to them
Test API Authentication
- Weak Passwords
- Authentication Bypass or Missing Auth Altogether
- Authentication Attempt Lockout
- Rate Limiting
Test API Tokens
- Are the tokens predictable?
- Does the JWT Payload leak sensitive information?
- Can the JWT Algorithm be altered or the secret guessed?
Excessive Data Exposure
- Use the API as it was intended and analyze the response
- Does the API return too much information?
- Can that information be used in additional attacks?
Improper Assets Management
- What version is the API? ( /v1, /v2, /v3 )
- How is that version designated? (Path, Header, POST body)
- Can you request unsupported versions?
- Is the unsupported version vulnerable to additional attacks? Do all of the supported
versions support a business purpose?
Fuzz Everything!
- Inputs = POST Body, query parameters, and headers
- Test inputs for Injection
- Test inputs for Mass Assignment
- Test for SSRF
Test File Upload Functionality
- Can malicious files be uploaded?
- Can arbitrary filetypes be manipulated?
- Can uploaded files be executed with web app functionality?
API-First Security Testing
• API requests make up over 80% of all web traffic
• APIs are the path of least resistance for adversaries
• The data that APIs interact with are often the most valuable to attackers
• "API Traffic increased 681% in 2022"
• "US companies faced $12-23 billion in losses as a result of compromises linked to web APIs"
Source: Bill Doerrfeld https://blog.treblle.com/why-api-security-is-a-top-concern/
Earn Confidence in Your API Security
1. Use baseline scanning tools for security misconfiguration
2. Cover the gaps with penetration testing, bug bounty hunting, and by using tools and
techniques that are designed for APIs.
3. Remediate and Retest
hAPI Hacking!
APIsec University (Free Course)
• Completely free course that teaches hands-on API security testing
• Course is 12 CPEs
• Certification Exam Q1 2023
- - - - - -
corey.ball@mossadams.com | @hAPI_hacker

More Related Content

PDF
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
PDF
5 step plan to securing your APIs
PDF
Checkmarx meetup API Security - API Security top 10 - Erez Yalon
PDF
OWASP API Security Top 10 - API World
PDF
WEBINAR: OWASP API Security Top 10
PDF
Outpost24 webinar Why API security matters and how to get it right.pdf
PDF
API testing methdology - OWASP Pune (1).pdf
PDF
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
5 step plan to securing your APIs
Checkmarx meetup API Security - API Security top 10 - Erez Yalon
OWASP API Security Top 10 - API World
WEBINAR: OWASP API Security Top 10
Outpost24 webinar Why API security matters and how to get it right.pdf
API testing methdology - OWASP Pune (1).pdf
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...

Similar to APIsecure 2023 - API First Hacking, Corey Ball, Author of Hacking APIs (20)

PPTX
Outpost24 webinar - Api security
PPTX
Adapt or Die Sydney - API Security
PPTX
What Hackers Don’t Want You To Know: How to Maximize Your API Security
PDF
OWASP API Security Top 10 - Austin DevSecOps Days
PPTX
APIs: The New Security Layer
PDF
apidays LIVE Australia 2020 - Evaluating the usability of security APIs by Dr...
PDF
apidays London 2023 - APIs: The Attack Surface That Connects Us All, Stefan M...
PDF
2022 APIsecure_Shift Left API Security - The Right Way
PDF
apidays Australia 2023 - API Security Breach Analysis & Empowering Devs to M...
PPTX
Test and Protect Your API
PDF
API Security with Postman and Qualys
PDF
API Security with Postman and Qualys
PDF
Apidays Helsinki & North 2024 - There’s no AI without API, but what does this...
PPTX
2022 APIsecure_From Shift Left to Full Circle - A Pragmatic Approach to Catch...
PDF
Protecting Your APIs Against Attack & Hijack
PPTX
How APIs are Changing Software Development
PDF
INTERFACE by apidays 2023 - Something Old, Something New, Colin Domoney, 42Cr...
PDF
Mobile and API identity – The New Challenges
PPTX
London Adapt or Die: Securing your APIs the Right Way!
PPTX
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Outpost24 webinar - Api security
Adapt or Die Sydney - API Security
What Hackers Don’t Want You To Know: How to Maximize Your API Security
OWASP API Security Top 10 - Austin DevSecOps Days
APIs: The New Security Layer
apidays LIVE Australia 2020 - Evaluating the usability of security APIs by Dr...
apidays London 2023 - APIs: The Attack Surface That Connects Us All, Stefan M...
2022 APIsecure_Shift Left API Security - The Right Way
apidays Australia 2023 - API Security Breach Analysis & Empowering Devs to M...
Test and Protect Your API
API Security with Postman and Qualys
API Security with Postman and Qualys
Apidays Helsinki & North 2024 - There’s no AI without API, but what does this...
2022 APIsecure_From Shift Left to Full Circle - A Pragmatic Approach to Catch...
Protecting Your APIs Against Attack & Hijack
How APIs are Changing Software Development
INTERFACE by apidays 2023 - Something Old, Something New, Colin Domoney, 42Cr...
Mobile and API identity – The New Challenges
London Adapt or Die: Securing your APIs the Right Way!
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...

More from apidays (20)

PDF
apidays Munich 2025 - The Physics of Requirement Sciences Through Application...
PDF
apidays Munich 2025 - Developer Portals, API Catalogs, and Marketplaces, Miri...
PDF
apidays Munich 2025 - Making Sense of AI-Ready APIs in a Buzzword World, Andr...
PDF
apidays Munich 2025 - Integrate Your APIs into the New AI Marketplace, Senthi...
PDF
apidays Munich 2025 - The Double Life of the API Product Manager, Emmanuel Pa...
PDF
apidays Munich 2025 - Let’s build, debug and test a magic MCP server in Postm...
PDF
apidays Munich 2025 - The life-changing magic of great API docs, Jens Fischer...
PDF
apidays Munich 2025 - Automating Operations Without Reinventing the Wheel, Ma...
PDF
apidays Munich 2025 - Geospatial Artificial Intelligence (GeoAI) with OGC API...
PPTX
apidays Munich 2025 - GraphQL 101: I won't REST, until you GraphQL, Surbhi Si...
PPTX
apidays Munich 2025 - Effectively incorporating API Security into the overall...
PPTX
apidays Munich 2025 - Federated API Management and Governance, Vince Baker (D...
PPTX
apidays Munich 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (Aavista Oy)
PPTX
apidays Munich 2025 - Streamline & Secure LLM Traffic with APISIX AI Gateway ...
PPTX
apidays Munich 2025 - Building Telco-Aware Apps with Open Gateway APIs, Subhr...
PPTX
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
PDF
apidays Helsinki & North 2025 - REST in Peace? Hunting the Dominant Design fo...
PDF
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
PDF
apidays Helsinki & North 2025 - How (not) to run a Graphql Stewardship Group,...
PDF
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays Munich 2025 - The Physics of Requirement Sciences Through Application...
apidays Munich 2025 - Developer Portals, API Catalogs, and Marketplaces, Miri...
apidays Munich 2025 - Making Sense of AI-Ready APIs in a Buzzword World, Andr...
apidays Munich 2025 - Integrate Your APIs into the New AI Marketplace, Senthi...
apidays Munich 2025 - The Double Life of the API Product Manager, Emmanuel Pa...
apidays Munich 2025 - Let’s build, debug and test a magic MCP server in Postm...
apidays Munich 2025 - The life-changing magic of great API docs, Jens Fischer...
apidays Munich 2025 - Automating Operations Without Reinventing the Wheel, Ma...
apidays Munich 2025 - Geospatial Artificial Intelligence (GeoAI) with OGC API...
apidays Munich 2025 - GraphQL 101: I won't REST, until you GraphQL, Surbhi Si...
apidays Munich 2025 - Effectively incorporating API Security into the overall...
apidays Munich 2025 - Federated API Management and Governance, Vince Baker (D...
apidays Munich 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (Aavista Oy)
apidays Munich 2025 - Streamline & Secure LLM Traffic with APISIX AI Gateway ...
apidays Munich 2025 - Building Telco-Aware Apps with Open Gateway APIs, Subhr...
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays Helsinki & North 2025 - REST in Peace? Hunting the Dominant Design fo...
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
apidays Helsinki & North 2025 - How (not) to run a Graphql Stewardship Group,...
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...

Recently uploaded (20)

PPTX
Introduction to Information and Communication Technology
PPTX
Digital Literacy And Online Safety on internet
DOCX
Unit-3 cyber security network security of internet system
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PPTX
innovation process that make everything different.pptx
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPT
tcp ip networks nd ip layering assotred slides
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PDF
Testing WebRTC applications at scale.pdf
PPTX
QR Codes Qr codecodecodecodecocodedecodecode
PDF
Sims 4 Historia para lo sims 4 para jugar
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
Introduction to Information and Communication Technology
Digital Literacy And Online Safety on internet
Unit-3 cyber security network security of internet system
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
Slides PPTX World Game (s) Eco Economic Epochs.pptx
international classification of diseases ICD-10 review PPT.pptx
SASE Traffic Flow - ZTNA Connector-1.pdf
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
innovation process that make everything different.pptx
Unit-1 introduction to cyber security discuss about how to secure a system
Paper PDF World Game (s) Great Redesign.pdf
tcp ip networks nd ip layering assotred slides
Design_with_Watersergyerge45hrbgre4top (1).ppt
WebRTC in SignalWire - troubleshooting media negotiation
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
Testing WebRTC applications at scale.pdf
QR Codes Qr codecodecodecodecocodedecodecode
Sims 4 Historia para lo sims 4 para jugar
Cloud-Scale Log Monitoring _ Datadog.pdf
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...

APIsecure 2023 - API First Hacking, Corey Ball, Author of Hacking APIs

  • 1. API First Hacking #whoami Corey Ball @hAPI_hacker • 13+ years in IT & Cyber • Senior Manager Pentest Consulting, Moss Adams • Author of Hacking APIs (No Starch Press, 2022) • Founder and Chief Hacking Officer, APIsec University - APIsecU (https://apisecu.com/)
  • 2. • OWASP API Security Project Contributor Free API Penetration Testing Course + Book Giveaway
  • 3. Overview Today I will explain why the following are true. • APIs are a leading attack vector • Organizations are confident in their insecure APIs
  • 4. • Web app scanning tools are insufficient for API testing • Specific testing is required to earn confidence in API Security Classic Hacking Process 1. Call me lazy, but the classic kill chain is a lot of work 2. Gain access 3. Pivot through the network to find data 4. Exfiltrate data
  • 5. The Hacking Process with APIs 1. Use Vulnerable API 2. Find Weakness 3. Exploit
  • 6. 4. The path of least resistance 1 - Thanks Dan Barahona, APIsec University APIs are a leading Attack Vector • Examples!
  • 7. Optus Quotes • "Some experts say [Optus] may be the worst data breach in Australia's history" • "Optus chief executive ... called it a "sophisticated attack", saying the company has very strong cybersecurity."
  • 8. • The Australian Cyber Security Minister ... • Optus chief executive responded, "We have multiple layers of protection. So it is not the case of having some sort of completely exposed APIs [software interfaces] sitting out there". Source: https://www.bbc.com/news/world-australia-63056838
  • 11. Noname 2022 Survey Results • 71% of respondents report confidence in their API protection • 67% of respondents are confident that their DAST and SAST tools are capable of testing APIs Meanwhile... • 76% experienced an API security incident in the last 12 months Credit: https://nonamesecurity.com/press/new-research-reveals-disconnect-between-api-protection- and-api-security-incidents Common Web App Tools Techniques are Ineffective Against APIs 1. Definition of False-Negative
  • 14. Test the Gaps! Authorized API Testing - Create resources as UserA and attempt to Create, Read, Update, Delete as UserB - Create resources as GroupA and attempt to Create, Read, Update, Delete as GroupB
  • 15. - Make sure that users are only able to alter object properties that belong to them Test API Authentication - Weak Passwords - Authentication Bypass or Missing Auth Altogether - Authentication Attempt Lockout - Rate Limiting
  • 16. Test API Tokens - Are the tokens predictable? - Does the JWT Payload leak sensitive information? - Can the JWT Algorithm be altered or the secret guessed? Excessive Data Exposure - Use the API as it was intended and analyze the response - Does the API return too much information? - Can that information be used in additional attacks?
  • 17. Improper Assets Management - What version is the API? ( /v1, /v2, /v3 ) - How is that version designated? (Path, Header, POST body) - Can you request unsupported versions? - Is the unsupported version vulnerable to additional attacks? Do all of the supported versions support a business purpose?
  • 18. Fuzz Everything! - Inputs = POST Body, query parameters, and headers - Test inputs for Injection - Test inputs for Mass Assignment - Test for SSRF
  • 19. Test File Upload Functionality - Can malicious files be uploaded? - Can arbitrary filetypes be manipulated? - Can uploaded files be executed with web app functionality? API-First Security Testing • API requests make up over 80% of all web traffic • APIs are the path of least resistance for adversaries • The data that APIs interact with are often the most valuable to attackers • "API Traffic increased 681% in 2022" • "US companies faced $12-23 billion in losses as a result of compromises linked to web APIs" Source: Bill Doerrfeld https://blog.treblle.com/why-api-security-is-a-top-concern/
  • 20. Earn Confidence in Your API Security 1. Use baseline scanning tools for security misconfiguration 2. Cover the gaps with penetration testing, bug bounty hunting, and by using tools and techniques that are designed for APIs. 3. Remediate and Retest
  • 21. hAPI Hacking! APIsec University (Free Course) • Completely free course that teaches hands-on API security testing • Course is 12 CPEs • Certification Exam Q1 2023
  • 22. - - - - - - corey.ball@mossadams.com | @hAPI_hacker