Prerequisites
- Target system, dependencies and environment configured.
Usage
Purpose
Sophisticated attackers don't just break in — they try to erase or falsify the evidence of it. Anti-forensics is the set of techniques used to defeat investigation: clearing logs, altering timestamps, wiping files, hiding data, and disabling logging. This skill covers recognising these techniques and the traces they leave, because the crucial insight is that anti-forensics is rarely perfect — the attempt to destroy evidence usually leaves its own evidence, and absence where you expect data is itself a finding.
When to use it
Any investigation where a capable adversary was involved. Applying it means reading the gaps and inconsistencies — not just what's present, but what's suspiciously missing or altered. It sharpens every other forensics skill by making you sceptical of clean-looking data.
The techniques and their traces
- Log clearing / deletion — wiping event logs to hide activity. Trace: a cleared Windows Security log records event 1102 (audit log cleared); a suspiciously empty or truncated log, or a gap in otherwise-continuous logging, all point to clearing. The absence is the evidence.
- Timestomping — altering file timestamps to hide when something happened. Trace: on NTFS,
$STANDARD_INFORMATION vs $FILE_NAME timestamp mismatches; times that are impossible (modified before created), suspiciously round (all zeros/identical), or inconsistent with other artefacts (prefetch, logs).
- File wiping / secure deletion — overwriting files to prevent recovery. Trace: wiping-tool artefacts (the tool's own execution shows in prefetch/amcache), patterns of overwritten space, and a conspicuous absence of files you'd expect.
- Data hiding — steganography, alternate data streams (ADS), hidden partitions, misnamed extensions. Trace: ADS enumeration, entropy analysis, file-type vs extension mismatches (the static-triage habit).
- Disabling logging / auditing — turning off the recording before acting. Trace: configuration changes to logging, a gap starting exactly when logging was disabled.
- Living-off-the-land / minimal footprint — using built-in tools and memory-only execution to avoid leaving disk artefacts. Trace: the value of memory forensics, since disk may be clean by design.
Procedure
- Read absence as evidence. The core mindset: a clean system where you expected activity is suspicious, not reassuring. A missing log, an empty history, a gap in a timeline — treat these as findings pointing at anti-forensics, and investigate why the expected evidence isn't there.
- Look for the anti-forensic act itself. Destroying evidence is an action that often leaves its own trace — the log-clear event (1102), the wiping tool in prefetch, the timestamp-altering pattern. Hunt for these markers explicitly.
- Corroborate across independent sources. Anti-forensics on disk is undone by evidence elsewhere — memory (which may still hold what was wiped from disk), network logs (external to the host, harder to clear), central SIEM (off-host, out of the attacker's reach), and cloud audit logs. Cross-source contradiction exposes the tampering.
- Cross-check timestamps ($SI vs $FN, artefact-vs-artefact) to catch timestomping, and don't trust a single artefact's times.
- Assume off-host evidence survives. The strongest counter to anti-forensics is evidence the attacker couldn't reach — logs forwarded to a SIEM, network captures, cloud trails. This is why centralised, off-host logging (the auditd/cloudtrail skills) is a forensic control, not just a detection one.
- Document what appears tampered and the basis for that conclusion — it's often material to the investigation (destruction of evidence has legal weight) and shapes how much to trust the remaining data.
Cheatsheet
core mindset: ABSENCE where you expect data = a finding, not reassurance.
anti-forensics is rarely perfect -> the ATTEMPT leaves traces.
technique trace to look for
------------------- -----------------------------------------------------------
log clearing Windows event 1102 ; empty/truncated log ; logging GAP
timestomping $SI vs $FN mismatch ; impossible/round times ; artefact conflict
file wiping wiping-tool in prefetch/amcache ; overwritten patterns ; missing files
data hiding ADS ; steganography (entropy) ; extension vs real type mismatch
disabled logging config change + gap starting exactly then
LOTL / fileless minimal disk footprint -> lean on MEMORY forensics
counter: corroborate across INDEPENDENT sources the attacker couldn't reach
memory (holds what was wiped from disk) | network logs | central SIEM | cloud audit
off-host logging = a forensic control (evidence beyond the attacker's reach)
Reading the signs
- A cleared or suspiciously empty log (event 1102, a truncated auth.log) = deliberate log clearing; the clearing itself, and the gap it leaves, are evidence of an attempt to hide activity. Don't read an empty log as "nothing happened".
- $SI/$FN timestamp mismatches or impossible times = timestomping; the file's real timeline is being hidden, and the inconsistency both flags it and tells you not to trust those timestamps.
- A wiping tool in execution artefacts = evidence destruction attempted; even if the wiped files are gone, the tool's execution proves it happened.
- A gap in a timeline starting exactly when logging changed = logging was disabled to create a blind spot; the timing correlation is the tell.
- Disk clean but memory/network tell a different story = the attacker cleaned disk but couldn't reach memory or off-host logs; the contradiction exposes the whole operation. This cross-source corroboration is the strongest counter.
- Everything suspiciously pristine on a system you have other reason to suspect = possible thorough anti-forensics; escalate scepticism and lean on off-host and memory evidence.
Pitfalls
- Reading a clean system as innocent. The biggest anti-forensics trap — absence of evidence on disk may mean thorough cleanup, not innocence. Where you expected activity and find none, that's a finding to chase.
- Trusting timestamps. Timestomping is common; always cross-check $SI vs $FN and against other artefacts before building a timeline on file times.
- Relying only on the host. Anti-forensics targets the host; memory, network, and off-host/SIEM/cloud logs are where the surviving evidence is. Corroborate off-host.
- Missing the anti-forensic act. Focusing on what's gone and forgetting that the destruction itself (1102, wiping tool, config change) left traces to find.
- Not documenting suspected tampering. Evidence destruction is material (and often legally significant); record what appears tampered and why.
References
- SANS anti-forensics and DFIR resources
- MITRE ATT&CK — T1070 (Indicator Removal), T1070.006 (Timestomp), T1562 (Impair Defenses)
- The timeline-analysis, memory-forensics, windows-artefacts, and auditd-and-logging skills
- Windows event 1102 / Linux log-integrity references
Inputs
- Relevant source code, logs, network traces, or system specifications.
Outputs
- Analysis findings, security audit report, or generated code artifacts.
1---2name: anti-forensics-awareness3description: Use when investigating a system where an attacker may have tried to destroy or falsify evidence — recognising log clearing, timestomping, wiping, and the traces these techniques leave.4---5678## Prerequisites9- Target system, dependencies and environment configured.1011## Usage12### Purpose1314Sophisticated attackers don't just break in — they try to erase or falsify the evidence of it. Anti-forensics is the set of techniques used to defeat investigation: clearing logs, altering timestamps, wiping files, hiding data, and disabling logging. This skill covers recognising these techniques and the traces they leave, because the crucial insight is that anti-forensics is rarely perfect — the *attempt* to destroy evidence usually leaves its own evidence, and absence where you expect data is itself a finding.1516### When to use it1718Any investigation where a capable adversary was involved. Applying it means reading the gaps and inconsistencies — not just what's present, but what's suspiciously *missing* or *altered*. It sharpens every other forensics skill by making you sceptical of clean-looking data.1920### The techniques and their traces2122- **Log clearing / deletion** — wiping event logs to hide activity. *Trace:* a cleared Windows Security log records event **1102** (audit log cleared); a suspiciously empty or truncated log, or a gap in otherwise-continuous logging, all point to clearing. The absence is the evidence.23- **Timestomping** — altering file timestamps to hide when something happened. *Trace:* on NTFS, `$STANDARD_INFORMATION` vs `$FILE_NAME` timestamp mismatches; times that are impossible (modified before created), suspiciously round (all zeros/identical), or inconsistent with other artefacts (prefetch, logs).24- **File wiping / secure deletion** — overwriting files to prevent recovery. *Trace:* wiping-tool artefacts (the tool's own execution shows in prefetch/amcache), patterns of overwritten space, and a conspicuous absence of files you'd expect.25- **Data hiding** — steganography, alternate data streams (ADS), hidden partitions, misnamed extensions. *Trace:* ADS enumeration, entropy analysis, file-type vs extension mismatches (the static-triage habit).26- **Disabling logging / auditing** — turning off the recording before acting. *Trace:* configuration changes to logging, a gap starting exactly when logging was disabled.27- **Living-off-the-land / minimal footprint** — using built-in tools and memory-only execution to avoid leaving disk artefacts. *Trace:* the value of memory forensics, since disk may be clean by design.2829### Procedure30311. **Read absence as evidence.** The core mindset: a clean system where you expected activity is suspicious, not reassuring. A missing log, an empty history, a gap in a timeline — treat these as findings pointing at anti-forensics, and investigate *why* the expected evidence isn't there.322. **Look for the anti-forensic act itself.** Destroying evidence is an action that often leaves its own trace — the log-clear event (1102), the wiping tool in prefetch, the timestamp-altering pattern. Hunt for these markers explicitly.333. **Corroborate across independent sources.** Anti-forensics on disk is undone by evidence elsewhere — memory (which may still hold what was wiped from disk), network logs (external to the host, harder to clear), central SIEM (off-host, out of the attacker's reach), and cloud audit logs. Cross-source contradiction exposes the tampering.344. **Cross-check timestamps** ($SI vs $FN, artefact-vs-artefact) to catch timestomping, and don't trust a single artefact's times.355. **Assume off-host evidence survives.** The strongest counter to anti-forensics is evidence the attacker couldn't reach — logs forwarded to a SIEM, network captures, cloud trails. This is why centralised, off-host logging (the auditd/cloudtrail skills) is a forensic control, not just a detection one.366. **Document what appears tampered** and the basis for that conclusion — it's often material to the investigation (destruction of evidence has legal weight) and shapes how much to trust the remaining data.3738### Cheatsheet3940```41core mindset: ABSENCE where you expect data = a finding, not reassurance.42 anti-forensics is rarely perfect -> the ATTEMPT leaves traces.4344technique trace to look for45------------------- -----------------------------------------------------------46log clearing Windows event 1102 ; empty/truncated log ; logging GAP47timestomping $SI vs $FN mismatch ; impossible/round times ; artefact conflict48file wiping wiping-tool in prefetch/amcache ; overwritten patterns ; missing files49data hiding ADS ; steganography (entropy) ; extension vs real type mismatch50disabled logging config change + gap starting exactly then51LOTL / fileless minimal disk footprint -> lean on MEMORY forensics5253counter: corroborate across INDEPENDENT sources the attacker couldn't reach54 memory (holds what was wiped from disk) | network logs | central SIEM | cloud audit55off-host logging = a forensic control (evidence beyond the attacker's reach)56```5758### Reading the signs5960- **A cleared or suspiciously empty log** (event 1102, a truncated auth.log) = deliberate log clearing; the clearing itself, and the gap it leaves, are evidence of an attempt to hide activity. Don't read an empty log as "nothing happened".61- **$SI/$FN timestamp mismatches or impossible times** = timestomping; the file's real timeline is being hidden, and the inconsistency both flags it and tells you not to trust those timestamps.62- **A wiping tool in execution artefacts** = evidence destruction attempted; even if the wiped files are gone, the *tool's* execution proves it happened.63- **A gap in a timeline starting exactly when logging changed** = logging was disabled to create a blind spot; the timing correlation is the tell.64- **Disk clean but memory/network tell a different story** = the attacker cleaned disk but couldn't reach memory or off-host logs; the contradiction exposes the whole operation. This cross-source corroboration is the strongest counter.65- **Everything suspiciously pristine on a system you have other reason to suspect** = possible thorough anti-forensics; escalate scepticism and lean on off-host and memory evidence.6667### Pitfalls6869- **Reading a clean system as innocent.** The biggest anti-forensics trap — absence of evidence on disk may mean thorough cleanup, not innocence. Where you expected activity and find none, that's a finding to chase.70- **Trusting timestamps.** Timestomping is common; always cross-check $SI vs $FN and against other artefacts before building a timeline on file times.71- **Relying only on the host.** Anti-forensics targets the host; memory, network, and off-host/SIEM/cloud logs are where the surviving evidence is. Corroborate off-host.72- **Missing the anti-forensic act.** Focusing on what's gone and forgetting that the destruction itself (1102, wiping tool, config change) left traces to find.73- **Not documenting suspected tampering.** Evidence destruction is material (and often legally significant); record what appears tampered and why.7475### References7677- SANS anti-forensics and DFIR resources78- MITRE ATT&CK — T1070 (Indicator Removal), T1070.006 (Timestomp), T1562 (Impair Defenses)79- The timeline-analysis, memory-forensics, windows-artefacts, and auditd-and-logging skills80- Windows event 1102 / Linux log-integrity references8182## Inputs83- Relevant source code, logs, network traces, or system specifications.8485## Outputs86- Analysis findings, security audit report, or generated code artifacts.