Cloud Security Orienteering
Cloud Security Orienteering
@ramimacisabird
Background
@ramimacisabird
Orienteering
@ramimacisabird
How is this relevant to you?
● New job, or new team
● Consulting engagement
● Merger or acquisition
● See your own environment, with fresh eyes
@ramimacisabird
Cloud Adoption Patterns
Characteristics Developer Led Data Center Snap Migration Native New Build
Transformation
Speed Fast then slow Slow (2-3 years+) 18-24 months Fast as DevOps
Tooling New + old when Culturally Panic (a lot of New, unless culturally
forced influenced; old + old) forced to old
new
https://securosis.com/blog/defining-the-journey-the-four-cloud-adoption-patterns @ramimacisabird
Cloud Adoption Patterns
Characteristics Developer Led Data Center Snap Migration Native New Build
Transformation
Speed Fast then slow Slow (2-3 years+) 18-24 months Fast as DevOps
Tooling New + old when Culturally Panic (a lot of New, unless culturally
forced influenced; old + old) forced to old
new
https://securosis.com/blog/defining-the-journey-the-four-cloud-adoption-patterns @ramimacisabird
You walk into a cloud environment...
@ramimacisabird
What Does Good Look
Like?
@ramimacisabird
Cloud Architecture
● Emergent standards
● High complexity ceiling
● Endless configurability and complexity (200+ number of services)
○ July 2020: “Over 150 AWS services now have a security chapter”
@ramimacisabird
Note: From here on out, I’m going to use AWS for all examples.
(even Oracle)
@ramimacisabird
What Does Good Look
Like?
In
@ramimacisabird
?
@ramimacisabird
The AWS Security Reference Architecture?
https://docs.aws.amazon.com/prescriptive-guidance/latest/security-reference-architecture/architecture.html
@ramimacisabird
AWS Control Tower?
@ramimacisabird
A history of AWS Architectures
https://cloudonaut.io/aws-account-structure-think-twice-before-using-aws-organizations/
@ramimacisabird
2017 -> 20181 2018 -> 2020
● Use GuardDuty ● Account Management and Seperation
● Use Athena to search and analyze logs top level - AWS Organizations
(not ElasticSearch, EMR) ● Federated identity provider
● Use Shield, WAF, and Firewall Manager ● AWS Security Hub (+ Config Rules)
● CloudFormation as a key service ● Automatic remediation with
● No more Macie EventBridge and Config->Lambda
● Systems Manager, Software integrity
● SCPs for data protection
● More Macie
● Significantly expanded IR section
1. Courtesy of Scott Piper:
https://summitroute.com/blog/2018/07/31/aws_security_pillar_whitepaper_updates/ @ramimacisabird
What Does Good Look Like in
@ramimacisabird
Let’s get orienteering
@ramimacisabird
Some assumptions:
@ramimacisabird
Principles of Orienteering
● Breadth, then depth
○ Avoid rabbit holes Known Known Known Unknown
● Anomaly detection
○ Every region, every project, every account
● Inside out
○ Leverage credentialed access to query and
enumerate Unknown Known Unknown Unknown
● Outside in
○ Only way to get unknown unknown
○ Lots of existing guides on how to do this
@ramimacisabird
Corporate archeology: Putting the “Information” in “Information security”
@ramimacisabird
Corporate Archeology
Services
Regions
Workloads
https://disruptops.com/aws-vs-azure-vs-gcp-a-security-pros-quick-cloud-comparison
@ramimacisabird
Discovering your environments (accounts)
https://summitroute.com/blog/2018/06/18/how_to_inventory_aws_accounts/
● Ask your Technical Account Manager for all accounts linked to your company domain
● Ask your finance team to find all expenses and payments to cloud providers
● Search the company emails for account setup notifications
● Search network and DNS logs
● Put out a public request to company employees
@ramimacisabird
Discovering your workloads
@ramimacisabird
Discovering your resources
@ramimacisabird
Prioritization
@ramimacisabird
What’s important
@ramimacisabird
What’s important - in the cloud
Identity is the new perimeter
@ramimacisabird
@ramimacisabird
Kill chains - https://disruptops.com/stop-todays-top-10-cloud-attack-killchains/
@ramimacisabird
Kill chains - https://disruptops.com/stop-todays-top-10-cloud-attack-killchains/
Cryptomining No ~ Medium
@ramimacisabird
https://speakerdeck.com/ramimac/learning-from-aws-customer-security-incidents @ramimacisabird
Environments and Collections of Environments
@ramimacisabird
Workloads
@ramimacisabird
Identity perimeter
@ramimacisabird
Identity perimeter - what
@ramimacisabird
Identity perimeter - how
● Native tools
○ IAM credential report
■ Great for unused IAM principals
○ Trusted advisor, Security Hub, AWS Config all have IAM
● Open source tools
○ Cloudsplaining
○ PMapper
@ramimacisabird
Cloudsplaining - Kinnaird McQuade @Salesforce
@ramimacisabird
PMapper - Erik Steringer @NCC Group
@ramimacisabird
Network Perimeter
● Public resources
○ List of exposable
○ Scan findings
○ Trusted advisor
● Wildcard security groups
● Default resources (VPCs, Security groups)
○ Launch-wizard sgs
@ramimacisabird
Hosted applications and services
● Out of date, Known vulnerabilities
● Unauthenticated
● Sensitive or internal services/tools (CI/CD, config management)
@ramimacisabird
Other concerns … but less actionable or less impactful
Exposed secrets:
Secret management pattern
● CloudFormation parameter defaults
● Unencrypted Lambda environment ● Secrets manager
variables ● Vault
● EC2 instance data scripts with hardcoded
secrets
● Etc.
● ECS task definitions with exposed
Supply chain
environment variables
● Sensitive files on S3 ● Vendors - how are they granted access?
● Dockerfiles/container images
● Code repositories, compromised ● AMIs - how are they sourced?
credentials
@ramimacisabird
@ramimacisabird
1. Congratulations! Please proceed
No
Working in a
regulated industry?
Ye
s
1. Sorry :(
2. Focus on compliance-impacting, documented
exceptions, and compensating controls. You can’t
avoid fiddling with encryption
@ramimacisabird
https://www.chrisfarris.com/post/cloud-encryption/
@ramimacisabird
Misconfigurations
"Through 2025, more than 99% of cloud breaches will have a root cause of preventable
misconfigurations or mistakes by end users."
- Gartner (h/t https://twitter.com/anton_chuvakin/status/1421165415699337216?s=20)
@ramimacisabird
Misconfigurations - defense in depth
@ramimacisabird
@ramimacisabird
Prioritization of misconfigurations
Take Security Hub’s AWS Foundational Security Best Practices controls as a case study
@ramimacisabird
Onward and upward
@ramimacisabird
Blanket AWS hardening recommendations
● Guardduty
● Cloudtrail
○ Turn on optional security features, including encryption at-rest and file
validation
○ Centralize and back up logs
● Access analyzer
● Security visibility to all accounts
● S3 block public access, EBS and all other default encryption
@ramimacisabird
What does fixing things look like
Seven steps to engage your organization:
1. Cultivate relationships
2. Ensure alignment
3. Focus on key security domains to build
program foundation
4. Create an evangelism plan
5. Give away your legos
6. Build your team
7. Measure what matters
@ramimacisabird
What does fixing things look like
@ramimacisabird
Maturity curves can help - there are many maturity models
Cloud Security Maturity Model (CSMM) - IANS, CSA, Securosis
1. No Automation
2. SecOps (Simple Automation)
3. Manually executed scripts
4. Guardrails
5. Centrally managed automation
https://www.iansresearch.com/resources/cloud-security-maturity-model/what-is-the-csmm
@ramimacisabird
Marco Lancini’s https://roadmap.cloudsecdocs.com/
5 levels, 7 domains:
@ramimacisabird
More, Broader, Deeper
● Marco Lancini, On Establishing a Cloud Security Program
● Scott Piper/Summit Route, AWS Security Maturity Roadmap 2021
● Matt Fuller, So You Inherited an AWS Account
● DisruptOps, AWS Cloud Security Checklist
● CSA Top Threats, Cloud Penetration Testing Playbook
● Dave Walker & Chris Astley, Security @ Scale on AWS
@ramimacisabird
Thank you
and thanks to the organizers!
Questions?
Find this, and all my talks, at:
https://speakerdeck.com/ramimac
@ramimacisabird