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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2012-2982 PoC — Webmin ‘file/show.cgi’任意命令执行漏洞

Source
Associated Vulnerability
Title:Webmin ‘file/show.cgi’任意命令执行漏洞 (CVE-2012-2982)
Description:Webmin是澳大利亚软件开发者Jamie Cameron和Webmin社区共同开发的一套基于Web的用于类Unix操作系统中的系统管理工具。 Webmin 1.590版本和较早版本中的file/show.cgi中存在漏洞。远程认证用户可利用该漏洞通过路径名中的无效字符如‘|’(竖线)字符,执行任意命令。
Description
An exploit for CVE-2012-2982 implemented in Rust
Readme
**This PoC exploit for CVE-2012-2982 was written as an exercise for the "Intro to PoC scripting" Room on TryHackMe**. <br>

The room can be found here: https://tryhackme.com/room/intropocscripting <br>

I was originally going to use Python to follow along, but decided to practice my Rust skills instead.<br>

I also saw that nearly every single non-Metasploit implementation on Github was in Python, 
so I figured that bringing something new to the table might be fun.

---

### Usage

**Note:** The program spawns a Netcat listener by default.
If Netcat isn't in your path, or you want to run your own listener, run the program with the `-d` flag.

**From Source (Rust and Cargo required):**<br>
```bash
# To get detailed info about arguments:
cargo run -- --help

# General command structure:
cargo run -- <rhost> <lhost> <username> <password> [options]
```
<br>

**From Binary:**<br>
```bash
# To get detailed info about arguments:
./cve-2012-2982 --help

# General command structure:
./cve-2012-2982 <rhost> <lhost> <username> <password> [options]
```
<br>

**Program defaults:**<br>
1. rport=10000 (Webmin's default)<br>
2. lport=1337<br>
3. payload = generic bash tcp reverse shell<br>

---
File Snapshot

[4.0K] /data/pocs/04dd626bfb048b1fffb6c85ed92b95c4f17a7b33 ├── [ 31K] Cargo.lock ├── [ 431] Cargo.toml ├── [1.0K] LICENSE ├── [1.2K] README.md └── [4.0K] src ├── [ 938] args.rs ├── [8.8K] exploit.rs ├── [1.1K] lib.rs └── [1.8K] main.rs 1 directory, 8 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.