hunting-for-defense-evasion-via-timestomping
Skill này làm gì
Công cụ này so sánh ngày tạo và ngày sửa đổi của tệp trên máy tính Windows. Nó tìm các điểm không nhất quán có thể cho thấy ai đó đã sửa ngày giờ để che giấu hoạt động độc hại.
Khi nào nên dùng
- ✓Khi bạn nghi ngờ ai đó đã sửa ngày của tệp để giấu chương trình độc hại.
- ✓Khi bạn điều tra xem hệ thống Windows có bị xâm nhập và có cố tình che giấu hoạt động hay không.
- ✓Khi bạn kiểm tra ngày của tệp có hợp lý không, ví dụ một tệp cũ hơn chính hệ điều hành.
Liên kết skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-defense-evasion-via-timestomping/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy kiểm tra xem có ai thay đổi dấu thời gian của tệp trên máy tính của tôi không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ phân tích siêu dữ liệu của hệ thống tệp NTFS, so sánh hai nguồn ngày giờ: một nguồn dễ bị sửa ($STANDARD_INFORMATION) và một nguồn khó sửa hơn ($FILE_NAME). Nếu ngày ở nguồn dễ sửa cũ hơn mức hợp lý, đó là dấu hiệu cảnh báo.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Hunting for Defense Evasion via Timestomping
Detect timestamp manipulation by analyzing NTFS MFT entries for discrepancies between $STANDARD_INFORMATION and $FILE_NAME attributes.
When to Use
- 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.
Prerequisites
- Raw $MFT file extracted from a Windows system (via FTK Imager, KAPE, or live extraction)
MFTECmd(Eric Zimmerman tool) oranalyzeMFTfor MFT parsing- Python 3.8+ with
pandasfor analysis - Optional:
mftPython 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
Step 1: Extract the $MFT from a Live System or Disk Image
# Method 1: Using KAPE to collect MFT and related artifacts
.\kape.exe --tsource C: --tdest D:\Evidence\MFT_Collection --target !SANS_Triage
# Method 2: Using FTK Imager CLI to extract $MFT
ftkimager.exe \\.\C: D:\Evidence\mft_raw.bin --e01 --include $MFT
# Method 3: Raw copy using RawCopy (handles locked NTFS system files)
RawCopy.exe /FileNamePath:C:0 /OutputPath:D:\Evidence\ /OutputName:$MFT
# Method 4: On a mounted forensic image in Linux
sudo mount -o ro,norecovery /dev/sdb1 /mnt/evidence
sudo icat -o 2048 /dev/sdb 0 > /mnt/output/$MFT
# Method 5: Using sleuthkit to extract MFT from disk image
icat -o 2048 evidence.E01 0 > extracted_MFT
Step 2: Parse the MFT with MFTECmd
Use Eric Zimmerman's MFTECmd to produce a CSV with both $STANDARD_INFORMATION and $FILE_NAME timestamps:
# Parse MFT to CSV with all timestamp columns
MFTECmd.exe -f "D:\Evidence\$MFT" --csv D:\Evidence\Parsed\ --csvf mft_parsed.csv
# The output CSV contains these critical columns:
# Created0x10 - $STANDARD_INFORMATION Created timestamp
# LastModified0x10 - $STANDARD_INFORMATION Modified timestamp
# LastAccess0x10 - $STANDARD_INFORMATION Accessed timestamp
# LastRecordChange0x10 - $STANDARD_INFORMATION Entry Modified timestamp
# Created0x30 - $FILE_NAME Created timestamp
# LastModified0x30 - $FILE_NAME Modified timestamp
# LastAccess0x30 - $FILE_NAME Accessed timestamp
# LastRecordChange0x30 - $FILE_NAME Entry Modified timestamp
Step 3: Detect Timestomping via SI vs FN Comparison
The core detection: $STANDARD_INFORMATION timestamps are easily modified by user-mode tools, but $FILE_NAME timestamps are updated only by the NTFS driver (kernel-mode). When SI timestamps are OLDER than FN timestamps, timestomping is likely:
import pandas as pd
from datetime import datetime, timedelta
def load_mft_data(csv_path):
"""Load MFTECmd parsed CSV output."""
df = pd.read_csv(csv_path, low_memory=False)
# Parse timestamp columns
timestamp_cols = [
"Created0x10", "LastModified0x10", "LastAccess0x10", "LastRecordChange0x10",
"Created0x30", "LastModified0x30", "LastAccess0x30", "LastRecordChange0x30"
]
for col in timestamp_cols:
if col in df.columns:
df[col] = pd.to_datetime(df[col], errors="coerce")
return df
def detect_timestomping(df):
"""Detect timestamp manipulation by comparing SI and FN attributes.
Key indicators:
1. SI Created < FN Created (SI timestamp pushed back in time)
2. SI timestamps have nanoseconds = 0000000 (tool artifact)
3. SI Created < FN Entry Modified (impossible under normal NTFS behavior)
4. Large gap between SI and FN timestamps
"""
…
Câu hỏi thường gặp
Dấu thời gian của tệp là gì?
Đó là thông tin gắn với tệp, ghi lại khi nào tệp được tạo, sửa đổi hoặc truy cập lần cuối.
“Timestomping” là gì?
Đây là kỹ thuật kẻ tấn công dùng để thay đổi dấu thời gian của tệp, làm cho tệp trông hợp pháp hoặc cũ hơn thực tế, nhằm tránh bị phát hiện.
Vì sao phải so sánh $STANDARD_INFORMATION và $FILE_NAME?
$STANDARD_INFORMATION dễ bị các chương trình thông thường sửa đổi, còn $FILE_NAME do chính hệ thống tệp NTFS cập nhật và khó bị thay đổi hơn. Nếu hai nguồn này không khớp nhau, có thể đã có sự can thiệp.
Chi tiết
Mô tả gốc của tác giả
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. '
Độ phổ biến
- Sao GitHub
- 35k
- Vị trí xếp hạng
- #7956
- Giấy phép
- Apache-2.0
- Cập nhật
- 31/8/2026
Bình luận
- …
Thêm skill từ kho mã này
abusing-dpapi-for-credential-access
35kCung cấp cho agent AI của bạn hướng dẫn có sẵn cho một tác vụ cụ thể, giúp nó làm việc tốt hơn và nhanh hơn.
abusing-shadow-credentials-for-privesc
35kDạy agent AI của bạn viết văn bản rõ ràng và có cấu trúc tốt.
achieving-cmmc-level-2-compliance
35kGiúp agent của bạn chuẩn bị môi trường để tuân thủ CMMC Level 2. Triển khai các yêu cầu bảo mật và quản lý tài liệu cần thiết.
acquiring-disk-image-with-dd-and-dcfldd
35kGiúp agent của bạn tạo bản sao chính xác của ổ đĩa. Cách này đảm bảo không mất hay thay đổi thông tin trong quá trình điều tra.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.