forked from Hestat/lw-yara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlw-rules-combined.yar
117 lines (94 loc) · 1.93 KB
/
lw-rules-combined.yar
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
rule cache_mailer
{
meta:
author = "Brian Laskowski"
info = " php mailer script "
strings:
$s1="if (mail(stripslashes(base64_decode($fr[0]))"
condition:
all of them
}
rule cache_mailer_encoded_1
{
meta:
author = "Brian Laskowski"
info = " obfuscated php shell "
strings:
$s1="pod_h1kgzu0cqr"
condition:
all of them
}
rule eitest_injection_0
{
meta:
author= "Brian Laskowski"
date= "4/25/18"
description= "eitest malware injection"
strings:
$a= "@error_reporting(0)"
$b= "!isset($eva1f"
condition:
all of them
}
rule eitest_injection_1
{
meta:
author= "Brian Laskowski"
date= "4/25/18"
description= "eitest malware injection"
strings:
$a= "bubE"
$b= "?php"
condition:
all of them
}
rule FOPOobfuscator
{
meta:
author= "Brian Laskowski"
info= " FOPO Obfuscator detected"
strings:
$fopo = "Obfuscation provided by FOPO"
condition:
$fopo
}
rule php_mailer_1
{
meta:
author = "Brian Laskowski"
info = " php mailer script "
strings:
$s1="$_COOKIE [str_replace('.', '_', $_SERVER['HTTP_HOST'])])"
condition:
all of them
}
rule crypto_miner
{
meta:
author= "Brian Laskowski"
info= " Detected a cryptomining exe"
strings:
$miner = "stratum+tcp"
condition:
$miner
}
/*
I first found this in May 2016, appeared in every PHP file on the
server, cleaned it with `sed` and regex magic. Second time was
in June 2016, same decoded content, different encoding/naming.
https://www.symantec.com/security_response/writeup.jsp?docid=2015-111911-4342-99
*/
rule php_anuna_eitest
{
meta:
author = "Vlad https://github.com/vlad-s"
date = "2016/07/18"
description = "Catches a PHP Trojan"
strings:
$a = /<\?php \$[a-z]+ = '/
$b = /\$[a-z]+=explode\(chr\(\([0-9]+[-+][0-9]+\)\)/
$c = /\$[a-z]+=\([0-9]+[-+][0-9]+\)/
$d = /if \(!function_exists\('[a-z]+'\)\)/
condition:
all of them
}