Anti-forensics techniques used by Threat Actors in the Wild

Hela Lucas (Incident Response Consultant · CrowdStrike)

Security BSides London 2023 · Day 1 · Clappy Monkey Track

Overview

In this insightful talk from BSides London, Hela Lucas, an Incident Response Consultant at CrowdStrike, delved into the increasingly sophisticated anti-forensic techniques employed by threat actors in the wild. The presentation highlighted how traditional forensic approaches often fall short when adversaries actively work to erase their tracks, necessitating creative and unconventional investigative methods. Lucas shared invaluable lessons learned from numerous incident response engagements where her team encountered these stealthy tactics, forcing them to adapt and uncover new indicators of compromise (IOCs).

Watch on YouTube

Visual summary for Anti-forensics techniques used by Threat Actors in the Wild by Hela Lucas
Visual summary for Anti-forensics techniques used by Threat Actors in the Wild by Hela Lucas

Key moments

  1. 0:00 Introduction to anti-forensic techniques in the wild
  2. 7:10 Overview of anti-forensic techniques discussed
  3. 8:50 Recovering deleted file records using Dollar I30
  4. 17:00 Mimikatz and Invoke Phantom for event log evasion
  5. 28:00 Vice Spider's anti-forensics and RDP bitmap cache
  6. 34:00 Scattered Spider's diverse anti-forensics arsenal
  7. 38:30 Q&A: Attributing threat actors and mimicry
  8. 43:00 Q&A: Attacker's purpose for Bring Your Own VM

Anti-forensics techniques used by Threat Actors in the Wild

Speakers: Hela Lucas (Incident Response Consultant, CrowdStrike)

Conference: BSides London

YouTube: https://www.youtube.com/watch?v=LsoieQeY7g8

Overview

In this insightful talk from BSides London, Hela Lucas, an Incident Response Consultant at CrowdStrike, delved into the increasingly sophisticated anti-forensic techniques employed by threat actors in the wild. The presentation highlighted how traditional forensic approaches often fall short when adversaries actively work to erase their tracks, necessitating creative and unconventional investigative methods. Lucas shared invaluable lessons learned from numerous incident response engagements where her team encountered these stealthy tactics, forcing them to adapt and uncover new indicators of compromise (IOCs).

The talk primarily focused on Windows environments, given the prevalence of these systems in the networks Lucas typically investigates, but also touched upon Linux and cloud-based anti-forensics. It underscored a critical shift in incident response: rather than simply identifying malware or malicious activity, responders must now also detect the absence of expected forensic artifacts, or even the tools used to suppress them. This presentation is crucial for security professionals, forensic analysts, and incident responders seeking to bolster their defensive strategies against advanced and persistent threats.

Background

▶ Watch: Introduction to anti-forensic techniques in the wild (0:00)

Hela Lucas began her journey in cybersecurity in 2016, pursuing a degree in cyber security and digital forensics, drawn to the practical and impactful nature of incident response (IR). After internships at Coinbase, Meta, and Morgan Stanley, and professional roles at Meta and KPMG, she joined CrowdStrike, a leading cybersecurity firm known for its Falcon EDR (Endpoint Detection and Response) agent. CrowdStrike's Professional Services team, of which Lucas is a part, specializes in post-breach incident response, leveraging Falcon's telemetry and forensic package collection to investigate compromises.

The core challenge addressed in this talk stems directly from the IR lifecycle. When a breach is detected, IR teams strive to gain full visibility across the compromised estate, collecting forensic data to identify IOCs such as compromised accounts, malware, or suspicious log entries. However, as Lucas explained, threat actors frequently employ anti-forensic techniques to hide these very IOCs. This creates a scenario where the traditional evidence of compromise is absent. The talk's premise is that in such cases, the act of hiding—the anti-forensic technique itself—becomes the new IOC, guiding investigators to understand what happened before and after the evidence was purged. This paradigm shift requires responders to look for subtle traces of anti-forensic activity rather than the direct artifacts of the initial compromise.

Key Findings

▶ Watch: Recovering deleted file records using Dollar I30 (8:50)

The talk identified several pervasive anti-forensic techniques employed by threat actors, ranging from basic to highly sophisticated. These methods are not exclusive to advanced persistent threat (APT) groups but are increasingly adopted by various e-crime syndicates and even less sophisticated actors. The key findings revolved around:

  • File Deletion: Beyond simple deletion, threat actors use specific utilities and methods that make recovery difficult.
  • Log Deletion and Tampering: Adversaries actively clear, modify, or disable critical system logs (Windows Event Logs, PowerShell logs, Linux bash history) to obscure their actions.
  • Bring Your Own VM (BYOVM): Threat actors deploy virtual machines or containers on compromised hosts to execute malicious tools outside the visibility of host-based EDRs.
  • Security Tool Corruption and SIM Encryption: Direct attacks on security infrastructure, including encrypting or deleting Security Information and Event Management (SIEM) data or altering logging configurations.
  • Cloud Anti-forensics: Leveraging the ephemeral nature of cloud resources by spinning up, using, and then deleting instances, or exploiting auto-scaling features to destroy evidence.

Lucas attributed certain advanced techniques to specific threat actor groups, including Vice Spider (also known as Vice Society), Light Basin (an activity cluster targeting Telcos), and Scattered Spider (a group known for social engineering and rapid movement). These groups often combine multiple anti-forensic tactics, making investigations significantly more challenging but also revealing unique behavioral patterns that can aid attribution.

Technical Deep Dive

▶ Watch: Vice Spider's anti-forensics and RDP bitmap cache (28:00)

The technical core of the talk focused on specific anti-forensic techniques and the often-overlooked artifacts that can still reveal malicious activity.

File Deletion

Threat actors frequently delete files, including malware, tools, or exfiltrated data. Common methods include using the Windows GUI, PowerShell (Remove-Item), or specialized file deletion utilities such as sdelete, KillDisk, File Shredder, BleachBit, and CCleaner. While file wipers overwrite data, making recovery impossible, their execution itself is an IOC.

To find evidence of deleted files, Lucas suggested several methods:

  • $I30 File (NTFS Index Record): This file, present in every NTFS directory, stores information about files, including those that have been deleted. Tools like index_parser.exe can parse $I30 files to output CSVs showing records of previously deleted files. This artifact is often missed by standard forensic collectors.
  • File Carving: In many file systems, deleting a file merely marks its space as available; the data remains in slack space until overwritten. Forensic tools can carve for file headers and footers to reconstruct deleted files. This applies even to forensic data files like Windows Event Logs.
  • PowerShell Logs: Threat actors often use PowerShell for deletion but neglect to clear ConsoleHost_history.txt (located at %USERPROFILE%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt) or Script Block Logs (Event ID 4104). These logs can reveal the exact commands used for deletion, providing critical IOCs.
  • Execution Artifacts: Even if a file wiper successfully destroys data, its execution leaves traces. Various Windows execution artifacts (e.g., Prefetch, Amcache, Shimcache, UserAssist) can show that a file wiping utility was run, providing an IOC to pivot from.

Log Deletion and Tampering

Windows Event Logs (found at C:\Windows\System32\config) are vital for IR, but threat actors frequently delete them using wevtutil cl, clear-wineventlog, or del *.evtx.

  • Detection of Log Clearing: Event IDs 104 (system log cleared), 1102 (security log cleared), and 1100 (event log service shut down) can indicate log deletion. Powershell logging can also capture the execution of wevtutil or clear-wineventlog.
  • Mimikatz event Module: Benjamin Delpy's Mimikatz tool, widely used by threat actors, includes an event module that can clear event logs or, more stealthily, patch the eventlog.dll function to return before any logging occurs. This prevents logs from being written without generating a "service stopped" event.
  • Invoke-Phantom: This tool suspends all event log service DLLs running under svchost.exe, effectively halting logging without triggering an event log service shutdown alert. Again, the execution of Invoke-Phantom itself, if captured in PowerShell logs, becomes an IOC.
  • Manual Event Log Modification: While complex, threat actors can stop the event log service, copy the .evtx file, modify events, and then recalculate the file and chunk headers.
  • EventLogEdit: Discovered in the Shadow Brokers leaks, EventLogEdit can modify the event record header by setting a larger size, causing the subsequent event log record to be overwritten and effectively hidden from standard parsers. Detection requires specialized tools like Fox-IT's danderspritz_evtx script.
  • Linux Log Manipulation: On Linux systems, threat actors often use HISTFILE=/dev/null or unset HISTFILE to prevent commands from being logged in bash history.

Security Tool Corruption and SIM Encryption

Threat actors sometimes directly target security infrastructure. This can involve:

  • Virtual Disk Encryption: Deploying ransomware that encrypts virtual disk files (e.g., VMDK files on an ESXi host), which might include the SIEM system itself.
  • Data Partition Deletion: Specifically deleting data partitions on a SIEM system.
  • Logging Configuration Changes: Altering logging configurations (e.g., removing email addresses for high-severity alerts).

Detection often comes from the SIEM simply ceasing to function or a noticeable reduction in ingested logs. Auditing changes to logging configurations can help, if such auditing is enabled.

Bring Your Own VM (BYOVM)

This advanced technique involves threat actors running a virtual machine or container on the compromised host. The key advantage for the attacker is that the host EDR agent typically has no visibility into the activities occurring inside the VM.

  • Detection: Evidence of BYOVM can include the execution of virtualization programs (e.g., VMware tools), or browser history showing downloads of virtualization software.
  • VMDK File Carving and Analysis: If a disk image is available, forensic analysts might carve VMDK files (virtual disk files) from slack space. While running these carved VMs is often difficult, string searching the VMDK file for IOCs (e.g., names of exfiltration utilities like S3 Browser, paths indicating SMB file transfers, or references to compressed archives) can provide clues. This can then be correlated with network logs to confirm exfiltration from the VM.

Cloud Anti-forensics

Cloud environments pose unique challenges due to their dynamic and ephemeral nature.

  • Resource Deletion: Threat actors can spin up cloud resources (e.g., AWS EC2 instances), conduct malicious activities, and then delete them, often making evidence unrecoverable.
  • Auto-scaling: Using auto-scaling groups means resources are automatically torn down when not in use, inadvertently destroying evidence. It's often unclear if this is intentional anti-forensics or just leveraging existing infrastructure.
  • Disabling/Deleting Logs: Disabling or deleting cloud logging services (e.g., CloudTrail) is a direct anti-forensic measure.
  • Detection: Visibility relies heavily on robust cloud logging configurations. Analysts should look for logs related to resource creation (CreateAutoScalingGroup, EnableAutoScalingGroup), deletion, and particularly DeleteTrail for CloudTrail logs. A sudden drop in cloud log volume or a smaller AWS bill could indicate log deletion.

Demo / Proof of Concept

▶ Watch: Scattered Spider's diverse anti-forensics arsenal (34:00)

While the talk did not feature a live technical demonstration, Lucas presented a compelling "proof of concept" of how a specific forensic artifact, the RDP Bitmap Cache, can be leveraged against sophisticated anti-forensic groups like Vice Spider. Vice Spider is known for extensive system wiping, deleting registry keys, console host history, and even SIEM data partitions, leaving investigators with almost no traditional artifacts.

The RDP Bitmap Cache consists of small tile files stored at %USERPROFILE%\AppData\Local\Microsoft\Terminal Server Client\Cache on systems that have initiated an RDP session. These files cache portions of the remote screen. Lucas explained that when humans type or read, they often follow along with the mouse, meaning "juicy" information on the RDP screen may be captured in these cache tiles.

The challenge lies in parsing and reassembling these tiles, which are just small, disconnected images. Lucas mentioned the existence of tools (one from French CERT, one from German CERT) that can parse these files and then arrange the tiles like a puzzle. Although this process is extremely time-consuming, it can reconstruct visual evidence, essentially providing "screenshots" of what the threat actor saw and did on the system. This visual evidence is not only invaluable for understanding the attacker's actions but also serves as a powerful tool to communicate findings to non-technical stakeholders or executives, offering undeniable proof of compromise even when all other logs have been erased. An example screenshot from a Vice Spider case, showing commands being executed, illustrated the power of this artifact.

Defensive Implications

▶ Watch: Q&A: Attacker's purpose for Bring Your Own VM (43:00)

The prevalence of anti-forensic techniques fundamentally alters the landscape of cybersecurity defense and incident response. Defenders must recognize that relying solely on traditional forensic artifacts is no longer sufficient.

  1. Shift Focus to Anti-Forensic Activity: Instead of just searching for malware hashes or specific commands, security teams must actively monitor for the execution of anti-forensic tools and techniques. The act of clearing logs, deleting files with wipers, or deploying virtualization software should be treated as a high-severity indicator of compromise.
  2. Robust and Centralized Logging:
  • PowerShell Logging: Enable and monitor Script Block Logging (Event ID 4104) and ConsoleHost_history.txt. These are frequently overlooked by threat actors.
  • Windows Event Logs: Configure comprehensive event logging and, crucially, forward these logs to a centralized SIEM or log aggregation platform immediately.
  • Protect the SIEM: Implement robust security measures for SIEM infrastructure, including host-based security, network segmentation, and regular backups, to prevent attackers from encrypting, deleting, or tampering with log data.
  • Cloud Logging: Ensure comprehensive CloudTrail logging (for AWS) or equivalent services are enabled, protected, and forwarded off-platform. Monitor for DeleteTrail events or changes to logging configurations.
  1. Monitor for Specific Tools and Behaviors:
  • File Wipers: Detect the execution of utilities like sdelete, BleachBit, KillDisk, CCleaner, etc., via EDR alerts or execution artifacts.
  • Log Tampering Tools: Monitor for mimikatz (especially the event module), Invoke-Phantom, EventLogEdit, and wevtutil commands.
  • Virtualization Software: Alert on the installation or execution of virtualization platforms like VMware tools, or the presence of VMDK files.
  • Linux Shell History: Monitor for HISTFILE=/dev/null or unset HISTFILE commands.
  1. Explore Alternative Artifacts: When primary logs are compromised, investigators must be prepared to delve into less conventional sources. The RDP Bitmap Cache is a prime example, offering visual evidence when all else is lost. Similarly, leveraging $I30 files and file carving techniques can yield critical insights into deleted files.
  2. Audit Cloud Configurations: Regularly audit cloud resource configurations, auto-scaling groups, and logging settings to ensure they meet security requirements and aren't inadvertently destroying forensic evidence.
  3. Embrace Lowcard's Exchange Principle: As Lucas concluded, "every contact leaves a trace." Even if the direct evidence is gone, the act of attempting to erase it leaves its own unique set of traces that can be leveraged for detection and investigation.

Key Takeaways

  • Anti-forensics is pervasive: Threat actors of all sophistication levels, from e-crime to APTs, commonly employ anti-forensic techniques to hinder investigations.
  • Detecting the anti-forensic act is crucial: When traditional IOCs are removed, the execution of anti-forensic tools or the act of log/file deletion itself becomes a critical indicator of compromise.
  • Robust logging is non-negotiable: Comprehensive PowerShell logging (Script Block, Console Host History), Windows Event Log forwarding, and secure cloud logging are fundamental layers of defense.
  • Traditional artifacts are still valuable: $I30 files, file carving, and various execution artifacts can reveal deleted files or the use of wiping utilities.
  • Unconventional artifacts provide resilience: The RDP Bitmap Cache, though time-consuming to analyze, can offer visual "screenshots" of attacker activity when all other logs are wiped, proving invaluable for non-technical stakeholders.
  • Threat actors like Vice Spider, Light Basin, and Scattered Spider demonstrate advanced anti-forensic capabilities, requiring specialized detection and response strategies.

About the Speaker(s)

Hela Lucas is an Incident Response Consultant at CrowdStrike, specializing in helping organizations navigate and recover from cybersecurity breaches. Her expertise is rooted in a strong academic background, having pursued a degree in Cyber Security and Digital Forensics starting in 2016. Driven by a passion for practical problem-solving in high-stakes environments, she chose a career in Incident Response. Prior to joining CrowdStrike, Hela gained valuable experience through internships at prominent companies such as Coinbase, Meta, and Morgan Stanley, and subsequently held professional roles at Meta and KPMG. At CrowdStrike, she primarily works on incident response engagements, leveraging the company's EDR technology and threat intelligence to investigate complex post-breach scenarios and uncover the sophisticated tactics used by threat actors in the wild.

Reviews

Dr. Zero (Offensive Security Researcher) — WEAK

This is a Forensics 101 lecture masquerading as a threat intel briefing. Pointing out that threat actors use wevtutil or sdelete isn't an insight in 2024—it's the baseline assumption of literally any IR engagement. It's a competent recap for juniors, but brings zero novel research to the table.

Heather Calloway (CISO) — STRONG ACCEPT

While aimed at incident responders, this talk highlights a critical architectural risk for security leaders. If your telemetry doesn't survive a breach, your IR firm will spend weeks reconstructing basic timelines, and your board won't get answers.

→ Top-rated talks at Security BSides London 2023

All talks from Security BSides London 2023