Exploitation via the web console (Java applet)

In this section, we will discuss the JBoss web console. Note that the JBoss web console has been deprecated and was replaced with the administration console, but it is still useful to us because, on older versions of the JBoss server, the web console can still be exploited. We may also face some errors while opening the web console in the browser, as shown:

To allow the applet to run, we need to change our Java security settings and add the domain name and IP address of the JBoss instance to the Java exception site list, as shown:

Once the exception is added, we will still get a warning from the browser, but we can go ahead and click Continue, as shown:

In the next popup, we need to click on the Run button to allow the application to run, as shown:

We are then presented with the web console of the JBoss server. Here, we can continue with the same steps that we covered in the previous section to upload the shell using MainDeployer. As the following screenshot shows, all we need to do is find and select the object in the left-hand side pane:

Clicking on the MainDeployer item will take us to the page where the WAR file can be deployed on the server to achieve code execution, as shown:

By default, running Java applets is disabled in most browsers, so sometimes, when visiting the web console page on the discovery of a JBoss server, we may just get a blank page. Encountering a blank page while opening the web console does not mean that the service is not accessible. It just means that we have to tweak our browsers a little to allow the Java applet execution.