SlideShare a Scribd company logo
1 of 47
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
September 2017
AWS Startup Day
Security Crash Course
#AWSstartupday
#AWSstartupday
Will St. Clair
Sr. Solutions Architect, Education Technology
wstclair@amazon.com
People will always choose the
path of least resistance.
Visibility
Visibility
Aggregated Logs
Systems Databases Access Logs
Log
Tool
Have one central place to aggregate and
review logs
Log access logs, application, db queries,
and more
Central location makes it easy to detect
suspicious behavior and set automated
alerts
Centralized logging speeds up response
time.
Visibility
Aggregated Logs: Filtering at the host
System
Log
Tool
Pros
• Limits network bandwidth utilization
• Limited bottleneck at log ingestion point
• Can leverage application specific log features
Cons
• Costs CPU cycles to process log data
• Difficult to manage log filters across large fleets
• Not good for high performance systems
Visibility
Aggregated Logs: Filtering at log ingestion
System
Log
Tool
Pros
• Easy to manage filters in one place
• Scale out log servers as demand increases
• Frees up CPU cycles on servers
Cons
• Introduces potential network & CPU limits
• Increased network traffic
• Potential SPOF (Single Point of Failure)
Visibility
Aggregated Logs: Aggregation Layer
System
Log
Tool
Log Aggregation
Pros
• Can handle queuing in case of log server failure
• Scale out aggregation nodes as needed
• Frees up CPU cycles on servers
• Easy to push out filter rules to set of servers
Cons
• More to manage
• Not needed in small environments
• Increased network traffic vs host level filters
Visibility
Logging: Write once, read many approach
System
Streaming Service
(Kinesis, Kafka, etc)
Log
Archives
Metrics
Write Read
Log tool
Least Permissions
Least Permissions
Processes and Files
• Run each process as it’s own user, not root
• Use file systems permissions to restrict or allow access to data
• Services like SELinux help
• Limit network access through security groups, and more
Least Permissions
Locking down SSH
• Ensure SSH is not open to the world
• Consider running SSH on an alternative port to reduce automated attacks
• Use key based SSH logins over passwords
• Trigger email notifications to distribution lists on system logins through PAM
• Look into third party services like DuoPush for added security
Least Permissions
Removing dependency on SSH
Interface to authenticate
and run commands.
Actions logged.
Output of commands run.
Production SystemAuthorized User
1
2
34
Least Permissions
Replacing SSH logins with EC2 Systems Manager
IAM control for who can run commands
Actions sent to CloudTrail for auditing
Can trigger automated responses
through SNS or Lambda
Keeping Systems Updated
Immutable Infrastructure
Users
Server
Server
Web Application Database
Server
Server
Users
version 1.1
minor modification
version 1.0
Each deployment builds on updated AMIs with updated packages
AMI 12.13 AMI 12.13
AMI 12.1 AMI 12.1
Encryption
Encryption
Avoid using IPSec everywhere
There are easier and more efficient ways to build transport encryption
When it fails, failures can be somewhat invisible. Things stop being able to
talk to other machines on the same network.
Hard to spot and hard to troubleshoot
The added overhead of management and potential risk of failure can
outweigh the benefits
Encryption
TLS is an easier approach
Most architectures in present day are API based making TLS an easy way to
manage encryption in transit
Many ways to wrap services with TLS including using lightweight TLS
proxies
Abstracts away from OS-level configuration
IPSec for legacy applications
Encryption
Encryption at rest: LUKS (non EBS)
System boots and attaches instance store volume
Key is generated on boot and stored in /dev/shm (in memory)
Luks is used to encrypt the volume by reading the key from /dev/shm
After encryption is done, key is deleted from /dev/shm
If instance terminates data vanishes
No way to steal a key and decrypt data; key has been thrown away
Ensure your systems replicate data across other AZs, Regions, and into
encrypted backups such as S3
Great for structured storage systems like Cassandra
Encryption
Encryption at rest: EBS w/ KMS
Simply check a box!
Encryption
Object Stores
Use server side encryption with object stores.
Encryption
Laptops & Workstations
MacOS Windows ChromeBooks
FileVault 2 BitLocker Built-in
Keeping Systems Updated
Alert on old servers
Server
12 days old
Server
18 days old
Server
32 days old
Automatically
rebuild server
Alert to manually
rebuild
or
- Old servers can accumulate and generate tech debt
- Outdated servers increase risk of security
vulnerabilities (outdated packages, manually tweaked
services, and more)
Start easily by manually refreshing
servers eventually automating it
Application Security
Application Security
Secure your build pipeline!
Source Code CI Server
Test &
Scan
Artifacts Deploy Monitoring
Each one of these steps can be exploited to push malicious code into your environment.
MFA No Shared Accounts Limited Access
Application Security
Building security testing into CI/CD
Source Code CI Server
Test &
Scan
Artifacts Deploy Monitoring
Nessus
TLS
ZAP
Owasp
Gauntlt
Application Security
Simple rules to keep you safe
Code review your application and infrastructure changes.
Don’t store credentials in your application
Avoid added unnecessary dependencies to your codebase
Always build for reliability and performance
Database & Analytics
Databases & Analytics
Code review process for migrations and prod changes
Code review application changes but few people review database changes!
Easy to build systems that commit your SQL into a repo, it gets
reviewed/approved, and then another system triggers running the actual
migration.
The automated piece can be handled by ChatOps, Jenkins, or others. This
piece can be manual to start with.
Databases & Analytics
Shift access control layer into an application
AbstractedReportingLayer
User
MySQL
Database
Postgres
Database
GroupUserPer
Role/Team
GroupUserPer
Role/Team
Easier to manage access through a unified application layer like Looker,
Metabase, Quicksight, and others than having to manage users in each
database.
Databases & Analytics
Audit all activity
Audit all you access, logs, and queries to your databases
Be able to answer who accessed what data when
You don’t need certain logs until the one day you do. Storage is cheap, store
the logs and have them available when needed. Easy option is to throw them
into S3 and use Athena to query.
Office IT
Office IT
Office VPN vs Individual VPN
Office VPN Individual VPN
If office network is compromised then access is gained to your
infrastructure (security cameras, network access ports, guest
networks, etc)
Laptops work with access to everything needed regardless of
location. Requires VPN connection while in the office.
Easier when no employees have laptops or are mobile. If mobile or laptops exist, you’ll need individual VPN anyways.
Managing just individual VPN is simpler and removes unnecessary
infrastructure.
Use multiple VPN servers to eliminate single point of failure at the
server (as well as location optimization)
Use multiple VPN servers to eliminate single point of failure at the
server (as well as location optimization)
If you have remote workers and laptops it’s easier to manage individual VPN. If you have dedicated workstations and no remote
workers, Office VPN may be a good fit.
Office IT
VPN vs oAuth
Consider using oAuth & whitelists (positive security) for enabling access to
resources
Handles encryption and authentication for you
Seeing an increase in adoption of this approach however it may not be
suitable for every situation
Office IT
Multi-Factor Authentication
There is no excuse to skip setting up MFA on your accounts. Audit users who
have access to your resources and make MFA a requirement.
Typically at least two of the following categories:
§ knowledge (something they know)
§ possession (something they have)
§ inherence (something they are)
Office IT
Multi-Factor Authentication
Authy
DuoMobile
YubiKey
SMS MFA
Gemalto Token
Office IT
Logon Notifications to Distribution Lists
Production
Server
User logs in
From: prod-18acf81-d1
To: engineers@mycompany.com
Cc: security@mycompany.com
Subject: Mackenzie logged into prod-18acf81-d1 from
54.239.17.7
Date: 2017-06-12 03:12:18am
Notification user Mackenzie logged into prod-18acf81-d1 from
54.239.17.7 at 2017-06-12 03:12:18am
Last login was on 2017-02-26 at 12:38:11pm
Production
Server
User logs in
Only alert between 7pm & 7am
AnyLoginTimeBased
Office IT
Wireless, WPA2, and 802.1x
Segment your guest network, and any external ports such as security cameras
or key access systems.
At the very least you should be using WPA2
You could go the extra step with 802.1x where each system has a certificate
issued which permits it onto the network regardless of wired or wireless.
Office IT
Web based interfaces
Thinclients
Reporting Tools
Call Center Systems
Email
Chat
Thin clients mean no data is
stored and at risk of being lost.
Web based makes managing
authentication easier (oAuth,
LDAP, etc)
No need to update applications on
the laptop itself. Everyone running
on the same versions.
Office IT
Phishing
One of the easiest ways people
gain access to unauthorized
systems.
Train all your employees from
day one about phishing attempts.
However, logon notifications and
monitoring are essential.
Office IT
Social Engineering
Understand how to mitigate common social engineering attacks:
• If someone calls saying they are from an organization, ask for a call back
number and search that number online. Ask the caller to verify information
about your account (recent transactions? number of registered users?
monthly spend? account reps name?)
• Do not plug free devices into your computer. USB drives, keyboards
received as gifts, USB plants, USB fans, and more.
Office IT
Security training on first day
Provide security training on day one. Topics to cover include:
- How to request access to systems
- Phishing attempts
- Data classification
- Identifying false browser messages and warnings
- Who and how to contact someone in the event of an emergency
- Most importantly: “Knowing it’s okay to ask others if you’re unsure if
something is safe.” Build that culture early on, and encourage people to
ask those around them for a second opinion.
Office IT
Access Requests
User requests
access to
system
Ticket created
in approval
queue
Manager signs
off and
approves
Process
triggers to
enable access
Ticketing systems make it easy to capture who is requesting access to
which systems.
Useful for understanding business justifications, auditing who gained access
to systems when, and what permissions similar new hires should have.
Trusted Advisor
Quickly identify security issues (and more!)
https://aws.amazon.com/security
https://d0.awsstatic.com/whitepapers/aws-security-whitepaper.pdf
Summary
1. Visibility
Aggregated Logs, Write Once Read Many
2. Least Permissions
Processes & Files, SSH Security, Immutable Design
3. Encryption
TLS vs IPsec, Luks, EBS, Object Stores, Laptops & Workstations
4. Keeping Systems Updated
Immutable Infrastructure, Alert on Old Systems
5. Application Security
Secure Build Pipeline, Security CI/CD, Layering
6. Office IT
VPN vs oAuth, MFA, Notifications, 802.1x, Web UIs, Phishing, Social
Engineering, Security Training, Access Requests
7. Database & Analytics
SQL Code Review, Application Layer Security, Audit Logs
Will St. Clair
wstclair@amazon.com

More Related Content

What's hot

What's hot (20)

Incident Response in the Cloud | AWS Public Sector Summit 2017
Incident Response in the Cloud | AWS Public Sector Summit 2017Incident Response in the Cloud | AWS Public Sector Summit 2017
Incident Response in the Cloud | AWS Public Sector Summit 2017
 
Understanding AWS Managed Database and Analytics Services | AWS Public Sector...
Understanding AWS Managed Database and Analytics Services | AWS Public Sector...Understanding AWS Managed Database and Analytics Services | AWS Public Sector...
Understanding AWS Managed Database and Analytics Services | AWS Public Sector...
 
Cloud Application Security: Lessons Learned
Cloud Application Security: Lessons LearnedCloud Application Security: Lessons Learned
Cloud Application Security: Lessons Learned
 
AWS re:Invent 2016: DevOps on AWS: Advanced Continuous Delivery Techniques (D...
AWS re:Invent 2016: DevOps on AWS: Advanced Continuous Delivery Techniques (D...AWS re:Invent 2016: DevOps on AWS: Advanced Continuous Delivery Techniques (D...
AWS re:Invent 2016: DevOps on AWS: Advanced Continuous Delivery Techniques (D...
 
Automating Event Driven Security in the AWS Cloud
Automating Event Driven Security in the AWS CloudAutomating Event Driven Security in the AWS Cloud
Automating Event Driven Security in the AWS Cloud
 
Building enterprise class disaster recovery as a service to aws - session spo...
Building enterprise class disaster recovery as a service to aws - session spo...Building enterprise class disaster recovery as a service to aws - session spo...
Building enterprise class disaster recovery as a service to aws - session spo...
 
Integrating Security into DevOps and CI / CD Environments - Pop-up Loft TLV 2017
Integrating Security into DevOps and CI / CD Environments - Pop-up Loft TLV 2017Integrating Security into DevOps and CI / CD Environments - Pop-up Loft TLV 2017
Integrating Security into DevOps and CI / CD Environments - Pop-up Loft TLV 2017
 
DevSecOps: Taking a DevOps Approach to Security
DevSecOps: Taking a DevOps Approach to SecurityDevSecOps: Taking a DevOps Approach to Security
DevSecOps: Taking a DevOps Approach to Security
 
Big Data in the Cloud: How the RISElab Enables Computers to Make Intelligent ...
Big Data in the Cloud: How the RISElab Enables Computers to Make Intelligent ...Big Data in the Cloud: How the RISElab Enables Computers to Make Intelligent ...
Big Data in the Cloud: How the RISElab Enables Computers to Make Intelligent ...
 
Configuration Management in the Cloud | AWS Public Sector Summit 2017
Configuration Management in the Cloud | AWS Public Sector Summit 2017Configuration Management in the Cloud | AWS Public Sector Summit 2017
Configuration Management in the Cloud | AWS Public Sector Summit 2017
 
AWS Summit 2013 | Singapore - Security & Compliance and Integrated Security w...
AWS Summit 2013 | Singapore - Security & Compliance and Integrated Security w...AWS Summit 2013 | Singapore - Security & Compliance and Integrated Security w...
AWS Summit 2013 | Singapore - Security & Compliance and Integrated Security w...
 
Putting it All Together: Securing Systems at Cloud Scale
Putting it All Together: Securing Systems at Cloud ScalePutting it All Together: Securing Systems at Cloud Scale
Putting it All Together: Securing Systems at Cloud Scale
 
Chaos Engineering
Chaos EngineeringChaos Engineering
Chaos Engineering
 
Leveraging elastic web scale computing with AWS
 Leveraging elastic web scale computing with AWS Leveraging elastic web scale computing with AWS
Leveraging elastic web scale computing with AWS
 
Automated Governance of Your AWS Resources
Automated Governance of Your AWS ResourcesAutomated Governance of Your AWS Resources
Automated Governance of Your AWS Resources
 
AWS Partner: Grindr: Aggregate, Analyze, and Act on 900M Daily API Calls
AWS Partner: Grindr: Aggregate, Analyze, and Act on 900M Daily API CallsAWS Partner: Grindr: Aggregate, Analyze, and Act on 900M Daily API Calls
AWS Partner: Grindr: Aggregate, Analyze, and Act on 900M Daily API Calls
 
Introduction to DevSecOps on AWS
Introduction to DevSecOps on AWSIntroduction to DevSecOps on AWS
Introduction to DevSecOps on AWS
 
Advanced Techniques for DDoS Mitigation and Web Application Defense | AWS Pub...
Advanced Techniques for DDoS Mitigation and Web Application Defense | AWS Pub...Advanced Techniques for DDoS Mitigation and Web Application Defense | AWS Pub...
Advanced Techniques for DDoS Mitigation and Web Application Defense | AWS Pub...
 
Cloud-Native DevOps: Simplifying application lifecycle management with AWS | ...
Cloud-Native DevOps: Simplifying application lifecycle management with AWS | ...Cloud-Native DevOps: Simplifying application lifecycle management with AWS | ...
Cloud-Native DevOps: Simplifying application lifecycle management with AWS | ...
 
Advanced Continuous Delivery on AWS
Advanced Continuous Delivery on AWSAdvanced Continuous Delivery on AWS
Advanced Continuous Delivery on AWS
 

Similar to Operations: Security

Microsoft Operating System Vulnerabilities
Microsoft Operating System VulnerabilitiesMicrosoft Operating System Vulnerabilities
Microsoft Operating System Vulnerabilities
Information Technology
 
Database Security Explained
Database Security ExplainedDatabase Security Explained
Database Security Explained
wensheng wei
 

Similar to Operations: Security (20)

Security in the cloud Workshop HSTC 2014
Security in the cloud Workshop HSTC 2014Security in the cloud Workshop HSTC 2014
Security in the cloud Workshop HSTC 2014
 
Enterprise Cloud Security
Enterprise Cloud SecurityEnterprise Cloud Security
Enterprise Cloud Security
 
Ch08 Microsoft Operating System Vulnerabilities
Ch08 Microsoft Operating System VulnerabilitiesCh08 Microsoft Operating System Vulnerabilities
Ch08 Microsoft Operating System Vulnerabilities
 
Microsoft Operating System Vulnerabilities
Microsoft Operating System VulnerabilitiesMicrosoft Operating System Vulnerabilities
Microsoft Operating System Vulnerabilities
 
Microsoft OS Vulnerabilities
Microsoft OS VulnerabilitiesMicrosoft OS Vulnerabilities
Microsoft OS Vulnerabilities
 
There is No Server: Immutable Infrastructure and Serverless Architecture
There is No Server: Immutable Infrastructure and Serverless ArchitectureThere is No Server: Immutable Infrastructure and Serverless Architecture
There is No Server: Immutable Infrastructure and Serverless Architecture
 
Aws training in bangalore
Aws training in bangalore Aws training in bangalore
Aws training in bangalore
 
Tips to Remediate your Vulnerability Management Program
Tips to Remediate your Vulnerability Management ProgramTips to Remediate your Vulnerability Management Program
Tips to Remediate your Vulnerability Management Program
 
[Toroman/Kranjac] Red Team vs. Blue Team in Microsoft Cloud
[Toroman/Kranjac] Red Team vs. Blue Team in Microsoft Cloud[Toroman/Kranjac] Red Team vs. Blue Team in Microsoft Cloud
[Toroman/Kranjac] Red Team vs. Blue Team in Microsoft Cloud
 
Ethical hacking chapter 8 - Windows Vulnerabilities - Eric Vanderburg
Ethical hacking   chapter 8 - Windows Vulnerabilities - Eric VanderburgEthical hacking   chapter 8 - Windows Vulnerabilities - Eric Vanderburg
Ethical hacking chapter 8 - Windows Vulnerabilities - Eric Vanderburg
 
Rik Ferguson
Rik FergusonRik Ferguson
Rik Ferguson
 
Cloud security privacy- org
Cloud security  privacy- orgCloud security  privacy- org
Cloud security privacy- org
 
Managed Threat Detection & Response for AWS Applications
Managed Threat Detection & Response for AWS ApplicationsManaged Threat Detection & Response for AWS Applications
Managed Threat Detection & Response for AWS Applications
 
10 server security hacks to secure your web servers
10 server security hacks to secure your web servers10 server security hacks to secure your web servers
10 server security hacks to secure your web servers
 
Mastering the move
Mastering the moveMastering the move
Mastering the move
 
Securing Servers in Public and Hybrid Clouds
Securing Servers in Public and Hybrid CloudsSecuring Servers in Public and Hybrid Clouds
Securing Servers in Public and Hybrid Clouds
 
Managed Threat Detection and Response
Managed Threat Detection and ResponseManaged Threat Detection and Response
Managed Threat Detection and Response
 
Database Security Explained
Database Security ExplainedDatabase Security Explained
Database Security Explained
 
Enterprise Node - Securing Your Environment
Enterprise Node - Securing Your EnvironmentEnterprise Node - Securing Your Environment
Enterprise Node - Securing Your Environment
 
Protecting location privacy in sensor networks against a global eavesdropper
Protecting location privacy in sensor networks against a global eavesdropperProtecting location privacy in sensor networks against a global eavesdropper
Protecting location privacy in sensor networks against a global eavesdropper
 

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
 

Operations: Security

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. September 2017 AWS Startup Day Security Crash Course #AWSstartupday #AWSstartupday
  • 2. Will St. Clair Sr. Solutions Architect, Education Technology wstclair@amazon.com
  • 3. People will always choose the path of least resistance.
  • 5. Visibility Aggregated Logs Systems Databases Access Logs Log Tool Have one central place to aggregate and review logs Log access logs, application, db queries, and more Central location makes it easy to detect suspicious behavior and set automated alerts Centralized logging speeds up response time.
  • 6. Visibility Aggregated Logs: Filtering at the host System Log Tool Pros • Limits network bandwidth utilization • Limited bottleneck at log ingestion point • Can leverage application specific log features Cons • Costs CPU cycles to process log data • Difficult to manage log filters across large fleets • Not good for high performance systems
  • 7. Visibility Aggregated Logs: Filtering at log ingestion System Log Tool Pros • Easy to manage filters in one place • Scale out log servers as demand increases • Frees up CPU cycles on servers Cons • Introduces potential network & CPU limits • Increased network traffic • Potential SPOF (Single Point of Failure)
  • 8. Visibility Aggregated Logs: Aggregation Layer System Log Tool Log Aggregation Pros • Can handle queuing in case of log server failure • Scale out aggregation nodes as needed • Frees up CPU cycles on servers • Easy to push out filter rules to set of servers Cons • More to manage • Not needed in small environments • Increased network traffic vs host level filters
  • 9. Visibility Logging: Write once, read many approach System Streaming Service (Kinesis, Kafka, etc) Log Archives Metrics Write Read Log tool
  • 11. Least Permissions Processes and Files • Run each process as it’s own user, not root • Use file systems permissions to restrict or allow access to data • Services like SELinux help • Limit network access through security groups, and more
  • 12. Least Permissions Locking down SSH • Ensure SSH is not open to the world • Consider running SSH on an alternative port to reduce automated attacks • Use key based SSH logins over passwords • Trigger email notifications to distribution lists on system logins through PAM • Look into third party services like DuoPush for added security
  • 13. Least Permissions Removing dependency on SSH Interface to authenticate and run commands. Actions logged. Output of commands run. Production SystemAuthorized User 1 2 34
  • 14. Least Permissions Replacing SSH logins with EC2 Systems Manager IAM control for who can run commands Actions sent to CloudTrail for auditing Can trigger automated responses through SNS or Lambda
  • 15. Keeping Systems Updated Immutable Infrastructure Users Server Server Web Application Database Server Server Users version 1.1 minor modification version 1.0 Each deployment builds on updated AMIs with updated packages AMI 12.13 AMI 12.13 AMI 12.1 AMI 12.1
  • 17. Encryption Avoid using IPSec everywhere There are easier and more efficient ways to build transport encryption When it fails, failures can be somewhat invisible. Things stop being able to talk to other machines on the same network. Hard to spot and hard to troubleshoot The added overhead of management and potential risk of failure can outweigh the benefits
  • 18. Encryption TLS is an easier approach Most architectures in present day are API based making TLS an easy way to manage encryption in transit Many ways to wrap services with TLS including using lightweight TLS proxies Abstracts away from OS-level configuration IPSec for legacy applications
  • 19. Encryption Encryption at rest: LUKS (non EBS) System boots and attaches instance store volume Key is generated on boot and stored in /dev/shm (in memory) Luks is used to encrypt the volume by reading the key from /dev/shm After encryption is done, key is deleted from /dev/shm If instance terminates data vanishes No way to steal a key and decrypt data; key has been thrown away Ensure your systems replicate data across other AZs, Regions, and into encrypted backups such as S3 Great for structured storage systems like Cassandra
  • 20. Encryption Encryption at rest: EBS w/ KMS Simply check a box!
  • 21. Encryption Object Stores Use server side encryption with object stores.
  • 22. Encryption Laptops & Workstations MacOS Windows ChromeBooks FileVault 2 BitLocker Built-in
  • 23. Keeping Systems Updated Alert on old servers Server 12 days old Server 18 days old Server 32 days old Automatically rebuild server Alert to manually rebuild or - Old servers can accumulate and generate tech debt - Outdated servers increase risk of security vulnerabilities (outdated packages, manually tweaked services, and more) Start easily by manually refreshing servers eventually automating it
  • 25. Application Security Secure your build pipeline! Source Code CI Server Test & Scan Artifacts Deploy Monitoring Each one of these steps can be exploited to push malicious code into your environment. MFA No Shared Accounts Limited Access
  • 26. Application Security Building security testing into CI/CD Source Code CI Server Test & Scan Artifacts Deploy Monitoring Nessus TLS ZAP Owasp Gauntlt
  • 27. Application Security Simple rules to keep you safe Code review your application and infrastructure changes. Don’t store credentials in your application Avoid added unnecessary dependencies to your codebase Always build for reliability and performance
  • 29. Databases & Analytics Code review process for migrations and prod changes Code review application changes but few people review database changes! Easy to build systems that commit your SQL into a repo, it gets reviewed/approved, and then another system triggers running the actual migration. The automated piece can be handled by ChatOps, Jenkins, or others. This piece can be manual to start with.
  • 30. Databases & Analytics Shift access control layer into an application AbstractedReportingLayer User MySQL Database Postgres Database GroupUserPer Role/Team GroupUserPer Role/Team Easier to manage access through a unified application layer like Looker, Metabase, Quicksight, and others than having to manage users in each database.
  • 31. Databases & Analytics Audit all activity Audit all you access, logs, and queries to your databases Be able to answer who accessed what data when You don’t need certain logs until the one day you do. Storage is cheap, store the logs and have them available when needed. Easy option is to throw them into S3 and use Athena to query.
  • 33. Office IT Office VPN vs Individual VPN Office VPN Individual VPN If office network is compromised then access is gained to your infrastructure (security cameras, network access ports, guest networks, etc) Laptops work with access to everything needed regardless of location. Requires VPN connection while in the office. Easier when no employees have laptops or are mobile. If mobile or laptops exist, you’ll need individual VPN anyways. Managing just individual VPN is simpler and removes unnecessary infrastructure. Use multiple VPN servers to eliminate single point of failure at the server (as well as location optimization) Use multiple VPN servers to eliminate single point of failure at the server (as well as location optimization) If you have remote workers and laptops it’s easier to manage individual VPN. If you have dedicated workstations and no remote workers, Office VPN may be a good fit.
  • 34. Office IT VPN vs oAuth Consider using oAuth & whitelists (positive security) for enabling access to resources Handles encryption and authentication for you Seeing an increase in adoption of this approach however it may not be suitable for every situation
  • 35. Office IT Multi-Factor Authentication There is no excuse to skip setting up MFA on your accounts. Audit users who have access to your resources and make MFA a requirement. Typically at least two of the following categories: § knowledge (something they know) § possession (something they have) § inherence (something they are)
  • 37. Office IT Logon Notifications to Distribution Lists Production Server User logs in From: prod-18acf81-d1 To: engineers@mycompany.com Cc: security@mycompany.com Subject: Mackenzie logged into prod-18acf81-d1 from 54.239.17.7 Date: 2017-06-12 03:12:18am Notification user Mackenzie logged into prod-18acf81-d1 from 54.239.17.7 at 2017-06-12 03:12:18am Last login was on 2017-02-26 at 12:38:11pm Production Server User logs in Only alert between 7pm & 7am AnyLoginTimeBased
  • 38. Office IT Wireless, WPA2, and 802.1x Segment your guest network, and any external ports such as security cameras or key access systems. At the very least you should be using WPA2 You could go the extra step with 802.1x where each system has a certificate issued which permits it onto the network regardless of wired or wireless.
  • 39. Office IT Web based interfaces Thinclients Reporting Tools Call Center Systems Email Chat Thin clients mean no data is stored and at risk of being lost. Web based makes managing authentication easier (oAuth, LDAP, etc) No need to update applications on the laptop itself. Everyone running on the same versions.
  • 40. Office IT Phishing One of the easiest ways people gain access to unauthorized systems. Train all your employees from day one about phishing attempts. However, logon notifications and monitoring are essential.
  • 41. Office IT Social Engineering Understand how to mitigate common social engineering attacks: • If someone calls saying they are from an organization, ask for a call back number and search that number online. Ask the caller to verify information about your account (recent transactions? number of registered users? monthly spend? account reps name?) • Do not plug free devices into your computer. USB drives, keyboards received as gifts, USB plants, USB fans, and more.
  • 42. Office IT Security training on first day Provide security training on day one. Topics to cover include: - How to request access to systems - Phishing attempts - Data classification - Identifying false browser messages and warnings - Who and how to contact someone in the event of an emergency - Most importantly: “Knowing it’s okay to ask others if you’re unsure if something is safe.” Build that culture early on, and encourage people to ask those around them for a second opinion.
  • 43. Office IT Access Requests User requests access to system Ticket created in approval queue Manager signs off and approves Process triggers to enable access Ticketing systems make it easy to capture who is requesting access to which systems. Useful for understanding business justifications, auditing who gained access to systems when, and what permissions similar new hires should have.
  • 44. Trusted Advisor Quickly identify security issues (and more!)
  • 46. Summary 1. Visibility Aggregated Logs, Write Once Read Many 2. Least Permissions Processes & Files, SSH Security, Immutable Design 3. Encryption TLS vs IPsec, Luks, EBS, Object Stores, Laptops & Workstations 4. Keeping Systems Updated Immutable Infrastructure, Alert on Old Systems 5. Application Security Secure Build Pipeline, Security CI/CD, Layering 6. Office IT VPN vs oAuth, MFA, Notifications, 802.1x, Web UIs, Phishing, Social Engineering, Security Training, Access Requests 7. Database & Analytics SQL Code Review, Application Layer Security, Audit Logs