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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2018-1000802 PoC — Python 命令注入漏洞

Source
Associated Vulnerability
Title:Python 命令注入漏洞 (CVE-2018-1000802)
Description:Python Software Foundation Python (CPython) version 2.7 contains a CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') vulnerability in shutil module (make_archive function) that can result in Denial of service, Information gain via injection of arbitrary files on the system or entire drive. This attack appear to be exploitable via Passage of unfiltered user input to the function. This vulnerability appears to have been fixed in after commit add531a1e55b0a739b0f42582f1c9747e5649ace.
Description
Python CVE-2018-1000802 Proof-of-Concept
Readme
# Python CVE-2018-1000802 Proof-of-Concept

This is a PoC for the vulnerability in `make_archive` function exported by `shutil` builtin module.

Vulnerability is present in CPython (Python) 2.7 prior to commit add531a1e55b0a739b0f42582f1c9747e5649ace.

For the vulnerability to be exploitable in the wild there are several conditions:
1.	Code must run on Windows machine;
2.	There must be a zip utility accessible via command line e.g. Zip for Windows;
3.	Import zipfile must fail.

Please see poc.py for code examples.
File Snapshot

[4.0K] /data/pocs/7c0dc829faf0ad73152f48d13f485f5161e76f7b ├── [ 18] external_file.txt ├── [ 458] poc.py ├── [ 520] README.md ├── [4.0K] testdir │   └── [ 4] file.txt └── [ 51] zipfile.py 1 directory, 5 files
Shenlong Bot has cached this for you
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 →