disk-forensics-evasion

Analyze disk forensics artifacts and apply anti-forensics techniques on NTFS and ext4 systems.

1.7k|238|Updated Dec 7, 2019
One-click install
npx skills add https://github.com/wgpsec/AboutSecurity --skill disk-forensics-evasion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: disk-forensics-evasion
Source: https://github.com/wgpsec/AboutSecurity/tree/main/skills/dfir/disk-forensics-evasion
Command: npx skills add https://github.com/wgpsec/AboutSecurity --skill disk-forensics-evasion

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Security professionals need to understand both how disk forensics recovers evidence (deleted files, timelines, execution artifacts) and how attackers evade it, in order to conduct incident response, red team operations, and OPSEC planning on Windows and Linux systems.

Core Features & Use Cases

  • Blue Team Disk Forensics: Acquire disk images with dcfldd/ewfacquire, parse NTFS artifacts ($MFT, $UsnJrnl, Prefetch, Amcache, Shimcache, LNK, $Recycle.Bin, VSS) and Linux ext4 artifacts (inodes, journals, logs) using Sleuth Kit, Plaso, and Eric Zimmerman tools.
  • Red Team Anti-Forensics: Apply secure deletion (shred, sdelete), timestomping, artifact cleanup, in-memory execution (memfd_create, /dev/shm), and history evasion to reduce disk traces during authorized engagements.
  • Detection Cross-Reference: A mapping table pairs each forensic technique (file recovery, timeline analysis, USN Journal) with the corresponding red team exposure and countermeasure.
  • Use Case: During a post-incident investigation, use the NTFS artifact workflow to reconstruct an attacker's execution timeline from Prefetch, Amcache, and USN Journal even after the malware binary was deleted.

Quick Start

Ask the agent to walk you through recovering deleted files and building a timeline from a Windows disk image using the NTFS artifacts reference.

Frequently Asked Questions about disk-forensics-evasion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I recover deleted files from a disk image?

Use Sleuth Kit commands like fls to list deleted entries, icat to extract file content by inode, or tsk_recover to restore all deleted files. On ext4, extundelete and photorec recover files based on journal data or file signatures.

How to detect timestomping on NTFS file systems?

Compare the $STANDARD_INFORMATION and $FILE_NAME timestamp sets in the $MFT. Timestomped files show $SI creation times far earlier than $FN creation times, or modification times earlier than creation times, which is logically impossible.

What Windows artifacts prove program execution?

Prefetch records execution counts and the last eight run times, Amcache stores SHA1 hashes and first execution time, and Shimcache logs files noticed by the OS. Cross-referencing all three confirms execution even after the binary is deleted.

Does shred securely delete files on SSD drives?

Shred may not fully erase data on SSDs because wear leveling writes overwrites to new blocks while old blocks remain readable at firmware level. Use TRIM commands like fstrim or blkdiscard instead for solid-state drives.

Why does clearing bash history still leave forensic traces?

Deleting .bash_history does not remove evidence from wtmp, auth.log, systemd journal, or ext4 journal entries. Investigators correlate these sources, so the skill recommends unset HISTFILE before operating rather than cleaning afterward.

Can the USN Journal be cleared without detection?

Running fsutil usn deletejournal removes the journal but the deletion itself is logged and SIEM rules often flag it. A quieter approach is generating large volumes of benign file writes so old records roll out of the fixed-size journal naturally.