-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathzeus.pl
82 lines (76 loc) · 2.12 KB
/
zeus.pl
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package zeus;
#-----------------------------------------------------------
# zeus - simple plugin to check for potential Zeus/Zbot
# infection
#
# Change History
# 20111004 - Updated
# 20100923 - Created
#
#
# copyright 2011 Quantum Analytics Research, LLC
#-----------------------------------------------------------
use strict;
my %config = (hasShortDescr => 1,
shortDescr => "Check for Zeus/Zbot sdra64\.exe",
hasRefs => 0,
osmask => 3, #XP, 2003
class => 0,
type => "File,Reg",
hive => "Software",
hivemask => 8, #Software hive
category => "Malware",
version => 20111004);
sub getConfig{return \%config};
my $VERSION = $config{version};
sub pluginmain {
my $class = shift;
my %parent = ::getConfig();
::logMsg("Zeus v.".$VERSION);
::rptMsg("-" x 60);
::rptMsg("Zeus v.".$VERSION);
::rptMsg(getShortDescr());
::rptMsg("Category: ".$config{category});
::rptMsg("");
::rptMsg("Simple checks for indicators of Zeus/ZBot");
::rptMsg("");
my $tag = "sdra64";
my $check = 0;
my $reg = Parse::Win32Registry->new($parent{softwarehive});
my $root_key = $reg->get_root_key;
my $key_path = "Microsoft\\Windows NT\\CurrentVersion\\Winlogon";
my $key;
if ($key = $root_key->get_subkey($key_path)) {
::rptMsg($key_path);
::rptMsg("LastWrite Time ".gmtime($key->get_timestamp())." (UTC)");
my $ui;
eval {
$ui = $key->get_value("Userinit")->get_data();
::rptMsg(" Userinit: ".$ui);
::rptMsg("");
if (grep(/$tag/,$ui)) {
$check++;
}
else {
::rptMsg("*Zeus apparently not found.");
}
};
}
::rptMsg("");
$parent{systemroot} = $parent{systemroot}."\\" unless ($parent{systemroot} =~ m/\\$/);
my $file = $parent{systemroot}."system32\\sdra64\.exe";
if (-e $file && -f $file) {
::rptMsg($file." found!");
$check++;
}
else {
::rptMsg($file." not found.");
}
if ($check == 0) {
::rptMsg($parent{computername}." is apparently not infected with Zeus.");
}
else {
::rptMsg($check." check(s) of two succeeded.");
}
}
1;