
WBCE CMS <= 1.6.3에 대한 인증된 RCE 익스플로잇으로, PHP 리버스 셸과 netcat 리스너가 포함된 악성 모듈 zip을 생성합니다.
이것은 TryHackMe의 Hackfinity 이벤트에 참여하던 중 발견한 인증된 원격 코드 실행(Authenticated Remote Code Execution) 취약점입니다. Ubuntu에서 실행되는 1.6.2 및 1.6.3 버전에서 테스트되었으며, 하위 버전에도 영향을 미칠 수 있습니다. 기본적으로 WBCE는 업로드되는 모든 모듈을 신뢰합니다. .zip 모듈 파일에 대해 실행되는 유일한 검사는 info.php 파일이 포함되어 있는지 여부입니다. WBCE의 /admin/modules/install.php에서 발췌:
// Check if uploaded file is a valid Add-On zip file
if (!($list && file_exists($temp_unzip . 'info.php'))) {
// Remove the temp unzip directory and the temp zip file
rm_full_dir($temp_unzip);
if (file_exists($temp_file)) {
unlink($temp_file);
}
$admin->print_error($MESSAGE['GENERIC_INVALID_ADDON_FILE']);
}
모듈이 "유효한 애드온"으로 이 검사를 통과하면, 서버에서 install.php 스크립트가 자동으로 실행됩니다. 이 익스플로잇은 단순히 PHP 페이로드로 PHP 리버스 셸을 사용합니다.
YouTube 데모: https://youtu.be/Dhg5gRe9Dzs?si=LHC29PBRRRPNNy73
Description:
This is an Authenticated RCE exploit for WBCE CMS version <= 1.6.3
It will create an infected module .zip file and start a netcat listener.
Once the zip is created, you will have to login to the admin page
to upload and install the module, which will immediately run the shell
Shell taken from: https://github.com/pentestmonkey/php-reverse-shell/tree/master
Usage:
./exploit.sh <lhost> <lport>