Module 8: Digital Forensics for Incident Responders
Fundamentals of Digital Evidence Handling
Importance of Evidence Handling
Failing to handle evidence properly can result in the integrity of the evidence bein compromised or become untrustworthy.
Evidence Collection and Preservation
Identify potential sources of digital evidence.
Gather content, and metadata.
Limit interactino with media that may contain digital evidence to avoid altering the original data.
Maintain integrity via cryptographic hashes for validation.
Use a hardware write blocker when duplicating data.
Store evidence securely.
Protect sensitive data/digital evidence via encryption.
Control and monitor chain of custody.
Kali Linux Forensics Mode
Kali live has a boot option for forensics mode which protects from writing/modifying contents of the hard drive(s). It also has auto-mounting disabled.
Capturing a disk image using dd
if=/dev/nvme0n1
This specifies the input file.
of=/mnt/external/VICTIM-OS.raw
This specifies the output file.
bs=4M
This specifies the size of each block.
conv=sync,noerror
This is specifying that if there is a read error, pad the output block with null bytes to "sync" with the original device. If there are errors, continue.
status=progress
Display a visual status of the progress of the image copy.
sha256sum
can be used to obtain a sha256 hash of the resulting image.
Legal and Procedural Aspects of Evidence Handling
It is suggested that evidence is gathered in this order, with most volatile being first:
Registers, cache
Routing table, ARP cache, process table, kernel statistics, memory
Temporary file systems
Disk
Remote logging and monitoring data that is relevant to the system in question
Physical configuration, network topology
Archival media
A very detailed, standardized, and methodical approach is provided in ISO 27037:
Response Kits
Bare minimum necessities:
Administrative Documents
Hard Drive Cloner/Eraser
Storage Devices
SSD/HDD Converters
Laptop
Forensics Tools
Forensic Tools and Techniques
Computer Forensics
Disk imaging
Offline imaging
Live imaging
remote imaging
VM imaging
Memory Forensics
Using volatility to perform some memory forensics.
Displaying Windows Information with Volatility3:
Displaying Networking Information with Volatility3
Advanced C2 frameworks such as Cobalt Strike or Sliver typically use beacons instead of fully-fledged reverse shells that maintain a permanent connection to the attacker's infrastructure. If the memory dump wasn't created at the exact moment the beacon check-in was performed, NetStat will not show this connection.
Displaying Process Tree Information with Volatility3
Network Forensics
Useful sources:
Netflow data
Full Packet Capture (FPC)
Log Forensics
We already did this earlier via Splunk. Do it again.
Malware Analysis
Basic Static Analysis
PowerShell Script to calculate Shannon's Entropy for all .exe files in a specified directory
Basic Dynamic Analysis
It is critical that your system is isolated before executing potentially destructive binaries.
Starting the binary application_builder.exe in PowerShell
Automated Analysis
Last updated