Join our Newsletter — 33% off our NHI Course
Home› Guides› Anti-Forensics Detection Guide: Spotting Log Clearing, Timestomping and…
Guide Incident Response & Forensics

Anti-Forensics Detection Guide: Spotting Log Clearing, Timestomping and Wiping in Investigations

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 27 October 2026 13 min read
On this page

Intruders who clear logs, rewrite file timestamps or wipe their tools rarely erase everything, but investigators who do not know where the residue sits will read an empty period as "nothing happened". Anti-forensics is the set of actions an attacker takes to remove, alter or hide evidence. The act itself usually leaves its own trace: an event saying the log was cleared, a mismatch between two timestamp sets, a gap in a record sequence, a journal entry for a renamed file. This guide covers how to detect the common techniques on Windows, Linux and cloud platforms during an investigation, and how to set up logging so that the next attempt fails. It assumes familiarity with the artefacts in the Windows Forensic Artefacts Guide and is written for DFIR analysts, incident responders and detection engineers.

Key takeaways

  • Anti-forensics is itself evidence. A cleared Security log produces event 1102 with the account and logon ID that cleared it; treat it as a high-severity finding, not as a dead end.
  • Two clocks beat one. Timestomping tools usually change the NTFS $STANDARD_INFORMATION times but not $FILE_NAME, and the USN journal records the change; compare them.
  • Gaps are findings. Missing EventRecordID ranges, silent periods in a busy log and a sensor that stopped reporting are as important as the events you have.
  • Off-host copies defeat local clearing. Forwarded events, EDR telemetry and cloud provider logs that the attacker cannot reach are the only reliable defence; design for them before the incident.
  • Destruction tools leave execution traces. wevtutil, vssadmin, fsutil usn deletejournal and secure-delete utilities appear in process creation logs, prefetch and Amcache even after the files they touched are gone.

The techniques and where ATT&CK places them

MITRE ATT&CK v20 split the old defence evasion tactic. Hiding traces such as file deletion and timestomping sits under Indicator Removal (T1070) in the Stealth tactic, while clearing or disabling logs and security tools sits under Disable or Modify Tools (T1685) in Defense Impairment (TA0112). Log clearing now maps to T1685.005 (Windows) and T1685.006 (Linux and macOS), so update older detection mappings.

TechniqueATT&CK IDPrimary residueWhere to look
Clear Windows event logsT1685.005Security 1102, System 104, process creation of wevtutil cl or Clear-EventLogForwarded events, EDR, prefetch
Disable or modify event loggingT1685.001Audit policy change 4719, EventLog service stop, registry changes to channel settingsSecurity log, Sysmon 13, EDR
Clear Linux or Mac system logsT1685.006Truncated /var/log files, journal verification failures, missing wtmp entriesRemote syslog, journal files, auditd
Disable Linux auditT1685.004auditd stop, rule changes, auditctl -e 0Remote audit stream, configuration management drift
Disable or modify cloud logsT1685.002API calls that stop, delete or narrow trails and sinksThe cloud audit log itself, organisation-level trails
TimestompT1070.006$SI and $FN mismatch, USN basic-info change, Sysmon 2$MFT, $UsnJrnl, Sysmon
File deletion and wipingT1070.004USN delete and rename records, Sysmon 23 or 26, secure-delete rename patterns$UsnJrnl, $LogFile, Sysmon, prefetch
Clear command historyT1070.003Empty or truncated .bash_history, PSReadLine history removed, HISTFILE unsetProcess creation, auditd execve, EDR
Clear persistenceT1070.009Service or task deleted after useSystem 7045 then deletion, task XML in VSS
Delete shadow copiesT1490vssadmin delete shadows, wmic shadowcopy delete, VSS service eventsProcess creation, EDR
Hide in NTFS attributesT1564.004Alternate data streams on unexpected files$MFT, Sysmon 15

Detecting log clearing and logging tampering

Windows

  • Security log cleared: event 1102 (provider Microsoft-Windows-Eventlog, channel Security) records the SID, account name, domain and logon ID of the account that cleared the log. Correlate the logon ID with 4624 to find the session and source.
  • Other logs cleared: System event 104 records clearing of other channels such as System and Application. Its presence alongside 1102 within seconds suggests a scripted clear of every channel.
  • Sequence gaps: each record has an EventRecordID that increments. A jump between two consecutive records, or a log whose first record is minutes before the incident on a host that has run for months, means data was removed or the log was rolled over. Check the log size setting before concluding tampering: a small maximum size causes legitimate overwrites.
  • Audit policy changes: 4719 (system audit policy changed) and changes to subcategory settings can silence logging without clearing anything.
  • Service and channel tampering: stopping the EventLog service, disabling a channel or changing its registry configuration (Sysmon 13 or EDR registry telemetry) degrades logging quietly. Sysmon 4 records the Sysmon service state and Sysmon 16 records changes to its configuration, so an attacker blinding Sysmon leaves those behind.
  • Execution evidence: wevtutil.exe, powershell.exe with Clear-EventLog or Remove-EventLog, and auditpol.exe in process creation (4688 with command line, or Sysmon 1), prefetch and Amcache.

Forward events off-host so that clearing the local copy does not destroy the record. See the Windows Event Forwarding Guide and the Sysmon Guide.

Linux

  • Truncation and gaps: files under /var/log with a size of zero or modification times during the incident, and holes in wtmp and lastlog.
  • Journal integrity: journalctl --verify checks journal files for internal consistency; if Forward Secure Sealing was set up with --setup-keys (sealing key on the host, verification key stored elsewhere, key change every 15 minutes by default), --verify-key= also checks authenticity, so later tampering is detectable.
  • Audit subsystem: auditd service stops, rule deletions and changes to /etc/audit/ are high-value events; send the audit stream to a remote collector. See the Linux Forensics Guide.

Cloud

Control-plane logs are harder for an attacker to erase, but they can be stopped, narrowed or redirected. Alert on actions such as stopping or deleting an AWS CloudTrail trail or changing its event selectors, deleting or modifying Google Cloud log sinks and exclusions, and changing Azure diagnostic settings. Organisation-level trails and sinks owned by a separate security account survive a compromised workload account. See the Cloud Forensics Guide and the Google Cloud Audit Logs and Log Sinks Guide.

Detecting timestomping

NTFS records four timestamps (modified, accessed, MFT entry changed, created) in two places in each MFT record: the $STANDARD_INFORMATION attribute, which user-mode APIs can set, and the $FILE_NAME attribute, which the file system maintains. ATT&CK's Timestomp entry describes attackers changing these times to blend malicious files with legitimate ones in the same folder.

IndicatorWhy it is suspiciousConfidence
$SI created time earlier than $FN created timeThe file system set $FN at creation; an earlier $SI value was written afterwardsHigh, but check for copy and archive extraction behaviour
$SI times with zero sub-second precision (for example .0000000)Many tools set whole-second values; genuine NTFS times carry 100-nanosecond precisionMedium; some legitimate software also does this
File times older than the operating system install or the folderA "system" binary predating the build it belongs toMedium
USN journal record with a basic information change reason for the fileTimestamp attribute was changed after creation, and the journal records whenHigh when it falls in the incident window
Sysmon event 2 (a process changed a file creation time)Records the process that made the change and the old and new timesHigh when the process is unusual; Microsoft notes many processes change creation times legitimately
Prefetch, Amcache or ShimCache first-execution time after the file's claimed creation by yearsExecution evidence contradicts the file system storyMedium to high

Parse the MFT with a tool that outputs both attribute sets and a "timestomped" flag where available, then confirm against the USN journal and execution artefacts. The EZ Tools Guide covers MFTECmd for this, and the Forensic Timeline Analysis Guide covers placing the result in a timeline.

Detecting deletion, wiping and recovery inhibition

  • Ordinary deletion: deleted files often remain in unallocated MFT records and clusters, the Recycle Bin ($I and $R files) and Volume Shadow Copies. The USN journal records the delete and the preceding renames.
  • Secure deletion: Microsoft's SDelete renames a file 26 times, replacing each character of the name with successive letters (the first rename of foo.txt is AAA.AAA), before overwriting. A run of renames to AAA.AAA, BBB.BBB and so on in the USN journal is a strong indicator. SDelete also does not securely remove file names held in free directory space.
  • Free space wiping: large temporary files created and deleted in rapid succession, and many new small files filling free MFT records, are the signature of free-space cleaning tools (SDelete -c or -z, cipher /w).
  • Journal deletion: fsutil usn deletejournal /d or /n disables the change journal. Microsoft notes this forces services such as FRS to rescan the volume, so an unexplained journal recreation or an empty journal on a long-running system is itself suspicious.
  • Shadow copy deletion: vssadmin delete shadows /all /quiet permanently removes client-accessible shadow copies. It is a common ransomware precursor and should alert on every endpoint and server.
  • Sysmon file delete events: event 23 logs a delete and archives a copy of the file to the archive directory (C:\Sysmon by default); event 26 logs the delete without archiving. Scope 23 tightly (scripts, executables in user-writable paths) so the archive does not grow unbounded. Event 28 (FileBlockShredding) can block shredding activity.

Wiper incidents push these techniques to their extreme. See the Wiper Malware Guide and the Wiper Attack Response Playbook.

Detecting hiding and evidence disruption

  • Alternate data streams: content in named streams on ordinary files (T1564.004). Sysmon 15 (FileCreateStreamHash) logs stream creation; MFT parsers list streams per record.
  • Encryption and packing: high-entropy files in staging directories, password-protected archives created shortly before exfiltration, and packed executables (T1027).
  • Masquerading: tools renamed to system binary names or placed in system paths (T1036); compare paths, hashes and signatures with a known-good baseline.
  • Security tool tampering: EDR or antivirus services stopped, exclusions added, drivers unloaded (T1685). Loss of sensor heartbeat is a detection in its own right. See the EDR Tampering and BYOVD Response Playbook.
  • Memory-only operation: payloads that never touch disk defeat disk forensics; capture memory before shutdown when this is suspected. See the Memory Forensics Guide.

Where identity fits

Clearing a Security log needs administrative rights, and disabling a cloud trail needs a privileged role. Every anti-forensics event therefore names an identity worth investigating: the account in 1102, the principal that called the cloud logging API, the service account that ran the wipe script. Check whether it is a human administrator, a shared local administrator (see the Local Administrator Password Solution (LAPS) Guide) or a service or automation identity whose credentials were stolen (see the Service Account Security Guide). Restricting who can clear logs or change logging configuration to a small, monitored group makes the event far more meaningful.

Building resilience before the incident

  1. Forward first: send Security, System, Sysmon, PowerShell and EDR telemetry off-host in near real time, and Linux syslog and audit to a remote collector.
  2. Size local logs: increase Security log maximum size on servers and domain controllers so legitimate rollover does not mimic clearing.
  3. Protect cloud logs: use organisation-level trails and sinks in a separate security account with immutable or retention-locked storage.
  4. Seal where possible: enable journal Forward Secure Sealing on high-value Linux hosts and store verification keys off-host.
  5. Alert on the act: deploy detections for 1102, 104, 4719, Sysmon 4 and 16, vssadmin delete shadows, fsutil usn deletejournal, CloudTrail stop or delete actions and auditd stops. See the Sigma Rules Guide.
  6. Test in a lab: run each technique on a test host in a purple team exercise, confirm the alert fires and that the evidence survives off-host. See the Purple Teaming Guide.
  7. Roll back safely: if a new detection floods analysts (for example legitimate backup software deleting shadow copies), tune by signed parent process and host group rather than disabling the rule.

Small organisations without a SIEM can still forward Windows events to a single collector and set cloud trail and sink alerts in the provider console; large organisations should treat logging pipeline health as a monitored service with its own on-call.

Framework mapping

FrameworkReferenceRelevance
NIST SP 800-53 Rev. 5AU-4, AU-9, AU-11, AU-12, SI-4, SI-7Log storage capacity, protection of audit information, retention, generation, monitoring, integrity
NIST CSF 2.0DE.CM-01, DE.AE-02, RS.AN-03, RS.AN-06Monitoring, analysis, root cause, integrity and provenance of investigation records
CIS Controls v8.1Control 8 (audit log management), Control 17 (incident response management)Central collection, retention and review; see the CIS Control 8 Audit Log Management Guide
ISO/IEC 27001:2022 Annex A8.15 Logging, 5.28 Collection of evidenceProtecting logs and preserving evidence
MITRE ATT&CK v20TA0112, T1685.001, T1685.004, T1685.005, T1685.006, T1070.003, T1070.004, T1070.006, T1490, T1564.004Technique coverage for detection engineering
MITRE D3FENDD3-FAPA File Access Pattern AnalysisDetecting bulk rename, overwrite and delete behaviour

Measuring the capability

  • Off-host coverage: percentage of servers and endpoints whose Security and Sysmon events reach the central store within 5 minutes.
  • Anti-forensics detection rate: percentage of purple team anti-forensics tests (log clear, timestomp, VSS delete, trail stop) that alert, target 100%.
  • Silent sensor time: median minutes before a host that stops sending telemetry raises an alert.
  • Cases with unexplained gaps: number of investigations per quarter where a logging gap could not be explained, trending down.
  • Privileged clearing rights: number of accounts able to clear Security logs or modify cloud trails, reviewed quarterly.

Common failure patterns

  • Reading absence as innocence: the report says "no malicious activity in the logs" when the logs start an hour before the analyst looked.
  • Trusting one timestamp set: analysts take Explorer or $SI times at face value and place the dropper years before the intrusion.
  • Overcalling timestomping: archive extraction, installers and file copies legitimately produce odd timestamp combinations; corroborate with the USN journal or Sysmon 2 before writing it up.
  • Local-only logging: the only copy of the Security log was on the host the attacker cleared.
  • Logging the admins out of scope: the cloud trail was in the same account the attacker controlled, so stopping it was one API call.
  • Rebuilding too fast: reimaging a host before acquisition destroys the journal, shadow copies and unallocated space that held the residue.

Practitioner checklist

  • Search every in-scope host for 1102, 104 and 4719 and record the account and logon session behind each.
  • Check EventRecordID continuity and log start times against host uptime and log size settings.
  • Compare $SI and $FN times for files of interest and confirm with USN journal records and Sysmon 2.
  • Look for SDelete-style rename runs, journal deletion and mass deletes in the USN journal.
  • Search process creation, prefetch and Amcache for wevtutil, vssadmin, fsutil, auditpol, cipher and secure-delete tools.
  • Review cloud audit logs for trail, sink and diagnostic setting changes in the incident window.
  • Acquire memory and disk before rebuilding any host suspected of anti-forensics.
  • Forward logs off-host and alert on clearing, audit policy and sensor state changes.
  • Limit and review the identities that can clear logs or change logging configuration.

Standards and references

Related NHI Mgmt Group resources: Windows Forensic Artefacts Guide · Digital Forensics (DFIR) Guide · Forensic Timeline Analysis Guide · Windows Event Forwarding Guide · Forensic Readiness Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 27 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.