SlideShare a Scribd company logo
1 of 85
Download to read offline
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Configure Your Cloud to Make It
Rain on Threats
Eric Schwenter
Principal Solutions Architect
AWS WWPS
S E C 3 3 5
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Are we in the right place?
• How can I better secure my AWS environment?
• How can I make sure all the accounts in our organization are following
the rules?
• How can I detect threats in one or many accounts?
• What tools should I be using?
• How can I know that new accounts are secure by default?
• I want to know what <insert threat actor here> is doing
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Part 1: Secure “an” account.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS
ENDPOINTS
AWS GLOBAL
INFRASTRUCTURE
REGIONS
AVAILABILITY
ZONES
EDGE
LOCATIONS
FOUNDATION
SERVICES
STORAGE DATABASES NETWORKINGCOMPUTE
AWSIAM
OPTIONAL – OPAQUE DATA: 0s & 1s (In transit / at rest)
CLIENT-SIDE DATA ENCRYPTION
& DATA INTEGRITY
AUTHENTICATION
NETWORK TRAFFIC PROTECTION
Encryption / Integrity / Identity
OPERATING SYSTEM, NETWORK CONFIGURATION
PLATFORM & APPLICATION MANAGEMENT
CUSTOMER DATA
CUSTOMERIAM
MANAGED BY
AWS CUSTOMERS
MANAGED BY
AMAZON WEB
SERVICES
FIREWALL
CONFIGURATION
AWS
ENDPOINTS
AWS GLOBAL
INFRASTRUCTURE
REGIONS
AVAILABILITY
ZONES
EDGE
LOCATIONS
FOUNDATION
SERVICES
STORAGE DATABASES NETWORKINGCOMPUTE
AWSIAM
OPTIONAL – OPAQUE DATA: 0s
& 1s (In transit / at rest)
CLIENT-SIDE DATA ENCRYPTION
& DATA INTEGRITY AUTHENTICATION
OPERATING SYSTEM, NETWORK & FIREWALL CONFIGURATION
PLATFORM & APPLICATION MANAGEMENT
CUSTOMER DATA
MANAGED BY
AWS CUSTOMERS
MANAGED BY
AMAZON WEB
SERVICES
NETWORK TRAFFIC PROTECTION PROVIDED BY THE PLATFORM
Protection of data in transit
SERVER SIDE ENCRYPTION PROVIDED BY THE PLATFORM
Protection of data at rest
Shared responsibility model
Infrastructure
services
Containers services
Abstract servicesAWS
ENDPOINTS
AWS GLOBAL
INFRASTRUCTURE
REGIONS
AVAILABILITY
ZONES
EDGE
LOCATIONS
FOUNDATION
SERVICES
STORAGE DATABASES NETWORKINGCOMPUTE
AWSIAM
OPTIONAL – OPAQUE DATA: 0s & 1s (In transit / at rest)
CLIENT-SIDE DATA ENCRYPTION
& DATA INTEGRITY
AUTHENTICATION
SERVER-SIDE ENCRYPTION
File System and/or Data
NETWORK TRAFFIC PROTECTION
Encryption / Integrity / Identity
OPERATING SYSTEM, NETWORK & FIREWALL CONFIGURATION
PLATFORM & APPLICATION MANAGEMENT
CUSTOMER DATA
CUSTOMERIAM
MANAGED BY
AWS CUSTOMERS
MANAGED BY
AMAZON WEB
SERVICES
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://aws.amazon.com/quickstart/#compliance
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon EC2 Systems Manager
Automation Documents Inventory Maintenance
windows
Parameter Store Patch managerRun command State manager
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon EC2 Systems Manager
Run command
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Why does this matter?
Attack surface Compliance Detect anomalies
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tools you’ll likely need to know
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Choose your adventure!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Replace remote access
Part 1, identify remote access for an environment.
o How can you programmatically check the account in all regions for remote access?
o Hint: What defines “remote access”
o Develop a tool for this, checking the console wont scale.
Part 2, replace remote access with AWS Systems Manager
o For Windows or Linux, deploy Systems Manager on a target host
o Disable the old remote protocol with Systems Manager
Part 3, Audit
o How can we see what commands were run in part 2?
o Can we make an alert if someone turns off a service like you just did?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data flow example
AWS API
Security account
AWS Cloud AWS Cloud
Client
Run
command
Production account
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data flow example
AWS API
AWS Cloud
Client
Run
command
Internet
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Automatic remediation
GuardDuty CloudWatch Events Lambda
Event (event-based) Lambda
Function
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
import boto3
import json
def lambda_handler(event, context):
try:
if event['detail']['type'] in [‘Backdoor:EC2/C&CActivity.B!DNS’]:
response =‘<do something here>’
except Exception, e:
print e
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data flow example
AWS API
AWS Cloud
Client
Run
command
Internet
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon VPC Flow Logs
• Agentless
• Enable per ENI, per subnet, or per Amazon VPC
• Logged to Amazon CloudWatch Logs
• Create CloudWatch metrics from log data
• Alarm on those metrics
AWS
account
Source IP
Destination IP
Source port
Destination port
Interface Protocol Packets
Bytes Start/end time
Accept or
reject
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Example Amazon VPC flow log query
[version, accountid, interfaceid, srcaddr!=172.31., dstaddr, srcport, distport,
protocol, packets, bytes, start, end, action=REJECT, logstatus]
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Query the flow
aws logs filter-log-events --log-group-name flowlogs --log-stream-names eni-
09abcd35bd881234-all --filter-pattern="[version, accountid, interfaceid,
srcaddr!=172.31., dstaddr, srcport, distport, protocol, packets, bytes, start, end,
action=REJECT, logstatus]”
…
{ "ingestionTime": 1540853212620,
"timestamp": 1540852908000,
"message": "2 638930115633 eni-09e099a35bd881234 172.31.56.147 23.15.x.x
49189 80 6 3 152 1540852908 1540852966 REJECT OK",
"eventId": "3436216808972294799655018431925166088321896272121234567",
"logStreamName": "eni-09abcd35bd881234-all"
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon VPC Flow Logs: Automation
Private subnet
Compliance
app
If SSH REJECT > 10,
then…
Elastic
Network
Interface
Metric filter
Filter on all
SSH REJECTFlow Logs group
CloudWatch
alarm
Source IP
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tools you’ll likely need to know
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Network control
Part 1, Enable network monitoring
o Detect attackers with flow logs
o Create an alert for more than (4) rejects from outside of your Amazon VPC
Part 2, how can you make this easier?
o Can we automatically process Amazon VPC flow logs without having to code anything?
Part 3, Bonus round
o Feeling lucky? Modify your local OS firewall with Systems Manager to block connections to
the host from part 1.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Port scanning?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Use the API instead
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://aws.amazon.com/security/penetration-testing/
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Access Advisor
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Keys
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Human Things
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tools you’ll likely need to know
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
IAM permissions
Part 1, Using the access advisor
o Using the access advisor in the AWS Identity and Access Management (IAM) console,
identify un-used permissions
o Is there any way that we could get to the specific API level of information?
Part 2, admin but not really
o Is it possible to give full admin access and not allow some specific options?
o Modify an IAM principal with full Administrator access but deny all Amazon Elastic
Compute Cloud (Amazon EC2) operations.
Part 3, Alert on new guy
o Create an alert when a new IAM user is created
Part 4, Bonus round
o Feeling lucky? Create an IAM user with access from the US-East-1 region only.
o Alert if any user has administrator access, and remove it from new accounts.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
select
useridentity.sessioncontext.sessionIssuer
.userName as uid, eventsource, eventname
from cloudtrail_logs
Where
useridentity.sessioncontext.sessionIssuer
.userName = ‘target-name’
GROUP BY
useridentity.sessioncontext.sessionIssuer
.userName, eventsource, eventname
Query cloud trail data for the target user or role with
Athena
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Wait, how do I make that?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://docs.aws.amazon.com/athena/latest/ug/cl
oudtrail-logs.html#create-cloudtrail-table-ct
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://github.com/Netflix-
Skunkworks/aardvark
https://github.com/Netflix/Repokid
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Restrict an IAM role to a region
{ "Version": "2012-10-17",
"Statement": [
{ "Effect": "Allow",
"Action": [
"ec2:DescribeAccountAttributes", "ec2:DescribeAvailabilityZones",
"ec2:DescribeInternetGateways", "ec2:DescribeSecurityGroups", "ec2:DescribeSubnets",
"ec2:DescribeVpcAttribute", "ec2:DescribeVpcs", "ec2:DescribeInstances", "ec2:DescribeImages",
"ec2:DescribeKeyPairs", "rds:Describe*", "iam:ListRolePolicies", "iam:ListRoles",
"iam:GetRole", "iam:ListInstanceProfiles", "iam:AttachRolePolicy", "lambda:GetAccountSettings"
],
"Resource": "*" },
{ "Effect": "Allow",
"Action": [ "ec2:RunInstances", "rds:CreateDBInstance", "rds:CreateDBCluster",
"lambda:CreateFunction", "lambda:InvokeFunction" ],
"Resource": "*",
"Condition": {"StringEquals": {"aws:RequestedRegion": ”us-east-1"}} }, {
"Effect": "Allow", "Action": [ "iam:PassRole" ], "Resource": "arn:aws:iam::account-
id:role/Please-use-a-specific-role" } ]
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS
Organizations
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Example Corp.
AWS
Organizations
Compliance
accounts
Research
accounts
HIPAA PCI Clinical
Non-
Clinical
A
B
C D E
F
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
OCP supported in Service Control Policies (SCPs)
• Enables you to control which AWS service APIs are accessible
- Define the list of APIs that are allowed – whitelisting
- Define the list of APIs that must be blocked – blacklisting
• Cannot be overridden by local administrator
• Resultant permission on IAM user/role is the intersection between
the SCP and assigned IAM permissions
• Must be used in unison with IAM policy
• IAM policy simulator is SCP aware
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "*",
"Resource": "*"
},
{
"Effect": "Deny",
"Action": "redshift:*",
"Resource": "*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"ec2:RunInstances",
"ec2:DescribeInstances",
"ec2:DescribeImages",
"ec2:DescribeKeyPairs",
"ec2:DescribeVpcs",
"ec2:DescribeSubnets",
"ec2:DescribeSecurityGroups"
],
"Resource": "*"
}
]
}
Blacklisting example Whitelisting example
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action":
"cloudtrail:StopLogging",
"Resource": "*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": [
"cloudwatch:DeleteAlarms",
"cloudwatch:DisableAlarmActions”
],
"Resource": "*"
}
]
}
Deny CloudTrail stop Deny CloudWatch functions
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Security Audit account
AWS Cloud
User
Long-term security
credential
MFA token
VPC
Log analysis
Read only
Role
ec2 describe-instances
ec2 describe-security-groups
…
AWS Cloud
AWS Cloud
Alarm Topic
Security
Acct A
Acct B
Alarm Topic
Alarm Topic
Log Bucket
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Example Corp.
Compliance
accounts
Research
accounts
HIPAA PCI Clinical
Non-
Clinical
A
B
C D E
F
Security
account
Read only
Audit
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Example Corp.
Prod Dev
Stage Deploy Stage Deploy
A
B
C D E
F
Security
account
Read only
Audit
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
GuardDuty account relationships
• Adding accounts to the services is simple and done via the console or API
• Invites accepted from an account will be designated as “Member” accounts. The
requestor will be the “Master” account
Member
account
……. .
1
Member
account
1000
(max)
Master account
Can do the following to all accounts:
• Generate sample findings
• Configure and view/manage findings
• Suspend GuardDuty service
• Upload and manage trusted IP and
threat IP lists (coming soon!)
Can only disable own account. Member
accounts must all be removed first and by the
member account
Member Account actions and
visibility is limited to the member
account
Each Account Billed Separately.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
can play too!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Enforce consistency
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
From To
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS CloudFormation + AWS Organizations
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Default Security group example
AWS Cloud
AWS Cloud
AWS Cloud
Security
Acct A
Acct B
Templates
Stack
Stack
Stack
VPC
VPC
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Default Security group example
AWS Cloud
AWS Cloud
AWS Cloud
Security
Acct A
Acct B
Templates
Stack
Stack
Stack
VPC
VPC
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Landing Zone
https://aws.amazon.com/answers/aws-landing-
zone/
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Service Catalog
DevelopersOrganizations
Standardize
Control
Govern
Agility
Self-service
Time to market
…allows organizations to create and manage catalogs of
IT services and software on AWS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Control AWS provisioning (cost, security, governance)
self-service portal – one-stop shop
Standardized deployments
Version control for AWS users
Enforce governance and compliance proactively
Integrate with ITSM tools
Centrally manage IT service lifecycle
Use cases
Why use an AWS Service Catalog?
Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

What's hot

What's hot (20)

Optimize Performance and Reduce Risk Using AWS Support Tools (ENT316-R1) - AW...
Optimize Performance and Reduce Risk Using AWS Support Tools (ENT316-R1) - AW...Optimize Performance and Reduce Risk Using AWS Support Tools (ENT316-R1) - AW...
Optimize Performance and Reduce Risk Using AWS Support Tools (ENT316-R1) - AW...
 
Moving 400 Engineers to AWS: Our Journey to Secure Adoption (SEC306-S) - AWS ...
Moving 400 Engineers to AWS: Our Journey to Secure Adoption (SEC306-S) - AWS ...Moving 400 Engineers to AWS: Our Journey to Secure Adoption (SEC306-S) - AWS ...
Moving 400 Engineers to AWS: Our Journey to Secure Adoption (SEC306-S) - AWS ...
 
Monitoring for Operational Outcomes and Application Insights: Best Practices ...
Monitoring for Operational Outcomes and Application Insights: Best Practices ...Monitoring for Operational Outcomes and Application Insights: Best Practices ...
Monitoring for Operational Outcomes and Application Insights: Best Practices ...
 
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
 
Deconstructing SaaS: Deep Dive into Building Multi-Tenant Solutions on AWS (A...
Deconstructing SaaS: Deep Dive into Building Multi-Tenant Solutions on AWS (A...Deconstructing SaaS: Deep Dive into Building Multi-Tenant Solutions on AWS (A...
Deconstructing SaaS: Deep Dive into Building Multi-Tenant Solutions on AWS (A...
 
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
 
Hands-on in the AWS Java Ecosystem (DEV325-R1) - AWS re:Invent 2018
Hands-on in the AWS Java Ecosystem (DEV325-R1) - AWS re:Invent 2018Hands-on in the AWS Java Ecosystem (DEV325-R1) - AWS re:Invent 2018
Hands-on in the AWS Java Ecosystem (DEV325-R1) - AWS re:Invent 2018
 
Securing Machine Learning Deployments for the Enterprise (SEC369-R1) - AWS re...
Securing Machine Learning Deployments for the Enterprise (SEC369-R1) - AWS re...Securing Machine Learning Deployments for the Enterprise (SEC369-R1) - AWS re...
Securing Machine Learning Deployments for the Enterprise (SEC369-R1) - AWS re...
 
Hands-on SaaS: Constructing a Multi-Tenant Solution on AWS (ARC327-R1) - AWS ...
Hands-on SaaS: Constructing a Multi-Tenant Solution on AWS (ARC327-R1) - AWS ...Hands-on SaaS: Constructing a Multi-Tenant Solution on AWS (ARC327-R1) - AWS ...
Hands-on SaaS: Constructing a Multi-Tenant Solution on AWS (ARC327-R1) - AWS ...
 
How Zocdoc Achieves Automatic Threat Detection & Remediation with Security as...
How Zocdoc Achieves Automatic Threat Detection & Remediation with Security as...How Zocdoc Achieves Automatic Threat Detection & Remediation with Security as...
How Zocdoc Achieves Automatic Threat Detection & Remediation with Security as...
 
Leadership Session: AWS Security (SEC305-L) - AWS re:Invent 2018
Leadership Session: AWS Security (SEC305-L) - AWS re:Invent 2018Leadership Session: AWS Security (SEC305-L) - AWS re:Invent 2018
Leadership Session: AWS Security (SEC305-L) - AWS re:Invent 2018
 
Executive Security Simulation Workshop (WPS206) - AWS re:Invent 2018
Executive Security Simulation Workshop (WPS206) - AWS re:Invent 2018Executive Security Simulation Workshop (WPS206) - AWS re:Invent 2018
Executive Security Simulation Workshop (WPS206) - AWS re:Invent 2018
 
Analyze Slide Images and Process Phenotypic Assays at Scale on AWS (CMP358) -...
Analyze Slide Images and Process Phenotypic Assays at Scale on AWS (CMP358) -...Analyze Slide Images and Process Phenotypic Assays at Scale on AWS (CMP358) -...
Analyze Slide Images and Process Phenotypic Assays at Scale on AWS (CMP358) -...
 
Detecting Credential Compromise in AWS (SEC389) - AWS re:Invent 2018
Detecting Credential Compromise in AWS (SEC389) - AWS re:Invent 2018Detecting Credential Compromise in AWS (SEC389) - AWS re:Invent 2018
Detecting Credential Compromise in AWS (SEC389) - AWS re:Invent 2018
 
How to Perform Forensics on AWS Using Serverless Infrastructure (SEC416-R1) -...
How to Perform Forensics on AWS Using Serverless Infrastructure (SEC416-R1) -...How to Perform Forensics on AWS Using Serverless Infrastructure (SEC416-R1) -...
How to Perform Forensics on AWS Using Serverless Infrastructure (SEC416-R1) -...
 
“Cloud First” Helps Hub Intl Grow the Business with Splunk on AWS (ANT330-S) ...
“Cloud First” Helps Hub Intl Grow the Business with Splunk on AWS (ANT330-S) ...“Cloud First” Helps Hub Intl Grow the Business with Splunk on AWS (ANT330-S) ...
“Cloud First” Helps Hub Intl Grow the Business with Splunk on AWS (ANT330-S) ...
 
Operational Excellence with Containerized Workloads Using AWS Fargate (CON320...
Operational Excellence with Containerized Workloads Using AWS Fargate (CON320...Operational Excellence with Containerized Workloads Using AWS Fargate (CON320...
Operational Excellence with Containerized Workloads Using AWS Fargate (CON320...
 
Solving for Identity and Authentication with .NET Apps on AWS (GPSWS408) - AW...
Solving for Identity and Authentication with .NET Apps on AWS (GPSWS408) - AW...Solving for Identity and Authentication with .NET Apps on AWS (GPSWS408) - AW...
Solving for Identity and Authentication with .NET Apps on AWS (GPSWS408) - AW...
 
Drive Self-Service & Standardization in the First 100 Days of Your Cloud Migr...
Drive Self-Service & Standardization in the First 100 Days of Your Cloud Migr...Drive Self-Service & Standardization in the First 100 Days of Your Cloud Migr...
Drive Self-Service & Standardization in the First 100 Days of Your Cloud Migr...
 
Resiliency Testing: Verify That Your System Is as Reliable as You Think (ARC4...
Resiliency Testing: Verify That Your System Is as Reliable as You Think (ARC4...Resiliency Testing: Verify That Your System Is as Reliable as You Think (ARC4...
Resiliency Testing: Verify That Your System Is as Reliable as You Think (ARC4...
 

Similar to Configure Your Cloud to Make It Rain on Threats (SEC335-R1) - AWS re:Invent 2018

New AWS Security Solutions to Protect Your Workload
New AWS Security Solutions to Protect Your WorkloadNew AWS Security Solutions to Protect Your Workload
New AWS Security Solutions to Protect Your Workload
Amazon Web Services
 

Similar to Configure Your Cloud to Make It Rain on Threats (SEC335-R1) - AWS re:Invent 2018 (20)

Lock it Down: How to Secure your AWS Account and your Organization's Accounts
Lock it Down: How to Secure your AWS Account and your Organization's AccountsLock it Down: How to Secure your AWS Account and your Organization's Accounts
Lock it Down: How to Secure your AWS Account and your Organization's Accounts
 
Lock It Down: How to Secure Your Organization's AWS Account
Lock It Down: How to Secure Your Organization's AWS AccountLock It Down: How to Secure Your Organization's AWS Account
Lock It Down: How to Secure Your Organization's AWS Account
 
New AWS Security Solutions to Protect Your Workload
New AWS Security Solutions to Protect Your WorkloadNew AWS Security Solutions to Protect Your Workload
New AWS Security Solutions to Protect Your Workload
 
Red Team vs. Blue Team on AWS ~ re:Invent 2018
Red Team vs. Blue Team on AWS ~ re:Invent 2018Red Team vs. Blue Team on AWS ~ re:Invent 2018
Red Team vs. Blue Team on AWS ~ re:Invent 2018
 
Meeting Enterprise Security Requirements with AWS Native Security Services (S...
Meeting Enterprise Security Requirements with AWS Native Security Services (S...Meeting Enterprise Security Requirements with AWS Native Security Services (S...
Meeting Enterprise Security Requirements with AWS Native Security Services (S...
 
Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018
Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018
Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018
 
Threat Detection & Remediation Workshop - Module 2
Threat Detection & Remediation Workshop - Module 2Threat Detection & Remediation Workshop - Module 2
Threat Detection & Remediation Workshop - Module 2
 
Visualise and Voice-Enable Your Security
Visualise and Voice-Enable Your SecurityVisualise and Voice-Enable Your Security
Visualise and Voice-Enable Your Security
 
Serverless Architectural Patterns - GOTO Amsterdam
Serverless Architectural Patterns - GOTO AmsterdamServerless Architectural Patterns - GOTO Amsterdam
Serverless Architectural Patterns - GOTO Amsterdam
 
Visualise and Voice-Enable Your Security - AWS Summit Sydney 2018
Visualise and Voice-Enable Your Security - AWS Summit Sydney 2018Visualise and Voice-Enable Your Security - AWS Summit Sydney 2018
Visualise and Voice-Enable Your Security - AWS Summit Sydney 2018
 
Discuss How to Secure Your Virtual Data Center in the Cloud (NET210-R1) - AWS...
Discuss How to Secure Your Virtual Data Center in the Cloud (NET210-R1) - AWS...Discuss How to Secure Your Virtual Data Center in the Cloud (NET210-R1) - AWS...
Discuss How to Secure Your Virtual Data Center in the Cloud (NET210-R1) - AWS...
 
Federation & Access Management
Federation & Access ManagementFederation & Access Management
Federation & Access Management
 
Red Team vs. Blue Team on AWS (DVC304) - AWS re:Invent 2018
Red Team vs. Blue Team on AWS (DVC304) - AWS re:Invent 2018Red Team vs. Blue Team on AWS (DVC304) - AWS re:Invent 2018
Red Team vs. Blue Team on AWS (DVC304) - AWS re:Invent 2018
 
Security@Scale
Security@ScaleSecurity@Scale
Security@Scale
 
An Active Case Study on Insider Threat Detection in your Applications
An Active Case Study on Insider Threat Detection in your ApplicationsAn Active Case Study on Insider Threat Detection in your Applications
An Active Case Study on Insider Threat Detection in your Applications
 
Resiliency and Availability Design Patterns for the Cloud
Resiliency and Availability Design Patterns for the CloudResiliency and Availability Design Patterns for the Cloud
Resiliency and Availability Design Patterns for the Cloud
 
How LogMeIn Automates Governance and Empowers Developers at Scale (SEC302) - ...
How LogMeIn Automates Governance and Empowers Developers at Scale (SEC302) - ...How LogMeIn Automates Governance and Empowers Developers at Scale (SEC302) - ...
How LogMeIn Automates Governance and Empowers Developers at Scale (SEC302) - ...
 
Deep Dive - AWS Security by Design
Deep Dive - AWS Security by DesignDeep Dive - AWS Security by Design
Deep Dive - AWS Security by Design
 
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018
 
Enabling Governance, Compliance, Operational, and Risk Auditing with AWS Mana...
Enabling Governance, Compliance, Operational, and Risk Auditing with AWS Mana...Enabling Governance, Compliance, Operational, and Risk Auditing with AWS Mana...
Enabling Governance, Compliance, Operational, and Risk Auditing with AWS Mana...
 

More from 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
 

More from 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
 

Configure Your Cloud to Make It Rain on Threats (SEC335-R1) - AWS re:Invent 2018

  • 1.
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Configure Your Cloud to Make It Rain on Threats Eric Schwenter Principal Solutions Architect AWS WWPS S E C 3 3 5
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Are we in the right place? • How can I better secure my AWS environment? • How can I make sure all the accounts in our organization are following the rules? • How can I detect threats in one or many accounts? • What tools should I be using? • How can I know that new accounts are secure by default? • I want to know what <insert threat actor here> is doing
  • 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Part 1: Secure “an” account.
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS ENDPOINTS AWS GLOBAL INFRASTRUCTURE REGIONS AVAILABILITY ZONES EDGE LOCATIONS FOUNDATION SERVICES STORAGE DATABASES NETWORKINGCOMPUTE AWSIAM OPTIONAL – OPAQUE DATA: 0s & 1s (In transit / at rest) CLIENT-SIDE DATA ENCRYPTION & DATA INTEGRITY AUTHENTICATION NETWORK TRAFFIC PROTECTION Encryption / Integrity / Identity OPERATING SYSTEM, NETWORK CONFIGURATION PLATFORM & APPLICATION MANAGEMENT CUSTOMER DATA CUSTOMERIAM MANAGED BY AWS CUSTOMERS MANAGED BY AMAZON WEB SERVICES FIREWALL CONFIGURATION AWS ENDPOINTS AWS GLOBAL INFRASTRUCTURE REGIONS AVAILABILITY ZONES EDGE LOCATIONS FOUNDATION SERVICES STORAGE DATABASES NETWORKINGCOMPUTE AWSIAM OPTIONAL – OPAQUE DATA: 0s & 1s (In transit / at rest) CLIENT-SIDE DATA ENCRYPTION & DATA INTEGRITY AUTHENTICATION OPERATING SYSTEM, NETWORK & FIREWALL CONFIGURATION PLATFORM & APPLICATION MANAGEMENT CUSTOMER DATA MANAGED BY AWS CUSTOMERS MANAGED BY AMAZON WEB SERVICES NETWORK TRAFFIC PROTECTION PROVIDED BY THE PLATFORM Protection of data in transit SERVER SIDE ENCRYPTION PROVIDED BY THE PLATFORM Protection of data at rest Shared responsibility model Infrastructure services Containers services Abstract servicesAWS ENDPOINTS AWS GLOBAL INFRASTRUCTURE REGIONS AVAILABILITY ZONES EDGE LOCATIONS FOUNDATION SERVICES STORAGE DATABASES NETWORKINGCOMPUTE AWSIAM OPTIONAL – OPAQUE DATA: 0s & 1s (In transit / at rest) CLIENT-SIDE DATA ENCRYPTION & DATA INTEGRITY AUTHENTICATION SERVER-SIDE ENCRYPTION File System and/or Data NETWORK TRAFFIC PROTECTION Encryption / Integrity / Identity OPERATING SYSTEM, NETWORK & FIREWALL CONFIGURATION PLATFORM & APPLICATION MANAGEMENT CUSTOMER DATA CUSTOMERIAM MANAGED BY AWS CUSTOMERS MANAGED BY AMAZON WEB SERVICES
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. https://aws.amazon.com/quickstart/#compliance
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon EC2 Systems Manager Automation Documents Inventory Maintenance windows Parameter Store Patch managerRun command State manager
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon EC2 Systems Manager Run command
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Why does this matter? Attack surface Compliance Detect anomalies
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Tools you’ll likely need to know
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Choose your adventure!
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Replace remote access Part 1, identify remote access for an environment. o How can you programmatically check the account in all regions for remote access? o Hint: What defines “remote access” o Develop a tool for this, checking the console wont scale. Part 2, replace remote access with AWS Systems Manager o For Windows or Linux, deploy Systems Manager on a target host o Disable the old remote protocol with Systems Manager Part 3, Audit o How can we see what commands were run in part 2? o Can we make an alert if someone turns off a service like you just did?
  • 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data flow example AWS API Security account AWS Cloud AWS Cloud Client Run command Production account
  • 21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data flow example AWS API AWS Cloud Client Run command Internet
  • 24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Automatic remediation GuardDuty CloudWatch Events Lambda Event (event-based) Lambda Function
  • 25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 26. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. import boto3 import json def lambda_handler(event, context): try: if event['detail']['type'] in [‘Backdoor:EC2/C&CActivity.B!DNS’]: response =‘<do something here>’ except Exception, e: print e
  • 27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data flow example AWS API AWS Cloud Client Run command Internet
  • 28. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 29. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon VPC Flow Logs • Agentless • Enable per ENI, per subnet, or per Amazon VPC • Logged to Amazon CloudWatch Logs • Create CloudWatch metrics from log data • Alarm on those metrics AWS account Source IP Destination IP Source port Destination port Interface Protocol Packets Bytes Start/end time Accept or reject
  • 30. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Example Amazon VPC flow log query [version, accountid, interfaceid, srcaddr!=172.31., dstaddr, srcport, distport, protocol, packets, bytes, start, end, action=REJECT, logstatus]
  • 31. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Query the flow aws logs filter-log-events --log-group-name flowlogs --log-stream-names eni- 09abcd35bd881234-all --filter-pattern="[version, accountid, interfaceid, srcaddr!=172.31., dstaddr, srcport, distport, protocol, packets, bytes, start, end, action=REJECT, logstatus]” … { "ingestionTime": 1540853212620, "timestamp": 1540852908000, "message": "2 638930115633 eni-09e099a35bd881234 172.31.56.147 23.15.x.x 49189 80 6 3 152 1540852908 1540852966 REJECT OK", "eventId": "3436216808972294799655018431925166088321896272121234567", "logStreamName": "eni-09abcd35bd881234-all" }
  • 32. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon VPC Flow Logs: Automation Private subnet Compliance app If SSH REJECT > 10, then… Elastic Network Interface Metric filter Filter on all SSH REJECTFlow Logs group CloudWatch alarm Source IP
  • 33. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 34. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Tools you’ll likely need to know
  • 35. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Network control Part 1, Enable network monitoring o Detect attackers with flow logs o Create an alert for more than (4) rejects from outside of your Amazon VPC Part 2, how can you make this easier? o Can we automatically process Amazon VPC flow logs without having to code anything? Part 3, Bonus round o Feeling lucky? Modify your local OS firewall with Systems Manager to block connections to the host from part 1.
  • 36. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 37. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 38. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Port scanning?
  • 39. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Use the API instead
  • 40. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. https://aws.amazon.com/security/penetration-testing/
  • 41. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 42. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Access Advisor
  • 43. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Keys
  • 44. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Human Things
  • 45. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 46. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Tools you’ll likely need to know
  • 47. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. IAM permissions Part 1, Using the access advisor o Using the access advisor in the AWS Identity and Access Management (IAM) console, identify un-used permissions o Is there any way that we could get to the specific API level of information? Part 2, admin but not really o Is it possible to give full admin access and not allow some specific options? o Modify an IAM principal with full Administrator access but deny all Amazon Elastic Compute Cloud (Amazon EC2) operations. Part 3, Alert on new guy o Create an alert when a new IAM user is created Part 4, Bonus round o Feeling lucky? Create an IAM user with access from the US-East-1 region only. o Alert if any user has administrator access, and remove it from new accounts.
  • 48. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 49. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. select useridentity.sessioncontext.sessionIssuer .userName as uid, eventsource, eventname from cloudtrail_logs Where useridentity.sessioncontext.sessionIssuer .userName = ‘target-name’ GROUP BY useridentity.sessioncontext.sessionIssuer .userName, eventsource, eventname Query cloud trail data for the target user or role with Athena
  • 50. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Wait, how do I make that?
  • 51. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. https://docs.aws.amazon.com/athena/latest/ug/cl oudtrail-logs.html#create-cloudtrail-table-ct
  • 52. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. https://github.com/Netflix- Skunkworks/aardvark https://github.com/Netflix/Repokid
  • 53. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Restrict an IAM role to a region { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:DescribeAccountAttributes", "ec2:DescribeAvailabilityZones", "ec2:DescribeInternetGateways", "ec2:DescribeSecurityGroups", "ec2:DescribeSubnets", "ec2:DescribeVpcAttribute", "ec2:DescribeVpcs", "ec2:DescribeInstances", "ec2:DescribeImages", "ec2:DescribeKeyPairs", "rds:Describe*", "iam:ListRolePolicies", "iam:ListRoles", "iam:GetRole", "iam:ListInstanceProfiles", "iam:AttachRolePolicy", "lambda:GetAccountSettings" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "ec2:RunInstances", "rds:CreateDBInstance", "rds:CreateDBCluster", "lambda:CreateFunction", "lambda:InvokeFunction" ], "Resource": "*", "Condition": {"StringEquals": {"aws:RequestedRegion": ”us-east-1"}} }, { "Effect": "Allow", "Action": [ "iam:PassRole" ], "Resource": "arn:aws:iam::account- id:role/Please-use-a-specific-role" } ] }
  • 54. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 55. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Organizations
  • 56. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Example Corp. AWS Organizations Compliance accounts Research accounts HIPAA PCI Clinical Non- Clinical A B C D E F
  • 57. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. OCP supported in Service Control Policies (SCPs) • Enables you to control which AWS service APIs are accessible - Define the list of APIs that are allowed – whitelisting - Define the list of APIs that must be blocked – blacklisting • Cannot be overridden by local administrator • Resultant permission on IAM user/role is the intersection between the SCP and assigned IAM permissions • Must be used in unison with IAM policy • IAM policy simulator is SCP aware
  • 58. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": "*", "Resource": "*" }, { "Effect": "Deny", "Action": "redshift:*", "Resource": "*" } ] } { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": [ "ec2:RunInstances", "ec2:DescribeInstances", "ec2:DescribeImages", "ec2:DescribeKeyPairs", "ec2:DescribeVpcs", "ec2:DescribeSubnets", "ec2:DescribeSecurityGroups" ], "Resource": "*" } ] } Blacklisting example Whitelisting example
  • 59. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. { "Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "Action": "cloudtrail:StopLogging", "Resource": "*" } ] } { "Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "Action": [ "cloudwatch:DeleteAlarms", "cloudwatch:DisableAlarmActions” ], "Resource": "*" } ] } Deny CloudTrail stop Deny CloudWatch functions
  • 60. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Security Audit account AWS Cloud User Long-term security credential MFA token VPC Log analysis Read only Role ec2 describe-instances ec2 describe-security-groups … AWS Cloud AWS Cloud Alarm Topic Security Acct A Acct B Alarm Topic Alarm Topic Log Bucket
  • 61. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Example Corp. Compliance accounts Research accounts HIPAA PCI Clinical Non- Clinical A B C D E F Security account Read only Audit
  • 62. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 63. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Example Corp. Prod Dev Stage Deploy Stage Deploy A B C D E F Security account Read only Audit
  • 64. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 65. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 66. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. GuardDuty account relationships • Adding accounts to the services is simple and done via the console or API • Invites accepted from an account will be designated as “Member” accounts. The requestor will be the “Master” account Member account ……. . 1 Member account 1000 (max) Master account Can do the following to all accounts: • Generate sample findings • Configure and view/manage findings • Suspend GuardDuty service • Upload and manage trusted IP and threat IP lists (coming soon!) Can only disable own account. Member accounts must all be removed first and by the member account Member Account actions and visibility is limited to the member account Each Account Billed Separately.
  • 67. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. can play too!
  • 68. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 69. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Enforce consistency
  • 70. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. From To
  • 71. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS CloudFormation + AWS Organizations
  • 72. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 73. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 74. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 75. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 76. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Default Security group example AWS Cloud AWS Cloud AWS Cloud Security Acct A Acct B Templates Stack Stack Stack VPC VPC
  • 77. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 78. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 79. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Default Security group example AWS Cloud AWS Cloud AWS Cloud Security Acct A Acct B Templates Stack Stack Stack VPC VPC
  • 80. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 81. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Landing Zone https://aws.amazon.com/answers/aws-landing- zone/
  • 82. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Service Catalog DevelopersOrganizations Standardize Control Govern Agility Self-service Time to market …allows organizations to create and manage catalogs of IT services and software on AWS
  • 83. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Control AWS provisioning (cost, security, governance) self-service portal – one-stop shop Standardized deployments Version control for AWS users Enforce governance and compliance proactively Integrate with ITSM tools Centrally manage IT service lifecycle Use cases Why use an AWS Service Catalog?
  • 84. Thank you! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 85. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.