SlideShare uma empresa Scribd logo
1 de 19
Copyright 2018 Vincent Lau
Securing Serverless Systems
a sharing by Vincent Lau
Copyright 2018 Vincent Lau
Agenda
2
Introduction
● What is Serverless or FaaS
● IaaS vs CaaS vs PaaS vs FaaS
● How is Serverless Used
● Examples of Serverless Architecture for IoT & AI
3
Security Impact of Going Serverless
● Change in the Shared Responsibility Model
● From Denial-of-Service to Denial-of-Wallet
● Increased Attack Surface & System Complexity
10
Top 10 Serverless Security Risks & How to Mitigate Them 14
Copyright 2018 Vincent Lau
Introduction
What is Serverless or FaaS?
3
Apps where server-side logic written by the app
developer is running in stateless compute containers
that are event-triggered, ephemeral (may only last for
one invocation), and fully managed by a 3rd party
(e.g. AWS Lambda).
It is also known as “Functions as a Service” or "FaaS".
Copyright 2018 Vincent Lau
Introduction
Top FaaS Providers
4
Others
● IBM OpenWhisk
● Alibaba Function
Compute
● Iron Functions
● Auth0 Webtask
● Oracle Fn Project
● Kubeless
Copyright 2018 Vincent Lau
Introduction
Top Serverless Frameworks
5
Serverless Framework Languages
● Serverless Framework (Javascript,
Python, Golang)
● Apex (Javascript)
● ClaudiaJS (Javascript)
● Sparta (Golang)
● Gordon (Javascript)
● Zappa (Python)
● Up (Javascript, Python, Golang, Crystal)
Copyright 2018 Vincent Lau
Introduction
6
https://medium.com/@nnilesh7756/what-are-cloud-computing-services-iaas-caas-paas-faas-saas-ac0f6022d36e
Copyright 2018 Vincent Lau
Introduction
How is Serverless Used
7
Occasional Requests
• If a server app only processes one request
per minute
• It will take 50ms to process each request
• So the CPU usage over an hour is 0.1%
• If this app is deployed to its own dedicated
host, it would be very inefficient
Inconsistent Traffic
• If your traffic profile is very spiky
○ baseline traffic is 20 requests/second
○ but every 5 minutes you receive 200
requests/second for 10 seconds
• Auto-scaling is not a good option; by the time
your new instances have spun up, the spike
phase will be over.
Horizontal scaling is completely automatic, elastic, and managed by the provider, but
the biggest benefit is that you only pay for the compute that you need.
https://martinfowler.com/articles/serverless.html#FaasScaling
Costs
Copyright 2018 Vincent Lau
Introduction
Serverless Architecture of IoT
8
Jogging Lap Counter
● The IoT button is connected to a local wifi
network or a mobile hotspot.
● Button can record different types of presses:
Single click – add a lap
Double click – reset the counter
Long press – reset the counter
● A DynamoDB table counts the number of
laps per button.
https://www.thinkahead.com/blog/using-aws-iot-running-buddy/
Copyright 2018 Vincent Lau
Introduction
Serverless Architecture of AI
9
https://chatbotsmagazine.com/a-serverless-event-driven-architecture-for-
chatbots-3095eb40cbb7
Copyright 2018 Vincent Lau
Security Impact of Going Serverless
Change in the Shared Responsibility Model
10
https://aws.a
mazon.com/
compliance/
shared-
responsibilit
y-model/
Copyright 2018 Vincent Lau
Security Impact of Going Serverless
From Denial-of-Service to Denial-of-Wallet
11
A serverless platform would just scale to continue handling all the requests it needed to,
and would be near impossible to DDoS.
BUT… Somebody still has to pay!
Even with the microbilling structure of FaaS, being hit with a few thousand requests per
second will still give you a hefty bill.
Hence, this is now known as a Denial of Wallet attack.
DOS (usually malicious) is an interruption in an authorized user's access to a cloud
service. It is often accomplish by flooding the target with traffic, or sending it information
that triggers a crash.
Copyright 2018 Vincent Lau
Security Impact of Going Serverless
Increased Attack Surface
12
Serverless functions consume data from multiple
event sources:
● HTTP APIs
● message queues
● cloud storage
● IoT device communications
Attack surface induces protocols and complex
message structures, which are hard to inspect by a
typical web application firewall.
Attack surface is complex, and the architecture is
relatively new to developers, hence the chances of
misconfiguration is very high.
Copyright 2018 Vincent Lau
Security Impact of Going Serverless
Overall System Complexity
13
Apps developed with serverless
architecture are:
● Difficult to visualize and monitor
● Difficult to run automated security
scans
● Difficult to test locally
Units of integration with FaaS are a lot
smaller than with other architectures,
resulting with higher reliance on
integration testing.
FaaS also takes DevOps out of the
picture!
Copyright 2018 Vincent Lau
Security Impact of Going Serverless
Top 10 Serverless Security Risks & How to
Mitigate Them
14
Function Event Data Injection
• Occurs when an untrusted input is passed
directly to an interpreter and gets
executed or evaluated
• Multiple event sources increases the
potential attack surface and introduces
complexities
• E.g. Cloud storage events, Stream
processing events, Message queue events
Broken Authentication
• Serverless apps architected in microservices-
like system design often contain many distinct
functions with their own purpose
• Some may expose public web APIs, while
others may serve as a proxy to different
functions or processes
• E.g. Exposing Unauthenticated Entry Point via
S3 Bucket with Public Access
https://dzone.com/articles/top-10-security-risks-in-serverless
Copyright 2018 Vincent Lau
Security Impact of Going Serverless
Top 10 Serverless Security Risks & How to
Mitigate Them
15
Insecure Serverless Deployment
Configuration
• Serverless architecture is relatively new, the
probability of misconfiguring critical
configuration settings are quite high
• Make functions stateless while designing
serverless architectures
• Do not expose sensitive data to any
unauthorized personnel
Over-Privileged Function Permissions and
Roles
• Follow the principle of “Least Privilege”,
functions should only be given necessary
privileges to perform the intended logic
• Provisioning over privileges to a function could
end up being abused to perform unintended
operations, such as “Executing System
Functions”
Copyright 2018 Vincent Lau
Security Impact of Going Serverless
Top 10 Serverless Security Risks & How to
Mitigate Them
16
Inadequate Function Monitoring and
Logging
• To achieve adequate real-time security
event monitoring with proper audit trail:
○ Collect real-time logs from different
functions and cloud services
○ Push these logs to a remote security
information and event management
(SIEM) system
Insecure 3rd Party Dependencies
• Serverless function is required to depend on
3rd party software packages, open source
libraries, and consume 3rd party remote web
services through API calls
• Look at 3rd party dependencies before
importing their code as they could be
vulnerable and can make the serverless
application susceptible to cyber attacks
Copyright 2018 Vincent Lau
Security Impact of Going Serverless
Top 10 Serverless Security Risks & How to
Mitigate Them
17
Insecure Application Secrets Storage
• Need for storing and maintaining app
secrets such as :
○ API keys
○ Database credentials
○ Encryption keys
○ Sensitive configuration settings
• Encrypt environment variables and don’t
store plaintext secrets (e.g. AWS Key
Management Service)
Denial of Service and Financial Resource
Exhaustion (a.k.a Denial of Wallet)
• Define execution limits:
○ Per-execution memory allocation
○ Per-execution ephemeral disk capacity
○ Per-execution number of processes and threads
○ Maximum execution duration per function
○ Maximum payload size
○ Per-account concurrent execution limit
○ Per-function concurrent execution limit
• Use an API Management Gateway
Copyright 2018 Vincent Lau
Security Impact of Going Serverless
Top 10 Serverless Security Risks & How to
Mitigate Them
18
Functions Execution Flow Manipulation
• Functions are chained; invoking a specific
function may invoke another function, thus
the order of invocation is critical for
achieving the desired logic
• Manipulating an application's flow will help
an attacker to subvert the application logic
in bypassing access controls, elevating user
privileges or even cause DoS attacks
Improper Exception Handling and Verbose
Error Messages
• Line-by-line debugging is more complicated
and limited for serverless apps
• Verbose error messages, such as stack traces
or syntax errors, expose internal logic of the
serverless function, revealing potential
weakness, flaws, or sensitive data
• Developers must remember to clean up
Copyright 2018 Vincent Lau
Q & A
Thank you
19
Let’s connect via
http://sg.linkedin.com/in/vincentktlau

Mais conteúdo relacionado

Mais procurados

Technologies You Need to Safely Use the Cloud
Technologies You Need to Safely Use the CloudTechnologies You Need to Safely Use the Cloud
Technologies You Need to Safely Use the Cloud
CloudPassage
 
ICS Cybersecurity: How to Protect the Proprietary Cyber Assets That Hackers C...
ICS Cybersecurity: How to Protect the Proprietary Cyber Assets That Hackers C...ICS Cybersecurity: How to Protect the Proprietary Cyber Assets That Hackers C...
ICS Cybersecurity: How to Protect the Proprietary Cyber Assets That Hackers C...
EnergySec
 
Cisco ACI & Hybrid Networks - Breaking Down Silos with Central Policy Management
Cisco ACI & Hybrid Networks - Breaking Down Silos with Central Policy ManagementCisco ACI & Hybrid Networks - Breaking Down Silos with Central Policy Management
Cisco ACI & Hybrid Networks - Breaking Down Silos with Central Policy Management
AlgoSec
 
Security and Compliance for Enterprise Cloud Infrastructure
Security and Compliance for Enterprise Cloud InfrastructureSecurity and Compliance for Enterprise Cloud Infrastructure
Security and Compliance for Enterprise Cloud Infrastructure
CloudPassage
 
QualysGuard InfoDay 2013 - QualysGuard RoadMap for H2-­2013/H1-­2014
QualysGuard InfoDay 2013 - QualysGuard RoadMap for H2-­2013/H1-­2014QualysGuard InfoDay 2013 - QualysGuard RoadMap for H2-­2013/H1-­2014
QualysGuard InfoDay 2013 - QualysGuard RoadMap for H2-­2013/H1-­2014
Risk Analysis Consultants, s.r.o.
 

Mais procurados (19)

Securing Your Cloud Transformation
Securing Your Cloud TransformationSecuring Your Cloud Transformation
Securing Your Cloud Transformation
 
5 Steps to Reduce Your Window of Vulnerability
5 Steps to Reduce Your Window of Vulnerability5 Steps to Reduce Your Window of Vulnerability
5 Steps to Reduce Your Window of Vulnerability
 
Technologies You Need to Safely Use the Cloud
Technologies You Need to Safely Use the CloudTechnologies You Need to Safely Use the Cloud
Technologies You Need to Safely Use the Cloud
 
ICS Cybersecurity: How to Protect the Proprietary Cyber Assets That Hackers C...
ICS Cybersecurity: How to Protect the Proprietary Cyber Assets That Hackers C...ICS Cybersecurity: How to Protect the Proprietary Cyber Assets That Hackers C...
ICS Cybersecurity: How to Protect the Proprietary Cyber Assets That Hackers C...
 
Rethinking Security: The Cloud Infrastructure Effect
Rethinking Security: The Cloud Infrastructure EffectRethinking Security: The Cloud Infrastructure Effect
Rethinking Security: The Cloud Infrastructure Effect
 
What's Wrong with Vulnerability Management & How Can We Fix It
What's Wrong with Vulnerability Management & How Can We Fix ItWhat's Wrong with Vulnerability Management & How Can We Fix It
What's Wrong with Vulnerability Management & How Can We Fix It
 
Zabezpečení softwarově definovaných datových center prostřednictvím Check Poi...
Zabezpečení softwarově definovaných datových center prostřednictvím Check Poi...Zabezpečení softwarově definovaných datových center prostřednictvím Check Poi...
Zabezpečení softwarově definovaných datových center prostřednictvím Check Poi...
 
Cisco ACI & Hybrid Networks - Breaking Down Silos with Central Policy Management
Cisco ACI & Hybrid Networks - Breaking Down Silos with Central Policy ManagementCisco ACI & Hybrid Networks - Breaking Down Silos with Central Policy Management
Cisco ACI & Hybrid Networks - Breaking Down Silos with Central Policy Management
 
Security and Compliance for Enterprise Cloud Infrastructure
Security and Compliance for Enterprise Cloud InfrastructureSecurity and Compliance for Enterprise Cloud Infrastructure
Security and Compliance for Enterprise Cloud Infrastructure
 
Application visibility across the security estate the value and the vision ...
Application visibility across the security estate   the value and the vision ...Application visibility across the security estate   the value and the vision ...
Application visibility across the security estate the value and the vision ...
 
2020 04-07 webinar slides -turning network security alerts into action change...
2020 04-07 webinar slides -turning network security alerts into action change...2020 04-07 webinar slides -turning network security alerts into action change...
2020 04-07 webinar slides -turning network security alerts into action change...
 
Reaching PCI Nirvana: Ensure a Successful Audit & Maintain Continuous Compliance
Reaching PCI Nirvana: Ensure a Successful Audit & Maintain Continuous ComplianceReaching PCI Nirvana: Ensure a Successful Audit & Maintain Continuous Compliance
Reaching PCI Nirvana: Ensure a Successful Audit & Maintain Continuous Compliance
 
QualysGuard InfoDay 2013 - QualysGuard RoadMap for H2-­2013/H1-­2014
QualysGuard InfoDay 2013 - QualysGuard RoadMap for H2-­2013/H1-­2014QualysGuard InfoDay 2013 - QualysGuard RoadMap for H2-­2013/H1-­2014
QualysGuard InfoDay 2013 - QualysGuard RoadMap for H2-­2013/H1-­2014
 
Migrating Application Connectivity and Network Security to AWS
Migrating Application Connectivity and Network Security to AWSMigrating Application Connectivity and Network Security to AWS
Migrating Application Connectivity and Network Security to AWS
 
2021 01-13 reducing risk-of_ransomware
2021 01-13 reducing risk-of_ransomware2021 01-13 reducing risk-of_ransomware
2021 01-13 reducing risk-of_ransomware
 
Webinar: Vulnerability Management leicht gemacht – mit Splunk und Qualys
Webinar: Vulnerability Management leicht gemacht – mit  Splunk und QualysWebinar: Vulnerability Management leicht gemacht – mit  Splunk und Qualys
Webinar: Vulnerability Management leicht gemacht – mit Splunk und Qualys
 
Best Practices for Workload Security: Securing Servers in Modern Data Center ...
Best Practices for Workload Security: Securing Servers in Modern Data Center ...Best Practices for Workload Security: Securing Servers in Modern Data Center ...
Best Practices for Workload Security: Securing Servers in Modern Data Center ...
 
Network Security Best Practices - Reducing Your Attack Surface
Network Security Best Practices - Reducing Your Attack SurfaceNetwork Security Best Practices - Reducing Your Attack Surface
Network Security Best Practices - Reducing Your Attack Surface
 
2018 10-11 automating network security policy management allows financial ins...
2018 10-11 automating network security policy management allows financial ins...2018 10-11 automating network security policy management allows financial ins...
2018 10-11 automating network security policy management allows financial ins...
 

Semelhante a Securing Serverless Systems

Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Priyanka Aash
 
Migrating Critical Applications To The Cloud - ISACA Seattle - Sanitized
Migrating Critical Applications To The Cloud - ISACA Seattle - SanitizedMigrating Critical Applications To The Cloud - ISACA Seattle - Sanitized
Migrating Critical Applications To The Cloud - ISACA Seattle - Sanitized
Norm Barber
 
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
 
DevSecCon Tel Aviv 2018 - Serverless Security
DevSecCon Tel Aviv 2018 - Serverless SecurityDevSecCon Tel Aviv 2018 - Serverless Security
DevSecCon Tel Aviv 2018 - Serverless Security
Avi Shulman
 

Semelhante a Securing Serverless Systems (20)

apidays LIVE Paris - Serverless security: how to protect what you don't see? ...
apidays LIVE Paris - Serverless security: how to protect what you don't see? ...apidays LIVE Paris - Serverless security: how to protect what you don't see? ...
apidays LIVE Paris - Serverless security: how to protect what you don't see? ...
 
What serverless means for enterprise apps
What serverless means for enterprise appsWhat serverless means for enterprise apps
What serverless means for enterprise apps
 
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
 
Introduction to Serverless through Architectural Patterns
Introduction to Serverless through Architectural PatternsIntroduction to Serverless through Architectural Patterns
Introduction to Serverless through Architectural Patterns
 
Darin Fisher [InfluxData] | Security Monitoring in the Time Series Domain | I...
Darin Fisher [InfluxData] | Security Monitoring in the Time Series Domain | I...Darin Fisher [InfluxData] | Security Monitoring in the Time Series Domain | I...
Darin Fisher [InfluxData] | Security Monitoring in the Time Series Domain | I...
 
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaSService Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
 
Measures to ensure Cyber Security in a serverless environment
Measures to ensure Cyber Security in a serverless environmentMeasures to ensure Cyber Security in a serverless environment
Measures to ensure Cyber Security in a serverless environment
 
Serverless security - how to protect what you don't see?
Serverless security - how to protect what you don't see?Serverless security - how to protect what you don't see?
Serverless security - how to protect what you don't see?
 
Migrating Critical Applications To The Cloud - ISACA Seattle - Sanitized
Migrating Critical Applications To The Cloud - ISACA Seattle - SanitizedMigrating Critical Applications To The Cloud - ISACA Seattle - Sanitized
Migrating Critical Applications To The Cloud - ISACA Seattle - Sanitized
 
Migrating Critical Applications to the Cloud - isaca seattle - sanitized
Migrating Critical Applications to the Cloud - isaca seattle - sanitizedMigrating Critical Applications to the Cloud - isaca seattle - sanitized
Migrating Critical Applications to the Cloud - isaca seattle - sanitized
 
Mulesoft Meetups - Salesforce & Mulesoft Integrations, Anypoint Security Poli...
Mulesoft Meetups - Salesforce & Mulesoft Integrations, Anypoint Security Poli...Mulesoft Meetups - Salesforce & Mulesoft Integrations, Anypoint Security Poli...
Mulesoft Meetups - Salesforce & Mulesoft Integrations, Anypoint Security Poli...
 
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...
 
Twelve Factor App With Lagom
Twelve Factor App With LagomTwelve Factor App With Lagom
Twelve Factor App With Lagom
 
The Rise of Serverless Architecture in Web Development.docx
The Rise of Serverless Architecture in Web Development.docxThe Rise of Serverless Architecture in Web Development.docx
The Rise of Serverless Architecture in Web Development.docx
 
Can Containers be Secured in a PaaS?
Can Containers be Secured in a PaaS?Can Containers be Secured in a PaaS?
Can Containers be Secured in a PaaS?
 
Can Containers be secured in a PaaS?
Can Containers be secured in a PaaS?Can Containers be secured in a PaaS?
Can Containers be secured in a PaaS?
 
Serverless: Market Overview and Investment Opportunities
Serverless: Market Overview and Investment OpportunitiesServerless: Market Overview and Investment Opportunities
Serverless: Market Overview and Investment Opportunities
 
DevSecCon Tel Aviv 2018 - Serverless Security
DevSecCon Tel Aviv 2018 - Serverless SecurityDevSecCon Tel Aviv 2018 - Serverless Security
DevSecCon Tel Aviv 2018 - Serverless Security
 
Serverless Spring
Serverless SpringServerless Spring
Serverless Spring
 
When to use serverless computing.pdf
When to use serverless computing.pdfWhen to use serverless computing.pdf
When to use serverless computing.pdf
 

Mais de Vincent Lau

Mais de Vincent Lau (7)

Fantastic Platforms: The Secrets of the Crypto-Metaverse
Fantastic Platforms: The Secrets of the Crypto-MetaverseFantastic Platforms: The Secrets of the Crypto-Metaverse
Fantastic Platforms: The Secrets of the Crypto-Metaverse
 
IoT Landscape and its Key Trends in Deployment
IoT Landscape and its Key Trends in DeploymentIoT Landscape and its Key Trends in Deployment
IoT Landscape and its Key Trends in Deployment
 
XR and the Future of Immersive Technology
XR and the Future of Immersive TechnologyXR and the Future of Immersive Technology
XR and the Future of Immersive Technology
 
Mobile App Development Trends in 2021
Mobile App Development Trends in 2021Mobile App Development Trends in 2021
Mobile App Development Trends in 2021
 
Emerging Technology Trends in the Post-COVID World
Emerging Technology Trends in the Post-COVID WorldEmerging Technology Trends in the Post-COVID World
Emerging Technology Trends in the Post-COVID World
 
Redefining Literacy in a Technologically Advanced World
Redefining Literacy in a Technologically Advanced WorldRedefining Literacy in a Technologically Advanced World
Redefining Literacy in a Technologically Advanced World
 
Learning New Skills for the Digital Age
Learning New Skills for the Digital AgeLearning New Skills for the Digital Age
Learning New Skills for the Digital Age
 

Último

+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@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

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
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
+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...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Securing Serverless Systems

  • 1. Copyright 2018 Vincent Lau Securing Serverless Systems a sharing by Vincent Lau
  • 2. Copyright 2018 Vincent Lau Agenda 2 Introduction ● What is Serverless or FaaS ● IaaS vs CaaS vs PaaS vs FaaS ● How is Serverless Used ● Examples of Serverless Architecture for IoT & AI 3 Security Impact of Going Serverless ● Change in the Shared Responsibility Model ● From Denial-of-Service to Denial-of-Wallet ● Increased Attack Surface & System Complexity 10 Top 10 Serverless Security Risks & How to Mitigate Them 14
  • 3. Copyright 2018 Vincent Lau Introduction What is Serverless or FaaS? 3 Apps where server-side logic written by the app developer is running in stateless compute containers that are event-triggered, ephemeral (may only last for one invocation), and fully managed by a 3rd party (e.g. AWS Lambda). It is also known as “Functions as a Service” or "FaaS".
  • 4. Copyright 2018 Vincent Lau Introduction Top FaaS Providers 4 Others ● IBM OpenWhisk ● Alibaba Function Compute ● Iron Functions ● Auth0 Webtask ● Oracle Fn Project ● Kubeless
  • 5. Copyright 2018 Vincent Lau Introduction Top Serverless Frameworks 5 Serverless Framework Languages ● Serverless Framework (Javascript, Python, Golang) ● Apex (Javascript) ● ClaudiaJS (Javascript) ● Sparta (Golang) ● Gordon (Javascript) ● Zappa (Python) ● Up (Javascript, Python, Golang, Crystal)
  • 6. Copyright 2018 Vincent Lau Introduction 6 https://medium.com/@nnilesh7756/what-are-cloud-computing-services-iaas-caas-paas-faas-saas-ac0f6022d36e
  • 7. Copyright 2018 Vincent Lau Introduction How is Serverless Used 7 Occasional Requests • If a server app only processes one request per minute • It will take 50ms to process each request • So the CPU usage over an hour is 0.1% • If this app is deployed to its own dedicated host, it would be very inefficient Inconsistent Traffic • If your traffic profile is very spiky ○ baseline traffic is 20 requests/second ○ but every 5 minutes you receive 200 requests/second for 10 seconds • Auto-scaling is not a good option; by the time your new instances have spun up, the spike phase will be over. Horizontal scaling is completely automatic, elastic, and managed by the provider, but the biggest benefit is that you only pay for the compute that you need. https://martinfowler.com/articles/serverless.html#FaasScaling Costs
  • 8. Copyright 2018 Vincent Lau Introduction Serverless Architecture of IoT 8 Jogging Lap Counter ● The IoT button is connected to a local wifi network or a mobile hotspot. ● Button can record different types of presses: Single click – add a lap Double click – reset the counter Long press – reset the counter ● A DynamoDB table counts the number of laps per button. https://www.thinkahead.com/blog/using-aws-iot-running-buddy/
  • 9. Copyright 2018 Vincent Lau Introduction Serverless Architecture of AI 9 https://chatbotsmagazine.com/a-serverless-event-driven-architecture-for- chatbots-3095eb40cbb7
  • 10. Copyright 2018 Vincent Lau Security Impact of Going Serverless Change in the Shared Responsibility Model 10 https://aws.a mazon.com/ compliance/ shared- responsibilit y-model/
  • 11. Copyright 2018 Vincent Lau Security Impact of Going Serverless From Denial-of-Service to Denial-of-Wallet 11 A serverless platform would just scale to continue handling all the requests it needed to, and would be near impossible to DDoS. BUT… Somebody still has to pay! Even with the microbilling structure of FaaS, being hit with a few thousand requests per second will still give you a hefty bill. Hence, this is now known as a Denial of Wallet attack. DOS (usually malicious) is an interruption in an authorized user's access to a cloud service. It is often accomplish by flooding the target with traffic, or sending it information that triggers a crash.
  • 12. Copyright 2018 Vincent Lau Security Impact of Going Serverless Increased Attack Surface 12 Serverless functions consume data from multiple event sources: ● HTTP APIs ● message queues ● cloud storage ● IoT device communications Attack surface induces protocols and complex message structures, which are hard to inspect by a typical web application firewall. Attack surface is complex, and the architecture is relatively new to developers, hence the chances of misconfiguration is very high.
  • 13. Copyright 2018 Vincent Lau Security Impact of Going Serverless Overall System Complexity 13 Apps developed with serverless architecture are: ● Difficult to visualize and monitor ● Difficult to run automated security scans ● Difficult to test locally Units of integration with FaaS are a lot smaller than with other architectures, resulting with higher reliance on integration testing. FaaS also takes DevOps out of the picture!
  • 14. Copyright 2018 Vincent Lau Security Impact of Going Serverless Top 10 Serverless Security Risks & How to Mitigate Them 14 Function Event Data Injection • Occurs when an untrusted input is passed directly to an interpreter and gets executed or evaluated • Multiple event sources increases the potential attack surface and introduces complexities • E.g. Cloud storage events, Stream processing events, Message queue events Broken Authentication • Serverless apps architected in microservices- like system design often contain many distinct functions with their own purpose • Some may expose public web APIs, while others may serve as a proxy to different functions or processes • E.g. Exposing Unauthenticated Entry Point via S3 Bucket with Public Access https://dzone.com/articles/top-10-security-risks-in-serverless
  • 15. Copyright 2018 Vincent Lau Security Impact of Going Serverless Top 10 Serverless Security Risks & How to Mitigate Them 15 Insecure Serverless Deployment Configuration • Serverless architecture is relatively new, the probability of misconfiguring critical configuration settings are quite high • Make functions stateless while designing serverless architectures • Do not expose sensitive data to any unauthorized personnel Over-Privileged Function Permissions and Roles • Follow the principle of “Least Privilege”, functions should only be given necessary privileges to perform the intended logic • Provisioning over privileges to a function could end up being abused to perform unintended operations, such as “Executing System Functions”
  • 16. Copyright 2018 Vincent Lau Security Impact of Going Serverless Top 10 Serverless Security Risks & How to Mitigate Them 16 Inadequate Function Monitoring and Logging • To achieve adequate real-time security event monitoring with proper audit trail: ○ Collect real-time logs from different functions and cloud services ○ Push these logs to a remote security information and event management (SIEM) system Insecure 3rd Party Dependencies • Serverless function is required to depend on 3rd party software packages, open source libraries, and consume 3rd party remote web services through API calls • Look at 3rd party dependencies before importing their code as they could be vulnerable and can make the serverless application susceptible to cyber attacks
  • 17. Copyright 2018 Vincent Lau Security Impact of Going Serverless Top 10 Serverless Security Risks & How to Mitigate Them 17 Insecure Application Secrets Storage • Need for storing and maintaining app secrets such as : ○ API keys ○ Database credentials ○ Encryption keys ○ Sensitive configuration settings • Encrypt environment variables and don’t store plaintext secrets (e.g. AWS Key Management Service) Denial of Service and Financial Resource Exhaustion (a.k.a Denial of Wallet) • Define execution limits: ○ Per-execution memory allocation ○ Per-execution ephemeral disk capacity ○ Per-execution number of processes and threads ○ Maximum execution duration per function ○ Maximum payload size ○ Per-account concurrent execution limit ○ Per-function concurrent execution limit • Use an API Management Gateway
  • 18. Copyright 2018 Vincent Lau Security Impact of Going Serverless Top 10 Serverless Security Risks & How to Mitigate Them 18 Functions Execution Flow Manipulation • Functions are chained; invoking a specific function may invoke another function, thus the order of invocation is critical for achieving the desired logic • Manipulating an application's flow will help an attacker to subvert the application logic in bypassing access controls, elevating user privileges or even cause DoS attacks Improper Exception Handling and Verbose Error Messages • Line-by-line debugging is more complicated and limited for serverless apps • Verbose error messages, such as stack traces or syntax errors, expose internal logic of the serverless function, revealing potential weakness, flaws, or sensitive data • Developers must remember to clean up
  • 19. Copyright 2018 Vincent Lau Q & A Thank you 19 Let’s connect via http://sg.linkedin.com/in/vincentktlau