目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CVE-2015-20107 PoC — Python 命令注入漏洞

来源
关联漏洞
标题: Python 命令注入漏洞 (CVE-2015-20107)
Description:Python是Python基金会的一套开源的、面向对象的程序设计语言。该语言具有可扩展、支持模块和包、支持多种平台等特点。 Python 3.10.4 版本及之前版本存在命令注入漏洞,该漏洞源于 mailcap 模块不会将转义字符添加到系统 mailcap 文件中发现的命令中。
Description
Scan for python installations on macOS, and run CVE-2015-20107.py script to report if patching is needed
介绍
# Python Patrol
Scan for python installations on macOS, and run CVE-2015-20107.py script to report if patching is needed

Several of these scripts need Full Disk Access permissions and must be run as root so it can scan the entire macOS filesystem (except the areas restricted by macOS)

Make sure to run this from an app with Full Disk Access permission - i.e. ensure iTerm.app has
Full Disk Access enabled in Apple System Settings, Security & Privacy Privacy & Security.

---

## How to use
Clone this repo

cd into the cloned repo directory

run
```
sudo ./python-patrol.zsh
```

---

## Example output:
```
...
lrwxr-xr-x  1 root  wheel  9 Apr 24 13:46 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3 -> python3.9
=====CVE-2015-20107.py START=====
python_path:/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3 python_version:3.9.6
Warning encountered trying to use unquoted mailcap path: Refusing to use mailcap with filename "'$(xterm);#.txt". Use a safe temporary filename.
CVE-2015-20107 patched OK, exiting without error.
=====CVE-2015-20107.py STOP=====


lrwxrwxr-x  1 root  admin  9 Apr 26 13:59 /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -> python3.9
=====CVE-2015-20107.py START=====
python_path:/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 python_version:3.9.11
No warning or error encountered importing unquoted mailcap path...!
CVE-2015-20107 NOT patched, PLEASE UPDATE OR UNINSTALL THIS PYTHON VERSION!
=====CVE-2015-20107.py STOP=====
...
```


## uninstall outdated versions installed from python.org packages
for instance, uninstall the discovered, outdated and vulnerable version 3.9.11 as follows
```
sudo ./uninstall_python.org_pkg.zsh 3.9
```
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →