SlideShare a Scribd company logo
BAY AREA
Native Cloud Security Monitoring
“A journey through bootstrapping security logging and monitoring in AWS”
● Senior Security Engineer at Segment
● Author of Cloud-Based Rube Goldberg Machines
● 8 years experience building SIEM, and SOAR platforms
for the enterprise
Who am I and why should you care?
What this is about
● To get better visibility on events in our
accounts.
● To automate incident detection and
response
● Facilitate effective threat hunting
Why are we here?
What this is about
● Configure requisite services (CloudTrail,
GuardDuty, ElasticSearch)
● Assemble our services into monitoring
infrastructure
● Apply some best practices
How do we get there?
Security Monitoring on AWS
CloudTrail - Consider this the audit and activity log for everything related to
the events, users and resources in our account.
✅ Relatively easy to configure
✅ Covers the majority of AWS
services
Security Monitoring on AWS
CloudTrail - Consider this the audit and activity log for everything related to
the events, users and resources in our account.
✅ Relatively easy to configure
✅ Covers the majority of AWS
services
❌ Limited search capabilities
❌ Limited export capability
Security Monitoring on AWS
CloudTrail - Consider this the audit and activity log for everything related to
the resources, users and actions in your account.
✅ Relatively easy to configure
✅ Covers the majority of AWS
services
❌ Limited search capabilities
❌ Limited export capability
Security Monitoring on AWS
✅ Easy to configure and deploy
✅ Monitors and alerts on events
without additional configuration
✅ Supports external threat feeds
✅ Under active development
GuardDuty - This is our Intrusion detection system. It generates alerts for
suspicious activity in Cloudtrail, DNS, and VPC Flow logs.
Security Monitoring on AWS
✅ Easy to configure and deploy
✅ Monitors and alerts on events
without additional configuration
✅ Supports external threat feeds
✅ Under active development
❌ Disabled by default
❌ No access to source log data
❌ No custom alerts
GuardDuty - This is our Intrusion detection system. It generates alerts for
suspicious activity in Cloudtrail, DNS, and VPC Flow logs.
Security Monitoring on AWS
✅ Easy to configure and deploy
✅ Monitors and alerts on events
without additional configuration
✅ Supports external threat feeds
✅ Under active development
❌ Disabled by default
❌ No access to source log data
❌ No custom alerts
GuardDuty - This is our Intrusion detection system. It generates alerts for
suspicious activity in Cloudtrail, DNS, and VPC Flow logs.
Security Monitoring on AWS
✅ Industry Standard
✅ Helps contextualize data
✅ Search capabilities facilitate threat
hunting
AWS ElasticSearch - A managed SaaS search solution based on open
source software, bundled with Kibana for data visualization (ELK)
Security Monitoring on AWS
✅ Industry Standard
✅ Helps contextualize data
✅ Search capabilities facilitate threat
hunting
❌ Poor defaults
❌ Index management can be
challenging
AWS ElasticSearch - A managed SaaS search solution based on open
source software, bundled with Kibana for data visualization (ELK)
Security Monitoring on AWS
✅ Industry Standard
✅ Helps contextualize data
✅ Search capabilities facilitate threat
hunting
❌ Poor defaults
❌ Index management can be
challenging
AWS ElasticSearch - A managed SaaS search solution based on open
source software, bundled with Kibana for data visualization (ELK)
Cloudtrail
❌ Limited search
capabilities
❌ Limited export
capability
GuardDuty
❌ Disabled by default
❌ No access to source
log data
❌ No custom alerts
ElasticSearch
❌ Poor defaults
❌ Index management
can be challenging
Summary of Pain
● Deploy all required services and components automatically
● Extend log retention beyond 90 days (configurable)
● Tune ElasticSearch for ingesting CloudTrail logs
● Allow custom alert generation
● Enhance search capabilities and eliminate weak defaults
✨ Fault Tolerant
✨ Scalable
✨ Self-Maintaining
Easing the pain - our solution
The Shopping List
● AWS ElasticSearch
● AWS CloudTrail
● AWS GuardDuty
● Terraform 0.11+
● Lambda*
● Cloudwatch Trigger
● Kinesis Streams
● Kinesis Firehose
● S3 Buckets
● IAM Roles
Reference Architecture
SSO
Infrastructure as Code
● All components will be
arranged and
configured by
Terraform
● A resource name and
an IP are all you need
to get started
Building the solution
Infrastructure as Code
● After about 15 minutes
we have the full ELK
● Lambda replaces
Logstash providing
serverless log
ingestion
Building the solution
Terraform plan below
1. CloudTrail logs are written to S3
2. S3 ObjectCreated events trigger our log processing function
3. Lambda processes log and delivers it to a kinesis stream
4. Kinesis firehose reads from kinesis stream
5. Kinesis firehose delivers stream data to ElasticSearch index
CloudTrail Logs
1. CloudTrail logs are written to S3
2. S3 ObjectCreated events trigger our log processing function
3. Lambda processes log and delivers it to a kinesis stream
4. Kinesis firehose reads from kinesis stream
5. Kinesis firehose delivers stream data to ElasticSearch index
CloudTrail Logs
1. CloudTrail logs are written to S3
2. S3 ObjectCreated events trigger our log processing function
3. Lambda processes log and delivers it to a kinesis stream
4. Kinesis firehose reads from kinesis stream
5. Kinesis firehose delivers stream data to ElasticSearch index
CloudTrail Logs
● Written in Go
● Highly efficient
● Cost effective
1. Cloudtrail logs are written to S3
2. S3 ObjectCreated events trigger our log processing function
3. Lambda processes log and delivers it to a kinesis stream
4. Kinesis firehose reads from kinesis stream
5. Kinesis firehose delivers stream data to ElasticSearch index
CloudTrail Logs
1. Cloudtrail logs are written to S3
2. S3 ObjectCreated events trigger our log processing function
3. Lambda processes log and delivers it to a kinesis stream
4. Kinesis firehose reads from kinesis stream
5. Kinesis firehose delivers stream data to ElasticSearch index
CloudTrail Logs
1. New GuardDuty findings trigger cloudwatch event
2. Cloudwatch sends GuardDuty event to Kinesis Stream
3. Kinesis firehose reads from kinesis stream
4. Kinesis firehose delivers stream data to ElasticSearch index
GuardDuty Logs
1. New GuardDuty findings trigger cloudwatch event
2. Cloudwatch sends GuardDuty finding to Kinesis Stream
3. Kinesis firehose reads from kinesis stream
4. Kinesis firehose delivers stream data to ElasticSearch index
GuardDuty Logs
1. New GuardDuty findings trigger cloudwatch event
2. Cloudwatch sends GuardDuty event to Kinesis Stream
3. Kinesis firehose reads from kinesis stream
4. Kinesis firehose delivers stream data to ElasticSearch index
GuardDuty Logs
1. New GuardDuty findings trigger cloudwatch event
2. Cloudwatch sends GuardDuty event to Kinesis Stream
3. Kinesis firehose reads from kinesis stream
4. Kinesis firehose delivers stream data to ElasticSearch index
GuardDuty Logs
Building the solution
Logs are now flowing
● Data arrives in real
time
● Kinesis streams allow
us to retain log data
and control flow rate
● Kinesis firehose allows
us to retry delivery in
case of downstream
failure
Applying best practices
● Cloudtrail logs can
potentially have
thousands of fields
● Evenly distribute
database shards to
cluster hosts
Building the solution
Raw log data is now searchable
Visualization adds context
● Built in monitoring and
alerting functionality
● Triggered by search
results
● Alerts can be sent
directly to Slack,
webhooks or SNS
topics
Creating Alerts
Creating Alerts
Monitors
● Define an execution
schedule
● Define an extraction
query
Triggers
● Define trigger
conditions for your
monitor
● Triggers define when
we should be notified
Creating Alerts
Actions
● Define alert action and
destination
Creating Alerts
● Alert text is fully
customizable via
markdown
● Include links to source
data
● Alerts can trigger other
events via Lambda
(webhook)
Creating Alerts
● Alert history is
maintained
automatically
● Alerts can easily be
enabled/disabled
● Alert configurations
can be exported
Creating Alerts
Wrapping things up
✨ Extend visibility
■ Logs can be retained in ElasticSearch and S3 for a
configurable period of time
✨ Facilitate threat hunting
■ ElasticSearch allows us to search and visualize all our log
data
✨ Automate detection and response
■ ElasticSearch monitoring and alerting can notify us of
conditions in our Cloudtrail logs
✨ Easily deploy all resources
■ The entire solution is deployed using Terraform, only
requiring a name and client IP
Wrapping things up
Terraform plan available here:
https://github.com/louisbarrett/Eager-Locomotive
git clone https://github.com/louisbarrett/eager-locomotive
cd eager-locomotive
terraform init
terraform plan / terraform apply
Terraform Plan QR
Native Cloud Security Monitoring
“A journey through bootstrapping security logging and monitoring in AWS”
Terraform plan below
Platform demo configuration and cost metrics
Instance type: t2.medium.elasticsearch
Number of instances: 1
Master instance type: n/a
Number of master instances: 0
Storage type: EBS
EBS volume type: General Purpose (SSD)
EBS volume size: 30 GB
ElasticSearch was the primary cost driver.
● Consuming 307mb of log data per week, cost approximately $200 per month
● Suitable for lab environments, or low traffic environments
Platform production configuration and cost metrics
Instance type: m5.large.elasticsearch
Number of instances: 20
Master instance type: c5.large.elasticsearch
Number of master instances: 3
Storage type: EBS
EBS volume type: General Purpose (SSD)
EBS volume size: 512 GB
ElasticSearch was the primary cost driver.
● Consuming 2TB of log data per week, cost approximately $3k per month
● Total platform storage in this configuration is 10TB
● Remarkably stable, fast, and reliable
Wrapping things up
ElasticSearch New Defaults:
Terraform Plan QR

More Related Content

PPTX
Of CORS thats a thing how CORS in the cloud still kills security
PDF
AWS temporary credentials challenges in prevention detection mitigation
PPTX
EKS security best practices
PDF
Keynote - Cloudy Vision: How Cloud Integration Complicates Security
PDF
Using Splunk/ELK for auditing AWS/GCP/Azure security posture
PPTX
Scaling Security in the Cloud With Open Source
PDF
Exploiting IAM in the google cloud platform - dani_goland_mohsan_farid
PDF
Pragmatic Cloud Security Automation
Of CORS thats a thing how CORS in the cloud still kills security
AWS temporary credentials challenges in prevention detection mitigation
EKS security best practices
Keynote - Cloudy Vision: How Cloud Integration Complicates Security
Using Splunk/ELK for auditing AWS/GCP/Azure security posture
Scaling Security in the Cloud With Open Source
Exploiting IAM in the google cloud platform - dani_goland_mohsan_farid
Pragmatic Cloud Security Automation

What's hot (19)

PDF
Practical Guide to Securing Kubernetes
PDF
MozDef Workshop slide
PDF
ATT&CKing the Sentinel – deploying a threat hunting capability on Azure Senti...
PDF
Securing your AWS Deployments with Spinnaker and Armory Enterprise
PPTX
AWS Security Week | Getting to Continuous Security and Compliance Monitoring ...
PDF
AWS Re:Invent - Securing HIPAA Compliant Apps in AWS
PPTX
Lacework Kubernetes Meetup | August 28, 2018
PPTX
Automated Intrusion Detection and Response on AWS
PPTX
AWS security - NULL meet chennai
PDF
Battle in the Clouds - Attacker vs Defender on AWS
PPTX
Crypto Miners in the Cloud
PDF
Phishing in the cloud era
PPTX
Building A Cloud Security Strategy for Scale
PDF
Aptible, AWS, and Telepharm: Architecting HIPAA compliance for the cloud
PDF
Mining Malevolence: Cryptominers in the Cloud
PDF
PCI Compliance on AWS - Evident.io @ AWS Pop-up Loft 2/26/2015
PDF
Build to Hack, Hack to Build
PPTX
Packet Capture on AWS
PPTX
Serverless - minimizing the attack surface
Practical Guide to Securing Kubernetes
MozDef Workshop slide
ATT&CKing the Sentinel – deploying a threat hunting capability on Azure Senti...
Securing your AWS Deployments with Spinnaker and Armory Enterprise
AWS Security Week | Getting to Continuous Security and Compliance Monitoring ...
AWS Re:Invent - Securing HIPAA Compliant Apps in AWS
Lacework Kubernetes Meetup | August 28, 2018
Automated Intrusion Detection and Response on AWS
AWS security - NULL meet chennai
Battle in the Clouds - Attacker vs Defender on AWS
Crypto Miners in the Cloud
Phishing in the cloud era
Building A Cloud Security Strategy for Scale
Aptible, AWS, and Telepharm: Architecting HIPAA compliance for the cloud
Mining Malevolence: Cryptominers in the Cloud
PCI Compliance on AWS - Evident.io @ AWS Pop-up Loft 2/26/2015
Build to Hack, Hack to Build
Packet Capture on AWS
Serverless - minimizing the attack surface
Ad

Similar to Native cloud security monitoring (19)

PPTX
Automating AWS security and compliance
PPTX
004 - Logging in the Cloud -- hide01.ir.pptx
PPTX
AWS Monitoring & Logging
PDF
A New Perspective on Resource-Level Cloud Forensics
PDF
Developer Experience at the Guardian, Equal Experts Sept 2021
PPTX
AWS Cloud trail
PDF
Stream Processing in SmartNews #jawsdays
PDF
AWS IoT Edge Management
PPTX
NVS_Sentinel
PPTX
AWS User Group - Security & Compliance
PDF
Nava SIEM Agent Datasheet
PPTX
AWS Cloudtrail JSP.pptx
PDF
Top conf serverlezz
PDF
AWS security monitoring and compliance validation from Adobe.
PDF
Automating Security in Cloud Workloads with DevSecOps
PDF
Enterprise Cloud Security
PDF
Alabama CyberNow 2018: Cloud Hardening and Digital Forensics Readiness
PDF
Incident response-in-the-cloud
PDF
Monitoring docker, k8s and your applications with the elastic stack
Automating AWS security and compliance
004 - Logging in the Cloud -- hide01.ir.pptx
AWS Monitoring & Logging
A New Perspective on Resource-Level Cloud Forensics
Developer Experience at the Guardian, Equal Experts Sept 2021
AWS Cloud trail
Stream Processing in SmartNews #jawsdays
AWS IoT Edge Management
NVS_Sentinel
AWS User Group - Security & Compliance
Nava SIEM Agent Datasheet
AWS Cloudtrail JSP.pptx
Top conf serverlezz
AWS security monitoring and compliance validation from Adobe.
Automating Security in Cloud Workloads with DevSecOps
Enterprise Cloud Security
Alabama CyberNow 2018: Cloud Hardening and Digital Forensics Readiness
Incident response-in-the-cloud
Monitoring docker, k8s and your applications with the elastic stack
Ad

More from John Varghese (20)

PPTX
Lessons Learned From Cloud Migrations: Planning is Everything
PPTX
Leveraging AWS Cloudfront & S3 Services to Deliver Static Assets of a SPA
PPTX
AWS Transit Gateway-Benefits and Best Practices
PPTX
Bridging Operations and Development With Observabilty
PPTX
Security Observability for Cloud Based Applications
PPTX
Who Broke My Crypto
PPTX
Building an IoT System to Protect My Lunch
PPTX
Building a Highly Secure S3 Bucket
PPTX
Reduce Amazon RDS Costs up to 50% with Proxies
PPTX
Keynote - Lead the change around you
PDF
AWS Systems manager 2019
PDF
Acd19 kubertes cluster at scale on aws at intuit
PPTX
Emerging job trends and best practices in the aws community
PDF
Automating security in aws with divvy cloud
PDF
Securing aws workloads with embedded application security
PDF
Last year in AWS - 2019
PDF
Gpu accelerated BERT deployment on aws
PPTX
Cruising in data lake from zero to scale
PPTX
Best practices on building data lakes and lake formation
PPTX
Automate compliance with cloud guard dome9
Lessons Learned From Cloud Migrations: Planning is Everything
Leveraging AWS Cloudfront & S3 Services to Deliver Static Assets of a SPA
AWS Transit Gateway-Benefits and Best Practices
Bridging Operations and Development With Observabilty
Security Observability for Cloud Based Applications
Who Broke My Crypto
Building an IoT System to Protect My Lunch
Building a Highly Secure S3 Bucket
Reduce Amazon RDS Costs up to 50% with Proxies
Keynote - Lead the change around you
AWS Systems manager 2019
Acd19 kubertes cluster at scale on aws at intuit
Emerging job trends and best practices in the aws community
Automating security in aws with divvy cloud
Securing aws workloads with embedded application security
Last year in AWS - 2019
Gpu accelerated BERT deployment on aws
Cruising in data lake from zero to scale
Best practices on building data lakes and lake formation
Automate compliance with cloud guard dome9

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
KodekX | Application Modernization Development
PPTX
Big Data Technologies - Introduction.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Electronic commerce courselecture one. Pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Empathic Computing: Creating Shared Understanding
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPT
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Machine learning based COVID-19 study performance prediction
KodekX | Application Modernization Development
Big Data Technologies - Introduction.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
Electronic commerce courselecture one. Pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Empathic Computing: Creating Shared Understanding
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”
The AUB Centre for AI in Media Proposal.docx
Dropbox Q2 2025 Financial Results & Investor Presentation
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Teaching material agriculture food technology

Native cloud security monitoring

  • 2. Native Cloud Security Monitoring “A journey through bootstrapping security logging and monitoring in AWS”
  • 3. ● Senior Security Engineer at Segment ● Author of Cloud-Based Rube Goldberg Machines ● 8 years experience building SIEM, and SOAR platforms for the enterprise Who am I and why should you care?
  • 4. What this is about ● To get better visibility on events in our accounts. ● To automate incident detection and response ● Facilitate effective threat hunting Why are we here?
  • 5. What this is about ● Configure requisite services (CloudTrail, GuardDuty, ElasticSearch) ● Assemble our services into monitoring infrastructure ● Apply some best practices How do we get there?
  • 6. Security Monitoring on AWS CloudTrail - Consider this the audit and activity log for everything related to the events, users and resources in our account. ✅ Relatively easy to configure ✅ Covers the majority of AWS services
  • 7. Security Monitoring on AWS CloudTrail - Consider this the audit and activity log for everything related to the events, users and resources in our account. ✅ Relatively easy to configure ✅ Covers the majority of AWS services ❌ Limited search capabilities ❌ Limited export capability
  • 8. Security Monitoring on AWS CloudTrail - Consider this the audit and activity log for everything related to the resources, users and actions in your account. ✅ Relatively easy to configure ✅ Covers the majority of AWS services ❌ Limited search capabilities ❌ Limited export capability
  • 9. Security Monitoring on AWS ✅ Easy to configure and deploy ✅ Monitors and alerts on events without additional configuration ✅ Supports external threat feeds ✅ Under active development GuardDuty - This is our Intrusion detection system. It generates alerts for suspicious activity in Cloudtrail, DNS, and VPC Flow logs.
  • 10. Security Monitoring on AWS ✅ Easy to configure and deploy ✅ Monitors and alerts on events without additional configuration ✅ Supports external threat feeds ✅ Under active development ❌ Disabled by default ❌ No access to source log data ❌ No custom alerts GuardDuty - This is our Intrusion detection system. It generates alerts for suspicious activity in Cloudtrail, DNS, and VPC Flow logs.
  • 11. Security Monitoring on AWS ✅ Easy to configure and deploy ✅ Monitors and alerts on events without additional configuration ✅ Supports external threat feeds ✅ Under active development ❌ Disabled by default ❌ No access to source log data ❌ No custom alerts GuardDuty - This is our Intrusion detection system. It generates alerts for suspicious activity in Cloudtrail, DNS, and VPC Flow logs.
  • 12. Security Monitoring on AWS ✅ Industry Standard ✅ Helps contextualize data ✅ Search capabilities facilitate threat hunting AWS ElasticSearch - A managed SaaS search solution based on open source software, bundled with Kibana for data visualization (ELK)
  • 13. Security Monitoring on AWS ✅ Industry Standard ✅ Helps contextualize data ✅ Search capabilities facilitate threat hunting ❌ Poor defaults ❌ Index management can be challenging AWS ElasticSearch - A managed SaaS search solution based on open source software, bundled with Kibana for data visualization (ELK)
  • 14. Security Monitoring on AWS ✅ Industry Standard ✅ Helps contextualize data ✅ Search capabilities facilitate threat hunting ❌ Poor defaults ❌ Index management can be challenging AWS ElasticSearch - A managed SaaS search solution based on open source software, bundled with Kibana for data visualization (ELK)
  • 15. Cloudtrail ❌ Limited search capabilities ❌ Limited export capability GuardDuty ❌ Disabled by default ❌ No access to source log data ❌ No custom alerts ElasticSearch ❌ Poor defaults ❌ Index management can be challenging Summary of Pain
  • 16. ● Deploy all required services and components automatically ● Extend log retention beyond 90 days (configurable) ● Tune ElasticSearch for ingesting CloudTrail logs ● Allow custom alert generation ● Enhance search capabilities and eliminate weak defaults ✨ Fault Tolerant ✨ Scalable ✨ Self-Maintaining Easing the pain - our solution
  • 17. The Shopping List ● AWS ElasticSearch ● AWS CloudTrail ● AWS GuardDuty ● Terraform 0.11+ ● Lambda* ● Cloudwatch Trigger ● Kinesis Streams ● Kinesis Firehose ● S3 Buckets ● IAM Roles
  • 19. Infrastructure as Code ● All components will be arranged and configured by Terraform ● A resource name and an IP are all you need to get started Building the solution
  • 20. Infrastructure as Code ● After about 15 minutes we have the full ELK ● Lambda replaces Logstash providing serverless log ingestion Building the solution
  • 21. Terraform plan below 1. CloudTrail logs are written to S3 2. S3 ObjectCreated events trigger our log processing function 3. Lambda processes log and delivers it to a kinesis stream 4. Kinesis firehose reads from kinesis stream 5. Kinesis firehose delivers stream data to ElasticSearch index CloudTrail Logs
  • 22. 1. CloudTrail logs are written to S3 2. S3 ObjectCreated events trigger our log processing function 3. Lambda processes log and delivers it to a kinesis stream 4. Kinesis firehose reads from kinesis stream 5. Kinesis firehose delivers stream data to ElasticSearch index CloudTrail Logs
  • 23. 1. CloudTrail logs are written to S3 2. S3 ObjectCreated events trigger our log processing function 3. Lambda processes log and delivers it to a kinesis stream 4. Kinesis firehose reads from kinesis stream 5. Kinesis firehose delivers stream data to ElasticSearch index CloudTrail Logs ● Written in Go ● Highly efficient ● Cost effective
  • 24. 1. Cloudtrail logs are written to S3 2. S3 ObjectCreated events trigger our log processing function 3. Lambda processes log and delivers it to a kinesis stream 4. Kinesis firehose reads from kinesis stream 5. Kinesis firehose delivers stream data to ElasticSearch index CloudTrail Logs
  • 25. 1. Cloudtrail logs are written to S3 2. S3 ObjectCreated events trigger our log processing function 3. Lambda processes log and delivers it to a kinesis stream 4. Kinesis firehose reads from kinesis stream 5. Kinesis firehose delivers stream data to ElasticSearch index CloudTrail Logs
  • 26. 1. New GuardDuty findings trigger cloudwatch event 2. Cloudwatch sends GuardDuty event to Kinesis Stream 3. Kinesis firehose reads from kinesis stream 4. Kinesis firehose delivers stream data to ElasticSearch index GuardDuty Logs
  • 27. 1. New GuardDuty findings trigger cloudwatch event 2. Cloudwatch sends GuardDuty finding to Kinesis Stream 3. Kinesis firehose reads from kinesis stream 4. Kinesis firehose delivers stream data to ElasticSearch index GuardDuty Logs
  • 28. 1. New GuardDuty findings trigger cloudwatch event 2. Cloudwatch sends GuardDuty event to Kinesis Stream 3. Kinesis firehose reads from kinesis stream 4. Kinesis firehose delivers stream data to ElasticSearch index GuardDuty Logs
  • 29. 1. New GuardDuty findings trigger cloudwatch event 2. Cloudwatch sends GuardDuty event to Kinesis Stream 3. Kinesis firehose reads from kinesis stream 4. Kinesis firehose delivers stream data to ElasticSearch index GuardDuty Logs
  • 30. Building the solution Logs are now flowing ● Data arrives in real time ● Kinesis streams allow us to retain log data and control flow rate ● Kinesis firehose allows us to retry delivery in case of downstream failure
  • 31. Applying best practices ● Cloudtrail logs can potentially have thousands of fields ● Evenly distribute database shards to cluster hosts Building the solution
  • 32. Raw log data is now searchable
  • 34. ● Built in monitoring and alerting functionality ● Triggered by search results ● Alerts can be sent directly to Slack, webhooks or SNS topics Creating Alerts
  • 35. Creating Alerts Monitors ● Define an execution schedule ● Define an extraction query
  • 36. Triggers ● Define trigger conditions for your monitor ● Triggers define when we should be notified Creating Alerts
  • 37. Actions ● Define alert action and destination Creating Alerts
  • 38. ● Alert text is fully customizable via markdown ● Include links to source data ● Alerts can trigger other events via Lambda (webhook) Creating Alerts
  • 39. ● Alert history is maintained automatically ● Alerts can easily be enabled/disabled ● Alert configurations can be exported Creating Alerts
  • 40. Wrapping things up ✨ Extend visibility ■ Logs can be retained in ElasticSearch and S3 for a configurable period of time ✨ Facilitate threat hunting ■ ElasticSearch allows us to search and visualize all our log data ✨ Automate detection and response ■ ElasticSearch monitoring and alerting can notify us of conditions in our Cloudtrail logs ✨ Easily deploy all resources ■ The entire solution is deployed using Terraform, only requiring a name and client IP
  • 41. Wrapping things up Terraform plan available here: https://github.com/louisbarrett/Eager-Locomotive git clone https://github.com/louisbarrett/eager-locomotive cd eager-locomotive terraform init terraform plan / terraform apply Terraform Plan QR
  • 42. Native Cloud Security Monitoring “A journey through bootstrapping security logging and monitoring in AWS” Terraform plan below
  • 43. Platform demo configuration and cost metrics Instance type: t2.medium.elasticsearch Number of instances: 1 Master instance type: n/a Number of master instances: 0 Storage type: EBS EBS volume type: General Purpose (SSD) EBS volume size: 30 GB ElasticSearch was the primary cost driver. ● Consuming 307mb of log data per week, cost approximately $200 per month ● Suitable for lab environments, or low traffic environments
  • 44. Platform production configuration and cost metrics Instance type: m5.large.elasticsearch Number of instances: 20 Master instance type: c5.large.elasticsearch Number of master instances: 3 Storage type: EBS EBS volume type: General Purpose (SSD) EBS volume size: 512 GB ElasticSearch was the primary cost driver. ● Consuming 2TB of log data per week, cost approximately $3k per month ● Total platform storage in this configuration is 10TB ● Remarkably stable, fast, and reliable
  • 45. Wrapping things up ElasticSearch New Defaults: Terraform Plan QR