@@ -20,28 +20,30 @@ rule EXPL_JNDI_Exploit_Patterns_Dec21_1 {
20
20
date = " 2021-12-12 "
21
21
score = 60
22
22
strings :
23
- $ = " /Basic/Command/Base64/ "
24
- $ = " /Basic/ReverseShell/ "
25
- $ = " /Basic/TomcatMemshell "
26
- $ = " /Basic/JettyMemshell "
27
- $ = " /Basic/WeblogicMemshell "
28
- $ = " /Basic/JBossMemshell "
29
- $ = " /Basic/WebsphereMemshell "
30
- $ = " /Basic/SpringMemshell "
31
- $ = " /Deserialization/URLDNS/ "
32
- $ = " /Deserialization/CommonsCollections1/Dnslog/ "
33
- $ = " /Deserialization/CommonsCollections2/Command/Base64/ "
34
- $ = " /Deserialization/CommonsBeanutils1/ReverseShell/ "
35
- $ = " /Deserialization/Jre8u20/TomcatMemshell "
36
- $ = " /TomcatBypass/Dnslog/ "
37
- $ = " /TomcatBypass/Command/ "
38
- $ = " /TomcatBypass/ReverseShell/ "
39
- $ = " /TomcatBypass/TomcatMemshell "
40
- $ = " /TomcatBypass/SpringMemshell "
41
- $ = " /GroovyBypass/Command/ "
42
- $ = " /WebsphereBypass/Upload/ "
23
+ $ x01 = " /Basic/Command/Base64/ "
24
+ $ x02 = " /Basic/ReverseShell/ "
25
+ $ x03 = " /Basic/TomcatMemshell "
26
+ $ x04 = " /Basic/JettyMemshell "
27
+ $ x05 = " /Basic/WeblogicMemshell "
28
+ $ x06 = " /Basic/JBossMemshell "
29
+ $ x07 = " /Basic/WebsphereMemshell "
30
+ $ x08 = " /Basic/SpringMemshell "
31
+ $ x09 = " /Deserialization/URLDNS/ "
32
+ $ x10 = " /Deserialization/CommonsCollections1/Dnslog/ "
33
+ $ x11 = " /Deserialization/CommonsCollections2/Command/Base64/ "
34
+ $ x12 = " /Deserialization/CommonsBeanutils1/ReverseShell/ "
35
+ $ x13 = " /Deserialization/Jre8u20/TomcatMemshell "
36
+ $ x14 = " /TomcatBypass/Dnslog/ "
37
+ $ x15 = " /TomcatBypass/Command/ "
38
+ $ x16 = " /TomcatBypass/ReverseShell/ "
39
+ $ x17 = " /TomcatBypass/TomcatMemshell "
40
+ $ x18 = " /TomcatBypass/SpringMemshell "
41
+ $ x19 = " /GroovyBypass/Command/ "
42
+ $ x20 = " /WebsphereBypass/Upload/ "
43
+
44
+ $ fp1 = " <html "
43
45
condition :
44
- 1 of them
46
+ 1 of ( $ x * ) and not 1 of ( $ fp * )
45
47
}
46
48
47
49
rule EXPL_Log4j_CVE_2021_44228_JAVA_Exception_Dec21_1 {
@@ -66,20 +68,24 @@ rule EXPL_Log4j_CVE_2021_44228_Dec21_Soft {
66
68
author = " Florian Roth "
67
69
reference = " https://twitter.com/h113sdx/status/1469010902183661568?s=20 "
68
70
date = " 2021-12-10 "
69
- modified = " 2021-12-12 "
71
+ modified = " 2021-12-20 "
70
72
score = 60
73
+ type = " file "
71
74
strings :
72
- $ = " ${jndi:ldap:/ "
73
- $ = " ${jndi:rmi:/ "
74
- $ = " ${jndi:ldaps:/ "
75
- $ = " ${jndi:dns:/ "
76
- $ = " ${jndi:iiop:/ "
77
- $ = " ${jndi:http:/ "
78
- $ = " ${jndi:nis:/ "
79
- $ = " ${jndi:nds:/ "
80
- $ = " ${jndi:corba:/ "
75
+ $ x01 = " ${jndi:ldap:/ "
76
+ $ x02 = " ${jndi:rmi:/ "
77
+ $ x03 = " ${jndi:ldaps:/ "
78
+ $ x04 = " ${jndi:dns:/ "
79
+ $ x05 = " ${jndi:iiop:/ "
80
+ $ x06 = " ${jndi:http:/ "
81
+ $ x07 = " ${jndi:nis:/ "
82
+ $ x08 = " ${jndi:nds:/ "
83
+ $ x09 = " ${jndi:corba:/ "
84
+
85
+ $ fp1 = " <html "
86
+ $ fp2 = " /nessus} "
81
87
condition :
82
- 1 of them
88
+ 1 of ( $ x * ) and not 1 of ( $ fp * )
83
89
}
84
90
85
91
rule EXPL_Log4j_CVE_2021_44228_Dec21_OBFUSC {
@@ -88,6 +94,7 @@ rule EXPL_Log4j_CVE_2021_44228_Dec21_OBFUSC {
88
94
author = " Florian Roth "
89
95
reference = " https://twitter.com/h113sdx/status/1469010902183661568?s=20 "
90
96
date = " 2021-12-12 "
97
+ modified = " 2021-12-13 "
91
98
score = 60
92
99
strings :
93
100
$ x1 = " $%7Bjndi: "
@@ -98,8 +105,10 @@ rule EXPL_Log4j_CVE_2021_44228_Dec21_OBFUSC {
98
105
$ x6 = " ${${env:BARFOO:-j} "
99
106
$ x7 = " ${::-l}${::-d}${::-a}${::-p} "
100
107
$ x8 = " ${base64:JHtqbmRp "
108
+
109
+ $ fp1 = " <html "
101
110
condition :
102
- 1 of them
111
+ 1 of ( $ x * ) and not 1 of ( $ fp * )
103
112
}
104
113
105
114
rule EXPL_Log4j_CVE_2021_44228_Dec21_Hard {
@@ -112,9 +121,10 @@ rule EXPL_Log4j_CVE_2021_44228_Dec21_Hard {
112
121
score = 80
113
122
strings :
114
123
$ x1 = /\$\{ jndi: (ldap | ldaps | rmi | dns | iiop | http | nis | nds | corba ): \/ [ \/ ] ? [ a - z - \. 0 - 9 ] {3,120 } : [ 0 - 9 ] {2,5 } \/ [ a - zA - Z \. ] {1,32 } \} /
124
+ $ x2 = " Reference Class Name: foo "
115
125
$ fp1r = /(ldap | rmi | ldaps | dns ): \/ [ \/ ] ? (127 \. 0 \. 0 \. 1 | 192 \. 168 \. | 172 \. [ 1 - 3 ] [ 0 - 9 ] \. | 10 \. )/
116
126
condition :
117
- $ x1 and not 1 of ($ fp * )
127
+ 1 of ( $ x * ) and not 1 of ($ fp * )
118
128
}
119
129
120
130
rule SUSP_Base64_Encoded_Exploit_Indicators_Dec21 {
@@ -123,6 +133,7 @@ rule SUSP_Base64_Encoded_Exploit_Indicators_Dec21 {
123
133
author = " Florian Roth "
124
134
reference = " https://twitter.com/Reelix/status/1469327487243071493 "
125
135
date = " 2021-12-10 "
136
+ modified = " 2021-12-13 "
126
137
score = 70
127
138
strings :
128
139
/* curl -s */
@@ -133,8 +144,11 @@ rule SUSP_Base64_Encoded_Exploit_Indicators_Dec21 {
133
144
$ sb1 = " fHdnZXQgLXEgLU8tI "
134
145
$ sb2 = " x3Z2V0IC1xIC1PLS "
135
146
$ sb3 = " 8d2dldCAtcSAtTy0g "
147
+
148
+ $ fp1 = " <html "
136
149
condition :
137
150
1 of ($ sa * ) and 1 of ($ sb * )
151
+ and not 1 of ($ fp * )
138
152
}
139
153
140
154
rule SUSP_JDNIExploit_Indicators_Dec21 {
@@ -160,16 +174,34 @@ rule SUSP_EXPL_OBFUSC_Dec21_1{
160
174
score = 60
161
175
strings :
162
176
/* ${lower:X} - single character match */
163
- $ = { 24 7B 6C 6F 77 65 72 3A ?? 7D }
177
+ $ x1 = { 24 7B 6C 6F 77 65 72 3A ?? 7D }
164
178
/* ${upper:X} - single character match */
165
- $ = { 24 7B 75 70 70 65 72 3A ?? 7D }
179
+ $ x2 = { 24 7B 75 70 70 65 72 3A ?? 7D }
166
180
/* URL encoded lower - obfuscation in URL */
167
- $ = " $%7blower: "
168
- $ = " $%7bupper: "
169
- $ = " %24%7bjndi: "
170
- $ = " $%7Blower: "
171
- $ = " $%7Bupper: "
172
- $ = " %24%7Bjndi: "
181
+ $ x3 = " $%7blower: "
182
+ $ x4 = " $%7bupper: "
183
+ $ x5 = " %24%7bjndi: "
184
+ $ x6 = " $%7Blower: "
185
+ $ x7 = " $%7Bupper: "
186
+ $ x8 = " %24%7Bjndi: "
187
+
188
+ $ fp1 = " <html "
189
+ condition :
190
+ 1 of ($ x * ) and not 1 of ($ fp * )
191
+ }
192
+
193
+ rule SUSP_JDNIExploit_Error_Indicators_Dec21_1 {
194
+ meta :
195
+ description = " Detects error messages related to JDNI usage in log files that can indicate a Log4Shell / Log4j exploitation "
196
+ author = " Florian Roth "
197
+ reference = " https://twitter.com/marcioalm/status/1470361495405875200?s=20 "
198
+ date = " 2021-12-10 "
199
+ modified = " 2021-12-17 "
200
+ score = 70
201
+ strings :
202
+ $ x1 = " FATAL log4j - Message: BadAttributeValueException: "
203
+ $ x2 = " Error looking up JNDI resource "
173
204
condition :
174
205
1 of them
175
206
}
207
+
0 commit comments