Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Cloud Forensics Demystified

You're reading from  Cloud Forensics Demystified

Product type Book
Published in Feb 2024
Publisher Packt
ISBN-13 9781800564411
Pages 384 pages
Edition 1st Edition
Languages
Concepts
Authors (2):
Ganesh Ramakrishnan Ganesh Ramakrishnan
Profile icon Ganesh Ramakrishnan
Mansoor Haqanee Mansoor Haqanee
Profile icon Mansoor Haqanee
View More author details

Table of Contents (18) Chapters

Preface 1. Part 1: Cloud Fundamentals
2. Chapter 1: Introduction to the Cloud 3. Chapter 2: Trends in Cyber and Privacy Laws and Their Impact on DFIR 4. Chapter 3: Exploring the Major Cloud Providers 5. Chapter 4: DFIR Investigations – Logs in AWS 6. Part 2: Forensic Readiness: Tools, Techniques, and Preparation for Cloud Forensics
7. Chapter 5: DFIR Investigations – Logs in Azure 8. Chapter 6: DFIR Investigations – Logs in GCP 9. Chapter 7: Cloud Productivity Suites 10. Part 3: Cloud Forensic Analysis – Responding to an Incident in the Cloud
11. Chapter 8: The Digital Forensics and Incident Response Process 12. Chapter 9: Common Attack Vectors and TTPs 13. Chapter 10: Cloud Evidence Acquisition 14. Chapter 11: Analyzing Compromised Containers 15. Chapter 12: Analyzing Compromised Cloud Productivity Suites 16. Index 17. Other Books You May Enjoy

DFIR Investigations – Logs in AWS

Through Chapters 1 to 3, you may have recognized the importance of the cloud in today’s technological landscape, and with any technological innovation comes threats against it. As organizations use more cloud products and host and store personal or sensitive information, it is prone to unauthorized disclosure, accidentally or by threat actors exploiting a vulnerability in the configuration of the systems. This chapter will focus on how to handle incidents that have occurred within Amazon Web Services (AWS). We will discuss various log sources that are available for investigators and how investigators can make use of these log sources.

Before we can begin our investigation, we will need to understand which logs are available by default versus which log sources must be explicitly turned on; something organizations should consider for ensuring breaches can be investigated thoroughly. We will focus on configuring these logs and look at...

VPC flow logs

We briefly introduced VPC in Chapter 3. VPC is the core of the network configuration for every instance within AWS. Each AWS instance (Elastic Compute Cloud (EC2)) is assigned a VPC and uniquely identified using a VPC ID. VPC allows users complete control of the network environment, including defining specific IP addresses (non-public routable IPs), subnets, and security groups. Users can also configure a virtual private network (VPN) through their VPC connection. In default configurations, AWS will automatically create a VPC for every new instance of EC2. Users can also connect their EC2 instance to an existing preconfigured VPC instead.

All VPCs have a VPC identifier (VPC ID). The VPC ID is the single reference point for all network-related configuration items. For each instance, if you want to configure any network properties within AWS, you must look into each VPC specifically. In the next example, for a specific EC2 instance, certain details are captured for VPC...

S3 access logs

Amazon S3 is a very popular cloud storage service that is highly scalable and dependable for data storage and retrieval. S3 provides high availability (HA), storage performance, and accessibility of any amount of data from around the world.

In AWS, S3 operates on buckets, which contain objects. Objects are any files, documents, images, and videos. Each object is identified using a unique identifier known as the key that serves within a bucket. A bucket can be visualized as a folder that contains all the objects.

Logging options

Access logs record information about the requests made to an Amazon S3 bucket, including details such as request information, specific resource requests, and the time and date of the request. Amazon S3 uses a specific internal account to write server access logs, which requires AWS account owners to configure explicit permission within their IAM modules to allow S3 to log server access requests.

Note

Note that S3 access logs are...

AWS CloudTrail

AWS CloudTrail records activities performed on the management console of AWS accessing any AWS resource—for example, an EC2 instance created or terminated, changes to the VPC settings, and so on. Any activity on the management console of AWS is recorded as an event within CloudTrail.

CloudTrail consolidates detailed action log events in a centralized location and provides a comprehensive and unified view of account’s activity, making it easier to search, analyze, download, and respond to account activity across your AWS infrastructure. It also identifies what actions were performed by which user and any other details that help DFIR teams analyze and respond to an incident in AWS.

CloudTrail logs can be integrated into CloudWatch to query activities and perform further analysis. We will discuss CloudWatch in the next section.

The following screenshot demonstrates an example of a CloudWatch dashboard:

Figure 4.8 – CloudWatch dashboard

Figure 4.8 –...

AWS CloudWatch

AWS CloudWatch monitors your AWS resources in near real time. You can collect and monitor resource usage and key metrics in a SPOG view. CloudWatch presents every resource metric on its dashboard for quick view. However, for DFIR teams, CloudWatch can query certain logs to support an investigation.

From a security perspective, CloudWatch is a log management solution that can centrally collect and monitor logs from systems, applications, and resources. It offers log analytics on top to allow interactive searching and analysis capabilities. Similar to CloudTrail, CloudWatch offers log exports via S3 buckets. Note that logs in CloudWatch never expire and are retained indefinitely. Administrators can change the retention policy and choose between a log retention of a day or up to 10 years. Alternatively, organizations can send CloudWatch logs to an SIEM solution via an API for centralized monitoring and management of logs.

CloudWatch is a service that allows you to...

Amazon GuardDuty

GuardDuty is a threat detection service designed to help protect AWS resources and workloads by continuously monitoring for malicious activity and unauthorized behavior. Note that this is a detection service and not a response service. It detects and notifies the user of a potential threat within an AWS resource. However, integration with automated services such as Lambda will enhance GuardDuty’s capabilities to respond to threats based on established playbooks for each threat detected. GuardDuty uses ML, anomaly detection, and integrated TI to identify potential security threats within your AWS environment.

Some DFIR use cases are as follows:

  • Threat detection: GuardDuty analyzes CloudTrail logs, VPC flow logs, and DNS logs to detect indicators of compromise (IOCs) and potential threats. It applies ML algorithms to identify patterns and anomalies that might indicate malicious activities, such as unauthorized access attempts, reconnaissance, or instances...

Amazon Detective

Amazon Detective helps DFIR teams analyze, investigate, and visualize security data from various AWS services. It automatically collects and analyzes log data from AWS CloudTrail, Amazon VPC flow logs, and Amazon GuardDuty to provide insights into potential security vulnerabilities and suspicious activities within an AWS environment. Some of the capabilities of Amazon Detective are as follows:

  • Security graph: Amazon Detective uses a graph-based approach to visualize and analyze security-related data by creating a graphical representation of AWS resources, accounts, and their relationships, allowing DFIR teams to identify patterns, anomalies, and potential security threats quickly.
  • Automated data ingestion: Amazon Detective automatically collects and ingests data from AWS CloudTrail, Amazon VPC flow logs, and Amazon GuardDuty for aggregating and processing to provide insights and recommendations.
  • Threat hunting: Amazon Detective enables DFIR teams with...

Summary

To summarize, AWS offers integration of API logs and generic event logs and provides a SPOG to determine threat actor activity or an insider threat within an AWS account. With CloudWatch and CloudTrail, DFIR teams can natively investigate AWS using AWS’s tools and identify activities an unauthorized user performs at a granular level. Furthermore, resources such as EC2 and S3 offer additional information concerning the configuration that allows DFIR teams to deduce and obtain further information for investigations. Remember that some security solutions, such as VPC flow logs, are not enabled by default and require the account owner or administrator to allow them explicitly. Integrating CloudTrail logs with CloudWatch and enabling Amazon GuardDuty offers DFIR teams a deep insight into threats within an AWS account and resources without explicitly going through deployments of security tools. Enabling GuardDuty and, subsequently, Amazon Detective allows telemetric information...

Further reading

lock icon The rest of the chapter is locked
You have been reading a chapter from
Cloud Forensics Demystified
Published in: Feb 2024 Publisher: Packt ISBN-13: 9781800564411
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}