Sploitus

Exploit for CVE-2024-6387_PoC

kitploit ยท 2026-08-27

Exploit Code

MARKDOWN39 lines
## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-YASSDEV221608-CVE-2024-6387_POC
# ์š”์•ฝ

์ด๋Š” ๋ณธ์งˆ์ ์œผ๋กœ ํ†ต๊ณ„์  ์ทจ์•ฝ์ ์ž…๋‹ˆ๋‹ค. ์ฆ‰, ๋ ˆ์ด์Šค ์ปจ๋””์…˜์—์„œ ์Šน๋ฆฌํ•˜๊ณ  ์ž„์˜ ์ฝ”๋“œ๋ฅผ ์„ฑ๊ณต์ ์œผ๋กœ ์‹คํ–‰ํ•˜๋ ค๋ฉด ๋งŽ์€ ์‹œ๋„๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ๊ณต๊ฒฉ์ž๋Š” ๋งŽ์€ ์žฅ์• ๋ฌผ์„ ๊ทน๋ณตํ•ด์•ผ ํ•œ๋‹ค๊ณ  Schwartz๋Š” SecurityWeek์— ๋งํ–ˆ์Šต๋‹ˆ๋‹ค. "์ตœ์ƒ์˜ ์‹œ๋‚˜๋ฆฌ์˜ค์—์„œ๋„ ๊ฐ€์žฅ ์ž˜ ์•Œ๋ ค์ง„ ์ทจ์•ฝ์ ์€ ์•…์šฉํ•˜๋Š” ๋ฐ 4์‹œ๊ฐ„ ์ด์ƒ์ด ๊ฑธ๋ฆฝ๋‹ˆ๋‹ค."

OpenSSH 9.8 ๋ฆด๋ฆฌ์Šค ๋…ธํŠธ์—์„œ ๊ฐœ๋ฐœ์ž๋“ค์€ ์ด ์ทจ์•ฝ์ ์ด glibc ๊ธฐ๋ฐ˜ 32๋น„ํŠธ Linux ์‹œ์Šคํ…œ์—์„œ๋งŒ ํ™•์ธ๋˜์—ˆ์œผ๋ฉฐ OpenBSD๋Š” ์˜ํ–ฅ์„ ๋ฐ›์ง€ ์•Š๋Š”๋‹ค๊ณ  ๋ฐํ˜”์Šต๋‹ˆ๋‹ค.

# ํ™˜๊ฒฝ ์„ค์ •

ํ™˜๊ฒฝ์€ Docker๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์„ค์ •๋ฉ๋‹ˆ๋‹ค.

## 1\. Dockerfile ์ž‘์„ฑ

root@kitploit:~
    
    
    # 1.1. Writing the Dockerfile
    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"]