Hunting For Defense Evasion Via Timestomping
Overview
Cybersecurity skill for hunting for defense evasion via timestomping. Follows industry best practices and security standards.
When to Use
Trigger phrases:
"hunting for defense evasion via timestomping"
"Detect NTFS timestamp manipulation (MITRE T1070"
Investigating suspected anti-forensic activity where an adversary may have altered file timestamps to blend malware into legitimate directories
Threat hunting for defense evasion (MITRE ATT&CK T1070.006) across compromised Windows systems
Validating timeline integrity during forensic examinations of disk images or live acquisitions
Triaging suspicious files that appear to have creation dates older than the OS installation or inconsistent with known deployment timelines
Detecting tools like Timestomp (Metasploit), NTimeStomp, SetMACE, or PowerShell Set-ItemProperty used to alter timestamps
Building automated detection pipelines that flag temporal anomalies in MFT data for SOC analysts
Do not use as the sole detection method; advanced adversaries can manipulate both $STANDARD_INFORMATION and $FILE_NAME timestamps (though the latter requires raw disk access and is much harder). Combine with USN Journal, $LogFile, and ShimCache/Amcache analysis for corroboration.
When NOT to Use
- When you lack proper authorization for testing
- For production systems without change management
- When the task requires legal or compliance expertise beyond technical scope
Prerequisites
- Raw $MFT file extracted from a Windows system (via FTK Imager, KAPE, or live extraction)
MFTECmd (Eric Zimmerman tool) or analyzeMFT for MFT parsing
- Python 3.8+ with
pandas for analysis
- Optional:
mft Python library (pip install mft) for programmatic MFT parsing
- Optional: KAPE (Kroll Artifact Parser and Extractor) for automated artifact collection
- Timeline Explorer or Excel for visual analysis of parsed MFT output
Workflow
# Example: IOC detection
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def extract_iocs(text: str) -> dict:
return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}
- Define Detection Scope — Identify the specific techniques or indicators to hunt. Map to MITRE ATT&CK tactics/techniques where applicable.
- Collect Baseline Data — Gather historical logs and establish normal behavior patterns for .
- Build Detection Queries — Write defense evasion via timestomping queries targeting indicators. Use platform-specific query language for optimal performance.
- Execute Hunts — Run queries against the collected data, starting with broad filters and narrowing down.
- Triage Results — Investigate alerts, filter false positives, and validate findings against known-good behavior.
- Document Findings — Record confirmed detections, IOCs, and affected systems. Update detection rules based on findings.
Tools
- defense evasion via timestomping — Primary tool for this skill
- SIEM Platform — Central log aggregation and query execution
- Sigma Rules — Vendor-agnostic detection rule format
- MITRE ATT&CK Navigator — Technique mapping and coverage analysis
Process
- Reconnaissance — Gather target information, identify attack surface, enumerate services
- Analysis/Exploitation — Execute the technique, analyze results, document findings
- Reporting — Document IOCs, write findings, provide remediation recommendations
Verification
Anti-Rationalization Table
| Rationalization |
Reality |
| "We are too small to be targeted" |
Automated attacks target everyone. Size does not matter. |
| "Security slows us down" |
A breach slows you down 100x more. Build security in from the start. |
| "We will fix it after launch" |
Vulnerabilities in production are exploited within hours. Fix before deploy. |
1---2name: hunting-for-defense-evasion-via-timestomping3description: Use when detect NTFS timestamp manipulation (MITRE T1070.006) by comparing $STANDARD_INFORMATION vs $FILE_NAME timestamps in the MFT. Uses analyzeMFT and Python to identify files with anomalous temporal patterns indicating anti-forensic timestomping activity. . Use when working with hunting for defense evasion via timestomping.4license: Apache-2.05---67# Hunting For Defense Evasion Via Timestomping89## Overview1011Cybersecurity skill for hunting for defense evasion via timestomping. Follows industry best practices and security standards.1213## When to Use14**Trigger phrases:**15- "hunting for defense evasion via timestomping"16- "Detect NTFS timestamp manipulation (MITRE T1070"171819- Investigating suspected anti-forensic activity where an adversary may have altered file timestamps to blend malware into legitimate directories20- Threat hunting for defense evasion (MITRE ATT&CK T1070.006) across compromised Windows systems21- Validating timeline integrity during forensic examinations of disk images or live acquisitions22- Triaging suspicious files that appear to have creation dates older than the OS installation or inconsistent with known deployment timelines23- Detecting tools like Timestomp (Metasploit), NTimeStomp, SetMACE, or PowerShell Set-ItemProperty used to alter timestamps24- Building automated detection pipelines that flag temporal anomalies in MFT data for SOC analysts2526**Do not use** as the sole detection method; advanced adversaries can manipulate both $STANDARD_INFORMATION and $FILE_NAME timestamps (though the latter requires raw disk access and is much harder). Combine with USN Journal, $LogFile, and ShimCache/Amcache analysis for corroboration.272829## When NOT to Use3031- When you lack proper authorization for testing32- For production systems without change management33- When the task requires legal or compliance expertise beyond technical scope343536## Prerequisites3738- Raw $MFT file extracted from a Windows system (via FTK Imager, KAPE, or live extraction)39- `MFTECmd` (Eric Zimmerman tool) or `analyzeMFT` for MFT parsing40- Python 3.8+ with `pandas` for analysis41- Optional: `mft` Python library (`pip install mft`) for programmatic MFT parsing42- Optional: KAPE (Kroll Artifact Parser and Extractor) for automated artifact collection43- Timeline Explorer or Excel for visual analysis of parsed MFT output4445## Workflow4647```python48# Example: IOC detection49import re5051IOC_PATTERNS = {52 "ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",53 "domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",54 "hash_md5": r"\b[a-f0-9]{32}\b",55 "hash_sha256": r"\b[a-f0-9]{64}\b",56}5758def extract_iocs(text: str) -> dict:59 return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}60```61621. **Define Detection Scope** — Identify the specific techniques or indicators to hunt. Map to MITRE ATT&CK tactics/techniques where applicable.632. **Collect Baseline Data** — Gather historical logs and establish normal behavior patterns for .643. **Build Detection Queries** — Write defense evasion via timestomping queries targeting indicators. Use platform-specific query language for optimal performance.654. **Execute Hunts** — Run queries against the collected data, starting with broad filters and narrowing down.665. **Triage Results** — Investigate alerts, filter false positives, and validate findings against known-good behavior.676. **Document Findings** — Record confirmed detections, IOCs, and affected systems. Update detection rules based on findings.6869## Tools7071- **defense evasion via timestomping** — Primary tool for this skill72- **SIEM Platform** — Central log aggregation and query execution73- **Sigma Rules** — Vendor-agnostic detection rule format74- **MITRE ATT&CK Navigator** — Technique mapping and coverage analysis757677## Process78791. **Reconnaissance** — Gather target information, identify attack surface, enumerate services801. **Analysis/Exploitation** — Execute the technique, analyze results, document findings811. **Reporting** — Document IOCs, write findings, provide remediation recommendations8283## Verification8485- [ ] All procedures executed completely and documented86- [ ] Findings validated against multiple data sources87- [ ] False positives identified and filtered88- [ ] Results documented with evidence and timestamps89- [ ] Recommendations provided with risk-based prioritization9091## Anti-Rationalization Table9293| Rationalization | Reality |94|---|---|95| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |96| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |97| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |