Identifier / Programs / Linux and Unix
java
Java application launcher. tldr-pages
GTFOBins shell 1 Sigma rule name it 1 documented command
How java is abused
shell
Each abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for java.
1 documented command
shell unprivileged, with sudo
The Shell.class class file can be compiled offline, then uploaded to the target:
cat >Shell.java <<EOF
public class Shell {
public static void main(String[] args) throws Exception {
new ProcessBuilder("/bin/sh").inheritIO().start().waitFor();
}
}
EOF
javac Shell.javajava ShellIdentifyThe command the identifier reads trips no Sigma process-creation rule. This command is, with GTFOBins’ notes, from GTFOBins, at commit acd524623f9c of 2026-05-27, under the GPL-3.0, with no warranty. Changed: Markdown is shown formatted. The source is in lolbas-gtfobins-commands.json.gz, and the full entry is on GTFOBins’s page for java. The identifier reads the line that runs java.
What detects it
Everyday use
Execute a Java .class file that contains a main method by using just the class name
java classnameIdentifyExecute a Java program and use additional third-party or user-defined classes
java -classpath path/to/classes1:path/to/classes2:. classnameIdentifyExecute a .jar program
java -jar filename.jarIdentifyNone of the 3 examples the identifier reads matches GTFOBins abuse or trips a Sigma process-creation rule.