implementing the top 10 aws security best practices
TRANSCRIPT
Copyright © 2016 evident.io1
IMPLEMENTING THE TOP 10 AWS SECURITY BEST PRACTICESJustin Lundy, Co-Founder / CTOSebastian Taphanel CISSP-ISSEP, Federal Solutions Architect
6 April 2016
Copyright © 2016 evident.io2
When we gave developers the power to create infrastructure, security became
their responsibility, too.
Security *IS* a Shared Responsibility
Copyright © 2016 evident.io4
Top 10 AWS Security Best Practices
1. Disable root API access key and secret key2. Enable MFA tokens everywhere3. Reduce number of IAM users with Admin rights4. Use Roles for EC25. Least privilege: limit what IAM entities can do with
strong/explicit policies6. Rotate all the keys regularly7. Use IAM roles with STS AssumeRole where
possible8. Dampen DDoS with Complementary Servcies9. Do not allow 0.0.0.0/0 in any EC2/ELB security
group unless you mean it10. Watch world-readable/listable S3 bucket policies
0. Enable CloudTrail Logging & Encryption
http://blog.evident.io/blog/2016/2/10/implementing-the-top-10-aws-security-best-practices
Copyright © 2016 evident.io5
• Do this first• You can’t get a log file if you don’t turn it on• Consolidate logs• Set up S3 Lifecycle• Only enable one global region• Encrypt everywhere
• S3• EBS• SSL• Rest• Flight• Not only at night…
#0 - ENABLE CLOUDTRAIL LOGGING & ENCRYPTION
Copyright © 2016 evident.io6
• “Root” account has no restrictions• Create administrative IAM users• Use Roles for EC2 (#4)• Make sure billing and contact questions are filled out• Bonus: Set up MFA on root and throw away the key!
#1 - DISABLE ROOT ACCOUNT API ACCESS KEY
Copyright © 2016 evident.io7
#2 - ENABLE MFA TOKENS EVERYWHERE
• Provide an additional factor to the authentication step• MFA is assigned to root account and IAM users• Can be assigned to roles• Physical or virtual• Virtual has choices (Google Authenticator, Authy, etc.)
Copyright © 2016 evident.io8
• How many people have the keys to your kingdom?• Not just people - apps• Review IAM policies on Users, Groups and Roles• Remember #1• Consider Identity Federation
#3 - REDUCE NUMBER OF IAM USERS WITH ADMIN
Copyright © 2016 evident.io9
• Do your EC2 instances need to contact other AWS Services?
• AWS SDKs and aws-cli support EC2 Roles• Reduced attack surface area• Secure DevOps on EC2• Create an EC2 specific role• Assign a specific policy to that role• Launch an EC2 instance with that role• Easy to test with aws-cli on EC2
#4 - USE ROLES FOR EC2
Copyright © 2016 evident.io10
• Programs should operate using the least amount of privilege to get the job done
• IAM can get very granular• Works in tandem with #4 on EC2• Should be applied to all automated workflows, too• Very specific IAM policies - only allow what you mean• IAM managed policies make this easier• Use the IAM policy generator and policy simulator to help
#5 - LEAST PRIVILEGE
Copyright © 2016 evident.io11
• Compromised access keys are very annoying and can cost your business dearly
• IAM users should have keys rotated every 90 days minimum• Mostly useful for when Roles for EC2 won’t work in automated
workflows• Sample process:
• Track age of Access Keys• Create new key• Supply key to automation process• Test• Deactivate old key
#6 - ROTATE ALL THE KEYS REGULARLY
Copyright © 2016 evident.io12
• Similar to EC2 Roles• Can be used in place of privileged IAM user
Access Keys• Temporary credentials• Allows for 3rd parties such as Evident.io to
access your AWS accounts more securely• Extended version of AssumeRole allows for
Identity Federation
#7 - USE IAM ROLES WITH STS ASSUME ROLE
temporary security
credential
Copyright © 2016 evident.io13
• AutoScaling allows you to increase number of EC2 instances automatically
• More instances means site stays up• Small price to pay for site reliability• You may need a temporary increase in EC2 limits• You may need to temporarily increase desired number of
instances in ASG• Work with AWS, they may be able to help you on the
network edge• Add CloudFront Content Distribution• Add WAF Rate Blacklisting w/Lambda
#8 - DAMPEN DDOS WITH COMPLEMENTARY SERVICES
Copyright © 2016 evident.io14
• Unless you really mean it• Like leaving the door wide open• EC2 IP address range is a favorite for scanners • Monitor Security Groups regularly (HINT:
Evident.io can help)• Affects not just EC2 instances, but:
• ELBs• RDS Database Servers• ElastiCache Clusters• EMR Nodes• and others…
#9 - DO NOT ALLOW ALL IN SECURITY GROUPS
Copyright © 2016 evident.io15
• Open S3 buckets a favorite for trolling for API Access Keys
• Check your Bucket ACLs regularly• Watch for all grantees, including
AuthenticatedUsers• Check your Bucket Policies regularly
#10 - WATCH READABLE AND LISTABLE S3 BUCKETS
For more content on AWS security and compliance best
practices check out the Evident.io blog at blog.evident.io
Copyright © 2016 evident.io16
EVIDENT SECURITY PLATFORM (ESP) FOR AWS A cloud-native solution that automates key cloud security processes and enables consistent enforcement of security policies, best practices and compliance requirements across an organization’s AWS cloud infrastructure.
Continuous Visibility and Monitoring24x7 monitoring, configuration checking & risk-basedthreat analysis of all AWS Accounts, Services & Regions.
Actionable IntelligenceRapid response and guided remediation of security alerts detected by ESP.
Security Automation & IntegrationManage compliance and automate security policyenforcement across the entire AWS infrastructure.
Copyright © 2016 evident.io18
Closing Thoughts:
• Compliance≠ Secure
• Think about Residual Risk!
• Keep up! Your opposition is..
• Fail Early. Fail Often.
• Embrace change
• Cloud Security is a full contact (TEAM) sport!
• A wise person seeks the counsel of many…• Shoutout to Justin Lundy / John Martinez / John Robel
Copyright © 2016 evident.io19
Online CloudSec Resources
http://blog.evident.io/blog/2016/2/10/implementing-the-top-10-aws-security-best-practices
https://d0.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf
https://d0.awsstatic.com/whitepapers/aws-security-whitepaper.pdf
https://cloudsecurityalliance.org/download/cloud-controls-matrix-v3-0-1/
https://acloud.guru/learn/aws-certified-solutions-architect-associate
https://www.isc2.org/ccsp/default.aspx
https://azure.microsoft.com/en-us/blog/topics/security/
https://cloud.google.com/security/
…?
THANKS FOR PARTICIPATING!
SEBASTIAN TAPHANEL: [email protected]://WWW.LINKEDIN.COM/IN/SEBASTIANTAPHANEL