Sploitus

Exploit for CVE-2024-6387

kitploit · 2026-08-25

Exploit Code

MARKDOWN38 lines
## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-YASSDEV221608-CVE-2024-6387
# 0\. 要約

これは本質的には統計的な脆弱性です。競合状態に勝利して任意のコードを実行するには、非常に多くの試行が必要です。「攻撃者は多くの障害を克服しなければならない」とSchwartz氏はSecurityWeekに語っています。最良の場合でも、最もよく知られた脆弱性の実行には4時間以上かかります。

OpenSSH 9.8のリリースノートで、開発者らはこの脆弱性がglibcベースの32ビットLinuxシステムでのみ確認されており、OpenBSDは影響を受けないと述べています。

# 1\. 環境セットアップ

環境セットアップではDockerを使用します。

## 1.1. Dockerfileの作成

root@kitploit:~
    
    
    FROM i386/ubuntu:20.04
    ENV DEBIAN_FRONTEND=noninteractive
    RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y \
        build-essential \
        wget \
        curl \
        libssl-dev:i386 \
        zlib1g-dev:i386
    RUN groupadd sshd && useradd -g sshd -s /bin/false sshd
    RUN wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.2p1.tar.gz && \
        tar -xzf openssh-9.2p1.tar.gz && \
        cd openssh-9.2p1 && \
        ./configure && make && make install
    RUN mkdir /var/run/sshd
    RUN echo 'root:password' | chpasswd
    RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /usr/local/etc/sshd_config && \
        sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /usr/local/etc/sshd_config && \
        echo 'MaxStartups 100:30:200' >> /usr/local/etc/sshd_config
    RUN echo '#!/bin/bash\n/usr/local/sbin/sshd -V' > /show_version.sh && \
        chmod +x /show_version.sh
    EXPOSE 22
    CMD ["/usr/local/sbin/sshd", "-D"]