Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
SharPersist — C# 工具包,用于通过注册表项、计划任务、服务、启动文件夹、KeePass 配置和 TortoiseSVN 钩子建立和管理 Windows 持久化。 | Kitploit
工具/GitHubGitHub/mandiant/sharpersist
持久化机制后渗透利用渗透测试红队Archived
GitHubmandiant/sharpersist

SharPersist

C# 工具包,用于通过注册表项、计划任务、服务、启动文件夹、KeePass 配置和 TortoiseSVN 钩子建立和管理 Windows 持久化。

查看仓库
1.5k258373年前Kitploit 审核通过
分享

SharPersist

Windows 持久化工具包,使用 C# 编写。有关每种技术的详细用法,请参阅 Wiki。

作者 - Brett Hawkins (@h4wkst3r)

发布

  • SharPersist 的公开版本 1.0.1 可在 Releases 部分中找到

安装/构建

预编译

  • 使用 Releases 部分中的预编译二进制文件

自行构建

按照以下步骤设置 Visual Studio,即可自行编译该项目。这需要一些可通过 NuGet 包管理器安装的 .NET 库。

使用的库

此项目使用了以下第三方库。

库URL许可证
TaskSchedulerhttps://github.com/dahall/TaskSchedulerMIT License
Fodyhttps://github.com/Fody/FodyMIT License

构建步骤

  • 打开 Visual Studio 项目,然后转到 "工具" --> "NuGet 包管理器" --> "包管理器设置"
  • 转到 "NuGet 包管理器" --> "包源"
  • 添加一个包源,URL 为 "https://api.nuget.org/v3/index.json"
  • 安装 Costura.Fody NuGet 包。需要使用较旧版本的 Costura.Fody(3.3.3),这样你就不需要 Visual Studio 2019。
    • Install-Package Costura.Fody -Version 3.3.3
  • 安装 TaskScheduler 包
    • Install-Package TaskScheduler -Version 2.8.11
  • 现在你可以自行构建该项目了!

参数/选项

  • -t - 持久化技术
  • -c - 要执行的命令
  • -a - 要执行命令的参数(如果适用)
  • -f - 要创建/修改的文件
  • -k - 要创建/修改的注册表项
  • -v - 要创建/修改的注册表值
  • -n - 计划任务名称或服务名称
  • -m - 方法(add、remove、check、list)
  • -o - 可选的附加功能
  • -h - 帮助页面

持久化技术(-t)

  • keepass - KeePass 配置文件后门
  • reg - 注册表项添加/修改
  • schtaskbackdoor - 通过添加额外操作向计划任务植入后门
  • startupfolder - 启动文件夹中的 lnk 文件
  • tortoisesvn - TortoiseSVN 钩子脚本
  • service - 创建新的 Windows 服务
  • schtask - 创建新的计划任务

方法(-m)

  • add - 添加持久化技术
  • remove - 移除持久化技术
  • check - 对持久化技术执行试运行(dry-run)
  • list - 列出持久化技术的当前条目

可选附加功能(-o)

  • env - 用于注册表环境变量混淆的可选附加功能
  • hourly - 用于计划任务频率的可选附加功能(每小时)
  • daily - 用于计划任务频率的可选附加功能(每天)
  • logon - 用于计划任务频率的可选附加功能(登录时)

注册表项(-k)

  • hklmrun
  • hklmrunonce
  • hklmrunonceex
  • hkcurun
  • hkcurunonce
  • logonscript
  • stickynotes
  • userinit

示例

添加持久化触发器(Add)

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 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

移除持久化触发器(Remove)

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

对持久化触发器执行试运行(Check)

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

列出持久化触发器条目(List)

注册表

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

下载工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    708
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    500
  • 3

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    398
  • 4

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    341
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    259
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    257

探索所有工具

浏览我们的工具集合

查看所有工具 →