.start
Bakers Dozen to Securing AWS
Dan Hubbard, Lacework
@dhubbard858
So, you are running in AWS?
AWS has amazing advantages….
Speed
Velocity
Auto-scale
They run the infrastructure.
And let you focus on your apps.
That is what matters.
But how do you secure all of this?
Think different.
It’s less about the castle and moat.
And more about automation.
scale.
visibility.
context.
And most importantly….
Shrinking your attack surface.
Minimizing mistakes.
And fitting security INTO your
architecture.
NOT in FRONT of it.
Where do we start?
Drive towards least-privilege
systems.
I know, you may not be there TODAY.
You may be migrating
Least Privilege is easier said than
done.
But it’s a destination you want to
drive to.
And if you have the luxury of starting
over.
then start with least privilege.
Start with templatized workload
configuration.
Terraform (multi-platform)
CloudFormation = AWS specific
Next select your orchestration
system.
Kubernetes
Docker Swarm
Mesos.
Choose your favorite container tech.
Likely Docker or equiv..
And finally your favorite OS.
CoreOS
Redhat
Ubuntu
OK, now let’s think about the
security...
Start with AWS Accounts.
Then your services
API’s
Compliance
Applications
Users
Secure your AWS account.1
Design your accounts carefully !
This is not easy to unwind and it’s
super important.
Balance accounts and
responsibilities.
Watch for sprawl.
You do not want to have too many
accounts.
If you have a reason for a LOT of
accounts.
Justify it !
Use AWS organizations.
MFA critical for all console
authentication.
Use instance roles for services.
Roles manage ephemeral keys
internally
CloudTrail2
Make sure it’s on for ALL accounts.
Log it in a place that you can query.
CloudTrail is very noisy
You need to understand the needles
in the data
Context is critical
Understand relevant change.
Change in config’s
Change in API usage
Change in critical services.
Change in user patterns.
Attackers can delete / turn off
CloudTrail
Segment S3 bucket with different
from monitored account
Secure Services3
EC2, S3, RDS, KMS...
Set a policy and a framework for
your services
Each service has unique attack
surface
How do you think about threats in
1000’s of services.
Lambda surface?
ECS ?
EKS ?
S3 ?
RDS ?
Redshift ?
Don’t boil the ocean YET.
Understand what you use, why, and
focus on those.
Learn what dev. is looking at next.
Compliance4
Your accounts and services need
continual checks
This is not your annual compliance
audit
Its all the time every time.
Start with CIS for AWS benchmarks
Expand into your relevant areas.
PCI
SOC II
HIPAA.
Secure the network.5
It’s not your network.
Yeah it’s virtual.
Limit what can go in and out.
Minimize in AND out.
Understand inter network traffic
(east-west)
But the network diminishes in
importance in cloud.
Like console access to the router
Firmare on edge router.
You don’t own it. Get used to that.
Network often static.
But systems are dynamic.
Containers and orchestration limit
relevance.
But monitor config’s still important
in VPC’s.
Secure the applications.6
What are they talking to?
And Why ?
Understand application topologies
and systems.
Gain insight into typical system
behavior
Understand outliers.
Log ALL application behaviors.
Abstract containers : translate apps :
containers : machines.
Did I mention log everything.
Ephemeral workloads must be
monitored
in near real-time.
Make meaning of the logs.
Good data turns into information
when it answers questions.
Who ran this app?
When did it run?
What did it do?
Where did it connect to?
Good data turns into information
when you either gain security
knowledge
or when your can answer questions
with context.
“Hey Dan, did you mean to install 50 new
GPU instances in the Europe Region running
Bitcoin Miners last night”?
Secure Users.7
Who can log into what machines.
Why?
Limit logins wherever you can!
Least Privileged systems.
If logins necessary….
NO SHARED ACCOUNTS
Unique accounts per user
Use MFA.
Setup a bastion.
3 Factors of ID..
Setup VPN
Limit access via IP
Use IAM (oauth, SAML)
3 Factors
Account password
Temporary password
And keys.
Log ALL logins.
Failures and Successes
Avoid service accounts logging in.
Yes no login as say...
ubuntu
coreos
admin
Or...root !!!!
Where possible limit users from
installing apps.
Immutable images.
Use the orchestration. That is what
its for.
Understand the app behaviors.
Both to from and to the Internet.
And laterally from application to
application.
Within your “network”
And from container to container.
Secure the Data.8
Encrypt it.
ALL OF IT.
Its likely someone will find value in
your data
Regardless of what you think.
Keys are critical.
Look into vaults.
Rotate.
Ephemeral keys
Layer 8 : People9
“DevSecOps”
It’s just a made up word.
Establish communication channel
from/to devops and security.
#Slack works.
Alert on criticals : PagerDuty or ?
Log criticals and below in #channel
Email still works too.
Retrospectives on alerts.
Get good at triage.
A great security product/system will
help bridge gaps
from developers to security
from security to developers.
within or across teams.
Best practices.10
There is no time continuum in
security.
It does not stop or start.
It is just part of the system
And the system needs testing.
Pen testing.
Vulnerability testing
It’s not as scary as it sounds.
War game with dev.
Think evil.
What if I had privileged access to ….
Think about.
Data exfil.
Data destruction.
Public disclosures.
Inadvertent configuration mistakes.
Compliance failures.
Low level bugs out of your control.
Ring0 happens.
Be prepared
For recovery
It’s not *if* the market will ask about
your security.
It’s *when*.
Have the answers before they ask.
But what about bugs in MY
applications?
11
Be responsible.
Follow responsible disclosures.
Answer security@yourdomain
Be friendly to bug hunters
Bug bounty not mandatory but look
into it.
Don’t be held hostage to hunters.
But be responsible.
They are saving your time, money,
and potentially losses.
Run your own internal bug program.
Hack a thons are great for this.
And finally….
Have fun.12
Be thankful.
You are designing the future state.
Starting over is a privilege.
Learn from past mistakes.
To determine the future.
Wait, bakers dozen!13
What do you feel is missing?
Add your comments here.
Share your experiences.
Give back to the community :)
Lacework : Let us run your security
Lacework : While you focus on your apps.
Dan Hubbard, Lacework
@dhubbard858
.end

Security for AWS: Journey to Least Privilege