Logo Anti Forensics

Anti Forensics

Cộng đồng
brucesongs
anti-forensics

Anti-forensics is the offensive counterpart to digital forensics.

Add to TypingMind

Tổng quan

Nhà phát hànhbrucesongs
Kho mãkali-claw
Tên kỹ nănganti-forensics
Sao
70
Bản fork
18
Tệp đi kèm
12
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 12 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được brucesongs công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Anti Forensics trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/brucesongs/kali-claw/tree/main/skills/anti-forensics
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/brucesongs/kali-claw.git /tmp/kali-claw
mkdir -p .claude/skills
cp -r /tmp/kali-claw/skills/anti-forensics .claude/skills/anti-forensics
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Anti Forensics trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Anti Forensics ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Anti Forensics với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Anti-Forensics

Supplementary Files:

  • payloads.md — Command reference covering secure file deletion, disk/volume encryption, log cleaning, timestamp manipulation, steganographic hiding, and anti-forensic countermeasure testing
  • test-cases.md — Structured test case list covering secure deletion verification, encrypted volume creation, log cleaning, timestamp manipulation, steganographic hiding, and bulk_extractor detection testing
  • guides/filesystem-anti-forensics.md — Deep dive into secure deletion, slack space wiping, MFT/inode manipulation, and forensic artifact cleanup
  • guides/log-tamper-timestamp.md — Deep dive into log tampering, timestamp manipulation, event log injection, and defeating timeline analysis
  • guides/crypto-hide-data-destruction.md — Deep dive into encrypted volumes, steganographic hiding, deniable encryption, and bulk_extractor effectiveness testing

Summary

Anti Forensics skill domain covering forensics operations.

Tools: shred, wipe, tcplay, logtamper, timestomp, bulk_extractor, steghide, Real-Time Logging (+6 more)

Domain: forensics

MITRE ATT&CK: TA0005-Defense Evasion

Description

Anti-forensics is the offensive counterpart to digital forensics. While the digital-forensics skill focuses on evidence collection and analysis, this skill covers the techniques attackers use to prevent evidence collection, corrupt evidence, or hide data from forensic examination. Understanding these techniques is essential for penetration testers who must simulate realistic attack scenarios and for defenders who need to know what anti-forensic artifacts to look for.

The agent has mastered secure file deletion with shred and wipe, encrypted volume management with tcplay (TrueCrypt/VeraCrypt compatible), log manipulation with logtamper, timestamp forging with timestomp, forensic artifact extraction with bulk_extractor (used defensively to test anti-forensic effectiveness), and steganographic data hiding with steghide.

Use Cases

  1. Post-Exploitation Cleanup - After completing a penetration test, securely remove dropped tools, modified configurations, and log entries to simulate how a real attacker would cover their tracks
  2. Data Exfiltration Channel Testing - Use steganographic hiding and encrypted volumes to test whether the target organization's data loss prevention (DLP) and forensic capabilities can detect hidden data channels
  3. Forensic Readiness Assessment - Test the effectiveness of an organization's forensic tools and procedures by attempting anti-forensic techniques against a controlled environment, then verifying what artifacts remain detectable
  4. Red Team Evasion Validation - Validate that red team operations can achieve realistic anti-forensic objectives, ensuring blue team detection rules are tested against the latest evasion techniques
  5. Incident Response Training - Create realistic scenarios where defenders must detect anti-forensic activity including timestamp manipulation, log cleaning, and steganographic data exfiltration

Core Tools

ToolPurposeCommand Example
shredSecure file overwrite and deletionshred -vfz -n 5 secret.txt
wipeSecure directory and file wipingwipe -rfci /tmp/sensitive/
tcplayTrueCrypt/VeraCrypt compatible encrypted volumestcplay -c -d /dev/loop0
logtamperUnix log file entry manipulationlogtamper -f /var/log/auth.log -r "192.168.1.100"
timestompNTFS MACE timestamp modification (Metasploit)timestomp secret.txt -m "01/01/2024 00:00:00"
bulk_extractorForensic feature extraction (anti-forensic testing)bulk_extractor -o /output disk_image.dd
steghideSteganographic data embedding in media filessteghide embed -cf photo.jpg -ef secret.txt

Methodology

Attack Chain

Pre-Operation               Active Operations              Post-Operation
(Encrypted Volume           (Log Manipulation,             (Secure Deletion,
 Setup, Stego Prep)         Timestamp Forging)              Stego Extraction)
       |                          |                              |
       v                          v                              v
                                  Verification
                                  (bulk_extractor scan
                                   to confirm no artifacts
                                   remain detectable)

Phase Details:

  1. Pre-Operation - Create encrypted containers with tcplay for storing tools and exfiltrated data. Prepare steganographic carrier files. Establish a clean baseline of the target system's log state and timestamps for later restoration.
  2. Active Operations - During the engagement, manipulate logs in real-time using logtamper to remove evidence of access. Forge file timestamps with timestomp to blend malicious files with legitimate ones. Use steganographic channels to exfiltrate data without triggering DLP alerts.
  3. Post-Operation Cleanup - Securely delete all dropped tools, temporary files, and artifacts using shred and wipe. Restore log files to their pre-engagement state. Verify timestamps are consistent. Remove any traces of encrypted volume mounts.
  4. Verification - Use bulk_extractor against the target disk image to confirm no recoverable artifacts remain. Test whether forensic timeline analysis can detect the engagement activities. Validate that steganographic carriers pass visual and statistical analysis.

Practical Steps

Step 1: Secure Data Destruction

Use shred to overwrite file contents with multiple passes of random data before deletion, making recovery impossible with standard forensic tools. Use wipe for recursive directory cleaning. Understand which filesystems and storage technologies (SSDs with wear leveling, copy-on-write filesystems like ZFS/Btrfs) reduce the effectiveness of these tools.

Step 2: Encrypted Volume Management

Create and manage encrypted volumes with tcplay (TrueCrypt/VeraCrypt compatible) for plausible deniability and secure storage. Understand hidden volume creation, keyfile-based authentication, and how encrypted containers appear in forensic analysis.

Step 3: Log Manipulation and Timestamp Forging

Use logtamper to selectively remove or modify log entries, and timestomp to forge file MAC timestamps. Understand the forensic artifacts these techniques leave behind (journal entries, NTFS $STANDARD_INFORMATION vs $FILE_NAME discrepancies, log sequence gaps).

Step 4: Steganographic Data Hiding

Embed data within image and audio files using steghide to create covert exfiltration channels. Understand capacity limits, statistical detection methods, and how to choose carrier files that minimize detectability.

Step 5: Anti-Forensic Effectiveness Testing

Use bulk_extractor and other forensic tools against the target environment to verify anti-forensic measures are effective. If bulk_extractor can still recover artifacts, iterate on cleanup techniques until the desired level of forensic resistance is achieved.

Detailed payloads in payloads.md, complete test checklist in test-cases.md.

Defense Perspective

Best PracticeDescriptionPriority
Real-Time LoggingForward logs to a remote, append-only syslog server that attackers cannot tamper with locallyCRITICAL
File Integrity MonitoringDeploy FIM tools (AIDE, OSSEC, Wazuh) that detect file modifications and timestamp changes in real-timeCRITICAL
Endpoint Detection and ResponseEDR agents capture process creation events before anti-forensics tools can modify or delete evidenceCRITICAL
NTFS Dual Timestamp ComparisonCompare $STANDARD_INFORMATION and $FILE_NAME attributes; timestomp only modifies the former, creating a detectable discrepancyHIGH
Secure Deletion DetectionMonitor for shred/wipe process execution and high-entropy file writes that indicate secure deletion activityHIGH
Steganography DetectionDeploy stegdetect and statistical analysis tools to identify carrier files with abnormal entropy patternsMEDIUM
Encrypted Volume DetectionMonitor for tcplay/VeraCrypt/LUKS device mapping events and loop device creationMEDIUM

Common Pitfalls

  • Ignoring SSD wear leveling and CoW filesystems: shred and wipe are designed for magnetic media. On SSDs with wear leveling, Btrfs, or ZFS, overwritten data may persist in flash pages or filesystem snapshots. Always verify the underlying storage technology before relying on secure deletion tools.
  • Forgetting about swap, hibernation, and temp files: Even after securely deleting the primary file, sensitive data may persist in swap partitions, hibernation files (hiberfil.sys), temporary directories, or application caches. A comprehensive cleanup must address all potential data leakage points.
  • Modifying timestamps without understanding forensic detection: Timestomp only modifies the $STANDARD_INFORMATION timestamp on NTFS, leaving the $FILE_NAME timestamp unchanged. Forensic examiners routinely compare both attributes, making naive timestamp manipulation immediately detectable. Logtamper creates sequence gaps that automated timeline tools flag as anomalies.

Automation and Scripting

Automate post-operation cleanup with scripts that chain secure deletion, log restoration, and timestamp normalization. Build a cleanup pipeline that: (1) identifies all files created during the engagement by timestamp range, (2) shreds each file with appropriate passes, (3) removes log entries matching engagement IP addresses and usernames, (4) restores file timestamps using the pre-operation baseline, and (5) runs bulk_extractor against a disk image snapshot to verify no recoverable artifacts remain. Use tcplay in scripted mode to create and mount encrypted volumes without interactive prompts, enabling automated secure storage during engagements.

Legal and Ethical Considerations

Anti-forensic techniques must only be used within authorized penetration testing engagements with explicit written permission. Destroying evidence on systems you do not own or without authorization is a criminal offense in most jurisdictions (e.g., 18 U.S.C. 1519 in the United States, Computer Misuse Act Section 3 in the UK). Even within authorized engagements, document all anti-forensic actions thoroughly so the client understands what was cleaned and what forensic artifacts may remain for their incident response team.

Integration with Other Tools

Anti-forensics connects directly to the digital-forensics skill domain. Every anti-forensic technique has a corresponding forensic detection method, and understanding both sides makes each more effective. The steganography skill provides additional steganographic tools beyond steghide (zsteg, stegcracker, stegseek). Post-exploitation techniques often require anti-forensic cleanup to maintain persistence without detection. Binary reverse engineering helps analyze anti-forensic tools themselves to understand exactly what artifacts they leave behind.

Detection Methods

Anti-forensic activity leaves distinctive traces that forensic examiners and EDR/XDR platforms detect through timeline analysis, entropy scanning, and behavioral anomalies.

Filesystem-Level Indicators

  • Secure deletion signatures: shred, wipe, srm, bcwipe process execution; high-entropy writes followed by file truncation.
  • Timestamp manipulation: NTFS $STANDARD_INFORMATION vs $FILE_NAME mismatch (timestomp signature); MAC times that don't fit timeline baseline.
  • Encrypted volume creation: tcplay, VeraCrypt, LUKS device mapper events; loop device creation; partition table changes; sudden high-entropy partition.
  • Hidden partition indicators: GPT entries with mismatched partition sizes; hidden sectors between visible partitions.
  • Alternate Data Streams (ADS): NTFS file size anomalies; zone identifier misuse.

Log Tampering Indicators

  • Missing log sequence: Windows Event Log gaps (sequence number jumps); missing syslog entries between specific timestamps.
  • Suspicious log clearing: Event ID 1102 (Audit log cleared); /var/log/auth.log truncation; inotifywatch events on /var/log/.
  • Log injection artifacts: Unusual awk/sed invocations on log files; rootkits with prctl syscalls hiding processes.
  • Time skew: System clock changes (Event ID 4616); NTP sync anomalies following user-mode time writes.

Memory Forensics Indicators

  • Process hollowing signatures: Volatility malfind output with PAGE_EXECUTE_READWRITE permissions; hollowed process with mismatched PEB.
  • DKOM (Direct Kernel Object Manipulation): Hidden processes (psxview mismatch); unlinking from EPROCESS ActiveProcessLinks.
  • Rootkit hooks: SSDT hooks; IRP hooks; inline function hooks in ntdll.dll/libc.so.
  • Shellcode in memory: MEM_PRIVATE | MEM_EXECUTE regions; RWX pages outside loaded modules.

SIEM Detection Rules

  • Splunk SPL: index=linux sourcetype=auditd type=EXECVE | search a0 IN ("shred","wipe","srm","tcplay")
  • Sysmon Event ID 1: Process creation; alert on shred.exe, sdelete.exe, ccleaner.exe, bcdwipe.exe.
  • Sysmon Event ID 4656/4663: File permission changes followed by deletion.
  • Sigma rule: sigma/rules/windows/audit_log_cleared.yml (Event ID 1102).
  • YARA: Memory scanning for known timestomp / logtamper signatures.

Defense Evasion Techniques

Sophisticated Timestamp Manipulation

  • Both $STANDARD_INFO and $FILE_NAME: Update both NTFS timestamps to defeat timeline analysis (use setMACE over timestomp).
  • Nanosecond precision matching: Match legitimate file nanosecond jitter to avoid statistical detection.
  • USN Journal cleaning: Use fsutil usn deletejournal to remove update sequence number journal before timestomping.
  • $LogFile overwrite: Overwrite NTFS transaction log to remove rollback records.
  • MFT entry slack: Hide data in MFT slack space (up to 1024 bytes per entry).

Log Cleaning Beyond Simple Clearing

  • Selective log entry removal: Use logtamper to remove specific entries matching engagement IP/user without clearing the entire log.
  • Journal spam before deletion: Fill systemd-journald with synthetic events to push real entries past retention limit.
  • Auditd configuration reload: auditctl -D to delete rules temporarily; restore after operations.
  • Forwarded log poisoning: Modify syslog forwarding rules to drop specific entries before they reach SIEM.
  • NTFS USN journal sparse: Sparse-allocate USN journal to make entries appear unreferenced.

Hidden Storage

  • NTFS ADS persistence: Hide payloads in :Zone.Identifier or custom ADS; rarely inspected by AV.
  • Volume boot record slack: Hide data in volume boot record slack space (fixed-size, ~32 KB).
  • Hibernation file weaponization: Use hiberfil.sys for both hiding and persistence.
  • Pagefile persistence: Hide payload in pagefile.sys; survives reboots.
  • Steganography in unused drivers: Embed payload in .sys file slack space.
  • MFT slack space: Hide up to 1024 bytes per file entry in MFT.

Memory-Resident Evasion

  • Reflective DLL injection: Load DLL from memory without file on disk.
  • Process doppelgänging: Use Transactional NTFS to load process from rolled-back file.
  • Process hollowing + dual token: Hollow legitimate process AND inherit its token; combines identity theft with stealth.
  • Hook NtQuerySystemInformation: Hide processes from ps, Task Manager, Get-Process.
  • DKOM on handle table: Remove process handle from CSRSS; fully invisible to userland tools.

Anti-Memory Forensics

  • Null out VAD tree: Manipulate Virtual Address Descriptors to hide memory regions from Volatility.
  • Unlink EPROCESS: Disconnect process from active list; survives live response but caught by dead-box forensics.
  • PteUAF: Use-after-free in page table entries to hide executable pages.
  • Bypass Kernel Mode checks: Use vulnerable signed drivers (RTCore64.sys) to disable PatchGuard temporarily.

Learning Resources

This skill's supplementary files: payloads.md, test-cases.md, guides/filesystem-anti-forensics.md, guides/log-tamper-timestamp.md, guides/crypto-hide-data-destruction.md

Related skills:

  • skills/digital-forensics/SKILL.md - The defensive counterpart covering forensic analysis that detects anti-forensic techniques
  • skills/steganography/SKILL.md - Additional steganographic tools and detection methods
  • skills/post-exploitation/SKILL.md - Persistence mechanisms that must be cleaned up using anti-forensic techniques

External resources:

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Anti Forensics làm được gì?

Anti-forensics is the offensive counterpart to digital forensics.

Vì sao nên dùng Anti Forensics trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Anti Forensics là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Anti Forensics trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/brucesongs/kali-claw/tree/main/skills/anti-forensics. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Anti Forensics?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Anti Forensics với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Anti Forensics với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Anti Forensics có miễn phí không?

Có. Kỹ năng này được brucesongs phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇