dsh-purge:DeepSeek Harness 本地网络安全红队插件

前言

DeepSeek Harness(DSH)在转发提示词之外,还会在运行时重写提示词、设置审批门控、调整沙盒策略以及迁移会话。如果只问“模型是否回答”,往往会把主机层的拦截误判为模型的拒绝。dsh-purge 插件将这两层分离,在用户本机已安装的官方 Harness 上进行受控评测和清洗,帮助排查默认策略是否过严。

核心定位

dsh-purge 是 DeepSeek Harness 的网络安全红队工具插件。它专注于本地官方 Harness 的受控评测与清洗,内置演练台。插件支持针对不同模型切换提示词,默认提示词面向国模「小码酱」。该项目由 YuJunZhiXue 维护,采用 MIT 许可证。

主要功能

该插件提供以下核心能力:

  1. dsh-purge dock
    点击会话标题旁的按钮打开右侧 Dock,包含 Clean 和 Drill 两个页面。

  2. 提示词编辑器
    支持针对不同模型切换提示词,通过编辑器调整规则集。

  3. 本地文件处理
    支持读取 $DSH_HOME、.dsh 等路径的本地文件,用于配置和提示词注入。

  4. 内置演练台
    授权后可访问资产、技能和本地环境,用于模拟演练。

  5. Host policy 修改
    提供默认副本、权限策略和工具限制的修改功能,不改变官方能力,不伪造身份。

  6. 自动检查
    启动时自动检查并重新应用配置,防止手动修改文件导致失效。

安装与启用

插件未提供命令行安装脚本,需通过以下渠道获取:

典型用法

使用 dsh-purge 进行注入和配置时,遵循以下步骤:

  1. 在 dsh-purge 的 Clean 页面上点击 Apply。Apply 仅将提示词和补丁写入磁盘,此时进程中的注入尚未生效。
  2. Apply 操作完成后,必须点击 Restart。只有重启 host 后,注入才会进入新的会话。Apply 单独执行时看起来没有任何变化。
  3. 使用提示词编辑器调整规则集,针对特定模型定制安全策略。

适用场景与注意事项

该插件仅限本地官方 Harness,不攻击公共互联网。目标版本为 DSH 0.1.7-rc.2。使用前需检查源码与许可证。

Strict legal and compliance disclaimer

Disclaimer: This is a non-profit open-source project. It follows applicable laws and the rules of the platforms it uses, and is intended only for learning and research. Do not use it for any illegal or non-compliant purpose; the user bears any resulting consequences.

Zero-tolerance statement: This project opposes and forbids any illegal activity. The authors do not support, encourage, or assist unauthorized network attacks, exploit use, data theft, unlawful intrusion into computer information systems, or generation of illegal or prohibited content. Anyone who uses this project for crime is solely responsible under the law. The authors have no liability.

  1. This repository contains no illegal material. The published code, docs, patches, and default prompt are not malware, backdoors, unauthorized pentest kits, ransomware, credential-stuffing scripts, or attack payloads aimed at the public internet or third-party systems.
  2. Local official Harness only. Security-eval patches and prompt injection run only on the official DeepSeek Harness already installed on the user’s machine.
  3. Eval patches do not attack the public internet. Apply, inject, revert, and uninstall stay in local files and local processes. They do not scan, probe, intrude, or send attack traffic to any public host.
  4. Lawful, controlled scope. Testing must stay on the authorized local official Harness, offline local synthetic fixtures, authorized cybersecurity ranges, and compliant lab environments.
  5. Forbidden uses. Users must not use this project to violate applicable laws (Criminal Law, Cybersecurity Law, Data Security Law, etc.) or engage in unauthorized intrusion, sabotage, credential stuffing, or spreading malicious payloads.

结语

dsh-purge 为本地官方 Harness 提供了可视化的红队评测环境,能够分离主机层与模型层的拒绝行为。通过 Clean 和 Drill 页面,开发者可以更精细地控制测试范围和权限策略。项目代码开源在 GitHub,目录页提供文档索引。

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜