-
Notifications
You must be signed in to change notification settings - Fork 1
/
RedGhost_Linux.yara
45 lines (39 loc) · 1.3 KB
/
RedGhost_Linux.yara
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
rule RedGhost_Linux: postexploitation linuxmalware
{
meta:
Author = "Adam M. Swanda"
Website = "https://www.deadbits.org"
Repo = "https://github.com/deadbits/yara-rules"
Date = "2019-08-07"
Reference = "https://github.com/d4rk007/RedGhost/"
strings:
$name = "[ R E D G H O S T - P O S T E X P L O I T - T O O L]" ascii
$feature0 = "Payloads" ascii
$feature1 = "SudoInject" ascii
$feature2 = "lsInject" ascii
$feature3 = "Crontab" ascii
$feature4 = "GetRoot" ascii
$feature5 = "Clearlogs" ascii
$feature6 = "MassinfoGrab" ascii
$feature7 = "CheckVM" ascii
$feature8 = "MemoryExec" ascii
$feature9 = "BanIP" ascii
$func0 = "checkVM(){" ascii
$func1 = "memoryexec(){" ascii
$func2 = "banip(){" ascii
$func3 = "linprivesc(){" ascii
$func4 = "dirty(){" ascii
$func5 = "Ocr(){" ascii
$func6 = "clearlog(){" ascii
$func7 = "conmethods(){" ascii
$func8 = "add2sys(){" ascii
//$header = "#!/bin/bash" ascii
condition:
// #!/bin/bash header
(uint16be(0x0) == 0x2321 and
for any i in (0..64) : (
uint16be(i) == 0x2f62 and uint8(i+2) == 0x68
))
and
($name or 5 of them)
}