the cloud migration playbook - owasp

35
The Cloud Migration Playbook Part 1: A Simple Primer To Complexity

Upload: others

Post on 16-May-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Cloud Migration Playbook - OWASP

The Cloud Migration Playbook

Part 1: A Simple Primer To Complexity

Page 2: The Cloud Migration Playbook - OWASP

Who Am I?

Jason SewellSr. Security Engineer@sewell_jason

AWS CertificationsAWS SysOps AssociateAWS Security SpecialistAWS Solutions Architect (TBD)

BackgroundWeb Application DeveloperDevOps => DevSecOpsInfoSec/Penetration TesterOWASP Hawaii Chapter Lead

Page 3: The Cloud Migration Playbook - OWASP

Who Are You? I am...● A CISO● A Technical Director● An Engineering Manager● A Security-Minded

Advocate

I want to...● Lift and shift

existing on-prem applications to AWS

● Understand the attack surface of our AWS resources

● Validate that proper security measures are in place in our AWS environment

Page 4: The Cloud Migration Playbook - OWASP

What do we want to accomplish today?

Page 5: The Cloud Migration Playbook - OWASP

The AWS Shared Security Model

Where To Begin?

Page 6: The Cloud Migration Playbook - OWASP

“Through 2025, 99% of cloud security failures will be the customer’s fault.”

Source: Gartner, https://www.gartner.com/smarterwithgartner/is-the-cloud-secure/

But is it really shared…?

Page 7: The Cloud Migration Playbook - OWASP

Q: What’s the main thing we have to worry about?

A: Misconfigurations

Page 8: The Cloud Migration Playbook - OWASP

Year over year from 2018 to 2019, the number of records exposed by cloud misconfigurations rose by 80%, as did the total cost to companies associated with those lost records.

Source: DivvyCloud, 2020 Cloud Misconfigurations Report

In 2018 and 2019, 68% of the companies that suffered a data breach caused by a cloud misconfiguration were founded prior to 2010.

Page 9: The Cloud Migration Playbook - OWASP

Know Your DefaultsConvenience vs Security

DISCLAIMER: Also easier said than done...

Page 10: The Cloud Migration Playbook - OWASP

“It’s the same stuff, just in the cloud right?”

Kinda.

Page 11: The Cloud Migration Playbook - OWASP

First Things First

● Identity● Data Storage

When performing a lift-and-shift or cloud migration you should start threat modeling and hardening 4 common areas:

● Networking● Compute

Page 12: The Cloud Migration Playbook - OWASP

IAM“Identity is the new

perimeter”

● Over 6000 unique permissions in AWS

...and growing

● Difficult to manage and visualize permission boundaries

● IAM is hard

Identity

Page 13: The Cloud Migration Playbook - OWASP

Attacks

● Account Takeover○ Brute Force Attempts○ Password Spraying○ Social Engineering

● Credential Theft○ Privilege Escalation○ Resource Allocation○ Persistence

Page 14: The Cloud Migration Playbook - OWASP

IAM (not gonna do this)

Page 15: The Cloud Migration Playbook - OWASP

Defenses

● Single Sign On/Federation (SSO)

● MFA Enforcement● No Root User API keys● User Key Rotation● Role-Based Access

Control (RBAC)● Least Privilege IAM

policies○ Use conditional policies○ No wildcards○ No AdministratorAccess

● Disable unused regions

Page 16: The Cloud Migration Playbook - OWASP

S3“Your favorite data breach

news source”

● S3● RDS● DynamoDB● Elasticache● SQS● ...more

Data Storage

Page 17: The Cloud Migration Playbook - OWASP

Attacks● Bucket Enumeration● Data Exfiltration● Resource Tampering● Payload Staging

Page 18: The Cloud Migration Playbook - OWASP

Bucket Enumeration

Page 19: The Cloud Migration Playbook - OWASP

Resource Tampering

Page 20: The Cloud Migration Playbook - OWASP

Data Exfiltration

Page 21: The Cloud Migration Playbook - OWASP

Defenses

● S3: Turn on Block Public Access

● S3: Strict Bucket Policies

● RDS/Elasticache: No public access, encrypt snapshots

● SQS: No public queues, encrypt messages

● DynamoDB: Strict IAM controls

Page 22: The Cloud Migration Playbook - OWASP

EC2 ● It’s still a server..● ...but in a whole new

environment.The same old servers, except different.

Compute

Page 23: The Cloud Migration Playbook - OWASP

Attacks

● Service Enumeration● Application Exploit

○ SSRF○ RCE

● Post-Exploit○ Instance Metadata Access○ Lateral Movement○ Cryptojacking○ Unencrypted Volume Access

Page 24: The Cloud Migration Playbook - OWASP

Service Enumeration

Page 25: The Cloud Migration Playbook - OWASP

Application Exploit (SSRF)

Page 26: The Cloud Migration Playbook - OWASP

Post-Exploitation

Page 27: The Cloud Migration Playbook - OWASP

Defenses

● Server Hardening● Remove Default Users● Load Balancers & WAF● Encrypt Volumes● Protect Instance

Metadata

Page 28: The Cloud Migration Playbook - OWASP

VPCThe same old network, except different.

● Networking is hard● Networking in the cloud

is hard AND different

Networking

Page 29: The Cloud Migration Playbook - OWASP

Attacks

● Service Discovery● Data Exfiltration● Lateral Movement (VPC

Peering, VPN, Direct Connect)

● Security Group Backdoor(IAM/EC2)

● Traffic Monitoring

Page 30: The Cloud Migration Playbook - OWASP

Defenses

● Network Segmentation● Create Strict Security

Group and NACL Rules● Assign SG Rules to

Other Internal SGs● Use VPC Endpoints for

Internal Traffic

Page 31: The Cloud Migration Playbook - OWASP

OK..so how do we manage this?

Migrate Your Practices, Not Just Your Applications.

Page 32: The Cloud Migration Playbook - OWASP

AutomationUnleash the robot army.

● DevSecOps / Security Engineering

● Infrastructure as Code● Monitor Events● Automate Remediation● Vulnerability Scanning

Page 33: The Cloud Migration Playbook - OWASP

Cloud Security Maturity Model

https://www.iansresearch.com/resources/cloud-security-maturity-model/what-is-the-csmm

Page 34: The Cloud Migration Playbook - OWASP

Organizations

Cloud Native Security Tools

Asset Management

Training

🔥Pentesting / Assessment

Where do you go from here...?

Page 35: The Cloud Migration Playbook - OWASP

Thank You.

We Can Help:[email protected]

https://www.linkedin.com/company/occamsec/ https://twitter.com/OccamSec