SlideShare a Scribd company logo
Starting the Avalanche:
Application DoS In Microservice Architectures
Scott Behrens
Jeremy Heffner
$1.71
Photo of a battering ram by Flickr user Patrick Denker; License: https://creativecommons.org/licenses/by/2.0/
Jami al-Tawarikh (Compendium of Chronicles) by Rashid ad-Din. Edinburgh University Library via Wikipedia Commons.
Outline
What is Application DDoS (3 minutes)
Intro to Microservices (4 minutes)
Application DDoS in Microservices (7 mins)
Framework Discussion (9 minutes)
Case Study/Introduction to Repulsive Grizzly and Cloudy Kraken (15 minutes)
Demo (2 minutes)
Mitigation Strategies (3 minutes)
Future Work/Call to Action (2 minutes)
DDoS focused on
application layer logic
How Novel is Application DDoS?
Akamai’s State of the Internet Security Report." https://www.akamai.com. N.p., 19 Feb. 2017. Web.
Microservices are a
collection of small loosely
coupled but collaborative
services
Who Uses Microservices?
Microservice Primer: API Gateways and Client Libraries
Interface for middle tier
services
Services provide client
libraries to API Gateway
Diagrams provided with permission by microservices.io
Microservice Primer: Circuit Breaker
Helps with handling service failures
How do you know what timeout to
choose?
How long should the breaker be triggered?
Diagrams provided with permission by microservices.io
Microservice Primer: Cache
Speeds up response time
Reduces load on services
fronted by cache
Reduces the number of servers
needed to handle requests
https://github.com/netflix/evcache
Common Application DDoS
CPU
Mem
Cache
Disk
Network
Less Common But Interesting Application DDoS
Queueing
Client Library Timeouts
Healthchecks
Connection Pool
Things That Don’t Autoscale
How Logical Work Per Request Differs
Most Monolithic Application DDoS
Often 1 to 1
Some Microservice Application DDoS
Often 1 to Many
PROXY
PROXY
PROXIES
API
GATEWAY
WEBSITE
Middle Tier Service
Middle Tier Service
Middle Tier Service
Middle Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Edge Middle Backend
New School Microservice API DDoS
> python grizzly.py
…
PROXY
PROXY
PROXIES
API
GATEWAY
WEBSITE
Middle Tier Service
Middle Tier Service
Middle Tier Service
Middle Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Edge Middle Backend
New School Microservice API DDoS
> python grizzly.py
…
Fallback or
Site Error
API Gateway making
many client requests
Middle tier services
making many calls to
backend services
Backend service
queues filling up with
expensive requests
Client Timeouts, circuit
breakers triggered,
fallback experience
triggered
API GATEWAY
Middle Tier Service
Middle Tier Service
Middle Tier Service
Middle Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Edge Middle Backend
Microservice API DDoS - Simplified
Single
request
asking for
1,000
objects not
in cache
Single Request
Asking for 1,000
Objects not in
Cache*
Cache Miss Attack
Figure out what is in the cache
Make calls that require lookups outside of cache
API GATEWAY
Middle Tier Service
Middle Tier Service
Middle Tier Service
Middle Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Edge Middle Backend
Microservice API DDoS - Simplified
Middle tier has to call 3
backend services, or
6,000 calls.
Single
request
asking for
1,000
objects not
in cache
Middle tier client
library doesn’t
support batching
Results in 2 RPC calls
per object, or 2,000
RPC calls
Workflow for Identifying Application DDoS - Part 1
Identify the most latent service calls
Investigate if latent calls allow for manipulation
Determine API Gateway error conditions, thresholds, and library timeouts
Tune payload to fly under WAF/Rate Limiting
Test hypothesis
Scale your test using Cloudy Kraken (orchestrator) and Repulsive Grizzly (attack
framework)
Identifying Latent Service Calls
Example Workflow - Ordinary API Call
POST data seems to be encrypted.
Modifying POST body seems to return
fast error code
Changing I/O didn’t result in increased
latency of API calls
Example Workflow - Interesting API Call
Adding more items to list results in
longer response time
Adding too many items results in a
special error code (exp. 502)
Changing I/O resulted in increased
latency of API calls
Identifying Latent Service Calls
Microservice Application DDoS: Attack Patterns
Range
Object Out per Object in
Request Size
Combination
Application DDoS Technique: Range
Application DDoS Technique: Object Out Per Object In
Application DDoS Technique: Request Size
Application DDoS Technique: Combination
<--What about N languages?
<--What about more object fields?
Build a List of Indicators on API Health
Healthy Response
API Gateway Timeout
Client Library Timeout
WAF
Rate Limiter
Framework Exceptions
Other Indicators
HTTP 200 + Latency
Empty Response
Look for Correlations
Rate Limited*
Service May Scale Up/
Service Healthy
Logical Work Per Request
#
Req
Service
Healthy
Service Impact
ServiceImpact
New School Application DDoS Attack: Case Study
Making the Call More Expensive
Workflow for Identifying Application DDoS - Part 2
Identify the most latent service calls
Investigate if latent calls allow for manipulation
Determine API Gateway error conditions, thresholds, and library timeouts
Tune payload to fly under WAF/Rate Limiting
Test hypothesis
Scale your test using Cloudy Kraken (orchestrator) and Repulsive Grizzly (attack
framework)
Repulsive Grizzly
Skunkworks* application DDoS
framework
Written in Python3
Eventlet for high concurrency
Uses AWS SNS for logging analysis
Easily configurable
Repulsive Grizzly: Bypass WAF with Sessions
http://nerdprint.com/wp-content/uploads/2014/09/Dumle-Mountain-Cookies-Advertising2.png
Repulsive Grizzly: Single Node
Cloudy Kraken
Cloudy Kraken - What is it?
Cloudy Kraken - Key Features
Fresh global fleet of test instances each run
Lots of fresh global IP addresses
Easily push new attack code and configs
Coordinates the attack timing
Safety kill-switch
Cloudy Kraken Overview
Update Code
Push the configuration file
and attack scripts to S3.
Reset the DynamoDB state.
Build
Environment
Configure the VPCs in each
region
Start up
Attack
Nodes
Launch instances
Collect
Data
Wait for data to come
through SNS
Tear-Down
Tear down and reset the
environment in each region
Cloudy Kraken Workflow
We scaled up, time to run the test!
Tested against prod
Multi-region and
multi-agent
Conducted two 5
minute attacks
Monitored for success
Results of Test
80%
$1.71
So What Failed?
Expensive API calls could be invoked with non-member cookies
Expensive traffic resulted in many RPCs per request (1:7200)
WAF/Rate Limiter was unable to monitor middle tier RPCs
API
GATEWAY
Middle Tier Service
Middle Tier Service
Middle Tier Service
Middle Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Backend Tier Service
Edge Middle Backend
Case Study API DDoS
5. Queue continues to
fill up, takes longer to
return objects
6. Middle Tier
services
returning
5XX and 200
status codes
1. Agents cycling
through multiple
session cookies and IP
addresses
7. API gateway starts to
trigger breakers,
returning some 403’s,
503’s, 200’s, 504’s.
3. Objects not in
Cache, Cache Miss
4. About 15
seconds to
return huge
object store8. Automatic scaling of
services in progress,
but not fast enough
9. CPU Spiking in API
Gateway, Gateway
Timeouts occurring
2. Each request asking
for 7,200 expensive
calculations from
multiple backends
Demo
Microservice
Application DDoS:
Mitigations
Understand which
microservices impact
customer experience
Microservice
Application DDoS:
Mitigations
Limit batch and object
size in both client and
server
Microservice
Application DDoS:
Mitigations
Rate limiter (WAF)
should monitor
middle tier signals or
cost of request*
Microservice
Application DDoS:
Mitigations
Rate limiter (WAF)
should monitor
volume of cache
misses*
Microservice
Application DDoS:
Mitigations
Prioritize
authenticated traffic
over unauthenticated
Microservice
Application DDoS:
Mitigations
Configure reasonable
client library timeouts
Microservice
Application DDoS:
Mitigations
Trigger fallback
experiences when
cache or lookups fail
Future Work
Automated identification of potential vulnerable endpoints
Autotuning attack parameters during exercise based up on error
condition criteria
Testing common open source microservice
frameworks/libraries/gateways
Thanks!
https://github.com/netflix-skunkworks/repulsive-grizzly
https://github.com/netflix-skunkworks/cloudy-kraken
Questions? Come find us in the chill room after the session!
Scott Behrens Jeremy Heffner
@helloarbit
Extra Slides
Repulsive Grizzly: Payload and Header Files
Provide payloads in any format you want
Headers are provided as a JSON key/value hash
Use $$AUTH$$ placeholder to tell grizzly where to place tokens
Microservice Primer: Architecture
Scale
Service independence
Fault isolation
Eliminates stack debt
Distributed system complexity
Deployment complexity
Cascading service failures if
things aren’t set up right
GOOD BAD
Application DoS In Microservice Architectures

More Related Content

What's hot

Automation Testing with Test Complete
Automation Testing with Test CompleteAutomation Testing with Test Complete
Automation Testing with Test Complete
Vartika Saxena
 
Ppt of soap ui
Ppt of soap uiPpt of soap ui
Ppt of soap ui
pkslide28
 

What's hot (20)

Automation Testing with Test Complete
Automation Testing with Test CompleteAutomation Testing with Test Complete
Automation Testing with Test Complete
 
Security Best Practices for Serverless Applications - July 2017 AWS Online T...
Security Best Practices for Serverless Applications  - July 2017 AWS Online T...Security Best Practices for Serverless Applications  - July 2017 AWS Online T...
Security Best Practices for Serverless Applications - July 2017 AWS Online T...
 
Assessment methodology and approach
Assessment methodology and approachAssessment methodology and approach
Assessment methodology and approach
 
APISecurity_OWASP_MitigationGuide
APISecurity_OWASP_MitigationGuide APISecurity_OWASP_MitigationGuide
APISecurity_OWASP_MitigationGuide
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
 
Web Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolWeb Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI Tool
 
API Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGAPI Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNG
 
AWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineAWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipeline
 
Wso2 is integration with .net core
Wso2 is   integration with .net coreWso2 is   integration with .net core
Wso2 is integration with .net core
 
Understanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsUnderstanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple Steps
 
Robot Framework :: Demo login application
Robot Framework :: Demo login applicationRobot Framework :: Demo login application
Robot Framework :: Demo login application
 
Api presentation
Api presentationApi presentation
Api presentation
 
Asp.net MVC training session
Asp.net MVC training sessionAsp.net MVC training session
Asp.net MVC training session
 
Introduction to Threat Detection and Remediation on AWS
Introduction to Threat Detection and Remediation on AWSIntroduction to Threat Detection and Remediation on AWS
Introduction to Threat Detection and Remediation on AWS
 
Ppt of soap ui
Ppt of soap uiPpt of soap ui
Ppt of soap ui
 
API Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonAPI Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj Rollison
 
Rest API Security
Rest API SecurityRest API Security
Rest API Security
 
Architecting Security & Governance across Your AWS Landing Zone - SEC301 - An...
Architecting Security & Governance across Your AWS Landing Zone - SEC301 - An...Architecting Security & Governance across Your AWS Landing Zone - SEC301 - An...
Architecting Security & Governance across Your AWS Landing Zone - SEC301 - An...
 
OpenID Connect Explained
OpenID Connect ExplainedOpenID Connect Explained
OpenID Connect Explained
 
Test your microservices with REST-Assured
Test your microservices with REST-AssuredTest your microservices with REST-Assured
Test your microservices with REST-Assured
 

Similar to Application DoS In Microservice Architectures

Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)
Deepak Gupta
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecurities
amiable_indian
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
JAXLondon2014
 

Similar to Application DoS In Microservice Architectures (20)

Netflix Play API: Why we built an evolutionary architecture
Netflix Play API: Why we built an evolutionary architectureNetflix Play API: Why we built an evolutionary architecture
Netflix Play API: Why we built an evolutionary architecture
 
Web Server Technologies II: Web Applications & Server Maintenance
Web Server Technologies II: Web Applications & Server MaintenanceWeb Server Technologies II: Web Applications & Server Maintenance
Web Server Technologies II: Web Applications & Server Maintenance
 
App fabric introduction
App fabric introductionApp fabric introduction
App fabric introduction
 
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCFMigrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
 
Oauth Nightmares Abstract OAuth Nightmares
Oauth Nightmares Abstract OAuth Nightmares Oauth Nightmares Abstract OAuth Nightmares
Oauth Nightmares Abstract OAuth Nightmares
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)
 
Protecting Your APIs Against Attack & Hijack
Protecting Your APIs Against Attack & Hijack Protecting Your APIs Against Attack & Hijack
Protecting Your APIs Against Attack & Hijack
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecurities
 
WEB API Gateway
WEB API GatewayWEB API Gateway
WEB API Gateway
 
Building a Great Web API - Evan Cooke - QCON 2011
Building a Great Web API - Evan Cooke - QCON 2011Building a Great Web API - Evan Cooke - QCON 2011
Building a Great Web API - Evan Cooke - QCON 2011
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of users
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
 
Advanced Techniques for DDoS Mitigation and Web Application Defense | AWS Pub...
Advanced Techniques for DDoS Mitigation and Web Application Defense | AWS Pub...Advanced Techniques for DDoS Mitigation and Web Application Defense | AWS Pub...
Advanced Techniques for DDoS Mitigation and Web Application Defense | AWS Pub...
 
Web Security
Web SecurityWeb Security
Web Security
 
Serverless Design Patterns (London Dev Community)
Serverless Design Patterns (London Dev Community)Serverless Design Patterns (London Dev Community)
Serverless Design Patterns (London Dev Community)
 
E Snet Raf Essc Jan2005
E Snet Raf Essc Jan2005E Snet Raf Essc Jan2005
E Snet Raf Essc Jan2005
 
APIsecure 2023 - Approaching Multicloud API Security USing Metacloud, David L...
APIsecure 2023 - Approaching Multicloud API Security USing Metacloud, David L...APIsecure 2023 - Approaching Multicloud API Security USing Metacloud, David L...
APIsecure 2023 - Approaching Multicloud API Security USing Metacloud, David L...
 
Resilient and Adaptable Systems with Cloud Native APIs
Resilient and Adaptable Systems with Cloud Native APIsResilient and Adaptable Systems with Cloud Native APIs
Resilient and Adaptable Systems with Cloud Native APIs
 
Ovations AWS pop-up loft 2019 Technical presentation
Ovations AWS pop-up loft 2019 Technical presentationOvations AWS pop-up loft 2019 Technical presentation
Ovations AWS pop-up loft 2019 Technical presentation
 

Recently uploaded

Recently uploaded (20)

How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 

Application DoS In Microservice Architectures