Skip to content

Commit d4ed496

Browse files
committed
Update yara rules
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
1 parent 77c356c commit d4ed496

1 file changed

Lines changed: 110 additions & 61 deletions

File tree

vulnerabilities/pipelines/v2_improvers/yara_rules.py

Lines changed: 110 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121

2222
class YaraRulesImproverPipeline(VulnerableCodePipeline):
2323
repo_url = None
24-
rglob_patterns = ["**/*.yml"]
24+
rglob_patterns = [
25+
"**/*.yara",
26+
"**/*.yar",
27+
]
2528

2629
@classmethod
2730
def steps(cls):
@@ -98,121 +101,167 @@ def on_failure(self):
98101

99102

100103
class ProtectionsArtifactsYara(YaraRulesImproverPipeline):
101-
repo_urls = "https://github.com/elastic/protections-artifacts"
102-
license_urls = "https://github.com/elastic/protections-artifacts/blob/main/LICENSE.txt"
104+
pipeline_id = "elastic-protections-artifacts"
105+
repo_url = "https://github.com/elastic/protections-artifacts"
106+
license_url = "https://github.com/elastic/protections-artifacts/blob/main/LICENSE.txt"
107+
rglob_patterns = ["yara/rules/**/*.yar"]
103108

104109
class YaraRulesYara(YaraRulesImproverPipeline):
105-
repo_urls = "https://github.com/Yara-Rules/rules"
106-
license_urls = "https://github.com/Yara-Rules/rules/blob/master/LICENSE"
110+
pipeline_id = "yara-rules-rules"
111+
repo_url = "https://github.com/Yara-Rules/rules"
112+
license_url = "https://github.com/Yara-Rules/rules/blob/master/LICENSE"
113+
rglob_patterns = [
114+
"antidebug_antivm/**/*.yar",
115+
"capabilities/**/*.yar",
116+
"crypto/**/*.yar",
117+
"cve_rules/**/*.yar",
118+
"deprecated/**/*.yar",
119+
"email/**/*.yar",
120+
"exploit_kits/**/*.yar",
121+
"maldocs/**/*.yar",
122+
"malware/**/*.yar",
123+
"mobile_malware/**/*.yar",
124+
"packers/**/*.yar",
125+
"utils/**/*.yar",
126+
"webshells/**/*.yar",
127+
]
107128

108129
class XumeiquerForensicsYara(YaraRulesImproverPipeline):
109-
repo_urls = "https://github.com/Xumeiquer/yara-forensics"
110-
license_urls = "https://github.com/Xumeiquer/yara-forensics/blob/master/LICENSE"
130+
pipeline_id = "xumeiquer-yara-forensics"
131+
repo_url = "https://github.com/Xumeiquer/yara-forensics"
132+
license_url = "https://github.com/Xumeiquer/yara-forensics/blob/master/LICENSE"
111133

112134
class ReversinglabsYaraRules(YaraRulesImproverPipeline):
113-
repo_urls = "https://github.com/reversinglabs/reversinglabs-yara-rules"
114-
license_urls = "https://github.com/reversinglabs/reversinglabs-yara-rules/blob/develop/LICENSE"
135+
pipeline_id = "reversinglabs-yara-rules"
136+
repo_url = "https://github.com/reversinglabs/reversinglabs-yara-rules"
137+
license_url = "https://github.com/reversinglabs/reversinglabs-yara-rules/blob/develop/LICENSE"
115138

116139
class AdvancedThreatResearchYara(YaraRulesImproverPipeline):
117-
repo_urls = "https://github.com/advanced-threat-research/Yara-Rules"
118-
license_urls = "https://github.com/advanced-threat-research/Yara-Rules/blob/master/LICENSE"
140+
pipeline_id = "advanced-threat-research-yara-rules"
141+
repo_url = "https://github.com/advanced-threat-research/Yara-Rules"
142+
license_url = "https://github.com/advanced-threat-research/Yara-Rules/blob/master/LICENSE"
119143

120144
class BartblazeYaraRules(YaraRulesImproverPipeline):
121-
repo_urls = "https://github.com/bartblaze/Yara-rules"
122-
license_urls = "https://github.com/bartblaze/Yara-rules/blob/master/LICENSE"
145+
pipeline_id = "bartblaze-yara-rules"
146+
repo_url = "https://github.com/bartblaze/Yara-rules"
147+
license_url = "https://github.com/bartblaze/Yara-rules/blob/master/LICENSE"
123148

124149
class GodaddyYaraRules(YaraRulesImproverPipeline):
125-
repo_urls = "https://github.com/godaddy/yara-rules" # archived
126-
license_urls = "https://github.com/godaddy/yara-rules/blob/master/LICENSE.md"
150+
pipeline_id = "godaddy-yara-rules"
151+
repo_url = "https://github.com/godaddy/yara-rules" # archived
152+
license_url = "https://github.com/godaddy/yara-rules/blob/master/LICENSE.md"
127153

128154
class SupportIntelligenceIcewaterYara(YaraRulesImproverPipeline):
129-
repo_urls = "https://github.com/SupportIntelligence/Icewater"
130-
license_urls = "https://github.com/SupportIntelligence/Icewater/blob/master/LICENSE"
155+
pipeline_id = "supportintelligence-icewater"
156+
repo_url = "https://github.com/SupportIntelligence/Icewater"
157+
license_url = "https://github.com/SupportIntelligence/Icewater/blob/master/LICENSE"
131158

132159
class Jeff0FalltradesSignaturesYara(YaraRulesImproverPipeline):
133-
repo_urls = "https://github.com/jeFF0Falltrades/YARA-Signatures"
134-
license_urls = "https://github.com/jeFF0Falltrades/YARA-Signatures/blob/master/LICENSE.md"
160+
pipeline_id = "jeff0falltrades-yara-signatures"
161+
repo_url = "https://github.com/jeFF0Falltrades/YARA-Signatures"
162+
license_url = "https://github.com/jeFF0Falltrades/YARA-Signatures/blob/master/LICENSE.md"
135163

136164
class TjnelRepoYara(YaraRulesImproverPipeline):
137-
repo_urls = "https://github.com/tjnel/yara_repo"
138-
license_urls = "https://github.com/tjnel/yara_repo/blob/master/LICENSE"
165+
pipeline_id = "tjnel-yara-repo"
166+
repo_url = "https://github.com/tjnel/yara_repo"
167+
license_url = "https://github.com/tjnel/yara_repo/blob/master/LICENSE"
139168

140169
class JpcertccJpcertYara(YaraRulesImproverPipeline):
141-
repo_urls = "https://github.com/JPCERTCC/jpcert-yara"
142-
license_urls = "https://github.com/JPCERTCC/jpcert-yara/blob/main/LICENSE"
170+
pipeline_id = "jpcertcc-jpcert-yara"
171+
repo_url = "https://github.com/JPCERTCC/jpcert-yara"
172+
license_url = "https://github.com/JPCERTCC/jpcert-yara/blob/main/LICENSE"
143173

144174
class MikesxrsOpenSourceYaraRules(YaraRulesImproverPipeline):
145-
repo_urls = "https://github.com/mikesxrs/Open-Source-YARA-rules"
146-
license_urls = None
175+
pipeline_id = "mikesxrs-open-source-yara-rules"
176+
repo_url = "https://github.com/mikesxrs/Open-Source-YARA-rules"
177+
license_url = None
147178

148179
class FboldewinYaraRules(YaraRulesImproverPipeline):
149-
repo_urls = "https://github.com/fboldewin/YARA-rules"
150-
license_urls = None
180+
pipeline_id = "fboldewin-yara-rules"
181+
repo_url = "https://github.com/fboldewin/YARA-rules"
182+
license_url = None
151183

152184
class H3x2bYaraRules(YaraRulesImproverPipeline):
153-
repo_urls = "https://github.com/h3x2b/yara-rules"
154-
license_urls = None
185+
pipeline_id = "h3x2b-yara-rules"
186+
repo_url = "https://github.com/h3x2b/yara-rules"
187+
license_url = None
155188

156189
class RoadwyDefenderYara(YaraRulesImproverPipeline):
157-
repo_urls = "https://github.com/roadwy/DefenderYara"
158-
license_urls = None
190+
pipeline_id = "roadwy-defenderyara"
191+
repo_url = "https://github.com/roadwy/DefenderYara"
192+
license_url = None
159193

160194
class MthchtThreatHuntingKeywordsYara(YaraRulesImproverPipeline):
161-
repo_urls = "https://github.com/mthcht/ThreatHunting-Keywords-yara-rules"
162-
license_urls = "https://github.com/mthcht/ThreatHunting-Keywords-yara-rules/blob/main/LICENSE"
195+
pipeline_id = "mthcht-threathunting-keywords-yara-rules"
196+
repo_url = "https://github.com/mthcht/ThreatHunting-Keywords-yara-rules"
197+
license_url = "https://github.com/mthcht/ThreatHunting-Keywords-yara-rules/blob/main/LICENSE"
163198

164199
class Neo23x0SignatureBaseYara(YaraRulesImproverPipeline):
165-
repo_urls = "https://github.com/Neo23x0/signature-base"
166-
license_urls = None
200+
pipeline_id = "neo23x0-signature-base"
201+
repo_url = "https://github.com/Neo23x0/signature-base"
202+
license_url = None
167203

168204
class MalpediaSignatorRulesYara(YaraRulesImproverPipeline):
169-
repo_urls = "https://github.com/malpedia/signator-rules"
170-
license_urls = "https://creativecommons.org/licenses/by-sa/4.0/"
205+
pipeline_id = "malpedia-signator-rules"
206+
repo_url = "https://github.com/malpedia/signator-rules"
207+
license_url = "https://creativecommons.org/licenses/by-sa/4.0/"
171208

172209
class BaderjYara(YaraRulesImproverPipeline):
173-
repo_urls = "https://github.com/baderj/yara"
174-
license_urls = "https://github.com/baderj/yara/blob/main/LICENSE"
210+
pipeline_id = "baderj-yara"
211+
repo_url = "https://github.com/baderj/yara"
212+
license_url = "https://github.com/baderj/yara/blob/main/LICENSE"
175213

176214
class DeadbitsYaraRules(YaraRulesImproverPipeline):
177-
repo_urls = "https://github.com/deadbits/yara-rules"
178-
license_urls = "https://github.com/deadbits/yara-rules/blob/master/UNLICENSE"
215+
pipeline_id = "deadbits-yara-rules"
216+
repo_url = "https://github.com/deadbits/yara-rules"
217+
license_url = "https://github.com/deadbits/yara-rules/blob/master/UNLICENSE"
179218

180219
class PmelsonYaraRules(YaraRulesImproverPipeline):
181-
repo_urls = "https://github.com/pmelson/yara_rules"
182-
license_urls = None
220+
pipeline_id = "pmelson-yara-rules"
221+
repo_url = "https://github.com/pmelson/yara_rules"
222+
license_url = None
183223

184224
class SbousseadenYaraHunts(YaraRulesImproverPipeline):
185-
repo_urls = "https://github.com/sbousseaden/YaraHunts"
186-
license_urls = None
225+
pipeline_id = "sbousseaden-yarahunts"
226+
repo_url = "https://github.com/sbousseaden/YaraHunts"
227+
license_url = None
187228

188229
class EmbeeResearchYaraRules(YaraRulesImproverPipeline):
189-
repo_urls = "https://github.com/embee-research/Yara-detection-rules"
190-
license_urls = "https://github.com/embee-research/Yara-detection-rules/tree/main?tab=readme-ov-file#detection-rule-license-drl-11"
230+
pipeline_id = "embee-research-yara-detection-rules"
231+
repo_url = "https://github.com/embee-research/Yara-detection-rules"
232+
license_url = "https://github.com/embee-research/Yara-detection-rules/tree/main?tab=readme-ov-file#detection-rule-license-drl-11"
191233

192234
class RussianPanda95YaraRules(YaraRulesImproverPipeline):
193-
repo_urls = "https://github.com/RussianPanda95/Yara-Rules"
194-
license_urls = None
235+
pipeline_id = "russianpanda95-yara-rules"
236+
repo_url = "https://github.com/RussianPanda95/Yara-Rules"
237+
license_url = None
195238

196239
class AilProjectAilYaraRules(YaraRulesImproverPipeline):
197-
repo_urls = "https://github.com/ail-project/ail-yara-rules"
198-
license_urls = "https://github.com/ail-project/ail-yara-rules?tab=AGPL-3.0-1-ov-file"
240+
pipeline_id = "ail-project-ail-yara-rules"
241+
repo_url = "https://github.com/ail-project/ail-yara-rules"
242+
license_url = "https://github.com/ail-project/ail-yara-rules?tab=AGPL-3.0-1-ov-file"
199243

200244
class MalgamyYaraRules(YaraRulesImproverPipeline):
201-
repo_urls = "https://github.com/MalGamy/YARA_Rules"
202-
license_urls = "https://github.com/MalGamy/YARA_Rules/blob/main/LICENSE.md"
245+
pipeline_id = "malgamy-yara-rules"
246+
repo_url = "https://github.com/MalGamy/YARA_Rules"
247+
license_url = "https://github.com/MalGamy/YARA_Rules/blob/main/LICENSE.md"
203248

204249
class ElceefYaraRulz(YaraRulesImproverPipeline):
205-
repo_urls = "https://github.com/elceef/yara-rulz"
206-
license_urls = "https://github.com/elceef/yara-rulz/tree/main?tab=MIT-1-ov-file"
250+
pipeline_id = "elceef-yara-rulz"
251+
repo_url = "https://github.com/elceef/yara-rulz"
252+
license_url = "https://github.com/elceef/yara-rulz/tree/main?tab=MIT-1-ov-file"
207253

208254
class TenableYaraRules(YaraRulesImproverPipeline):
209-
repo_urls = "https://github.com/tenable/yara-rules"
210-
license_urls = "https://github.com/tenable/yara-rules/tree/master?tab=BSD-3-Clause-1-ov-file"
255+
pipeline_id = "tenable-yara-rules"
256+
repo_url = "https://github.com/tenable/yara-rules"
257+
license_url = "https://github.com/tenable/yara-rules/tree/master?tab=BSD-3-Clause-1-ov-file"
211258

212259
class Dr4k0niaYaraRules(YaraRulesImproverPipeline):
213-
repo_urls = "https://github.com/dr4k0nia/yara-rules"
214-
license_urls = "https://github.com/dr4k0nia/yara-rules/blob/main/LICENSE.md"
260+
pipeline_id = "dr4k0nia-yara-rules"
261+
repo_url = "https://github.com/dr4k0nia/yara-rules"
262+
license_url = "https://github.com/dr4k0nia/yara-rules/blob/main/LICENSE.md"
215263

216264
class Umair9747YaraRules(YaraRulesImproverPipeline):
217-
repo_urls = "https://github.com/umair9747/yara-rules"
218-
license_urls = "https://github.com/umair9747/yara-rules?tab=GPL-3.0-1-ov-file"
265+
pipeline_id = "umair9747-yara-rules"
266+
repo_url = "https://github.com/umair9747/yara-rules"
267+
license_url = "https://github.com/umair9747/yara-rules?tab=GPL-3.0-1-ov-file"

0 commit comments

Comments
 (0)