SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Pragmatic Container Security
Jeffrey Westphal
Technical Director
Trend Micro
D E M 1 1 - R
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
“It worked on my machine”
…every developer ever
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
The problem
It’s hard to deploy an application
with all of it’s dependencies
The solution
Containers package the app and
it’s dependencies in a portable
format
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
“Containers provide the ability to
package and run an application in a
loosely isolated environment”
Docker Inc. on the idea behind containers
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
CVE-2019-5736runC container to host exploit
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Data
Application
OS
Virtualization
Infrastructure
Physical
On-premises
(Traditional)
Data
Application
OS
Virtualization
Infrastructure
Physical
Infrastructure
(IaaS)
Data
Application
OS
Virtualization
Infrastructure
Physical
Container
(PaaS)
Data
Application
OS
Virtualization
Infrastructure
Physical
Abstract
(SaaS)
The Shared Responsibility Model
AWS’ responsibilityYour responsibility
Service configuration
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Container
Environment
Tactics
• Container host
• Network
• Management stack
• Build pipeline
• Application foundation
• Application
Specific areas
Agenda
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Development Environment
EC2 ECS Fargate
Container Hosts
ECR EKS Kubernetes
Orchestration Tools
Cloud9
Code Repo Jenkins CodeDeploy
CodePipeline
CI/CD Pipeline
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
EC2 ECS
Container Hosts
Production Environment
Registry Containers
Aurora
S3
ELB
WAF
API
Gateway
Fargate
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Infrastructure
(IaaS)
Container
(PaaS)
Abstract
(SaaS)
The Shared Responsibility Model
EC2
ECS
Fargate
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Amazon EC2
• Choose a container specific operating system
• These OS’ have reduced their attack surface by removing non-essential services in addition to some
performance gains
• Harden the operating system (NIST, SANS)
• Removing non-essential services, updating libraries and tools, making smart choices for
service configurations all lead to a strong foundation to build on
• Add logging and monitoring tools
• Container hosts are a critical aspect of your infrastructure, you need the right telemetry from the host in
order to continuously monitor their health and efficiency
Specific areas of focus
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Amazon EC2
• Patch regularly
• Software updates often contain critical security patches and should be applied as quickly as possible
• Restrict the IAM role
• Apply the principle of least privilege
• Add critical security controls like application control, integrity
monitoring, anti-malware
• Using an “allow list” for applications that can be run on the host is highly effective given their specific
workloads. Similar integrity monitoring and anti-malware controls make sure any changes to the host are
expected and not malicious
Specific areas of focus
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Amazon ECS
• Same as EC2 for any AMI that meets the Amazon ECS AMI
specification
• Use one of the AWS provided AMIs as a starting point
Specific areas of focus
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
AWS Fargate
• IAM policies and roles
• Runs on AWS-managed infrastructure, no Amazon EC2
instances to manage
Specific areas of focus
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Amazon Virtual Private Cloud (Amazon VPC)
• Turn on VPC flow logging
• This captures src, dst, timestamp, size, and other critical information used to monitor and troubleshoot
the network
• Security groups for tasks/instances
• Configure least privilege security groups for an EC2 instances or ECS/Fargate tasks in order to reduce their
network footprint
• Encrypt data in transit
• Leverage ALB and ELB functionality with the AWS Certificate Manager in order to use encrypted channels
where possible
Specific areas of focus
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
• Use intrusion prevention controls on the EC2 instance
• Container aware intrusion prevention systems will help apply security controls to container network
traffic, regardless of whether or not it heads north/south
• Log inter-container traffic
• Failing to log network traffic between containers on the same host leaves gaps in your visibility of the
overall application
Specific areas of focus
Amazon EC2 & ECS
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
• AWS WAF works on the edge stopping layer 7 attacks as far
away from your containers as possible
• This low cost service adds a strong preventative control to your applications with little to no effort on
your part
• Use managed rule from trusted APN partners or AWS labs
rules project
• Managed rules reduce your overhead and required domain specific knowledge
Specific areas of focus
AWS WAF
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
• Amazon GuardDuty, finding low level network abuses
• The service scans VPC flow logs looking for actionable intelligence, it’s another aspect of your defence in
depth
Specific areas of focus
Amazon GuardDuty
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Amazon ECR
• Write permissions should be strongly policed
• Trust is a key part of a registry, limiting updates and the creation of new images will help reduce your
organizations exposure
• All images should be scanned for issues after any change
• Container images may contain known vulnerabilities, malware, or sensitive information that should not
be exposed, using a scanner to check for these issues before making the image available
• Systems, not people should access the registry
• Container images should be added post-scan after being built by a service. Similarly, a service or
automated tool should instantiate the images into a new container
Specific areas of focus
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Kubernetes
• Don’t run it if you don’t have to
• A managed service like EKS will significantly reduce your operational overhead and exposed attack
surface
• Restrict access to the management interface
• Make sure you have limited access to operational teams that require it and only those teams
• Follow the CIS Kubernetes benchmark for security
• Walk through the default configurations and customize to your requirements. Remember the principle of
least privilege
• Monitor your k8s deployment to ensure it stays in line with
CIS
Specific areas of focus
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Amazon EKS
• Set strong IAM policies to restrict access
• Control who can access the tool and when that access can occur
• Configure the security groups responsible for access to the
control plane
• Restrict and monitor usage of the control plane to ensure your deployment works as intended
• Leverage k8s’ native role-based access control
• Apply the principle of least privilege to ensure that access is limited to only where it is absolutely
necessary
Specific areas of focus
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Code*
• IAM roles and permissions
• Make sure to restrict access appropriately. No “Full Access” policies!
• Add scanning and sanity checks at appropriate stages
• Automating security steps like static code analysis, vulnerability scanning, malware scanning and secrets
management is key
• Add security tests alongside integration and unit tests
• Never assume, always verify. Adding security tests makes it simple to validate your security assumptions
each time a build is deployed
• If you are running your own pipeline, apply the same
principles as the EC2 section to those systems
Specific areas of focus
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
• Deploy strong endpoint controls to developers workstations
• Phishing accounts for 92% of all malware infections and attackers are shifting focus to attack developers
in order to compromise the systems they build
• Educate developers on strong security coding practices and
help breakdown the barriers between teams
• Security traditionally struggles with getting controls built in and settles for “bolt on” controls which are
more expensive and less effective. Anything you can do to reduce the divide between teams will benefit
everyone involved
Specific areas of focus
Developers
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
3rd Party Code
• Choose a framework that is actively maintained with a strong
security response workflow
• Make sure you are constantly monitoring the security status of the framework in order to evaluate the
risk of any known vulnerabilities
• Control the version of 3rd party libraries
• Make sure you cache the required versions of the libraries your application depends on. Don’t pull from
NPM/GitHub/etc. every time you build or deploy
Specific areas of focus
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Image Scanning
• Scan container images before publishing for vulnerabilities,
malware, non-compliant code and exposed secrets
• Before pushing a built container to a registry, verify that your containers are in the state you expect
• Mitigate any known vulnerabilities in source or downstream
• Not all issue need to be immediately resolved. Security vulnerabilities can be mitigated on the container
host if the appropriate control is in place and has the right rule configuration
Specific areas of focus
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Container Spec
• Reduce services and tools in the container itself
• Only deploy the minimal amount required to accomplish the task at hand. Try to align with the Unix
Philosophy: do one thing well
• Monitor port usage in containers
• Needlessly open ports are a security risk
• Track container requirements closely
• Explicitly define container requirements for network, compute, and security to ensure that they are being
met within the larger environment
Specific areas of focus
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
…and only as intended
Make sure that systems work
as intended
The goal of cybersecurity
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Container Security
• Container host
• Network
• Management stack
• Build pipeline
• Application foundation
• Application
6 areas to focus on…
Container-aware protection for your EC2
instances and ECS container hosts
Deep Security
Deep Security
Smart Check
Automated container image scanning to
detect vulnerabilties, malware, and
exposed secrets
Visit trendmicro.com/aws to learn more
Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Jeffrey Westphal
jeffrey_westphal@trendmicro.com

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

AWS Executive Security Simulation - FND201-R - AWS re:Inforce 2019
AWS Executive Security Simulation - FND201-R - AWS re:Inforce 2019 AWS Executive Security Simulation - FND201-R - AWS re:Inforce 2019
AWS Executive Security Simulation - FND201-R - AWS re:Inforce 2019
 
How to secure your Active Directory deployment on AWS - FND306-R - AWS re:Inf...
How to secure your Active Directory deployment on AWS - FND306-R - AWS re:Inf...How to secure your Active Directory deployment on AWS - FND306-R - AWS re:Inf...
How to secure your Active Directory deployment on AWS - FND306-R - AWS re:Inf...
 
Using analytics to set access controls in AWS - SDD204 - AWS re:Inforce 2019
Using analytics to set access controls in AWS - SDD204 - AWS re:Inforce 2019 Using analytics to set access controls in AWS - SDD204 - AWS re:Inforce 2019
Using analytics to set access controls in AWS - SDD204 - AWS re:Inforce 2019
 
Build security into your golden AMI pipeline - DEM08 - AWS reInforce 2019
Build security into your golden AMI pipeline - DEM08 - AWS reInforce 2019 Build security into your golden AMI pipeline - DEM08 - AWS reInforce 2019
Build security into your golden AMI pipeline - DEM08 - AWS reInforce 2019
 
Don’t be a haven for attackers: Mitigate misconfigurations with AWS Service C...
Don’t be a haven for attackers: Mitigate misconfigurations with AWS Service C...Don’t be a haven for attackers: Mitigate misconfigurations with AWS Service C...
Don’t be a haven for attackers: Mitigate misconfigurations with AWS Service C...
 
Scaling threat detection and response in AWS - SDD312-R - AWS re:Inforce 2019
Scaling threat detection and response in AWS - SDD312-R - AWS re:Inforce 2019 Scaling threat detection and response in AWS - SDD312-R - AWS re:Inforce 2019
Scaling threat detection and response in AWS - SDD312-R - AWS re:Inforce 2019
 
Build end-to-end IT lifecycle management on AWS - FND301-R - AWS re:Inforce 2...
Build end-to-end IT lifecycle management on AWS - FND301-R - AWS re:Inforce 2...Build end-to-end IT lifecycle management on AWS - FND301-R - AWS re:Inforce 2...
Build end-to-end IT lifecycle management on AWS - FND301-R - AWS re:Inforce 2...
 
Building secure APIs in the cloud - SDD403-R - AWS re:Inforce 2019
Building secure APIs in the cloud - SDD403-R - AWS re:Inforce 2019 Building secure APIs in the cloud - SDD403-R - AWS re:Inforce 2019
Building secure APIs in the cloud - SDD403-R - AWS re:Inforce 2019
 
Identity and access control for custom enterprise applications - SDD412 - AWS...
Identity and access control for custom enterprise applications - SDD412 - AWS...Identity and access control for custom enterprise applications - SDD412 - AWS...
Identity and access control for custom enterprise applications - SDD412 - AWS...
 
Build anywhere; Secure everywhere - DEM01-R - AWS re:Inforce 2019
Build anywhere; Secure everywhere - DEM01-R - AWS re:Inforce 2019 Build anywhere; Secure everywhere - DEM01-R - AWS re:Inforce 2019
Build anywhere; Secure everywhere - DEM01-R - AWS re:Inforce 2019
 
Deploying critical Microsoft workloads on AWS at Capital One - SDD337 - AWS r...
Deploying critical Microsoft workloads on AWS at Capital One - SDD337 - AWS r...Deploying critical Microsoft workloads on AWS at Capital One - SDD337 - AWS r...
Deploying critical Microsoft workloads on AWS at Capital One - SDD337 - AWS r...
 
Root CA hierarchies for AWS Certificate Manager (ACM) Private CA - FND320 - A...
Root CA hierarchies for AWS Certificate Manager (ACM) Private CA - FND320 - A...Root CA hierarchies for AWS Certificate Manager (ACM) Private CA - FND320 - A...
Root CA hierarchies for AWS Certificate Manager (ACM) Private CA - FND320 - A...
 
Incident Response: Eyes Everywhere
Incident Response: Eyes EverywhereIncident Response: Eyes Everywhere
Incident Response: Eyes Everywhere
 
Build a PCI SAQ A-EP-compliant serverless service to manage credit card payme...
Build a PCI SAQ A-EP-compliant serverless service to manage credit card payme...Build a PCI SAQ A-EP-compliant serverless service to manage credit card payme...
Build a PCI SAQ A-EP-compliant serverless service to manage credit card payme...
 
Lean and clean SecOps using AWS native services cloud - SDD301 - AWS re:Infor...
Lean and clean SecOps using AWS native services cloud - SDD301 - AWS re:Infor...Lean and clean SecOps using AWS native services cloud - SDD301 - AWS re:Infor...
Lean and clean SecOps using AWS native services cloud - SDD301 - AWS re:Infor...
 
Architect proper segmentation for PCI DSS workloads on AWS - GRC306 - AWS re:...
Architect proper segmentation for PCI DSS workloads on AWS - GRC306 - AWS re:...Architect proper segmentation for PCI DSS workloads on AWS - GRC306 - AWS re:...
Architect proper segmentation for PCI DSS workloads on AWS - GRC306 - AWS re:...
 
Serverless remediation in Financial Services: A custom tool - SEP311 - AWS re...
Serverless remediation in Financial Services: A custom tool - SEP311 - AWS re...Serverless remediation in Financial Services: A custom tool - SEP311 - AWS re...
Serverless remediation in Financial Services: A custom tool - SEP311 - AWS re...
 
Adding the Sec to Your DevOps Pipelines
Adding the Sec to Your DevOps PipelinesAdding the Sec to Your DevOps Pipelines
Adding the Sec to Your DevOps Pipelines
 
Building a well-engaged and secure AWS account access management - FND207-R ...
 Building a well-engaged and secure AWS account access management - FND207-R ... Building a well-engaged and secure AWS account access management - FND207-R ...
Building a well-engaged and secure AWS account access management - FND207-R ...
 
Capital One case study: Addressing compliance and security within AWS - FND21...
Capital One case study: Addressing compliance and security within AWS - FND21...Capital One case study: Addressing compliance and security within AWS - FND21...
Capital One case study: Addressing compliance and security within AWS - FND21...
 

Ähnlich wie Pragmatic container security - DEM11-R - AWS re:Inforce 2019

Ähnlich wie Pragmatic container security - DEM11-R - AWS re:Inforce 2019 (20)

AWS Community Day - Vitaliy Shtym - Pragmatic Container Security
AWS Community Day - Vitaliy Shtym - Pragmatic Container SecurityAWS Community Day - Vitaliy Shtym - Pragmatic Container Security
AWS Community Day - Vitaliy Shtym - Pragmatic Container Security
 
Pragmatic Container Security (Sponsored by Trend Micro) - AWS Summit Sydney
Pragmatic Container Security (Sponsored by Trend Micro) - AWS Summit SydneyPragmatic Container Security (Sponsored by Trend Micro) - AWS Summit Sydney
Pragmatic Container Security (Sponsored by Trend Micro) - AWS Summit Sydney
 
Too Many Tools - How AWS Systems Manager Bridges Operational Models
Too Many Tools - How AWS Systems Manager Bridges Operational ModelsToo Many Tools - How AWS Systems Manager Bridges Operational Models
Too Many Tools - How AWS Systems Manager Bridges Operational Models
 
Too Many Tools? How AWS Systems Manager Bridges Operational Models - AWS Summ...
Too Many Tools? How AWS Systems Manager Bridges Operational Models - AWS Summ...Too Many Tools? How AWS Systems Manager Bridges Operational Models - AWS Summ...
Too Many Tools? How AWS Systems Manager Bridges Operational Models - AWS Summ...
 
Infrastructure Security: Your Minimum Security Baseline
Infrastructure Security: Your Minimum Security BaselineInfrastructure Security: Your Minimum Security Baseline
Infrastructure Security: Your Minimum Security Baseline
 
AWS Security Week: Infrastructure Security- Your Minimum Security Baseline
AWS Security Week: Infrastructure Security- Your Minimum Security BaselineAWS Security Week: Infrastructure Security- Your Minimum Security Baseline
AWS Security Week: Infrastructure Security- Your Minimum Security Baseline
 
DevSecOps: Integrating security into pipelines - SDD310 - AWS re:Inforce 2019
DevSecOps: Integrating security into pipelines - SDD310 - AWS re:Inforce 2019 DevSecOps: Integrating security into pipelines - SDD310 - AWS re:Inforce 2019
DevSecOps: Integrating security into pipelines - SDD310 - AWS re:Inforce 2019
 
How AI is disrupting the world
How AI is disrupting the world How AI is disrupting the world
How AI is disrupting the world
 
Tax returns in the cloud: The journey of Intuit’s data platform - SDD330 - AW...
Tax returns in the cloud: The journey of Intuit’s data platform - SDD330 - AW...Tax returns in the cloud: The journey of Intuit’s data platform - SDD330 - AW...
Tax returns in the cloud: The journey of Intuit’s data platform - SDD330 - AW...
 
Rodney Lester: Well-Architected - Reliability Instructor Led Lab.pdf
Rodney Lester: Well-Architected - Reliability Instructor Led Lab.pdfRodney Lester: Well-Architected - Reliability Instructor Led Lab.pdf
Rodney Lester: Well-Architected - Reliability Instructor Led Lab.pdf
 
Securing Your Customers Data From Day One
Securing Your Customers Data From Day OneSecuring Your Customers Data From Day One
Securing Your Customers Data From Day One
 
SecuringYourCustomersDataFromDayOne_SFStartupDay
SecuringYourCustomersDataFromDayOne_SFStartupDaySecuringYourCustomersDataFromDayOne_SFStartupDay
SecuringYourCustomersDataFromDayOne_SFStartupDay
 
Securing Your Customers Data From Day One
Securing Your Customers Data From Day OneSecuring Your Customers Data From Day One
Securing Your Customers Data From Day One
 
Managing Microsoft Workloads on AWS.pdf
Managing Microsoft Workloads on AWS.pdfManaging Microsoft Workloads on AWS.pdf
Managing Microsoft Workloads on AWS.pdf
 
利用 Fargate - 無伺服器的容器環境建置高可用的系統
利用 Fargate - 無伺服器的容器環境建置高可用的系統利用 Fargate - 無伺服器的容器環境建置高可用的系統
利用 Fargate - 無伺服器的容器環境建置高可用的系統
 
How to Implement a Well-Architected Security Solution.pdf
How to Implement a Well-Architected Security Solution.pdfHow to Implement a Well-Architected Security Solution.pdf
How to Implement a Well-Architected Security Solution.pdf
 
PaaS – From Code to Running Application using AWS Elastic Beanstalk (DEV323) ...
PaaS – From Code to Running Application using AWS Elastic Beanstalk (DEV323) ...PaaS – From Code to Running Application using AWS Elastic Beanstalk (DEV323) ...
PaaS – From Code to Running Application using AWS Elastic Beanstalk (DEV323) ...
 
AWS18_StartupDayToronto_SecuringYourCustomersDataFromDayOne
AWS18_StartupDayToronto_SecuringYourCustomersDataFromDayOneAWS18_StartupDayToronto_SecuringYourCustomersDataFromDayOne
AWS18_StartupDayToronto_SecuringYourCustomersDataFromDayOne
 
AWS Security by Design
AWS Security by Design AWS Security by Design
AWS Security by Design
 
Compliance and Security Mitigation Techniques
Compliance and Security Mitigation TechniquesCompliance and Security Mitigation Techniques
Compliance and Security Mitigation Techniques
 

Mehr von Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Mehr von Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Pragmatic container security - DEM11-R - AWS re:Inforce 2019

  • 1. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Pragmatic Container Security Jeffrey Westphal Technical Director Trend Micro D E M 1 1 - R
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. “It worked on my machine” …every developer ever
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. The problem It’s hard to deploy an application with all of it’s dependencies The solution Containers package the app and it’s dependencies in a portable format
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. “Containers provide the ability to package and run an application in a loosely isolated environment” Docker Inc. on the idea behind containers
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. CVE-2019-5736runC container to host exploit
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Data Application OS Virtualization Infrastructure Physical On-premises (Traditional) Data Application OS Virtualization Infrastructure Physical Infrastructure (IaaS) Data Application OS Virtualization Infrastructure Physical Container (PaaS) Data Application OS Virtualization Infrastructure Physical Abstract (SaaS) The Shared Responsibility Model AWS’ responsibilityYour responsibility Service configuration
  • 7. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Container Environment Tactics • Container host • Network • Management stack • Build pipeline • Application foundation • Application Specific areas Agenda
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 9. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Development Environment EC2 ECS Fargate Container Hosts ECR EKS Kubernetes Orchestration Tools Cloud9 Code Repo Jenkins CodeDeploy CodePipeline CI/CD Pipeline
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. EC2 ECS Container Hosts Production Environment Registry Containers Aurora S3 ELB WAF API Gateway Fargate
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Infrastructure (IaaS) Container (PaaS) Abstract (SaaS) The Shared Responsibility Model EC2 ECS Fargate
  • 13. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Amazon EC2 • Choose a container specific operating system • These OS’ have reduced their attack surface by removing non-essential services in addition to some performance gains • Harden the operating system (NIST, SANS) • Removing non-essential services, updating libraries and tools, making smart choices for service configurations all lead to a strong foundation to build on • Add logging and monitoring tools • Container hosts are a critical aspect of your infrastructure, you need the right telemetry from the host in order to continuously monitor their health and efficiency Specific areas of focus
  • 14. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Amazon EC2 • Patch regularly • Software updates often contain critical security patches and should be applied as quickly as possible • Restrict the IAM role • Apply the principle of least privilege • Add critical security controls like application control, integrity monitoring, anti-malware • Using an “allow list” for applications that can be run on the host is highly effective given their specific workloads. Similar integrity monitoring and anti-malware controls make sure any changes to the host are expected and not malicious Specific areas of focus
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Amazon ECS • Same as EC2 for any AMI that meets the Amazon ECS AMI specification • Use one of the AWS provided AMIs as a starting point Specific areas of focus
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. AWS Fargate • IAM policies and roles • Runs on AWS-managed infrastructure, no Amazon EC2 instances to manage Specific areas of focus
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Amazon Virtual Private Cloud (Amazon VPC) • Turn on VPC flow logging • This captures src, dst, timestamp, size, and other critical information used to monitor and troubleshoot the network • Security groups for tasks/instances • Configure least privilege security groups for an EC2 instances or ECS/Fargate tasks in order to reduce their network footprint • Encrypt data in transit • Leverage ALB and ELB functionality with the AWS Certificate Manager in order to use encrypted channels where possible Specific areas of focus
  • 19. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. • Use intrusion prevention controls on the EC2 instance • Container aware intrusion prevention systems will help apply security controls to container network traffic, regardless of whether or not it heads north/south • Log inter-container traffic • Failing to log network traffic between containers on the same host leaves gaps in your visibility of the overall application Specific areas of focus Amazon EC2 & ECS
  • 20. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. • AWS WAF works on the edge stopping layer 7 attacks as far away from your containers as possible • This low cost service adds a strong preventative control to your applications with little to no effort on your part • Use managed rule from trusted APN partners or AWS labs rules project • Managed rules reduce your overhead and required domain specific knowledge Specific areas of focus AWS WAF
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. • Amazon GuardDuty, finding low level network abuses • The service scans VPC flow logs looking for actionable intelligence, it’s another aspect of your defence in depth Specific areas of focus Amazon GuardDuty
  • 22. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 23. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Amazon ECR • Write permissions should be strongly policed • Trust is a key part of a registry, limiting updates and the creation of new images will help reduce your organizations exposure • All images should be scanned for issues after any change • Container images may contain known vulnerabilities, malware, or sensitive information that should not be exposed, using a scanner to check for these issues before making the image available • Systems, not people should access the registry • Container images should be added post-scan after being built by a service. Similarly, a service or automated tool should instantiate the images into a new container Specific areas of focus
  • 24. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Kubernetes • Don’t run it if you don’t have to • A managed service like EKS will significantly reduce your operational overhead and exposed attack surface • Restrict access to the management interface • Make sure you have limited access to operational teams that require it and only those teams • Follow the CIS Kubernetes benchmark for security • Walk through the default configurations and customize to your requirements. Remember the principle of least privilege • Monitor your k8s deployment to ensure it stays in line with CIS Specific areas of focus
  • 25. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Amazon EKS • Set strong IAM policies to restrict access • Control who can access the tool and when that access can occur • Configure the security groups responsible for access to the control plane • Restrict and monitor usage of the control plane to ensure your deployment works as intended • Leverage k8s’ native role-based access control • Apply the principle of least privilege to ensure that access is limited to only where it is absolutely necessary Specific areas of focus
  • 26. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 27. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Code* • IAM roles and permissions • Make sure to restrict access appropriately. No “Full Access” policies! • Add scanning and sanity checks at appropriate stages • Automating security steps like static code analysis, vulnerability scanning, malware scanning and secrets management is key • Add security tests alongside integration and unit tests • Never assume, always verify. Adding security tests makes it simple to validate your security assumptions each time a build is deployed • If you are running your own pipeline, apply the same principles as the EC2 section to those systems Specific areas of focus
  • 28. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. • Deploy strong endpoint controls to developers workstations • Phishing accounts for 92% of all malware infections and attackers are shifting focus to attack developers in order to compromise the systems they build • Educate developers on strong security coding practices and help breakdown the barriers between teams • Security traditionally struggles with getting controls built in and settles for “bolt on” controls which are more expensive and less effective. Anything you can do to reduce the divide between teams will benefit everyone involved Specific areas of focus Developers
  • 29. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 30. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. 3rd Party Code • Choose a framework that is actively maintained with a strong security response workflow • Make sure you are constantly monitoring the security status of the framework in order to evaluate the risk of any known vulnerabilities • Control the version of 3rd party libraries • Make sure you cache the required versions of the libraries your application depends on. Don’t pull from NPM/GitHub/etc. every time you build or deploy Specific areas of focus
  • 31. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Image Scanning • Scan container images before publishing for vulnerabilities, malware, non-compliant code and exposed secrets • Before pushing a built container to a registry, verify that your containers are in the state you expect • Mitigate any known vulnerabilities in source or downstream • Not all issue need to be immediately resolved. Security vulnerabilities can be mitigated on the container host if the appropriate control is in place and has the right rule configuration Specific areas of focus
  • 32. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 33. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Container Spec • Reduce services and tools in the container itself • Only deploy the minimal amount required to accomplish the task at hand. Try to align with the Unix Philosophy: do one thing well • Monitor port usage in containers • Needlessly open ports are a security risk • Track container requirements closely • Explicitly define container requirements for network, compute, and security to ensure that they are being met within the larger environment Specific areas of focus
  • 34. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 35. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. …and only as intended Make sure that systems work as intended The goal of cybersecurity
  • 36. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Container Security • Container host • Network • Management stack • Build pipeline • Application foundation • Application 6 areas to focus on…
  • 37. Container-aware protection for your EC2 instances and ECS container hosts Deep Security Deep Security Smart Check Automated container image scanning to detect vulnerabilties, malware, and exposed secrets Visit trendmicro.com/aws to learn more
  • 38. Thank you! © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Jeffrey Westphal jeffrey_westphal@trendmicro.com