hack proof your aws cloud cloudcheckr_040416

25
Aaron Newman, Co- Founder April 4, 2016 Hackproof Your Cloud Unified Cost & Security Management

Upload: jarrett-plante

Post on 20-Mar-2017

116 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Hack proof your aws cloud cloudcheckr_040416

Aaron Newman, Co-FounderApril 4, 2016

Hackproof Your Cloud

Unified Cost & Security Management

Page 2: Hack proof your aws cloud cloudcheckr_040416

Changing Your PerspectiveMoving to the Cloud = rethinking your perimeter security

How do I secure my business applications in AWS?

Rethink how you perform most security tasks:• Network-based IPS/IDS• Network scanning• Penetration tests• Vulnerability assessments

Focus on securing cloud workloads……not on securing the cloud

Page 3: Hack proof your aws cloud cloudcheckr_040416

In the Traditional Data Center

Setting Up Perimeter Security:• Setting up your infrastructure• Setting up access points to the internet• Configuring firewall, IDS, IPS, etc. at the access points

Auditing Your Perimeter Security:• Gather set of IP Address blocks to poke at• Do a port scan (using tools such as Nmap) • Determine which ports are open on the target • Try various exploits on the open ports. • Sniff lots of packets• Dig around to make sure no back doors into the network

• Wireless access points, secondary T1 lines, DSL connections• VPN access from some other network

Page 4: Hack proof your aws cloud cloudcheckr_040416

AWS: What’s Different?

The idea of physical security morphs as infrastructure becomes virtualized by AWS APIs.

In a new world of ephemeral, auto-scaling infrastructure, you need to adapt your security architecture to meet

both compliance and security threats.

Physical assets secured at the AWS availability zone Must guard the AWS API IAM Access is your new physical security

Page 5: Hack proof your aws cloud cloudcheckr_040416

AWS Foundation Services

Compute Storage Database Networking

AWS Global Infrastructure

Regions

Availability Zones

Edge Locations

NetworkSecurity

Inventory& Config

Customer Applications & ContentYou get to define your controls IN the Cloud

AWS takes care of the security OF the Cloud

You

AWS and You Share Responsibility for Security

DataSecurity

Access Control

Page 6: Hack proof your aws cloud cloudcheckr_040416

Minimizing Attack Vectors

Principles don’t change• Reduce your surface area!• Defense-in-depth

Some attack vectors don’t change• Application level

• user-privilege escalation, web app vulns, XSS• Operating system vulnerabilities• Database vulnerabilities

Some attack vectors change• Homogeneous environment• Polymorphic targets/mapping• Reduced network sniffing

Security Hardening

Configure and manage user

privileges

Remove unused user

accounts

Close unused open network

ports

Enforce password

complexity & policies

Remove unwanted services

Patch all known

vulnerabilities

Page 7: Hack proof your aws cloud cloudcheckr_040416

Give me your network block• Nmap• Port scans• Ping sweeps• Etc…

Perimeter Assessments In the CloudHow do I assess the perimeter of my cloud?

Let me see your configuration• List of publicly-accessible

resources• Security groups (Amazon EC2-

Classic, Amazon EC2-VPC, Redshift, RDS, etc…)

• Routing tables, Network ACL• VPC, subnets • Amazon S3 buckets and

permissions• IAM policies

OLDWORLD

NEWWORLD

Page 8: Hack proof your aws cloud cloudcheckr_040416

Virtual Private Clouds

Default VPC is created in every region• VPCs are wide open by default

VPC is composed of:• Internet and VPN gateways – connect to the rest of

the world• 1+ subnet(s)• Routing table – how to move traffic around the VPC• Network ACLs – a firewall but stateless• Security groups – host-based firewall stateful• Resources – Amazon EC2, RDS, Redshift, ElastiCache

Page 9: Hack proof your aws cloud cloudcheckr_040416
Page 10: Hack proof your aws cloud cloudcheckr_040416

Network Security in a VPC

Network ACLs (NACLs)• Virtual firewalls assigned to VPC/Subnets• Network ACLs are stateless; responses to allowed inbound

traffic are subject to the rules for outbound traffic (and vice versa).• Rules evaluated numerical ascending – DENY can be overridden by

ALLOW• Watch for INEFFECTIVE rules

Security Groups• Host-based firewalls assigned to instances• Stateful – responses to allowed inbound traffic are not subjected

to the rules for outbound traffic• Rules are cumulative – DENY always overrides ALLOW• Assigning wrong security group to an instance exposes the entire VPC

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html

Page 11: Hack proof your aws cloud cloudcheckr_040416

Complex Connections to Amazon EC2

Amazon EC2 instance can be run inside VPCs

•Legacy capability to run outside VPCs

•Instance ID: i-001bac39 •Friendly name (implemented as a tag): ISS-V2-API1

Amazon EC2 instance can be given 1 or more private IP

addresses

•For example: 172.12.6.186•This generates a DNS name ip-172-12-6-186.us-west-2.compute.internal

Amazon EC2 instance can be given 1 or more public IP

addresses

•For example: 52.24.201.167•This generates a DNS name ec2-52-24-201-167.us-west-2.compute.amazonaws.com

Amazon EC2 instance can be attached to an Elastic IP

address (EIP)

•For example: 107.20.135.132

Page 12: Hack proof your aws cloud cloudcheckr_040416

Running VA in Cloud EnvironmentsHow do I run Vulnerability Assessments?

Gather the list of public IPs and EIPs of all resources

Do I need to scan the private IP addresses and instances?

Scanning an AMI

Spin up a new instance, run a scan on the new instance

Mark everything based on this AMI as “scanned”

What about when an instance “drifts” from original AMI?

Someone can reconfigure settings, install new software

In an elastic, ephemeral, auto scaling environmentclouds can have tens of thousands of instances

Page 13: Hack proof your aws cloud cloudcheckr_040416

Patching Strategies for AWS“No Patch” Strategy

• Stay away from patching live systems• Focus on patching templates/AMIs• Deliver patches by redeploying workloads• Dependent on adopting pure cloud architectures

Look at AWS OS Templates• Patched by Amazon

Systematic Workload Reprovisioning• Based on high-assurance repositories• Effective battling Advanced Persistent Threats

Page 14: Hack proof your aws cloud cloudcheckr_040416

What are we missing?

Don’t assume attacks only happen against Amazon EC2

Over 30 different AWS services • Many have unique access control systems

You will have 100s of AWS accounts

We need a complete inventory• All publicly-accessible endpoints and resources

Security breaches can happen with a single weak link

Page 15: Hack proof your aws cloud cloudcheckr_040416

AWS Relational Database Service

Location• Within a VPC or not, multi-AZ or not

Security options• DB security groups (if not in a VPC) or Amazon EC2-VPC security groups• Select a non-default database port

Only port RDS listens on is the database port • Shutdown on all other ports (publicly, I’m sure AWS team can access the OS)

Publicly accessible option• Not a good idea, but if you do this

• Make sure you use security groups to restrict source IP address• Make sure you have latest patches applied

Secure your database snapshots• Keys to the kingdom if someone can get a copy• Brute-force passwords, restore to their own account

Page 16: Hack proof your aws cloud cloudcheckr_040416

S3 (Simple Storage Service)Up to 1000 buckets in an account

• Unlimited number of objects (billions is not uncommon)

Location• Within a region, across multi-AZs, not housed in a VPC• Can’t sit between client and storage

Security• Access control through IAM policies, bucket policies, ACLs, and query string authentication• Server-side Encryption, HTTPS support• Server-access logs (does not integrate with CloudTrail)

Don’t grant FULL_CONTROL, WRITE_ACP, WRITE bucket permissions to Everyone EVER!!!

Create an inventory of your sensitive data

Page 17: Hack proof your aws cloud cloudcheckr_040416

SQS (Simple Queuing Service)

Where does SQS live?• Within a region, not within a VPC• Uses a URL such as:

https://sqs.us-east-1.amazonaws.com/123456789012/MySQS

Security based on policy documents:{ "Version": "2008-10-17", "Id": "arn:aws:sqs:us-east-1:123456789012:MySQS/SQSDefaultPolicy", "Statement": [ { "Sid": "Sid1415217272568", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": [ "SQS:ReceiveMessage", "SQS:SendMessage" ], "Resource": "arn:aws:sqs:us-east-1:123456789012:MySQS" },

Page 18: Hack proof your aws cloud cloudcheckr_040416

SNS (Simple Notification Service)

SNS does not live inside your VPC

Permissions based on topic policies:

Page 19: Hack proof your aws cloud cloudcheckr_040416

Using AWS CloudTrail

An AWS Service that records each time the AWS API is called• Currently supports most AWS services

http://docs.aws.amazon.com/awscloudtrail/latest/userguide/dochistory.html

Conveniently everything in AWS goes through the API• Even actions in the Management Console go through the API

CloudTrail writes files into an Amazon S3 bucket• Near real-time (every five minutes)• Files are in JSON format

Get started at: http://aws.amazon.com/cloudtrail/

Page 20: Hack proof your aws cloud cloudcheckr_040416

Using CloudWatch LogsSimple method of monitoring operating system logs

• Ship Windows event logs and syslogs to AWS CloudWatch

Types of use-case:• Account Login Failure, Account Login Success, New local account

creation,Excessive Login Failure (Configurable)

• Unauthorized Windows Admin Logon, Windows Account Lockout Attempt,Windows Computer Account Changes

• Windows Audit Policy Changes, Windows Event Log Cleared• Non-Windows - Account Locked Out, Non-Windows - Account

Unlocked,Changes to System or Audit log

Get started at: http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/WhatIsCloudWatchLogs.html

Page 21: Hack proof your aws cloud cloudcheckr_040416

Using Amazon VPC Flow Logs

An AWS service that records each time packets enter or leave a VPC• http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/flow-logs.html

Security team comes to you and says:“We need logs going to instance 1-0123456 from IP address ranges 52.205.16.0 - 52.205.31.255”

Monitor for DENY connections• Gives you both security group and NACL denies

Announcement:https://aws.amazon.com/about-aws/whats-new/2015/06/aws-launches-amazon-vpc-flow-logs/

Page 22: Hack proof your aws cloud cloudcheckr_040416

Tools For Configuring AWS Securely & Cost Effectively

Generic tools fall short

Purpose-built, not cloud-washed• Make sure tools don’t fall over in the cloud• Tools have to understand dynamic, ephemeral IPs

Need a deep understanding of AWS• What does this means• Context is important• Actionable intelligence

Page 23: Hack proof your aws cloud cloudcheckr_040416

Unified Cost & Security Management

Visualize deployed inventory in the cloud

What cloud users need… CloudCheckr provides…

Monitoring reports, generated and updated daily, listing all additions, deletions, or modifications over the past 24 hours.

Comprehensive visibility & control on security, availability, cost and usage with 350+ out-of-the-box best practice policies.

A detailed report of configured infrastructure, highlightingand maintaining configuration records.

Detailed inventory reports designed to allow anyone from an to obtain a complete picture of their AWS cloud deployment.

Multiple reports allowing required staff to dissect cloud costs.

Utilization reports to ensure infrastructure is running smoothly.

Maintain a cloud configuration historical record

Check best practices covering security,availability, cost, and usage

Monitor changes in a cloud environment

Analyze usage in the cloud

Understand/Audit costs in the cloud»»»»»»

Page 24: Hack proof your aws cloud cloudcheckr_040416

Questions?

Page 25: Hack proof your aws cloud cloudcheckr_040416

Try a Free Trialapp.cloudcheckr.com

@CloudCheckr

How-to Videos