SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
THREATS PROTECTION
IN A DISTRIBUTED WORLD


Using 42Crunch API Firewall on Kubernetes
ISABELLE MAUNY - Field CTO (isabelle@42crunch.com)
LOOSELY COUPLED ARCHITECTURE
2
App icon made by https://www.flaticon.com/authors/pixel-buddha
Microservice B
Microservice A
Front Process/Controller Data
North
South
North
South
East
West
API
API
API
API
API
HOW DO WE SECURE
APIS?
LAYERED APPROACH TO SECURITY
4
Hypervisor, images (VM/Docker)
Intra-services communication (auth, azn, TLS)
App level security (libs, code, data)
OS / Network / Physical Access
COMMUNICATION LAYER SECURITY
5
Microservice B
Microservice A
Front Process/Controller Data
North
South
North
South
East
West
API
API
API
API
API
WHAT DO WE ENFORCE AT COMMUNICATION LEVEL ?
Can service A talk to service B ?
✓ Authentication (is this Service A?)
✓ Authorization (is it authorized to invoke Service B?)
Where is service B ?
✓ Service registry
Is the communication secure?
✓ Use TLS across the board
Can any service B be abused via large number of calls from Service A?
✓ Traffic management
Protection from cascading failures
✓ If Service B is stalled, how does the rest of the system reacts ?
If somebody can inject a rogue service in our infra, will this service be able to
invoke other services? 6
API
GW
Service Mesh Proxy
Service Mesh Proxy
Service Mesh Proxy
Service Mesh Proxy
Service Mesh Proxy
COMMUNICATION LAYER SECURITY
7
Microservice B
Front Process/Controller
Data
API
API
Microservice A
API
API
API
CRITICAL THINGS TO REMEMBER
Respect separation of concerns
✓ A Service Mesh is only concerned with infrastructure security !
✓ A mesh does not know about the data flowing through
✓ A service does not know about the infrastructure setup
Think of an API Gateway as a pattern, not a product !
API Gateway is defined as a layer which can:
✓ Expose APIs to consumers (business APIs)
✓ Compose microservices into one or multiple macro-services
✓ Enforce communication level security as described before
8
SO NOW…
Where do we validate that the data we are receiving is what we
expect ?
How do we ensure that we don’t leak data or exceptions?
Where do we validate that our app tokens are the ones we expect ?
Where do we authenticate/authorize access to our business services?
✓ Can Isabelle view a resource with ID 123456 ?
9
WE NEED APP LEVEL SECURITY
APPLICATION LEVEL SECURITY
API Threat Protection API Access Control
API/Identity managementAPI Firewall
➡ Content validation
➡ Token validation
➡ Traffic management
➡ Payload security (encrypt/
sign)
➡ Threat detection
➡ Access tokens management
➡ Authentication
➡ Authorization
➡ Identity management
API
GW
Service Mesh Proxy
Service Mesh Proxy
Service Mesh Proxy
Service Mesh Proxy
Service Mesh Proxy
COMMUNICATION LAYER + APP LAYER SECURITY
11
Microservice B
Front Process/Controller
Data
API
API
Microservice A
API
API
API
APPLICATION LEVEL
SECURITY PRINCIPLES
13
GUIDING PRINCIPLE:
ZERO TRUST ARCHITECTURE
1
14
GUIDING PRINCIPLE:
ALL APIS ARE OPEN APIS
2
“Dance like no one is watching, encrypt like everyone is!”
Werner Vogels, Amazon CTO
15
GUIDING PRINCIPLE:
SECURITY IS ADAPTED
FROM RISK
3
WHAT IS SPECIAL
ABOUT API THREAT
PROTECTION?
API-BASED APPLICATIONS
HAVE DIFFERENT VULNERABILITIES
API1 : Broken Object Level Access Control
API2 : Broken Authentication
API3 : Excessive Data Exposure
API4 : Lack of Resources & Rate Limiting
API5 : Missing Function/Resource Level Access Control
API6 : Mass Assignment
API7 : Security Misconfiguration
API8 : Injection
API9 : Improper Assets Management
API10 : Insufficient Logging & Monitoring
17
DOWNLOAD
DEMO DEPLOYMENT SETUP
18
pixisecured pixiapp
42crunch
Configuration
firewall-props protection-token guardian-certs docker-credentials
apifirewall
42 Crunch Platform
pixiapp pixiapp pixidb
EQUIFAX AND MANY MORE (2017)
The Attack
✓ Remote command injection attack: server executes commands written in ONGL language when a
Content-Type validation error is raised.
✓ Example:
✓
The Breach
✓ One of the most important in history: 147 millions people worldwide, very sensitive data
✓ Equifax got fined $700 million in Sept 2019
Core Issue
✓ Unpatched Apache Struts library, with remote command injection vulnerability, widely exploited
during months.
19
A2
A3
A4
A5
A6
A10
A9
A8
A7
A1
https://blog.talosintelligence.com/2017/03/apache-0-day-exploited.html
UBER (SEPT 2019)
The Attack
✓ Account takeover for any Uber account from a phone number
The Breach
✓ None. This was a bug bounty.
Core Issues
✓ First Data leakage : driver internal UUID exposed through error message!
✓ Second Data leakage via the getConsentScreenDetails operation: full account
information is returned, when only a few fields are used by the UI. This includes
the mobile token used to login onto the account 20
A2
A3
A4
A5
A6
A10
A9
A8
A7
A1
https://appsecure.security/blog/how-i-could-have-hacked-your-uber-account
HARBOUR REGISTRY (SEPT 2019)
The Attack
✓ Privilege escalation: become registry administrator
The Breach
✓ Potentially 1300+ registries with default security settings
Core Issue
✓ Mass Assignment vulnerability allows any normal user to become an admin
POST /api/users
{“username”:”test”,”email”:”test123@gmail.com”,”realname”:”
noname”,”password”:”Password1u0021″,”comment”:null,
“has_admin_role” = True}
21
A2
A3
A4
A5
A6
A10
A9
A8
A7
A1
https://unit42.paloaltonetworks.com/critical-vulnerability-in-harbor-enables-privilege-escalation-from-zero-to-admin-cve-2019-16097/
FACEBOOK (FEB 2018)
The Attack
✓ Account takeover via password reset at https://www.facebook.com/login/identify?
ctx=recover&lwv=110.
✓ facebook.com has rate limiting, beta.facebook.com does not!
The Breach
✓ None. This was a bug bounty.
Core Issues
✓ Rate limiting missing on beta APIs, which allows brute force guessing on password
reset code
✓ Misconfigured security on beta endpoints
22
A2
A3
A4
A5
A6
A10
A9
A8
A7
A1
https://appsecure.security/blog/we-figured-out-a-way-to-hack-any-of-facebook-s-2-billion-accounts-and-they-paid-us-a-15-000-bounty-for-it
PROTECTING APIS
AGAINST THREATS
REQUIRES A NEW APPROACH!
 © COPYRIGHT 42CRUNCH | CONFIDENTIAL
OPENAPI 

INITIATIVE
OpenAPI Specification
(formerly Swagger
Specification) is an API
description format for REST
APIs. An OpenAPI file allows
you to describe your entire
API, including: Available
endpoints ( /users ) and
operations on each endpoint
( GET /users , POST /users )
• Web Application Security is painful because
the security is not handled from beginning
• Developers cannot define how the web
application is built and designed
• After 20 years of R&D, detection and
protection tools have to use AI to understand
how the Web Application works...
=> Now we have a worldwide accepted and
used API standard: OpenAPI Specification
=> We build a whitelist based on OAS
POSITIVE SECURITY
MODEL FOR APIS
 © COPYRIGHT 42CRUNCH | CONFIDENTIAL
API DEVSECOPS: SHIFT-
LEFT AND AUTOMATE
API security becomes fully part of
the API lifecycle

Key Benefits
• Security can now be applied
automatically and at scale
• Vulnerable APIs are detected early
• APIs are automatically protected as
soon as the contract is defined
 © COPYRIGHT 42CRUNCH | CONFIDENTIAL
ZERO-TRUST
ARCHITECTURE FOR
MICROSERVICES
Low footprint, ultra-low latency
runtime that can be deployed in
Kubernetes

API micro-firewall can be deployed as:
• Sidecar proxy for defense in depth
• Reverse proxy (Gateway) for edge protection
Key Benefits
• Enables zero trust architecture: microservices must
not trust the environment
• Platform agnostic: any cloud, hybrid or on-premises
• Deployment agnostic: monolithic, microservices, and
service-mesh
• Supports multi-cloud, multi-geo zone deployments
 © COPYRIGHT 42CRUNCH | CONFIDENTIAL
RESOURCES
• 42Crunch Website
• Free OAS Security Audit
• OpenAPI VS Code Extension
• OpenAPI Spec Encyclopedia
• OWASP API Security Top 10
• APIsecurity.io
• Security Strategies for Microservices
Apps
• API Security Pentesting

Contenu connexe

Tendances

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
42Crunch
 

Tendances (20)

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
 
OWASP API Security Top 10 - API World
OWASP API Security Top 10 - API WorldOWASP API Security Top 10 - API World
OWASP API Security Top 10 - API World
 
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
 
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
 
OWASP API Security TOP 10 - 2019
OWASP API Security TOP 10 - 2019OWASP API Security TOP 10 - 2019
OWASP API Security TOP 10 - 2019
 
Applying API Security at Scale
Applying API Security at ScaleApplying API Security at Scale
Applying API Security at Scale
 
42crunch-API-security-workshop
42crunch-API-security-workshop42crunch-API-security-workshop
42crunch-API-security-workshop
 
Guidelines to protect your APIs from threats
Guidelines to protect your APIs from threatsGuidelines to protect your APIs from threats
Guidelines to protect your APIs from threats
 
Advanced API Security Patterns
Advanced API Security PatternsAdvanced API Security Patterns
Advanced API Security Patterns
 
APISecurity_OWASP_MitigationGuide
APISecurity_OWASP_MitigationGuide APISecurity_OWASP_MitigationGuide
APISecurity_OWASP_MitigationGuide
 
API Security in a Microservices World
API Security in a Microservices WorldAPI Security in a Microservices World
API Security in a Microservices World
 
SecDevOps for API Security
SecDevOps for API SecuritySecDevOps for API Security
SecDevOps for API Security
 
Checkmarx meetup API Security - API Security in depth - Inon Shkedy
Checkmarx meetup API Security - API Security in depth - Inon ShkedyCheckmarx meetup API Security - API Security in depth - Inon Shkedy
Checkmarx meetup API Security - API Security in depth - Inon Shkedy
 
Better API Security with Automation
Better API Security with Automation Better API Security with Automation
Better API Security with Automation
 
API Security Guidelines: Beyond SSL and OAuth.
API Security Guidelines: Beyond SSL and OAuth.API Security Guidelines: Beyond SSL and OAuth.
API Security Guidelines: Beyond SSL and OAuth.
 
Owasp top 10 2017 (en)
Owasp top 10 2017 (en)Owasp top 10 2017 (en)
Owasp top 10 2017 (en)
 
I Love APIs 2015: Advanced Security Extensions in Apigee Edge - HMAC and http...
I Love APIs 2015: Advanced Security Extensions in Apigee Edge - HMAC and http...I Love APIs 2015: Advanced Security Extensions in Apigee Edge - HMAC and http...
I Love APIs 2015: Advanced Security Extensions in Apigee Edge - HMAC and http...
 
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...
 
Data-driven API Security
Data-driven API SecurityData-driven API Security
Data-driven API Security
 

Similaire à Protecting Microservices APIs with 42Crunch API Firewall

Cloud Conversations: Giving Business Transformation a Voice_AWSPSSummit_Singa...
Cloud Conversations: Giving Business Transformation a Voice_AWSPSSummit_Singa...Cloud Conversations: Giving Business Transformation a Voice_AWSPSSummit_Singa...
Cloud Conversations: Giving Business Transformation a Voice_AWSPSSummit_Singa...
Amazon Web Services
 

Similaire à Protecting Microservices APIs with 42Crunch API Firewall (20)

APIdays London 2019 - API Security Tips for Developers with Isabelle Mauny, 4...
APIdays London 2019 - API Security Tips for Developers with Isabelle Mauny, 4...APIdays London 2019 - API Security Tips for Developers with Isabelle Mauny, 4...
APIdays London 2019 - API Security Tips for Developers with Isabelle Mauny, 4...
 
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...
 
OWASP API Security Top 10 Examples
OWASP API Security Top 10 ExamplesOWASP API Security Top 10 Examples
OWASP API Security Top 10 Examples
 
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...
 
Test and Protect Your API
Test and Protect Your APITest and Protect Your API
Test and Protect Your API
 
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...
 
Realizing the Full Potential of Cloud-Native Application Security
Realizing the Full Potential of Cloud-Native Application SecurityRealizing the Full Potential of Cloud-Native Application Security
Realizing the Full Potential of Cloud-Native Application Security
 
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
 
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
 
Cloud Conversations: Giving Business Transformation a Voice_AWSPSSummit_Singa...
Cloud Conversations: Giving Business Transformation a Voice_AWSPSSummit_Singa...Cloud Conversations: Giving Business Transformation a Voice_AWSPSSummit_Singa...
Cloud Conversations: Giving Business Transformation a Voice_AWSPSSummit_Singa...
 
apidays LIVE New York 2021 - API Security & AI by Deb Roy, Accenture
apidays LIVE New York 2021 - API Security & AI by Deb Roy, Accentureapidays LIVE New York 2021 - API Security & AI by Deb Roy, Accenture
apidays LIVE New York 2021 - API Security & AI by Deb Roy, Accenture
 
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...
 
APIConnect Security Best Practice
APIConnect Security Best PracticeAPIConnect Security Best Practice
APIConnect Security Best Practice
 
API, Integration, and SOA Convergence
API, Integration, and SOA ConvergenceAPI, Integration, and SOA Convergence
API, Integration, and SOA Convergence
 
Progetta, crea e gestisci Modern Application per web e mobile su AWS
Progetta, crea e gestisci Modern Application per web e mobile su AWSProgetta, crea e gestisci Modern Application per web e mobile su AWS
Progetta, crea e gestisci Modern Application per web e mobile su AWS
 
AWS Chicago user group meetup on June 24, 2014
AWS Chicago user group meetup on June 24, 2014AWS Chicago user group meetup on June 24, 2014
AWS Chicago user group meetup on June 24, 2014
 
Mobile Enterprise Application Platform
Mobile Enterprise Application PlatformMobile Enterprise Application Platform
Mobile Enterprise Application Platform
 
London Adapt or Die: Securing your APIs the Right Way!
London Adapt or Die: Securing your APIs the Right Way!London Adapt or Die: Securing your APIs the Right Way!
London Adapt or Die: Securing your APIs the Right Way!
 
42Crunch Security Audit for WSO2 API Manager 3.1
42Crunch Security Audit for WSO2 API Manager 3.142Crunch Security Audit for WSO2 API Manager 3.1
42Crunch Security Audit for WSO2 API Manager 3.1
 
Gateway/APIC security
Gateway/APIC securityGateway/APIC security
Gateway/APIC security
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Protecting Microservices APIs with 42Crunch API Firewall

  • 1. THREATS PROTECTION IN A DISTRIBUTED WORLD 
 Using 42Crunch API Firewall on Kubernetes ISABELLE MAUNY - Field CTO (isabelle@42crunch.com)
  • 2. LOOSELY COUPLED ARCHITECTURE 2 App icon made by https://www.flaticon.com/authors/pixel-buddha Microservice B Microservice A Front Process/Controller Data North South North South East West API API API API API
  • 3. HOW DO WE SECURE APIS?
  • 4. LAYERED APPROACH TO SECURITY 4 Hypervisor, images (VM/Docker) Intra-services communication (auth, azn, TLS) App level security (libs, code, data) OS / Network / Physical Access
  • 5. COMMUNICATION LAYER SECURITY 5 Microservice B Microservice A Front Process/Controller Data North South North South East West API API API API API
  • 6. WHAT DO WE ENFORCE AT COMMUNICATION LEVEL ? Can service A talk to service B ? ✓ Authentication (is this Service A?) ✓ Authorization (is it authorized to invoke Service B?) Where is service B ? ✓ Service registry Is the communication secure? ✓ Use TLS across the board Can any service B be abused via large number of calls from Service A? ✓ Traffic management Protection from cascading failures ✓ If Service B is stalled, how does the rest of the system reacts ? If somebody can inject a rogue service in our infra, will this service be able to invoke other services? 6
  • 7. API GW Service Mesh Proxy Service Mesh Proxy Service Mesh Proxy Service Mesh Proxy Service Mesh Proxy COMMUNICATION LAYER SECURITY 7 Microservice B Front Process/Controller Data API API Microservice A API API API
  • 8. CRITICAL THINGS TO REMEMBER Respect separation of concerns ✓ A Service Mesh is only concerned with infrastructure security ! ✓ A mesh does not know about the data flowing through ✓ A service does not know about the infrastructure setup Think of an API Gateway as a pattern, not a product ! API Gateway is defined as a layer which can: ✓ Expose APIs to consumers (business APIs) ✓ Compose microservices into one or multiple macro-services ✓ Enforce communication level security as described before 8
  • 9. SO NOW… Where do we validate that the data we are receiving is what we expect ? How do we ensure that we don’t leak data or exceptions? Where do we validate that our app tokens are the ones we expect ? Where do we authenticate/authorize access to our business services? ✓ Can Isabelle view a resource with ID 123456 ? 9 WE NEED APP LEVEL SECURITY
  • 10. APPLICATION LEVEL SECURITY API Threat Protection API Access Control API/Identity managementAPI Firewall ➡ Content validation ➡ Token validation ➡ Traffic management ➡ Payload security (encrypt/ sign) ➡ Threat detection ➡ Access tokens management ➡ Authentication ➡ Authorization ➡ Identity management
  • 11. API GW Service Mesh Proxy Service Mesh Proxy Service Mesh Proxy Service Mesh Proxy Service Mesh Proxy COMMUNICATION LAYER + APP LAYER SECURITY 11 Microservice B Front Process/Controller Data API API Microservice A API API API
  • 14. 14 GUIDING PRINCIPLE: ALL APIS ARE OPEN APIS 2 “Dance like no one is watching, encrypt like everyone is!” Werner Vogels, Amazon CTO
  • 15. 15 GUIDING PRINCIPLE: SECURITY IS ADAPTED FROM RISK 3
  • 16. WHAT IS SPECIAL ABOUT API THREAT PROTECTION?
  • 17. API-BASED APPLICATIONS HAVE DIFFERENT VULNERABILITIES API1 : Broken Object Level Access Control API2 : Broken Authentication API3 : Excessive Data Exposure API4 : Lack of Resources & Rate Limiting API5 : Missing Function/Resource Level Access Control API6 : Mass Assignment API7 : Security Misconfiguration API8 : Injection API9 : Improper Assets Management API10 : Insufficient Logging & Monitoring 17 DOWNLOAD
  • 18. DEMO DEPLOYMENT SETUP 18 pixisecured pixiapp 42crunch Configuration firewall-props protection-token guardian-certs docker-credentials apifirewall 42 Crunch Platform pixiapp pixiapp pixidb
  • 19. EQUIFAX AND MANY MORE (2017) The Attack ✓ Remote command injection attack: server executes commands written in ONGL language when a Content-Type validation error is raised. ✓ Example: ✓ The Breach ✓ One of the most important in history: 147 millions people worldwide, very sensitive data ✓ Equifax got fined $700 million in Sept 2019 Core Issue ✓ Unpatched Apache Struts library, with remote command injection vulnerability, widely exploited during months. 19 A2 A3 A4 A5 A6 A10 A9 A8 A7 A1 https://blog.talosintelligence.com/2017/03/apache-0-day-exploited.html
  • 20. UBER (SEPT 2019) The Attack ✓ Account takeover for any Uber account from a phone number The Breach ✓ None. This was a bug bounty. Core Issues ✓ First Data leakage : driver internal UUID exposed through error message! ✓ Second Data leakage via the getConsentScreenDetails operation: full account information is returned, when only a few fields are used by the UI. This includes the mobile token used to login onto the account 20 A2 A3 A4 A5 A6 A10 A9 A8 A7 A1 https://appsecure.security/blog/how-i-could-have-hacked-your-uber-account
  • 21. HARBOUR REGISTRY (SEPT 2019) The Attack ✓ Privilege escalation: become registry administrator The Breach ✓ Potentially 1300+ registries with default security settings Core Issue ✓ Mass Assignment vulnerability allows any normal user to become an admin POST /api/users {“username”:”test”,”email”:”test123@gmail.com”,”realname”:” noname”,”password”:”Password1u0021″,”comment”:null, “has_admin_role” = True} 21 A2 A3 A4 A5 A6 A10 A9 A8 A7 A1 https://unit42.paloaltonetworks.com/critical-vulnerability-in-harbor-enables-privilege-escalation-from-zero-to-admin-cve-2019-16097/
  • 22. FACEBOOK (FEB 2018) The Attack ✓ Account takeover via password reset at https://www.facebook.com/login/identify? ctx=recover&lwv=110. ✓ facebook.com has rate limiting, beta.facebook.com does not! The Breach ✓ None. This was a bug bounty. Core Issues ✓ Rate limiting missing on beta APIs, which allows brute force guessing on password reset code ✓ Misconfigured security on beta endpoints 22 A2 A3 A4 A5 A6 A10 A9 A8 A7 A1 https://appsecure.security/blog/we-figured-out-a-way-to-hack-any-of-facebook-s-2-billion-accounts-and-they-paid-us-a-15-000-bounty-for-it
  • 24.  © COPYRIGHT 42CRUNCH | CONFIDENTIAL OPENAPI 
 INITIATIVE OpenAPI Specification (formerly Swagger Specification) is an API description format for REST APIs. An OpenAPI file allows you to describe your entire API, including: Available endpoints ( /users ) and operations on each endpoint ( GET /users , POST /users ) • Web Application Security is painful because the security is not handled from beginning • Developers cannot define how the web application is built and designed • After 20 years of R&D, detection and protection tools have to use AI to understand how the Web Application works... => Now we have a worldwide accepted and used API standard: OpenAPI Specification => We build a whitelist based on OAS POSITIVE SECURITY MODEL FOR APIS
  • 25.  © COPYRIGHT 42CRUNCH | CONFIDENTIAL API DEVSECOPS: SHIFT- LEFT AND AUTOMATE API security becomes fully part of the API lifecycle
 Key Benefits • Security can now be applied automatically and at scale • Vulnerable APIs are detected early • APIs are automatically protected as soon as the contract is defined
  • 26.  © COPYRIGHT 42CRUNCH | CONFIDENTIAL ZERO-TRUST ARCHITECTURE FOR MICROSERVICES Low footprint, ultra-low latency runtime that can be deployed in Kubernetes 
API micro-firewall can be deployed as: • Sidecar proxy for defense in depth • Reverse proxy (Gateway) for edge protection Key Benefits • Enables zero trust architecture: microservices must not trust the environment • Platform agnostic: any cloud, hybrid or on-premises • Deployment agnostic: monolithic, microservices, and service-mesh • Supports multi-cloud, multi-geo zone deployments
  • 27.  © COPYRIGHT 42CRUNCH | CONFIDENTIAL RESOURCES • 42Crunch Website • Free OAS Security Audit • OpenAPI VS Code Extension • OpenAPI Spec Encyclopedia • OWASP API Security Top 10 • APIsecurity.io • Security Strategies for Microservices Apps • API Security Pentesting