Anti-forensics means hiding, changing or destroying evidence so investigators struggle to see what happened.
This guide is for students, new security staff and anyone who wonders how attackers cover their tracks. You do not need to be technical to be affected: if your business keeps logs to investigate problems, an attacker may try to erase them, and small choices made now decide whether a copy survives.
In short
- Attackers may clear logs, change file dates or delete files to hide what they did.
- Covering tracks often leaves its own signs, such as a "log cleared" record, a gap or dates that do not agree.
- Copies of logs kept somewhere the attacker cannot reach are one of the strongest defences.
- Investigators look for things that do not fit, not only for things that are there.
What you will learn
- Explain what anti-forensics is in one sentence.
- Spot three common ways attackers try to hide their tracks.
- Explain why hiding tracks often leaves new clues.
- Check whether your logs are copied somewhere safe.
- Wiping the record (log clearing)
- deleting the list of events a computer keeps, so past actions are harder to see.
- Faking file dates (timestomping)
- changing the dates on a file so it looks older or more ordinary.
What is anti-forensics?
Think of a burglar who sweeps the floor on the way out to hide their footprints. The footprints go, but now there are broom marks and one patch of floor that is far cleaner than the rest.
Anti-forensics is the computer version. After breaking in, an attacker may try to remove or blur the evidence. They might clear the logs (the records a computer keeps of events), change the dates on their files or delete the files they used.
Attackers rarely wipe everything. They tend to remove the parts most likely to look odd, and leave the rest so the system seems normal.[1]
Where the comparison stops working: a house has one floor to sweep. A computer keeps traces in many places at once. Copies may already sit on other systems, so an attacker can miss traces they never knew existed.
Why does it matter?
Without evidence, it is hard to know what an attacker took, how they got in or whether they are still there. That makes it harder to fix the problem and to tell the right people.
If you run a small business
What could happen: after a break-in, the only copy of your logs was on the computer the attacker controlled, and it has been wiped.
Check this: ask your IT provider whether logs are copied to a separate place, and for how long they are kept.
If you are new to a security team
What could happen: you see a quiet hour in the logs and assume nothing happened, when the logs were cleared.
Check this: learn what a "log cleared" event looks like, and treat an unexpected one as an alert.
If you are studying digital forensics
What could happen: you trust the date shown on a file, and build your whole story on a faked time.
Check this: compare several sources of time before you rely on one.
What does it look like?
Here is a made-up comparison an investigator might make. On the left is a copy of the logs kept on a separate system. On the right is what was left on the server itself.
Example only. All values are made up.
Time (UTC) Central copy Server's own log 02:09 sign-in: svc-EXAMPLE-0000 (missing) (1) 02:11 new program started (missing) 02:14 security log cleared log starts here (2) File: C:\ProgramData\EXAMPLE\upd0000.dll (3) Date shown to users: 2019-03-01 Date in file system table: 2026-11-20
- In a real system, this line would show a sign-in by an account, here a service account (an account used by software, not a person).
- Windows writes a "log cleared" event when the security log is cleared, and it names the account that did it.
- The two dates for the same file disagree, a common sign that someone changed the visible date.
Why this is risky: if the server's own log were the only copy, the sign-in and the new program would simply be gone.
The safer way: send logs to a separate, protected place as they are written, so clearing one computer's log does not erase the copy.[4]
How does it work?
Here are the most common ways attackers try to cover their tracks, and why each one tends to leave a clue. This is about spotting them, not doing them.
- Clearing logs. An attacker with enough access may clear a computer's logs. On Windows, clearing the security log writes its own event, which names the account that did it.[3]
- Faking file dates. An attacker may change a file's dates so it blends in. On Windows, a file has a second set of dates in the file system that is harder to change. When the two disagree, investigators take note.[2]
- Deleting files. An attacker may delete the tools they used. Deleted data can often still be recovered, and other records may show that the tool ran.[1]
- Wiping data. Wiping, or secure deletion, aims to make data infeasible to recover.[5] It is slower and noisier than a normal delete, and the wiping tool can leave traces of its own.
- Looking for what does not fit. Investigators compare sources: the central log copy against the local log, one set of dates against another. Gaps and mismatches become clues.[6]


A worked example
Kaia Brandt is a security analyst at a fictional delivery company. Early one Thursday, the company's central log system raises an alert: the security log on a file server was cleared at 02:14.
Her manager, Vida Thorne, asks the obvious question. "Was it one of ours doing maintenance?"
Kaia remembers the burglar with the broom. A swept floor is itself a clue. She checks the change calendar and finds no work planned for that night.
The "log cleared" event names the account that did it: a service account used by the backup software. A service account is one kind of non-human identity (NHI). That is a digital identity for software or a machine, so it can carry out tasks without a person. This one should only ever run backups.
The server's own log now starts at 02:14. But the central copy still holds the events from before. It shows the service account signing in from an unfamiliar computer at 02:09, then a new program starting at 02:11.
The company's forensics partner takes a copy of the server's disk. They find the program's file. Its visible date says 2019, but the second date in the file system says this week.
Vida approves disabling the service account and changing its password. The partner widens the investigation to the unfamiliar computer. Kaia notes that the attacker's attempt to hide was what raised the alert in the first place.
Myths and mistakes
| What people think | What is true |
|---|---|
| If the logs are empty, nothing happened. | An empty or short log can be a sign of clearing. Check for a "log cleared" event and compare with any central copy. |
| The date on a file is when it arrived. | Visible dates can be changed. Investigators check other records of time too.[2] |
| Deleted means gone. | Deleted data can often be recovered, and other records may show what was there.[1] |
| Logs on the server itself are enough. | An attacker who controls the server may clear them. Keep a copy on a separate system.[4] |
| Anti-forensics is only used by skilled attackers. | Clearing logs and deleting tools can be simple to do, so plan for them in every incident. |
What can I do this week?
- Ask whether your important logs are copied to a separate system as they are written.
- Find out how long those copies are kept. Some guidance suggests at least six months for the most important logs.[4]
- Check that a "log cleared" event raises an alert someone will see.
- Write down who can clear logs, and make sure that list is short.
Checklist
- Important logs are sent to a separate, protected place as they are written.
- People and accounts that can clear logs are few and known.
- A "log cleared" event triggers an alert.
- Log copies are kept for an agreed time, long enough to cover slow-to-find incidents.
- Investigators compare more than one source of time before trusting a date.
- A suspect computer is copied before anyone changes or cleans it.
- Service accounts have only the rights their job needs, so most cannot clear logs.
Common questions
Is clearing logs always a sign of an attack?
No. Administrators sometimes clear logs for housekeeping. That is why it helps to have a short list of who may do it and a record of planned work. An unplanned clear, or one by an unexpected account, deserves a closer look.
Can investigators recover deleted files?
Often, yes, at least in part. A normal delete usually removes the file's entry, not the data itself, until the space is reused. Other records may also show that the file existed or ran. Wiping makes recovery much harder, but tends to leave other signs.
What is timestomping?
Timestomping is changing the dates on a file to make it look older or more ordinary. On Windows, a file has more than one set of dates, and the hidden set is harder to change. When the two sets disagree, investigators take a closer look.
How do I protect my logs from being wiped?
Copy them off the computer as they are written, to a separate system with its own access controls. Keep the list of people and accounts who can delete logs short. Set an alert for any "log cleared" event.
Is anti-forensics illegal?
The techniques themselves are not always illegal. Securely wiping an old laptop before selling it is good practice. Using them to hide a break-in or destroy evidence is a different matter. If evidence may be needed, take legal advice first.
Where next?
Ready for the detail? Read the practitioner guide: Anti-Forensics Detection Guide. It goes further into detection on Windows, Linux and cloud systems, how to spot wiping and hiding, and how to measure the capability.
Also useful:
- Log Timestamps and Time Zones Guide
- File System Forensics Guide
- Security Logging for Beginners
- Windows Event Logs for Beginners
Related NHI Mgmt Group resources: Digital Forensics for Beginners · Forensic Readiness Guide · Non-Human Identities for Beginners
Key terms
- Anti-forensics
- Actions that hide, change or destroy evidence of what happened on a system.
- Log clearing
- Removing or changing log records, sometimes for housekeeping and sometimes to hide traces.
- Timestomping
- Changing a file's dates so it looks older or less suspicious.
- Secure deletion
- Removing data so that getting it back is infeasible, not just harder.
- Indicator removal
- Deleting or changing the records defenders rely on to spot an attack.
- Forensic image
- An exact copy of a disk, made so the original stays unchanged.
Sources and further reading
- Indicator Removal (T1070). MITRE ATT&CK, MITRE. https://attack.mitre.org/techniques/T1070/, accessed 28 Nov 2026.
- Indicator Removal: Timestomp (T1070.006). MITRE ATT&CK, MITRE. https://attack.mitre.org/techniques/T1070/006/, accessed 28 Nov 2026.
- Event 1102(S): The audit log was cleared. Microsoft Learn, Microsoft. https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-1102, accessed 28 Nov 2026.
- 10 Steps to Cyber Security: Logging and monitoring. National Cyber Security Centre (UK). https://www.ncsc.gov.uk/collection/10-steps/logging-and-monitoring, accessed 28 Nov 2026.
- Guidelines for Media Sanitization (SP 800-88 Rev. 2). NIST, September 2025. https://csrc.nist.gov/pubs/sp/800/88/r2/final, accessed 28 Nov 2026.
- Guide to Integrating Forensic Techniques into Incident Response (SP 800-86). NIST, August 2006. https://csrc.nist.gov/pubs/sp/800/86/final, accessed 28 Nov 2026.