POC详情: c9d9db31d0cbabe21e617b67d00ae0323f3b4504

来源
关联漏洞
标题: OpenSSH 安全漏洞 (CVE-2024-6387)
描述:OpenSSH(OpenBSD Secure Shell)是加拿大OpenBSD计划组的一套用于安全访问远程计算机的连接工具。该工具是SSH协议的开源实现,支持对所有的传输进行加密,可有效阻止窃听、连接劫持以及其他网络级的攻击。 OpenSSH 存在安全漏洞,该漏洞源于信号处理程序中存在竞争条件,攻击者利用该漏洞可以在无需认证的情况下远程执行任意代码并获得系统控制权。
描述
An Ansible Playbook to mitigate the risk of RCE (CVE-2024-6387) until platforms update OpenSSH to a non-vulnerable version.
介绍
# CVE-2024-6387 Mitigation Ansible Playbook

An Ansible Playbook to mitigate the risk of the regreSSHion RCE (CVE-2024-6387) vulnerability until platforms update OpenSSH to a non-vulnerable version.

The mitigation applied here is based on the [Mitigation Advice provided by Red Hat](https://access.redhat.com/security/cve/cve-2024-6387).
As noted there:

> Notice the sshd server will still be vulnerable to Denial of Service attacks due to there
> possibility os MaxStartups connection exhaustion, however it'll be safe against possible remote code execution attacks.

You should keep this in mind before applying the mitigation.

# Pre-requisites

- Ansible
- Linux server with OpenSSH Server installed

# Assumptions

- You have a drop-in configuration directory at: `/etc/ssh/sshd_config.d/`
- You are affected by CVE-2024-6387 - see affected package versions [here](https://www.qualys.com/regresshion-cve-2024-6387/).
- `ansible` user set up on target server(s) with sufficient permissions to write in `/etc/ssh/sshd_config.d/`.
  Here, `sudo` permissions are assumed for best compatibility (though this is not necessarily the best approach).

The playbook also includes an alternative step (to replace the drop-in one) which
could be used to apply this patch in-place i.e. in the `/etc/ssh/sshd_config` file itself.

# Usage

```
ansible-playbook ./apply_mitigation.yaml --limit <your host group>
```

# Disclaimer

This Ansible playbook is provided AS IS WITHOUT WARRANTY and WITHOUT ANY LIABILITY.
If you break your SSHd configuration, servers or anything else, I take no responsibility.

Just sharing this to help others.
文件快照

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