
WBCE CMS <= 1.6.3 向けの認証済みRCEエクスプロイトで、PHPリバースシェルとnetcatリスナーを備えた悪意のあるモジュールZIPを作成します。
これは、TryHackMe の Hackfinity イベントでプレイ中に発見した、認証済みリモートコード実行(RCE)の脆弱性です。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>