Public network authentication for dsh-pocket, specifically its vulnerability to PIN brute-force and the broader security posture of exposing DeepSeek Harness (DSH) to the internet.
Raw Developer Origin & Technical Request
GitHub Issue
Sep 1, 2026
当前 dsh-pocket 的公网认证是「URL+8 位 PIN」单因子模型,且登录限速**只覆盖 POST 登录端点**:`?token=` 与 WebSocket 路径的失败尝试不计数、不锁定,攻击者可以无限速穷举默认 PIN(空间 9×10⁷,约 2~10 天)。而 dsh-pocket 挡在无任何鉴权、可执行任意代码的 DSH 本体前面——被突破的后果是远程代码执行,相当于裸奔。
本 issue 提出重构方案:以固定域名命名隧道为**唯一入口**,用「浏览器设备凭据+每设备独立密码+电脑本机批准」替换 PIN 单因子,移除 LAN / Quick Tunnel / 无认证 CLI 等多余入口。完整实现已在 fork 完成(80 项自动测试+荣耀 50 真实链路验收),先对齐设计,确认后拆成小 PR 分批提交。
## 1. 背景:dsh-pocket 是 DSH 暴露公网时的唯一防线
前几天在知乎看到个讨论,奇安信威胁情报中心披露了 DSH 本体的未授权远程代码执行漏洞(QVD-2026-57410,CVSS 9.8;[知乎讨论](zhihu.com/question/20753723... web 只有防浏览器语境攻击的 Host 头检查,没有真正的身份验证层,端口一旦公网可达即可未授权执行任意命令。社区的高赞结论是「受影响的是把 DSH 暴露到公网的人,暴露前请自备 nginx 反代+鉴权+HTTPS」。
dsh-pocket 恰恰就是「把 DSH 暴露到公网」的插件——它挡在无鉴权的 DSH 前面,是唯一防线;一旦失守,后果是宿主机上的远程代码执行。#13、#40 已经指出了「URL 即钥匙」和弱口令问题,但当前实现仍把安全责任留给使用者的网络防护意识。本提案把这道防线做进插件本身。
## 2. 现状攻击面(基于 main@8fc6bce,v2.10.0)
`#40` 之后实现的三层限速(单 IP 60 秒 5 次失败锁 60 秒;全局 1 分钟 50 次失败锁 30 秒)**对登录端点本身是有效的**,公网判定 fail-closed(#66)也属实。但以下结构性问题仍然存在:
1. **限速可被完全绕开,存在无限穷举通道(最严重)**:`record(ip)` 只在 `POST /pocket-login` 分支调用(`lib/proxy.mjs:525` 附近)。而认证检查 `authCheck` 对所有请求生效,其中 `?token=` 比对失败(`proxy.mjs:322`)**不计数、不锁定**;WebSocket 握手的 token 校验(`proxy.mjs:503-506/698-699`)同样不限速。攻击者可以全速发送 `GET /?token=` 无限穷举。
2. **默认 PIN 可在数天内穷举**:PIN 由 `Math.random()` 生成(非 CSPRNG,`lib/index.js:68-70`),8 位纯数字、无前导零,实际空间 **9×10⁷**。走隧道以 100~500 req/s 枚举,约 2~10 天穷举完毕;有分布式肉鸡更快。
3. **`?token=` 进 URL**:这是正式功能(扫码直达/分享)。PIN 因此进入浏览器历史、聊天转发记录、Cloudflare/服务器访问日志、截图——单因子模型下,PIN 泄露即完全沦陷。
4. **明文存储与非 timing-safe 比...
Developer Debate & Comments
No active discussions extracted for this entry yet.
Adjacent Repository Pain Points
Other highly discussed features and pain points extracted from shaobeichen/dsh-pocket.
Frequently Asked Questions
Market intelligence mapped to Public network authentication for dsh-pocket, specifically its vulnerability to PIN brute-force and the broader security posture of exposing DeepSeek Harness (DSH) to the internet..
What is the technical positioning of Public network authentication for dsh-pocket, specifically its vulnerability to PIN brute-force and the broader security posture of exposing DeepSeek Harness (DSH) to the internet.?
What architecture is tied to Public network authentication for dsh-pocket, specifically its vulnerability to PIN brute-force and the broader security posture of exposing DeepSeek Harness (DSH) to the internet.?
Are developers creating tools for Public network authentication for dsh-pocket, specifically its vulnerability to PIN brute-force and the broader security posture of exposing DeepSeek Harness (DSH) to the internet.?
Engagement Signals
Cross-Market Term Frequency
Quantifies the cross-market adoption of foundational terms like 远程代码执行 and fail-closed by tracking occurrence frequency across active SaaS architectures and enterprise developer debates.
SaaS Metrics