SlideShare a Scribd company logo
1 of 28
API Security Testing
The Next Step in Security Testing
$ whoami
Scott Gerlach
● CSO/Co-Founder StackHawk, Inc
● CISO @SendGrid - 3 years
● Sr. Security Arch @GoDaddy - 9 years
● Husband, Dad, Brewer, Golfer, tinkerer
● @sgerlach
● linkedin.com/in/scott-gerlach-
kaakaww
AppSec Problem Overview
AppSec = Important, but hard and how do you not let this Tech Debt pile
up?
Static Code Analysis
● Noisy, often lacks Application Context
● Language Dependant (Don’t get me started on IDE support)
Dynamic Code Analysis
● Better at actual app and context, but still somewhat noisy
● Hard to use
RASP, IAST, WAF
● Wait til someone/something else finds it… in Prod
Problem One:
Working Agreements Aren’t
Clear
Hey! I broke the crap out of your thing. Cool huh!
working agreement | [wur-king ə-ˈgrē-mənt ]
Definition Time
1. The purpose of a working agreement is to ensure the Agile Team
shares responsibility in defining expectations for how they will function
together and enhance their self-organization process
2. Working agreements can apply to services, and can even be
documented.
3. You can certainly make a working agreement with the Security Team…
just saying
Functional Agreements:
● Rate Limiting?
● Standardized Errors?
Data Input:
● Validation?
● Encoding?
● Escaping?
Data Output:
● Validation?
● Encoding?
● Escaping?
● Paging?
Data Working Agreement
Functional Agreements:
● Back off routines?
Data Input:
● Validation?
● Encoding?
● Escaping?
Data Output:
● Validation?
● Encoding?
● Escaping?
Backend Team (API Team) Front End Team
Functional Agreements:
● Rate Limiting
● Standardized Errors
Data Input:
● Validation
● Encoding
● Escaping
Data Output:
● Validation
● Encoding
● Escaping
● Paging
Data Working Agreement
Functional Agreements:
● Back off routines
Data Input:
● Validation
● Encoding
● Escaping
Data Output:
● Validation
● Encoding
● Escaping
Backend Team (API Team) Front End Team
YES, THAT!
Problem Two:
Security Tools are Built for the
Security Team
Hey! I broke the crap out of your thing. Cool huh!
FIX ALL THE THINGS!
I think we’ve got a
SQL Injection here
Security Websters
Broken Object Level Authorization
Tenancy Filtering
APIs tend to expose endpoints that handle object identifiers, creating a wide attack surface
Level Access Control issue. Object level authorization checks should be considered in every
function that accesses a data source using an input from the user
Customer A shouldn’t be able to get to Customer B’s data
Let’s Teach Them AppSec
If they know how attackers think, they’ll be able to test like an attacker - Hack Yourself!
● Here’s 11ty Billion new Acronyms to learn
● Also, let’s talk about risk
● But wait before that, do you know the Internet is a bad
place?
● If you have sent any of your Devs to a Security Training
program, who usually gets selected?
“We Need to Model Out a Price Increase”
Have you ever seen the FP&A team teach the basics of accounting to the Exec Team
Lastly, and worst of all,
they suffer from….
Problem Three:
The Production Bias
Examining the Production-Bias: People
Primary Value: These groups are very focused on the “finding” of vulnerabilities/security bugs. MOAR
findings = MOAR better.
The Security Team Pen Tester
Production is where they know the app the best Production is their only point of access
Repercussions…
● More focused on the numbers of things found, than finding and fixing the right things
● Inefficient — the “finders” are not the “fixers”
● Reinforces an adversarial relationship — “Hey look, I broke your stuff”
*Assuming you have a security team
Security is either
a blocker
or “playing catch up”
DEV OPS
Examining the Production-Bias: Timing
Production Bias - Pants Problem
Pants `R’ Us
GET /rest/api/v1/listPants
Returns list of pantIds
GET /rest/api/v1/{pantId}/details
Returns details about a pair of pants, size, color, stock
Production Bias - Pants Problem
GET /rest/api/v1/listPants
Returns list of pantIds
GET /rest/api/v1/{pantId}/details
Returns details about a pair of pants, size, color, stock
HUNDREDS OF STYLES AND SIZES WAITING FOR YOU!
Production Bias - Pants Problem
SO MANY PANTS!
Also, there’s a major problem with appsec tools that
favor running in production…
THE BUGS ARE IN
PRODUCTION.
Illustration by Stories by Freepik
Getting Started:
The Right Way
How Test-Driven
Security
Should Work
When a team writes code, they know the syntax
is wrong when it won’t compile.
When a team merges code they know there is a
problem when it doesn’t merge.
When a team runs unit tests, they know the
code is wrong when it fails the unit test.
When a team runs integration tests, they
know the code is wrong when it doesn’t work
as designed.
When a team introduces a
vulnerability, they know when it
fails a security test.
DEV OPS
Right Time: Pre-Production
Instrumenting Security Tests into CI/CD
gives engineers immediate feedback.
Adding the ability to test locally allows for
quick iteration in the fix-test loop if a new
bug is identified.
Local Dev & CI/CD
● Set up working agreements across
teams/apps/departments
● Create Standards documentation automatically
(OpenAPI/Introspection)
● If you are in security shopping for AppSec tools, BRING A
DEV with you!
● Seed the database! Test in Pre-Prod!
● Understand these two things deeply
○ Object Level Authorization (ie Tenancy Filtering)
○ Function Level Authorization (ie Admin API access)
Cover Your Bases
● Engage a project team and their pipeline
● Choose AN app or service to start
● Choose a technology (SCA, DAST)
● Iterate and expand
Just Start!
Thanks!
scott.gerlach@stackhawk.com @sgerlach https://stackhawk.com

More Related Content

Similar to 2022 APIsecure_API Security Testing: The Next Step in Modernizing AppSec

Making Security Agile
Making Security AgileMaking Security Agile
Making Security AgileOleg Gryb
 
Appsec Agility: A Brief Tour
Appsec Agility: A Brief TourAppsec Agility: A Brief Tour
Appsec Agility: A Brief TourRobert Keefer
 
IT Security - TestArmy
IT Security - TestArmy IT Security - TestArmy
IT Security - TestArmy TestArmy
 
Mistakes to-avoid-api-product
Mistakes to-avoid-api-productMistakes to-avoid-api-product
Mistakes to-avoid-api-productRahul Dighe
 
So you wanna be a pentester - free webinar to show you how
So you wanna be a pentester - free webinar to show you howSo you wanna be a pentester - free webinar to show you how
So you wanna be a pentester - free webinar to show you howJoe McCray
 
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
 
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
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flexmichael.labriola
 
Security engineering 101 when good design & security work together
Security engineering 101  when good design & security work togetherSecurity engineering 101  when good design & security work together
Security engineering 101 when good design & security work togetherWendy Knox Everette
 
Security at Greenhouse
Security at GreenhouseSecurity at Greenhouse
Security at GreenhouseMichael O'Neil
 
Securing Underprotected APIs - Deja vu Security
Securing Underprotected APIs - Deja vu SecuritySecuring Underprotected APIs - Deja vu Security
Securing Underprotected APIs - Deja vu SecurityDeja vu Security
 
iPhone App from concept to product
iPhone App from concept to productiPhone App from concept to product
iPhone App from concept to productjoeysim
 
Test execution
Test executionTest execution
Test executionadarsh j
 
Showing How Security Has (And Hasn't) Improved, After Ten Years Of Trying
Showing How Security Has (And Hasn't) Improved, After Ten Years Of TryingShowing How Security Has (And Hasn't) Improved, After Ten Years Of Trying
Showing How Security Has (And Hasn't) Improved, After Ten Years Of TryingDan Kaminsky
 
#ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman
#ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman #ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman
#ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman Agile Testing Alliance
 
2022 APIsecure_A day in the life of an API; Fighting the odds
2022 APIsecure_A day in the life of an API; Fighting the odds2022 APIsecure_A day in the life of an API; Fighting the odds
2022 APIsecure_A day in the life of an API; Fighting the oddsAPIsecure_ Official
 
Manual testing interview question by INFOTECH
Manual testing interview question by INFOTECHManual testing interview question by INFOTECH
Manual testing interview question by INFOTECHPravinsinh
 
Grails Worst Practices
Grails Worst PracticesGrails Worst Practices
Grails Worst PracticesBurt Beckwith
 
App sec and quality london - may 2016 - v0.5
App sec and quality   london -  may 2016 - v0.5App sec and quality   london -  may 2016 - v0.5
App sec and quality london - may 2016 - v0.5Dinis Cruz
 

Similar to 2022 APIsecure_API Security Testing: The Next Step in Modernizing AppSec (20)

Making Security Agile
Making Security AgileMaking Security Agile
Making Security Agile
 
Appsec Agility: A Brief Tour
Appsec Agility: A Brief TourAppsec Agility: A Brief Tour
Appsec Agility: A Brief Tour
 
IT Security - TestArmy
IT Security - TestArmy IT Security - TestArmy
IT Security - TestArmy
 
Mistakes to-avoid-api-product
Mistakes to-avoid-api-productMistakes to-avoid-api-product
Mistakes to-avoid-api-product
 
So you wanna be a pentester - free webinar to show you how
So you wanna be a pentester - free webinar to show you howSo you wanna be a pentester - free webinar to show you how
So you wanna be a pentester - free webinar to show you how
 
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
 
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...
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
 
Year Zero
Year ZeroYear Zero
Year Zero
 
Security engineering 101 when good design & security work together
Security engineering 101  when good design & security work togetherSecurity engineering 101  when good design & security work together
Security engineering 101 when good design & security work together
 
Security at Greenhouse
Security at GreenhouseSecurity at Greenhouse
Security at Greenhouse
 
Securing Underprotected APIs - Deja vu Security
Securing Underprotected APIs - Deja vu SecuritySecuring Underprotected APIs - Deja vu Security
Securing Underprotected APIs - Deja vu Security
 
iPhone App from concept to product
iPhone App from concept to productiPhone App from concept to product
iPhone App from concept to product
 
Test execution
Test executionTest execution
Test execution
 
Showing How Security Has (And Hasn't) Improved, After Ten Years Of Trying
Showing How Security Has (And Hasn't) Improved, After Ten Years Of TryingShowing How Security Has (And Hasn't) Improved, After Ten Years Of Trying
Showing How Security Has (And Hasn't) Improved, After Ten Years Of Trying
 
#ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman
#ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman #ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman
#ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman
 
2022 APIsecure_A day in the life of an API; Fighting the odds
2022 APIsecure_A day in the life of an API; Fighting the odds2022 APIsecure_A day in the life of an API; Fighting the odds
2022 APIsecure_A day in the life of an API; Fighting the odds
 
Manual testing interview question by INFOTECH
Manual testing interview question by INFOTECHManual testing interview question by INFOTECH
Manual testing interview question by INFOTECH
 
Grails Worst Practices
Grails Worst PracticesGrails Worst Practices
Grails Worst Practices
 
App sec and quality london - may 2016 - v0.5
App sec and quality   london -  may 2016 - v0.5App sec and quality   london -  may 2016 - v0.5
App sec and quality london - may 2016 - v0.5
 

More from APIsecure_ Official

2022 APIsecure_The Real World, API Security Edition
2022 APIsecure_The Real World, API Security Edition2022 APIsecure_The Real World, API Security Edition
2022 APIsecure_The Real World, API Security EditionAPIsecure_ Official
 
2022 APIsecure_Learn from the Past, Secure the Present, Plan for the Future: ...
2022 APIsecure_Learn from the Past, Secure the Present, Plan for the Future: ...2022 APIsecure_Learn from the Past, Secure the Present, Plan for the Future: ...
2022 APIsecure_Learn from the Past, Secure the Present, Plan for the Future: ...APIsecure_ Official
 
2022 APIsecure_Shift Left API Security - The Right Way
2022 APIsecure_Shift Left API Security - The Right Way2022 APIsecure_Shift Left API Security - The Right Way
2022 APIsecure_Shift Left API Security - The Right WayAPIsecure_ Official
 
2022 APIsecure_Passwordless Multi-factor Authentication Security and Identity
2022 APIsecure_Passwordless Multi-factor Authentication Security and Identity2022 APIsecure_Passwordless Multi-factor Authentication Security and Identity
2022 APIsecure_Passwordless Multi-factor Authentication Security and IdentityAPIsecure_ Official
 
2022 APIsecure_Securing Large API Ecosystems
2022 APIsecure_Securing Large API Ecosystems2022 APIsecure_Securing Large API Ecosystems
2022 APIsecure_Securing Large API EcosystemsAPIsecure_ Official
 
2022 APIsecure_Quarterly Review of API Vulnerabilities
2022 APIsecure_Quarterly Review of API Vulnerabilities2022 APIsecure_Quarterly Review of API Vulnerabilities
2022 APIsecure_Quarterly Review of API VulnerabilitiesAPIsecure_ Official
 
2022 APIsecure_Top Ten Security Tips for APIs
2022 APIsecure_Top Ten Security Tips for APIs2022 APIsecure_Top Ten Security Tips for APIs
2022 APIsecure_Top Ten Security Tips for APIsAPIsecure_ Official
 
2022 APIsecure_Are your APIs Rugged Enough?
2022 APIsecure_Are your APIs Rugged Enough?2022 APIsecure_Are your APIs Rugged Enough?
2022 APIsecure_Are your APIs Rugged Enough?APIsecure_ Official
 
2022 APIsecure_Making webhook APIs secure for enterprise
2022 APIsecure_Making webhook APIs secure for enterprise2022 APIsecure_Making webhook APIs secure for enterprise
2022 APIsecure_Making webhook APIs secure for enterpriseAPIsecure_ Official
 
2022 APIsecure_API Security & Fraud Detection - Are you ready?
2022 APIsecure_API Security & Fraud Detection - Are you ready?2022 APIsecure_API Security & Fraud Detection - Are you ready?
2022 APIsecure_API Security & Fraud Detection - Are you ready?APIsecure_ Official
 
2022 APIsecure_Monitoring and Responding to API Breaches
2022 APIsecure_Monitoring and Responding to API Breaches2022 APIsecure_Monitoring and Responding to API Breaches
2022 APIsecure_Monitoring and Responding to API BreachesAPIsecure_ Official
 
2022 APIsecure_Exploiting multi-step business logic vulnerabilities in APIs
2022 APIsecure_Exploiting multi-step business logic vulnerabilities in APIs2022 APIsecure_Exploiting multi-step business logic vulnerabilities in APIs
2022 APIsecure_Exploiting multi-step business logic vulnerabilities in APIsAPIsecure_ Official
 
2022 APIsecure_Realizing the Full Cloud Native Potential With a Multi-Layered...
2022 APIsecure_Realizing the Full Cloud Native Potential With a Multi-Layered...2022 APIsecure_Realizing the Full Cloud Native Potential With a Multi-Layered...
2022 APIsecure_Realizing the Full Cloud Native Potential With a Multi-Layered...APIsecure_ Official
 
2022 APIsecure_From Shift Left to Full Circle - A Pragmatic Approach to Catch...
2022 APIsecure_From Shift Left to Full Circle - A Pragmatic Approach to Catch...2022 APIsecure_From Shift Left to Full Circle - A Pragmatic Approach to Catch...
2022 APIsecure_From Shift Left to Full Circle - A Pragmatic Approach to Catch...APIsecure_ Official
 
2022 APIsecure_Hackers with Valid Credentials
2022 APIsecure_Hackers with Valid Credentials2022 APIsecure_Hackers with Valid Credentials
2022 APIsecure_Hackers with Valid CredentialsAPIsecure_ Official
 
2022 APIsecure_API Abuse - How data breaches now and in the future will use A...
2022 APIsecure_API Abuse - How data breaches now and in the future will use A...2022 APIsecure_API Abuse - How data breaches now and in the future will use A...
2022 APIsecure_API Abuse - How data breaches now and in the future will use A...APIsecure_ Official
 
2022 APIsecure_Understanding API Abuse With Behavioral Analytics
2022 APIsecure_Understanding API Abuse With Behavioral Analytics2022 APIsecure_Understanding API Abuse With Behavioral Analytics
2022 APIsecure_Understanding API Abuse With Behavioral AnalyticsAPIsecure_ Official
 
2022 APIsecure_Harnessing the Speed of Innovation
2022 APIsecure_Harnessing the Speed of Innovation2022 APIsecure_Harnessing the Speed of Innovation
2022 APIsecure_Harnessing the Speed of InnovationAPIsecure_ Official
 
2022 APIsecure_API Discovery: First step towards API Security
2022 APIsecure_API Discovery: First step towards API Security2022 APIsecure_API Discovery: First step towards API Security
2022 APIsecure_API Discovery: First step towards API SecurityAPIsecure_ Official
 
2022 APIsecure_We’re Not in AppSec Anymore Toto
2022 APIsecure_We’re Not in AppSec Anymore Toto2022 APIsecure_We’re Not in AppSec Anymore Toto
2022 APIsecure_We’re Not in AppSec Anymore TotoAPIsecure_ Official
 

More from APIsecure_ Official (20)

2022 APIsecure_The Real World, API Security Edition
2022 APIsecure_The Real World, API Security Edition2022 APIsecure_The Real World, API Security Edition
2022 APIsecure_The Real World, API Security Edition
 
2022 APIsecure_Learn from the Past, Secure the Present, Plan for the Future: ...
2022 APIsecure_Learn from the Past, Secure the Present, Plan for the Future: ...2022 APIsecure_Learn from the Past, Secure the Present, Plan for the Future: ...
2022 APIsecure_Learn from the Past, Secure the Present, Plan for the Future: ...
 
2022 APIsecure_Shift Left API Security - The Right Way
2022 APIsecure_Shift Left API Security - The Right Way2022 APIsecure_Shift Left API Security - The Right Way
2022 APIsecure_Shift Left API Security - The Right Way
 
2022 APIsecure_Passwordless Multi-factor Authentication Security and Identity
2022 APIsecure_Passwordless Multi-factor Authentication Security and Identity2022 APIsecure_Passwordless Multi-factor Authentication Security and Identity
2022 APIsecure_Passwordless Multi-factor Authentication Security and Identity
 
2022 APIsecure_Securing Large API Ecosystems
2022 APIsecure_Securing Large API Ecosystems2022 APIsecure_Securing Large API Ecosystems
2022 APIsecure_Securing Large API Ecosystems
 
2022 APIsecure_Quarterly Review of API Vulnerabilities
2022 APIsecure_Quarterly Review of API Vulnerabilities2022 APIsecure_Quarterly Review of API Vulnerabilities
2022 APIsecure_Quarterly Review of API Vulnerabilities
 
2022 APIsecure_Top Ten Security Tips for APIs
2022 APIsecure_Top Ten Security Tips for APIs2022 APIsecure_Top Ten Security Tips for APIs
2022 APIsecure_Top Ten Security Tips for APIs
 
2022 APIsecure_Are your APIs Rugged Enough?
2022 APIsecure_Are your APIs Rugged Enough?2022 APIsecure_Are your APIs Rugged Enough?
2022 APIsecure_Are your APIs Rugged Enough?
 
2022 APIsecure_Making webhook APIs secure for enterprise
2022 APIsecure_Making webhook APIs secure for enterprise2022 APIsecure_Making webhook APIs secure for enterprise
2022 APIsecure_Making webhook APIs secure for enterprise
 
2022 APIsecure_API Security & Fraud Detection - Are you ready?
2022 APIsecure_API Security & Fraud Detection - Are you ready?2022 APIsecure_API Security & Fraud Detection - Are you ready?
2022 APIsecure_API Security & Fraud Detection - Are you ready?
 
2022 APIsecure_Monitoring and Responding to API Breaches
2022 APIsecure_Monitoring and Responding to API Breaches2022 APIsecure_Monitoring and Responding to API Breaches
2022 APIsecure_Monitoring and Responding to API Breaches
 
2022 APIsecure_Exploiting multi-step business logic vulnerabilities in APIs
2022 APIsecure_Exploiting multi-step business logic vulnerabilities in APIs2022 APIsecure_Exploiting multi-step business logic vulnerabilities in APIs
2022 APIsecure_Exploiting multi-step business logic vulnerabilities in APIs
 
2022 APIsecure_Realizing the Full Cloud Native Potential With a Multi-Layered...
2022 APIsecure_Realizing the Full Cloud Native Potential With a Multi-Layered...2022 APIsecure_Realizing the Full Cloud Native Potential With a Multi-Layered...
2022 APIsecure_Realizing the Full Cloud Native Potential With a Multi-Layered...
 
2022 APIsecure_From Shift Left to Full Circle - A Pragmatic Approach to Catch...
2022 APIsecure_From Shift Left to Full Circle - A Pragmatic Approach to Catch...2022 APIsecure_From Shift Left to Full Circle - A Pragmatic Approach to Catch...
2022 APIsecure_From Shift Left to Full Circle - A Pragmatic Approach to Catch...
 
2022 APIsecure_Hackers with Valid Credentials
2022 APIsecure_Hackers with Valid Credentials2022 APIsecure_Hackers with Valid Credentials
2022 APIsecure_Hackers with Valid Credentials
 
2022 APIsecure_API Abuse - How data breaches now and in the future will use A...
2022 APIsecure_API Abuse - How data breaches now and in the future will use A...2022 APIsecure_API Abuse - How data breaches now and in the future will use A...
2022 APIsecure_API Abuse - How data breaches now and in the future will use A...
 
2022 APIsecure_Understanding API Abuse With Behavioral Analytics
2022 APIsecure_Understanding API Abuse With Behavioral Analytics2022 APIsecure_Understanding API Abuse With Behavioral Analytics
2022 APIsecure_Understanding API Abuse With Behavioral Analytics
 
2022 APIsecure_Harnessing the Speed of Innovation
2022 APIsecure_Harnessing the Speed of Innovation2022 APIsecure_Harnessing the Speed of Innovation
2022 APIsecure_Harnessing the Speed of Innovation
 
2022 APIsecure_API Discovery: First step towards API Security
2022 APIsecure_API Discovery: First step towards API Security2022 APIsecure_API Discovery: First step towards API Security
2022 APIsecure_API Discovery: First step towards API Security
 
2022 APIsecure_We’re Not in AppSec Anymore Toto
2022 APIsecure_We’re Not in AppSec Anymore Toto2022 APIsecure_We’re Not in AppSec Anymore Toto
2022 APIsecure_We’re Not in AppSec Anymore Toto
 

Recently uploaded

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
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
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
#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
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
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
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
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...
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
#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
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
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
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

2022 APIsecure_API Security Testing: The Next Step in Modernizing AppSec

  • 1. API Security Testing The Next Step in Security Testing
  • 2. $ whoami Scott Gerlach ● CSO/Co-Founder StackHawk, Inc ● CISO @SendGrid - 3 years ● Sr. Security Arch @GoDaddy - 9 years ● Husband, Dad, Brewer, Golfer, tinkerer ● @sgerlach ● linkedin.com/in/scott-gerlach- kaakaww
  • 3. AppSec Problem Overview AppSec = Important, but hard and how do you not let this Tech Debt pile up? Static Code Analysis ● Noisy, often lacks Application Context ● Language Dependant (Don’t get me started on IDE support) Dynamic Code Analysis ● Better at actual app and context, but still somewhat noisy ● Hard to use RASP, IAST, WAF ● Wait til someone/something else finds it… in Prod
  • 5. Hey! I broke the crap out of your thing. Cool huh!
  • 6. working agreement | [wur-king ə-ˈgrē-mənt ] Definition Time 1. The purpose of a working agreement is to ensure the Agile Team shares responsibility in defining expectations for how they will function together and enhance their self-organization process 2. Working agreements can apply to services, and can even be documented. 3. You can certainly make a working agreement with the Security Team… just saying
  • 7. Functional Agreements: ● Rate Limiting? ● Standardized Errors? Data Input: ● Validation? ● Encoding? ● Escaping? Data Output: ● Validation? ● Encoding? ● Escaping? ● Paging? Data Working Agreement Functional Agreements: ● Back off routines? Data Input: ● Validation? ● Encoding? ● Escaping? Data Output: ● Validation? ● Encoding? ● Escaping? Backend Team (API Team) Front End Team
  • 8. Functional Agreements: ● Rate Limiting ● Standardized Errors Data Input: ● Validation ● Encoding ● Escaping Data Output: ● Validation ● Encoding ● Escaping ● Paging Data Working Agreement Functional Agreements: ● Back off routines Data Input: ● Validation ● Encoding ● Escaping Data Output: ● Validation ● Encoding ● Escaping Backend Team (API Team) Front End Team YES, THAT!
  • 9. Problem Two: Security Tools are Built for the Security Team
  • 10. Hey! I broke the crap out of your thing. Cool huh! FIX ALL THE THINGS! I think we’ve got a SQL Injection here
  • 11. Security Websters Broken Object Level Authorization Tenancy Filtering APIs tend to expose endpoints that handle object identifiers, creating a wide attack surface Level Access Control issue. Object level authorization checks should be considered in every function that accesses a data source using an input from the user Customer A shouldn’t be able to get to Customer B’s data
  • 12. Let’s Teach Them AppSec If they know how attackers think, they’ll be able to test like an attacker - Hack Yourself! ● Here’s 11ty Billion new Acronyms to learn ● Also, let’s talk about risk ● But wait before that, do you know the Internet is a bad place? ● If you have sent any of your Devs to a Security Training program, who usually gets selected?
  • 13. “We Need to Model Out a Price Increase” Have you ever seen the FP&A team teach the basics of accounting to the Exec Team
  • 14. Lastly, and worst of all, they suffer from….
  • 16. Examining the Production-Bias: People Primary Value: These groups are very focused on the “finding” of vulnerabilities/security bugs. MOAR findings = MOAR better. The Security Team Pen Tester Production is where they know the app the best Production is their only point of access Repercussions… ● More focused on the numbers of things found, than finding and fixing the right things ● Inefficient — the “finders” are not the “fixers” ● Reinforces an adversarial relationship — “Hey look, I broke your stuff” *Assuming you have a security team
  • 17. Security is either a blocker or “playing catch up” DEV OPS Examining the Production-Bias: Timing
  • 18. Production Bias - Pants Problem Pants `R’ Us GET /rest/api/v1/listPants Returns list of pantIds GET /rest/api/v1/{pantId}/details Returns details about a pair of pants, size, color, stock
  • 19. Production Bias - Pants Problem GET /rest/api/v1/listPants Returns list of pantIds GET /rest/api/v1/{pantId}/details Returns details about a pair of pants, size, color, stock HUNDREDS OF STYLES AND SIZES WAITING FOR YOU!
  • 20. Production Bias - Pants Problem SO MANY PANTS!
  • 21. Also, there’s a major problem with appsec tools that favor running in production… THE BUGS ARE IN PRODUCTION. Illustration by Stories by Freepik
  • 23. How Test-Driven Security Should Work When a team writes code, they know the syntax is wrong when it won’t compile. When a team merges code they know there is a problem when it doesn’t merge. When a team runs unit tests, they know the code is wrong when it fails the unit test. When a team runs integration tests, they know the code is wrong when it doesn’t work as designed. When a team introduces a vulnerability, they know when it fails a security test.
  • 24. DEV OPS Right Time: Pre-Production Instrumenting Security Tests into CI/CD gives engineers immediate feedback. Adding the ability to test locally allows for quick iteration in the fix-test loop if a new bug is identified. Local Dev & CI/CD
  • 25. ● Set up working agreements across teams/apps/departments ● Create Standards documentation automatically (OpenAPI/Introspection) ● If you are in security shopping for AppSec tools, BRING A DEV with you! ● Seed the database! Test in Pre-Prod! ● Understand these two things deeply ○ Object Level Authorization (ie Tenancy Filtering) ○ Function Level Authorization (ie Admin API access) Cover Your Bases
  • 26.
  • 27. ● Engage a project team and their pipeline ● Choose AN app or service to start ● Choose a technology (SCA, DAST) ● Iterate and expand Just Start!

Editor's Notes

  1. Working agreements just don’t exist between a lot of teams. Let’s dig in a bit more
  2. Working agreements just don’t exist between a lot of teams. Our friends here don’t seme to buy into what we are talking about. Working agreements are good Mr. Lamar! They can help you keep things straight between teams. Perhaps you’ve not heard of them or maybe not understand how they relate to API security? Let dig into them a bit more.
  3. Generally a working agreement is a contract or an understanding between two or more parties. This really came up in Agile and Scrum or Product Delivery Teams
  4. Who is in charge of all of these things? At what point should the front end be encoding data? If the front end encodes the data, does the back end need to worry about it at all? Don’t forget, that API is probably public. Who’s to say the Front End is the only thing accessing the API? Data Shape / Data Contracts
  5. Yes, we should be doing all of these things. HOW you do them is just as important as identifying needing to do them and that’s what should go into the working agreement
  6. The hard truth is, you can never hire as many AppSec people as the organization can hire developers. The Security team often makes this whole thing a lot harder in the name of “accountability”, but really what they are doing at this point is making people go slower or cause interruptions because they can’t scale with the business.
  7. This is what a lot of security tools look like and in fact almost all of the AppSec tools look like this. If an engineer gained access to a tool that looked like this, they’d probably close it pretty quick OR start making fun of how it was developed. Neither is what you want them to do.
  8. Built in security person language A developers job is not to learn all of this new stuff, but they have to know how to protect against it and or prevent it. These are basically the same thing here, obviously there could be more to the Tenancy Filtering, but so many of these definitions are so broadly described, it can be really hard to apply them to a real word scenario
  9. This is at best misguided and at worst continues to drive division between Dev and Security teams. “You don’t know how to do your job, but we can teach you how to do ours...”
  10. It’s the equivalent of accounting saying to leadership, lets teach you about the GL
  11. Because they are built for the security team they inherit another problem
  12. The people that do testing today and the context under which they understand the thing they are testing
  13. As companies are rapidly shipping code to production, security is not baked into this workflow. (Either you’re not rapidly shipping (in which case appsec processes act as a blocker), or the security team is playing catch up) If the security team is doing release approval, they are acting as blockers. AppSec tools that run in production are often used infrequently, in <some duration> after a release and are just telling you about the bugs you released in production There’s a huge problem with this methodology
  14. Here’ an example API. It’s used to display pant details in an online shop. We don’t just sell one kind of pants though
  15. We sell LOTS of pants. Most tools that are used to scan APIs and Websites like this don’t understand and turn 2 simple API calls into HUNDREDS and can end up taking hours to complete. Sometimes they do this because we aren’t generating standard specs like OpenAPI Spec and sometimes it’s because the scanner just doesn’t use the specs.
  16. I mean like a LOT! of pants. Most tools that are used to scan APIs and Websites like this don’t understand and turn 2 simple API calls into HUNDREDS and can end up taking hours to complete. Sometimes they do this because we aren’t generating standard specs like OpenAPI Spec and sometimes it’s because the scanner just doesn’t use the specs.
  17. The process is so frustrating for software engineers. The security team runs infrequent scans of your code that is already in production. They then engage in a bunch of ticket shuffling trying to find the engineering team that wrote or can otherwise fix the issue in the code. That team has long moved on to other engineering work (business value) and they have conflicting priorities - and often security tickets lack the concept of business context as to why they’re important to fix over current spint work. As a product person you’re fighting for roadmap delivery and meeting customer commitments. May intentionally ship to production making a risk based decision… There will be lots of times that we will intentionally ship security bugs to production, but the intentionality is the important thing here. This should be done eyes wide open and be a risk based decision. You might know that exposure is limited and it will be fixed in the next sprint. But production should not be the first place that you are checking *if* there are any bugs. <- PREACH!
  18. To combat this trust issue, often times security teams com up with a new great idea
  19. We (security), also have this nasty habit. Often we think of eliminating ALL risk - patch EVERYTHING, don’t do ANYTHING in the cloud, etc. Businesses exist to take risk. That risk is to provide solutions to customer problems. Heck even thinking you can solve a customers problem is a risk. Need measured and informed risk to operate, security is no different.
  20. As CTOs, VPs Eng, and Engineering manager or even a Developer, perhaps you’ve been tasked with “Security”. That can lead to one of these things in your head. It’s easier to start than you think, and we’ll go over that at the end.
  21. And one other, that I know of for sure. Wink wink
  22. A check for security bugs in production is inefficient. Engineers have moved on to other sprint tasks and fixing involves context switching. Scanning www. Or app. In production makes it difficult to identify the app or service affected, and lacks context of the specific data handled by that service. You end up with ticket shuffling trying to identify the service affected then find the team who owns the service that was affected. Focus on number of bugs found, and % fixed over time ignores business context of the findings and trade off decisions around business value generation Might be some good data here about time to fix from other analogs (e.g., unit testing or integration testing)? The findings often lack business context - How important is this thing to the business? Should we be fixing ALL of the bugs on an internal application or going fast on that? How should we think about our apps and the data they handle?
  23. The process is so frustrating for software engineers. The security team runs infrequent scans of your code that is already in production. They then engage in a bunch of ticket shuffling trying to find the engineering team that wrote or can otherwise fix the issue in the code. That team has long moved on to other engineering work (business value) and they have conflicting priorities - and often security tickets lack the concept of business context as to why they’re important to fix over current spint work. As a product person you’re fighting for roadmap delivery and meeting customer commitments. May intentionally ship to production making a risk based decision… There will be lots of times that we will intentionally ship security bugs to production, but the intentionality is the important thing here. This should be done eyes wide open and be a risk based decision. You might know that exposure is limited and it will be fixed in the next sprint. But production should not be the first place that you are checking *if* there are any bugs. <- PREACH!
  24. Instrumenting Security Tests into CICD gives feedback immediately. Adding the ability to test locally allows engineers to quickly iterate the fix-test loop if a new bug was identified. would add something about feedback loops - CiCD gives feedback immediately and is configured to run with merge/pr etc - weekly scanning is not that at all… less security bugs make it to production Our customers check for security bugs on every merge. And have the ability to quickly test locally when troubleshooting a fix. You can test while you’re writing code, and test while you’re building code… and security tools should play well in these phases of development.
  25. Working agreements make most of this stuff easier. Knowing what the other team is going to do, take a lot of guess work out of your daily job Having code create documentation for you is your BEST Friend. I’ve spoken with so many company’s that have REST APIs and no API Specification. When I ask them how people in the organization figure out how to integrate with those services, the answers range from Internal Wikis to the read the code base of the API… None of that is efficient AND it makes testing really hard Testing in Prod has a lot of drawbacks. If you need to test in prod, it should be the triple double stamp, not the only stamp. Test early, test often, test with seed data. The best tool you can buy, is one the dev team will use and like (let’s not stretch here and say love) - Bring a lead dev or a dev experience or a dev manager with you to do evaluations. Printing outstanding issues to PDF is not doing you any good. Measuring Time to Close in months, is, we’ll it’s a waste of time… Security tools just don’t understand these things and they are REALLY hard to generically test for. Write tests for these issues, make sure customer A can’t see customer Bs data and make sure you can’t just willy nilly get to the admin section of the API by guessing a path (becasue you documented the path, remember, it’s not secret)
  26. Warning: You may need a few therapy sessions to break down the lack of trust between these teams
  27. Define each appsec tool - high level of how it works Options open source and commercial (open source and commercial) I feel like there could be something here that drills home the how. Auto check on every merge Visibility in developer tooling (e.g., Slack) Reproducibility that developers can use themselves. It should all live with the developers so they can self serve. This democratizes security.