Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1310 CNY

100%

CVE-2021-31630 PoC — OpenPLC 代码注入漏洞

Source
Associated Vulnerability
Title:OpenPLC 代码注入漏洞 (CVE-2021-31630)
Description:Command Injection in Open PLC Webserver v3 allows remote attackers to execute arbitrary code via the "Hardware Layer Code Box" component on the "/hardware" page of the application.
Description
proof of Concept (PoC) exploit for CVE-2021-31630, targeting the OpenPLC service running on the WifineticTwo box on the Hack The Box platform.
Readme
## CVE-2021-31630 Exploit
CVE-2021-31630 Exploit PoC for OpenPLC on WifineticTwo box (Hack The Box),
This script serves as a Proof of Concept (PoC) exploit for CVE-2021-31630, targeting the OpenPLC service running on the WifineticTwo box on the Hack The Box platform. 

## Usage

```bash
python exploit.py -ip <IP_ADDRESS_FOR_LISTEN> -p <PORT_FOR_LISTEN> -u <USERNAME> -pwd <PASSWORD>
```
```bash
python ./exploit.py -ip 10.10.16.5 -p 1337 -u openplc -pwd openplc
```

### Arguments

- `-ip`  <IP_ADDRESS>: Specifies the IP address to listen on.
- `-p`   <PORT>: Specifies the port to listen on.
- `-u`   <USERNAME>: Specifies the username for OpenPLC login.
- `-pwd` <PASSWORD>: Specifies the password for OpenPLC login.

## Description

This script exploits the CVE-2021-31630 vulnerability in OpenPLC, allowing remote code execution on the WifineticTwo box. It establishes a connection to the target IP and port, authenticates with the provided username and password, and uploads a malicious payload to execute arbitrary code.

## Author

Created by [z1ntrx](@Hunt3r0x)

## Disclaimer

This script is intended for educational and testing purposes only. Use it responsibly and only on systems you have explicit permission to test.
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →