Replies: 1 comment 2 replies
|
核验确认(当前 main HEAD 1. 标志更正:代码里没有 SANDBOX_INERT,是 LUA_TOKEN
abi.DISABLE_MAX_PRIVILEGE | abi.LUA_TOKEN | abi.WRITE_RESTRICTED
2. README 矛盾确认
3. 机制探针建议(补上最后一块证据) 你的证据链已经排除证书库本身(My/Root 都能打开),失败精确落在 credential acquisition。还差一步就能完全定位"AcquireCredentialsHandle 到底被哪个受保护对象拒绝":
这一步做完,"受限令牌缺哪个权限/对象访问"就从推测变成事实,修复(要么放宽那个对象、要么文档化)才有依据。如果你的环境方便,跑完把结果贴上来,我可以继续跟。 4. 修复/缓解选项(按成本排序)
5. 回归测试建议 windows-acl 套件已有原生 runner 测试,可以加一条:受限子进程内跑 |
Uh oh!
There was an error while loading. Please reload this page.
结论(中文)
Windows 沙箱在 workspace-write / read-only 模式下用受限令牌
(CreateRestrictedToken,DISABLE_MAX_PRIVILEGE | SANDBOX_INERT | WRITE_RESTRICTED)
启动子进程,导致 schannel 系工具(curl / PowerShell / .NET)的 HTTPS 全部报
SEC_E_NO_CREDENTIALS;OpenSSL 系(Node / Python)不受影响。
已用 danger-full-access 对照实验证明受限令牌是根因。
README 称"网络不受限"与此矛盾,建议文档化或修复。
Environment
Summary
In confined modes, any schannel-based HTTPS request from inside the sandbox
fails with SEC_E_NO_CREDENTIALS (0x8009030e). The README states "reads,
network, and process visibility are not [restricted]" — but schannel credential
acquisition actually breaks under the restricted token. OpenSSL-based tools
(Node/Python) are unaffected.
Steps to reproduce
In a workspace-write session:
curl.exe -s -m 10 https://www.baidu.com→ exit 35; verbose shows
AcquireCredentialsHandle failed: SEC_E_NO_CREDENTIALSInvoke-WebRequest -Uri https://www.baidu.com -UseBasicParsing→ "The underlying connection was closed"
node -e "fetch('https://www.baidu.com').then(r=>console.log(r.status))"→ 200
Root cause analysis (evidence chain)
CreateRestrictedTokenwith flagsDISABLE_MAX_PRIVILEGE | SANDBOX_INERT | WRITE_RESTRICTED(0x0D).whoami /allunder the restricted token: onlySeChangeNotifyPrivilegeremains;
BUILTIN\Administratorsis deny-only; Medium integrity level.X509Store("My","CurrentUser")opens (1 cert) and
X509Store("Root","LocalMachine")opens (54 certs).SslStream.AuthenticateAsClientthrows "No credentials are available in the security package".Invoke-WebRequest https://www.baidu.comsucceeds (HTTP 200) under
danger-full-access(unconfined token).→ the restricted token is the necessary & sufficient cause.
and never calls schannel.
Expected vs actual
child can "open sockets".
Impact
danger-full-accessmode.All reactions