SlideShare a Scribd company logo
PAGE
1
DEVOPS INDONESIA
PAGE
1
DEVOPS INDONESIA
Steve Giguere
Palo ALto
Jakarta, 8 Maret 2022
Securing an NGINX deployment for Kubernetes
Securing an
Deployment for
Kubernetes
Featuring:
● Checkov: Open Source IaC Scanning
Your guide:
Steve Giguere
@_SteveGiguere_
● Developer Advocate - Bridgecrew
● DevSecOp s Enthusiast
● DevSecOps London - Organiser
● Raspberry Pi Geek
● Formerly: Aqua Security, StackRox,
Synopsys Software Integrity Group
● Twitch show: https://Clust3rF8ck (.com)
● Podcaster: BeerSecOps, CoSeCast (.com)
● Beer Taster: BeerNative (.tv)
● More Steve: https://stevegiguere.com
W h o is… Steve Giguere (shig-air)
T H E C H A L L E N G E
T H E C H A L L E N G E
● NEED WEBSITE FOR TWITCH SHOW
● HOST ON RASPBERRY PI
● CREATED WITH HUGO
● USE NGINX
TRY NOT TO L O O K L I KE TOTAL IDIOT WO R KI N G F O R A N IAC
SECURITY COMPAN Y BY DEPLOYI NG A N NGINX W E B S I T E
F O R A TWITCH S H O W A B O U T C L O U D NATIVE SECURITY
THAT DOESN’ T PA S S O U R C H E C KO V YAML S C A N
● A01:2021-Broken A cce ss Control
● A02:2021-Cryptographic Failures
● A03:2021-Injection
● A04:2021-Insecure De sig n
● A05:2021-Security Misconfiguration
● A06:2021-Vulnerable a n d Outdated C omponents
● A07:2021-Identification and Authentication Failures
● A08:2021-Software and Data Integrity Failures
● A09:2021-Security L o g g i n g and Monitoring Failures
● A10:2021-Server-Side Request Forgery
Coding issues like input
sanitization have been
replaced by
misconfigurations and
dependency (supply
chain) risks
The Problem
Defaults are bad!
Misconfigurations are bad!
● Unintended behaviour
● Outage
● Data Breach
● Lateral movement
● Supply Chain
Compromise
● PII Exposure
Security best practices are
important!
IF COMPROMISED
● T HE NGINX DEFAULT IMAGE HAS…
○ NSENTER
○ CURL
○ APT
○ And much much more!!
● T HE NGINX IMAGE CAN...
○ Enumerate the network
○ Breakout to the host
■ EG. CVE-2021-22555
○ Serve malicious content
T H E P L A N
ST E P 1 - U S E NGINX
● B T W NGINX RECENTLY HIT #1
ST E P 1
● GET CODE FROM SOMEBODY ELSE
S T E P 2 - W R A P IT IN A K8s D E P L O Y M E N T
● Get the code (from somebody else)
○ SEARCH GOOGLE/DUCKDUCKGO?
● Go to the source (kubernetes.io)
S T E P 3 - C H E C K IT IS S E C U R E
● Checkov
○ DEPLOYMENT
■ Are my defaults secure and what happens when they
are not?
○ IMAGE
■ Can I use the default image or should I make
changes?
W H A T D O E S S E C U R E MEAN?
W H A T D O E S S E C U R E MEAN
● CIA
○ Confidentiality
■ Least Privilege
○ Integrity
■ Immutability
○ Availability
■ Resilience
What is
?
Open source (Apache 2.0)
misconfiguration scanner for IaC,
intended to be used in CI/CD pipelines
1.1000+ built in checks
2. Supports extensions
3. Built in best practices and security
W h a t is Checkov
● Open source
● Analyze infrastructure as code (IaC)
● Terraform, CloudFormation,
Kubernetes, Helm, ARM Templates
and Serverless framework
● > 500 rules
● VSCode Plugin
● Optional config file
○ .checkov.yaml
*
L E A S T PRIVILEGE
Add S e c c o m p Profile
● Disables > 44 system calls
○ Expelliarmus
● Eg.
○ Mount (host filesystems)
○ Ptrace (watch everything)
○ Reboot (the host!)
○ Setns (change linux
namespace)
○ Quotactl (mess with cpu limits)
● Default defence in depth
○ Many of these overlap with
blocking CAP_SYS_ADMIN
Set allowPrivilegeEscalation to false
setuid
● Prevents binaries from changing
the effective user ID
○ Blocks enabling of extra capabilities,
○ Even blocks the use of ping.
D o not run as root (the default)
● Seems obvious but
● Assign a UID and GID > 10000 to avoid conflict
I a m root!
Drop all capabilities
● Add them back as required
IMMUTABILITY
Read-only filesystem
● Prevents the creation, installation or
downloading of malicious code
● Containers should be immutable
CAN’T
TOUCH
THIS
Unmount Service Account Token
● Uses the default service account
● Can impersonate the service account
● Abuse the K8s RESTAPIs.
Avoid Supply Chain Attacks
● Use the digest for your image NOT tags
RE S I LI E N CE
Liveness/Readiness Probes
● Let kubernetes know you’re there
and it will keep you alive and kicking
Can be difficult to come up with methods
to determine a ready and live state. Not
the case for NGINX however.
C P U / Memory Requests and Limits
● Prevents self induced DoS
● Ensures weighted scheduling of pods
● Limits losses from crypto-mining attacks
Can be difficult to determine up front but
defaults can be quickly derived from the K8s
metrics server.
MO RE P OWE R!
Key Takeaways
● Finding Secure Examples Is Difficult
● Basic Best Practices Can Be Easy
● Tools are Available To Help
● Many Defaults Aren’t Secure
Checkov: https://www.checkov.io/
Our blog: https://bridgecrew.io/blog
T H A N KS !
DEPLOYMENTS
SERVICES
JOBS
DEFAULTS
OUR BATTERED POD
COMES FROM A
SECURE SUPPLY
CHAIN
30 | ©2020 Palo Alto Networks, Inc. All rights reserved.
Sca n to register >>
When:
24 March 2022 (Thu)
Time:
7.00am Indonesia Time
Spea kers:
W h a t topics will be
covered?
Code to Cloud is
dedicated to covering
security best practices
W h o should join:
Relevant job titles
include but are not
Code to Cloud Virtual Su mmi t
Block your calendar now!
limited to DevOps
engineers and team leads,
infrastructure and platform
engineers, security engineers,
SREs, CTOs, engineering and
InfoSec managers.
across cloud native tech stacks and
the development lifecycle — from
IaC and open source packages to
containers and workloads.
Survey Form
We hope you’ve found our session beneficial.
Please help us in answering a short 5 questions survey.
A small INR200,000 Grab thank you token awaits.
https://forms.gle/bGzk2ntgCmuHCuRg7
Please scan the Q R code or use clickable link in Chatbox
Stay Connected With Us!
t.me/iddevops
DevOps Indonesia
DevOps Indonesia
DevOps Indonesia
@iddevops
@iddevops
DevOps Indonesia
Scan here
PAGE
34
DEVOPS INDONESIA
Alone Wearesmart,togetherWearebrilliant
THANKYOU!
Quote by Steve Anderson

More Related Content

What's hot (20)

PDF
DevSecOps for you Full Stack
Ron Nixon
 
PDF
DevOps or DevSecOps
Michelangelo van Dam
 
PPTX
Secure DevOPS Implementation Guidance
Tej Luthra
 
PDF
Introduction to DevSecOps
Setu Parimi
 
PDF
Talk DevSecOps to me
Michelle Ribeiro
 
PDF
Open Source Security at Scale- The DevOps Challenge 
WhiteSource
 
PDF
DevOps & DevSecOps in Swiss Banking
Aarno Aukia
 
PPTX
Continuous security: Bringing agility to the secure development lifecycle
Rogue Wave Software
 
PPTX
Why cloud native envs deserve better security - Dima Stopel, Twistlock - Clou...
Cloud Native Day Tel Aviv
 
PPTX
Elizabeth Lawler - Devops, security, and compliance working in unison
DevSecCon
 
PDF
Top 10 Practices of Highly Successful DevOps Incident Management Teams
Deborah Schalm
 
PDF
Open Source Security: How to Lay the Groundwork for a Secure Culture
WhiteSource
 
PDF
Integrating DevOps and Security
Stijn Muylle
 
PPTX
Integrate Security into DevOps - SecDevOps
Ulf Mattsson
 
PDF
RSAC DevSecOpsDays 2018 - We are all Equifax
Sonatype
 
PDF
CI/CD pipeline security from start to finish with WhiteSource & CircleCI
WhiteSource
 
PDF
DevSecOps Everything You Need To Know
Centextech
 
PPTX
AllDayDevOps 2019 AppSensor
jtmelton
 
DOCX
Kaspersky Security center 10 documentation
Tarek Amer
 
DevSecOps for you Full Stack
Ron Nixon
 
DevOps or DevSecOps
Michelangelo van Dam
 
Secure DevOPS Implementation Guidance
Tej Luthra
 
Introduction to DevSecOps
Setu Parimi
 
Talk DevSecOps to me
Michelle Ribeiro
 
Open Source Security at Scale- The DevOps Challenge 
WhiteSource
 
DevOps & DevSecOps in Swiss Banking
Aarno Aukia
 
Continuous security: Bringing agility to the secure development lifecycle
Rogue Wave Software
 
Why cloud native envs deserve better security - Dima Stopel, Twistlock - Clou...
Cloud Native Day Tel Aviv
 
Elizabeth Lawler - Devops, security, and compliance working in unison
DevSecCon
 
Top 10 Practices of Highly Successful DevOps Incident Management Teams
Deborah Schalm
 
Open Source Security: How to Lay the Groundwork for a Secure Culture
WhiteSource
 
Integrating DevOps and Security
Stijn Muylle
 
Integrate Security into DevOps - SecDevOps
Ulf Mattsson
 
RSAC DevSecOpsDays 2018 - We are all Equifax
Sonatype
 
CI/CD pipeline security from start to finish with WhiteSource & CircleCI
WhiteSource
 
DevSecOps Everything You Need To Know
Centextech
 
AllDayDevOps 2019 AppSensor
jtmelton
 
Kaspersky Security center 10 documentation
Tarek Amer
 

Similar to Securing an NGINX deployment for K8s (20)

ODP
Continuous Security
Sysdig
 
PDF
Deploying Kubernetes without scaring off your security team - KubeCon 2017
Major Hayden
 
PDF
A Developer’s Guide to Kubernetes Security
Gene Gotimer
 
PDF
Deploy 22 microservices from scratch in 30 mins with GitOps
Opsta
 
PDF
CI / CD / CS - Continuous Security in Kubernetes
Sysdig
 
PPTX
Keeping Your Kubernetes Cluster Secure
Gene Gotimer
 
PDF
Developer-Friendly CI / CD for Kubernetes
DevOps Indonesia
 
PDF
5 Kubernetes Security Tools You Should Use
DevOps.com
 
PDF
Cncf checkov and bridgecrew
LibbySchulze
 
PPTX
Unlocking DevOps Secuirty :Vault & Keylock
HusseinMalikMammadli
 
PDF
KCD Munich 2022: How to Prevent Your Kubernetes Cluster From Being Hacked
Nico Meisenzahl
 
PDF
Security as Code: DevSecOps Patterns with AWS Bk Sarthak Das
lsangmushie
 
PDF
Continuous Security for GitOps
Weaveworks
 
PDF
DevSecOps: What Why and How : Blackhat 2019
NotSoSecure Global Services
 
PDF
The Hacker's Guide to Kubernetes
Patrycja Wegrzynowicz
 
PDF
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster
smalltown
 
PDF
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Codemotion
 
PDF
Introduction to Kubernetes Security (Aqua & Weaveworks)
Weaveworks
 
PDF
Slide DevSecOps Microservices
Hendri Karisma
 
PDF
How to Prevent Your Kubernetes Cluster From Being Hacked
Nico Meisenzahl
 
Continuous Security
Sysdig
 
Deploying Kubernetes without scaring off your security team - KubeCon 2017
Major Hayden
 
A Developer’s Guide to Kubernetes Security
Gene Gotimer
 
Deploy 22 microservices from scratch in 30 mins with GitOps
Opsta
 
CI / CD / CS - Continuous Security in Kubernetes
Sysdig
 
Keeping Your Kubernetes Cluster Secure
Gene Gotimer
 
Developer-Friendly CI / CD for Kubernetes
DevOps Indonesia
 
5 Kubernetes Security Tools You Should Use
DevOps.com
 
Cncf checkov and bridgecrew
LibbySchulze
 
Unlocking DevOps Secuirty :Vault & Keylock
HusseinMalikMammadli
 
KCD Munich 2022: How to Prevent Your Kubernetes Cluster From Being Hacked
Nico Meisenzahl
 
Security as Code: DevSecOps Patterns with AWS Bk Sarthak Das
lsangmushie
 
Continuous Security for GitOps
Weaveworks
 
DevSecOps: What Why and How : Blackhat 2019
NotSoSecure Global Services
 
The Hacker's Guide to Kubernetes
Patrycja Wegrzynowicz
 
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster
smalltown
 
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Codemotion
 
Introduction to Kubernetes Security (Aqua & Weaveworks)
Weaveworks
 
Slide DevSecOps Microservices
Hendri Karisma
 
How to Prevent Your Kubernetes Cluster From Being Hacked
Nico Meisenzahl
 
Ad

More from DevOps Indonesia (20)

PDF
DevOps Indonesia Meetup #52 - announcement
DevOps Indonesia
 
PDF
Dev ops meetup 51 : Securing DevOps Lifecycle - Announcement
DevOps Indonesia
 
PDF
Securing DevOps Lifecycle
DevOps Indonesia
 
PDF
DevOps Meetup 50 : Securing your Application - Announcement
DevOps Indonesia
 
PDF
Secure your Application with Google cloud armor
DevOps Indonesia
 
PDF
DevOps Meetup 49 Aws Copilot and Gitops - announcement by DevOps Indonesia
DevOps Indonesia
 
PDF
Operate Containers with AWS Copilot
DevOps Indonesia
 
PDF
Continuously Deploy Your CDK Application by Petra novandi barus
DevOps Indonesia
 
PDF
DevOps indonesia (online) meetup 46 aws with payfazz in devops indonesia - a...
DevOps Indonesia
 
PDF
Securing Your Database Dynamic DB Credentials
DevOps Indonesia
 
PDF
DevOps Indonesia (online) meetup 45 - Announcement
DevOps Indonesia
 
PDF
The Death and Rise of Enterprise DevOps
DevOps Indonesia
 
PDF
API Security Webinar - Credential Stuffing
DevOps Indonesia
 
PDF
API Security Webinar - Security Guidelines for Providing and Consuming APIs
DevOps Indonesia
 
PDF
API Security Webinar - Hendra Tanto
DevOps Indonesia
 
PDF
API Security Webinar : Credential Stuffing
DevOps Indonesia
 
PDF
API Security Webinar : Security Guidelines for Providing and Consuming APIs
DevOps Indonesia
 
PDF
Feature Scoring in Green Field Application Development and DevOps
DevOps Indonesia
 
PDF
DevOps indonesia (Online) Meetup #44 - Announcement
DevOps Indonesia
 
PDF
Introduction to SaltStack (An Event-Based Configuration Management)
DevOps Indonesia
 
DevOps Indonesia Meetup #52 - announcement
DevOps Indonesia
 
Dev ops meetup 51 : Securing DevOps Lifecycle - Announcement
DevOps Indonesia
 
Securing DevOps Lifecycle
DevOps Indonesia
 
DevOps Meetup 50 : Securing your Application - Announcement
DevOps Indonesia
 
Secure your Application with Google cloud armor
DevOps Indonesia
 
DevOps Meetup 49 Aws Copilot and Gitops - announcement by DevOps Indonesia
DevOps Indonesia
 
Operate Containers with AWS Copilot
DevOps Indonesia
 
Continuously Deploy Your CDK Application by Petra novandi barus
DevOps Indonesia
 
DevOps indonesia (online) meetup 46 aws with payfazz in devops indonesia - a...
DevOps Indonesia
 
Securing Your Database Dynamic DB Credentials
DevOps Indonesia
 
DevOps Indonesia (online) meetup 45 - Announcement
DevOps Indonesia
 
The Death and Rise of Enterprise DevOps
DevOps Indonesia
 
API Security Webinar - Credential Stuffing
DevOps Indonesia
 
API Security Webinar - Security Guidelines for Providing and Consuming APIs
DevOps Indonesia
 
API Security Webinar - Hendra Tanto
DevOps Indonesia
 
API Security Webinar : Credential Stuffing
DevOps Indonesia
 
API Security Webinar : Security Guidelines for Providing and Consuming APIs
DevOps Indonesia
 
Feature Scoring in Green Field Application Development and DevOps
DevOps Indonesia
 
DevOps indonesia (Online) Meetup #44 - Announcement
DevOps Indonesia
 
Introduction to SaltStack (An Event-Based Configuration Management)
DevOps Indonesia
 
Ad

Recently uploaded (20)

PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
July Patch Tuesday
Ivanti
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
July Patch Tuesday
Ivanti
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 

Securing an NGINX deployment for K8s

  • 1. PAGE 1 DEVOPS INDONESIA PAGE 1 DEVOPS INDONESIA Steve Giguere Palo ALto Jakarta, 8 Maret 2022 Securing an NGINX deployment for Kubernetes
  • 2. Securing an Deployment for Kubernetes Featuring: ● Checkov: Open Source IaC Scanning Your guide: Steve Giguere @_SteveGiguere_
  • 3. ● Developer Advocate - Bridgecrew ● DevSecOp s Enthusiast ● DevSecOps London - Organiser ● Raspberry Pi Geek ● Formerly: Aqua Security, StackRox, Synopsys Software Integrity Group ● Twitch show: https://Clust3rF8ck (.com) ● Podcaster: BeerSecOps, CoSeCast (.com) ● Beer Taster: BeerNative (.tv) ● More Steve: https://stevegiguere.com W h o is… Steve Giguere (shig-air)
  • 4. T H E C H A L L E N G E
  • 5. T H E C H A L L E N G E ● NEED WEBSITE FOR TWITCH SHOW ● HOST ON RASPBERRY PI ● CREATED WITH HUGO ● USE NGINX TRY NOT TO L O O K L I KE TOTAL IDIOT WO R KI N G F O R A N IAC SECURITY COMPAN Y BY DEPLOYI NG A N NGINX W E B S I T E F O R A TWITCH S H O W A B O U T C L O U D NATIVE SECURITY THAT DOESN’ T PA S S O U R C H E C KO V YAML S C A N
  • 6. ● A01:2021-Broken A cce ss Control ● A02:2021-Cryptographic Failures ● A03:2021-Injection ● A04:2021-Insecure De sig n ● A05:2021-Security Misconfiguration ● A06:2021-Vulnerable a n d Outdated C omponents ● A07:2021-Identification and Authentication Failures ● A08:2021-Software and Data Integrity Failures ● A09:2021-Security L o g g i n g and Monitoring Failures ● A10:2021-Server-Side Request Forgery Coding issues like input sanitization have been replaced by misconfigurations and dependency (supply chain) risks
  • 7. The Problem Defaults are bad! Misconfigurations are bad! ● Unintended behaviour ● Outage ● Data Breach ● Lateral movement ● Supply Chain Compromise ● PII Exposure Security best practices are important!
  • 8. IF COMPROMISED ● T HE NGINX DEFAULT IMAGE HAS… ○ NSENTER ○ CURL ○ APT ○ And much much more!! ● T HE NGINX IMAGE CAN... ○ Enumerate the network ○ Breakout to the host ■ EG. CVE-2021-22555 ○ Serve malicious content
  • 9. T H E P L A N
  • 10. ST E P 1 - U S E NGINX ● B T W NGINX RECENTLY HIT #1
  • 11. ST E P 1 ● GET CODE FROM SOMEBODY ELSE
  • 12. S T E P 2 - W R A P IT IN A K8s D E P L O Y M E N T ● Get the code (from somebody else) ○ SEARCH GOOGLE/DUCKDUCKGO? ● Go to the source (kubernetes.io)
  • 13. S T E P 3 - C H E C K IT IS S E C U R E ● Checkov ○ DEPLOYMENT ■ Are my defaults secure and what happens when they are not? ○ IMAGE ■ Can I use the default image or should I make changes?
  • 14. W H A T D O E S S E C U R E MEAN?
  • 15. W H A T D O E S S E C U R E MEAN ● CIA ○ Confidentiality ■ Least Privilege ○ Integrity ■ Immutability ○ Availability ■ Resilience
  • 16. What is ? Open source (Apache 2.0) misconfiguration scanner for IaC, intended to be used in CI/CD pipelines 1.1000+ built in checks 2. Supports extensions 3. Built in best practices and security
  • 17. W h a t is Checkov ● Open source ● Analyze infrastructure as code (IaC) ● Terraform, CloudFormation, Kubernetes, Helm, ARM Templates and Serverless framework ● > 500 rules ● VSCode Plugin ● Optional config file ○ .checkov.yaml *
  • 18. L E A S T PRIVILEGE
  • 19. Add S e c c o m p Profile ● Disables > 44 system calls ○ Expelliarmus ● Eg. ○ Mount (host filesystems) ○ Ptrace (watch everything) ○ Reboot (the host!) ○ Setns (change linux namespace) ○ Quotactl (mess with cpu limits) ● Default defence in depth ○ Many of these overlap with blocking CAP_SYS_ADMIN
  • 20. Set allowPrivilegeEscalation to false setuid ● Prevents binaries from changing the effective user ID ○ Blocks enabling of extra capabilities, ○ Even blocks the use of ping.
  • 21. D o not run as root (the default) ● Seems obvious but ● Assign a UID and GID > 10000 to avoid conflict I a m root!
  • 22. Drop all capabilities ● Add them back as required
  • 24. Read-only filesystem ● Prevents the creation, installation or downloading of malicious code ● Containers should be immutable CAN’T TOUCH THIS
  • 25. Unmount Service Account Token ● Uses the default service account ● Can impersonate the service account ● Abuse the K8s RESTAPIs.
  • 26. Avoid Supply Chain Attacks ● Use the digest for your image NOT tags
  • 27. RE S I LI E N CE
  • 28. Liveness/Readiness Probes ● Let kubernetes know you’re there and it will keep you alive and kicking Can be difficult to come up with methods to determine a ready and live state. Not the case for NGINX however.
  • 29. C P U / Memory Requests and Limits ● Prevents self induced DoS ● Ensures weighted scheduling of pods ● Limits losses from crypto-mining attacks Can be difficult to determine up front but defaults can be quickly derived from the K8s metrics server. MO RE P OWE R!
  • 30. Key Takeaways ● Finding Secure Examples Is Difficult ● Basic Best Practices Can Be Easy ● Tools are Available To Help ● Many Defaults Aren’t Secure Checkov: https://www.checkov.io/ Our blog: https://bridgecrew.io/blog T H A N KS ! DEPLOYMENTS SERVICES JOBS DEFAULTS OUR BATTERED POD COMES FROM A SECURE SUPPLY CHAIN
  • 31. 30 | ©2020 Palo Alto Networks, Inc. All rights reserved. Sca n to register >> When: 24 March 2022 (Thu) Time: 7.00am Indonesia Time Spea kers: W h a t topics will be covered? Code to Cloud is dedicated to covering security best practices W h o should join: Relevant job titles include but are not Code to Cloud Virtual Su mmi t Block your calendar now! limited to DevOps engineers and team leads, infrastructure and platform engineers, security engineers, SREs, CTOs, engineering and InfoSec managers. across cloud native tech stacks and the development lifecycle — from IaC and open source packages to containers and workloads.
  • 32. Survey Form We hope you’ve found our session beneficial. Please help us in answering a short 5 questions survey. A small INR200,000 Grab thank you token awaits. https://forms.gle/bGzk2ntgCmuHCuRg7 Please scan the Q R code or use clickable link in Chatbox
  • 33. Stay Connected With Us! t.me/iddevops DevOps Indonesia DevOps Indonesia DevOps Indonesia @iddevops @iddevops DevOps Indonesia Scan here