-
Notifications
You must be signed in to change notification settings - Fork 10
/
clamav.yml
3696 lines (3693 loc) · 299 KB
/
clamav.yml
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
- name: ClamAV
become: true
tags: clamav
block:
- name: Install ClamAV (Debian) (non-x86_64)
ansible.builtin.apt:
name: ['clamav', 'clamav-daemon']
update_cache: true
when: (ansible_distribution == "Debian" or ansible_distribution == "Kali") and ansible_architecture != "x86_64"
tags:
- packages
- services
- debian
- name: ClamAV Debian x86_64
when: (ansible_distribution == "Debian" or ansible_distribution == "Kali" or ansible_distribution == "Ubuntu") and ansible_architecture == "x86_64"
tags:
- packages
- debian
block:
- name: Uninstall ClamAV (Debian) (x86_64)
ansible.builtin.apt:
name: ['clamav', 'clamav-daemon', 'clamav-base', 'clamav-freshclam', 'libclamav11']
state: absent
tags:
- services
# This is commented out so that accounts tag can be run on it's own
#- accounts # postrm removed the ClamAV user
- name: Create group for ClamAV
# This is commented out so that accounts tag can be run on it's own
#tags: accounts
ansible.builtin.group:
name: clamav
state: present
system: true
- name: Create user account for ClamAV
# This is commented out so that accounts tag can be run on it's own
#tags: accounts
ansible.builtin.user:
name: clamav
group: clamav
shell: /usr/sbin/nologin
system: true
create_home: false
home: /var/lib/clamav
password_lock: true
state: present
- name: Check latest ClamAV version
ansible.builtin.uri:
url: https://api.github.com/repos/Cisco-Talos/clamav/releases/latest
method: GET
register: clamav_latest
# TODO: Download PGP signature and verify it
- name: Download ClamAV
ansible.builtin.get_url:
url: "{{ clamav_latest.json | json_query(query) | first }}"
dest: /var/cache/apt/archives/
owner: root
group: root
mode: '0600'
vars:
query: "assets[?ends_with(name,'.linux.x86_64.deb')].browser_download_url"
register: clamav_download
- name: Install ClamAV (x86_64)
ansible.builtin.apt:
deb: "{{ clamav_download.dest }}"
- name: Determine ClamAV sysconfdir
ansible.builtin.shell: set -o pipefail; {{ clamav_location }}/clamconf | awk '/^Checking configuration files in/{print$5}' # noqa no-changed-when
register: clamav_sysconfdir
tags: check
args:
executable: /bin/bash
- name: Verify ClamAV sysconfdir
ansible.builtin.assert:
that:
- clamav_sysconfdir.stdout | length > 0
- clamav_sysconfdir.stdout | regex_search('/etc')
tags: check
- name: Generate fresh configs
ansible.builtin.shell: "{{ clamav_location }}/clamconf -g {{ item }}.conf 1>{{ clamav_sysconfdir.stdout }}/{{ item }}.conf.new"
with_items:
- freshclam
- clamd
tags: configuration
changed_when: true
args:
executable: /bin/bash
- name: Comment out Example lines
ansible.builtin.replace:
path: '{{ clamav_sysconfdir.stdout }}/{{ item }}.conf.new'
regexp: '^(Example)$'
replace: '#\g<1>'
with_items:
- freshclam
- clamd
tags: configuration
- name: mkdir /var/run/clamav/
ansible.builtin.file:
path: /var/run/clamav
state: directory
owner: clamav
group: clamav
mode: '0771'
# https://docs.clamav.net/manual/Usage/Configuration.html#clamdconf
- name: Configure ClamAV
ansible.builtin.replace:
path: '{{ clamav_sysconfdir.stdout }}/clamd.conf.new'
regexp: '^#?({{ item.key }} ).*$'
replace: '\g<1>{{ item.value }}'
validate: '/bin/grep "^{{ item.key }} {{ item.value }}$" %s'
with_dict: "{{ clamav_settings }}"
vars:
clamav_settings:
LogTime: "no"
LogSyslog: "yes"
LogFacility: LOG_LOCAL6
ExtendedDetectionInfo: "yes"
CrossFilesystems: "yes"
DetectPUA: "yes"
HeuristicAlerts: "yes"
HeuristicScanPrecedence: "no"
AlertBrokenExecutables: "yes"
AlertBrokenMedia: "yes"
ScanPE: "yes"
ScanELF: "yes"
ScanOLE2: "yes"
ScanPDF: "yes"
ScanSWF: "yes"
ScanXMLDOCS: "yes"
ScanHWP3: "yes"
ScanMail: "yes"
PhishingSignatures: "yes"
PhishingScanURLs: "yes"
ScanHTML: "yes"
ScanArchive: "yes"
Bytecode: "yes"
BytecodeSecurity: Paranoid
LocalSocket: "{{ clamav['socket'] }}"
LocalSocketMode: 660
PidFile: "{{ clamav['pid'] }}"
User: clamav
AlertOLE2Macros: "yes"
FixStaleSocket: "yes"
DatabaseDirectory: "{{ clamav['database'] }}"
OnAccessExcludeUname: clamav
tags: configuration
# https://docs.clamav.net/manual/Usage/Configuration.html#freshclamconf
- name: Configure freshclam
ansible.builtin.replace:
path: '{{ clamav_sysconfdir.stdout }}/freshclam.conf.new'
regexp: '^#?({{ item.key }} ).*$'
replace: '\g<1>{{ item.value }}'
validate: '/bin/grep "^{{ item.key }} {{ item.value }}$" %s'
with_dict: "{{ freshclam_settings }}"
vars:
freshclam_settings:
LogTime: "no"
LogFacility: LOG_LOCAL6
ScriptedUpdates: "yes"
CompressLocalDatabase: "no"
ReceiveTimeout: 300
TestDatabases: "yes"
Bytecode: "yes"
DatabaseMirror: database.clamav.net
DatabaseOwner: clamav
PidFile: /run/clamav/freshclam.pid
DatabaseDirectory: "{{ clamav['database'] }}"
tags: configuration
- name: Copy new ClamAV configurations into place
ansible.builtin.copy:
remote_src: true
src: '{{ clamav_sysconfdir.stdout }}/{{ item }}.conf.new'
dest: '{{ clamav_sysconfdir.stdout }}/{{ item }}.conf'
owner: root
group: root
mode: '0644'
backup: true
with_items:
- freshclam
- clamd
tags: configuration
- name: Remove .new configs
ansible.builtin.file:
path: '{{ clamav_sysconfdir.stdout }}/{{ item }}.conf.new'
state: absent
with_items:
- clamd
- freshclam
- name: mkdir /var/lib/clamav/
ansible.builtin.file:
path: /var/lib/clamav
state: directory
owner: clamav
group: clamav
mode: '0755'
# Make the dir and the necessary files readable by other users so they can run clamscan
- name: Make /var/lib/clamav/ +rx
ansible.builtin.file:
path: /var/lib/clamav/
mode: '0755'
tags: permissions
register: result
failed_when:
- result.failed == true
- result.state != "absent"
# "CLD files are uncompressed and unsigned versions of the CVD that have had CDIFFs applied"
- name: Make /var/lib/clamav/*.c[lv]d +r
ansible.builtin.file:
path: /var/lib/clamav/{{ item }}
mode: '0644'
with_items:
- daily.cld
- daily.cvd
- bytecode.cld
- bytecode.cvd
- main.cvd
- main.cld
register: result
failed_when:
- result.failed == true
- result.state != "absent"
tags: permissions
# https://blog.didierstevens.com/2017/02/15/quickpost-clamav-and-zip-file-decryption/
- name: Create a password signature file
ansible.builtin.copy:
dest: /var/lib/clamav/passwords.pwdb
owner: root
group: root
mode: '0644'
content: |
ZipPasswordInfected;Engine:81-255;0;infected
tags: configuration
# https://docs.clamav.net/faq/faq-ignore.html
#
# sigs.InterServer.net.HEX.Topline.malware.string.11334.179 alerts on tables.go (1.20.5)
# https://www.virustotal.com/gui/file/77daba99ce1c13daa2b200ab40b3e06d484cffc1a39ec5201fd1ec8a25426c4b
- name: Create a signature ignore list
ansible.builtin.copy:
dest: /var/lib/clamav/ignore_list.ign2
owner: root
group: root
mode: '0644'
content: |
sigs.InterServer.net.HEX.Topline.malware.string.11334.179
PoetRat_Python
php_uname
php_malfunctions
blackhole_basic
PM_Email_Sent_By_PHP_Script
UPX
Ramnit
malware_lodeinfo_c2_cmd_xor_bruteforce
malware_lodeinfo_network_decode_process_xor_bruteforce
CS_encrypted_beacon_x86
Windows_Trojan_BloodAlchemy_de591c5a
mimikatz
ft_elf
ft_exe
maldoc_suspicious_strings
maldoc_structured_exception_handling
maldoc_function_prolog_signature
maldoc_OLE_file_magic_number
vmdetect_misc
ROKRAT_loader
PoetRat_Python
cmstp_macro_builder_rev_a
maldoc_indirect_function_call_2
maldoc_indirect_function_call_3
Ramnit
upx
maldoc_find_kernel32_base_method_1
browser_pass
shylock
sysocmgr
maldoc_getEIP_method_1
vmdetect
dotnet_libraries
executable_au3
MD5_Constants
RIPEMD160_Constants
SHA1_Constants
blackhole_basic
blackhole2_css
ft_gzip
DarkComet_Keylogs_Memory
CrowdStrike_CVE_2014_4113
PlugX
CryptoLocker_set1
silent_banker
Trojan
BLOWFISH_Constants
SHA512_Constants
wannacry_1
SHA256_Constants
Hacktool_Strings_p0wnedShell
mime_mso
CrowdStrike_CVE_2014_4113
WHIRLPOOL_Constants
cmstp_macro_builder_rev_a
Windows_Trojan_ShadowPad_0d899241
md5_825a3b2a6abbe6abcdeda64a73416b3d
md5_e03b5df1fa070675da8b6340ff4a67c2
Methodology_Shortcut_HotKey
Methodology_Contains_Shortcut_OtherURIhandlers
Methodology_Suspicious_Shortcut_IconNotFromExeOrDLLOrICO
Methodology_Suspicious_Shortcut_Evasion
Methodology_Suspicious_Shortcut_LOLcommand
Methodology_Suspicious_Shortcut_WebDAV
Methodology_Suspicious_Shortcut_ScriptURL
hikit
eval_with_comments
PoetRat_Python
PoetRat_Python
PoetRat_Python
FE_CPE_MS17_010_RANSOMWARE
APT1_WEBC2_TABLE
EXPL_Log4j_CallBackDomain_IOCs_Dec21_1
EXPL_Log4j_CVE_2021_44228_Dec21_Hard
SUSP_JDNIExploit_Indicators_Dec21
PoetRat_Doc
RTF_Byte_Nibble_Obfuscation_method1
early_october2015_vawtrak_dropper
early_october2015_vawtrak_dropper
Suspicious_PowerShell_Code_1
Suspicious_PowerShell_Code_1
DarkComet_Keylogs_Memory
manitsme
SUSP_Just_EICAR
tags:
- configuration
- yara
# https://docs.clamav.net/manual/Signatures/YaraRules.html
# https://github.com/Neo23x0/signature-base (e36e80a)
#
# Some of the YARA rules do not work with ClamAV.
# At least the following error messages might occure with some rules:
#
# LibClamAV Error: yyerror(): undefined identifier "filename"
# LibClamAV Error: yyerror(): undefined identifier "pe"
# LibClamAV Error: yyerror(): undefined identifier "uint32be"
# LibClamAV Error: yyerror(): undefined identifier "hash"
# undefined identifier "is__elf"
# LibClamAV Error: parse_yara_hex_string: Single byte subpatterns unsupported in ClamAV
# LibClamAV Warning: load_oneyara[verify]: wide modifier [w] is not supported for regex subsigs
- name: YARA
tags: yara
block:
- name: Download YARA rules
ansible.builtin.get_url:
url: "https://raw.githubusercontent.com/Neo23x0/signature-base/master/yara/{{ item }}"
dest: /var/lib/clamav/
owner: root
group: root
mode: '0644'
async: 20 # Single yara rule download shouldn't take longer than this
poll: 0
loop:
- apt_aa19_024a.yar
- apt_alienspy_rat.yar
- apt_apt17_malware.yar
- apt_apt28_drovorub.yar
- apt_apt29_grizzly_steppe.yar
- apt_apt29_nobelium_apr22.yar
- apt_apt30_backspace.yar
- apt_apt34.yar
- apt_apt37.yar
- apt_apt3_bemstour.yar
- apt_apt6_malware.yar
- apt_ar18_165a.yar
- apt_area1_phishing_diplomacy.yar
- apt_aus_parl_compromise.yar
- apt_backdoor_ssh_python.yar
- apt_backspace.yar
- apt_beepservice.yar
- apt_between-hk-and-burma.yar
- apt_bitter.yar
- apt_blackenergy.yar
- apt_blackenergy_installer.yar
- apt_bluetermite_emdivi.yar
- apt_buckeye.yar
- apt_casper.yar
- apt_cheshirecat.yar
- apt_cloudatlas.yar
- apt_cloudduke.yar
- apt_cn_netfilter.yar
- apt_cn_pp_zerot.yar
- apt_cn_reddelta.yar
- apt_cobaltstrike_evasive.yar
- apt_cobaltstrike.yar
- apt_codoso.yar
- apt_coreimpact_agent.yar
- apt_danti_svcmondr.yar
- apt_darkcaracal.yar
- apt_deeppanda.yar
- apt_derusbi.yar
- apt_dnspionage.yar
- apt_dtrack.yar
- apt_dubnium.yar
- apt_duqu1_5_modules.yar
- apt_duqu2.yar
- apt_dustman.yar
- apt_emissary.yar
- apt_eqgrp_apr17.yar
- apt_eqgrp_triangulation_jun23.yar
- apt_eternalblue_non_wannacry.yar
- apt_f5_bigip_expl_payloads.yar
- apt_fakem_backdoor.yar
- apt_fancybear_computrace_agent.yar
- apt_fancybear_dnc.yar
- apt_fancybear_osxagent.yar
- apt_fidelis_phishing_plain_sight.yar
- apt_fin7_backdoor.yar
- apt_fin8.yar
- apt_four_element_sword.yar
- apt_fujinama_rat.yar
- apt_furtim.yar
- apt_fvey_shadowbroker_dec16.yar
- apt_fvey_shadowbroker_jan17.yar
- apt_ghostdragon_gh0st_rat.yar
- apt_glassRAT.yar
- apt_goldenspy.yar
- apt_hackingteam_rules.yar
- apt_ham_tofu_chches.yar
- apt_hellsing_kaspersky.yar
- apt_hiddencobra_bankshot.yar
- apt_hiddencobra_wiper.yar
- apt_iamtheking.yar
- apt_icefog.yar
- apt_indetectables_rat.yar
- apt_industroyer.yar
- apt_irongate.yar
- apt_irontiger.yar
- apt_irontiger_trendmicro.yar
- apt_ism_rat.yar
- apt_kaspersky_duqu2.yar
- apt_ke3chang.yar
- apt_keylogger_cn.yar
- apt_korplug_fast.yar
- apt_kwampirs.yar
- apt_laudanum_webshells.yar
- apt_lazarus_aug20.yar
- apt_lazarus_dec17.yar
- apt_lazarus_gopuram.yar
- apt_lazarus_jan21.yar
- apt_lazarus_vhd_ransomware.yar
- apt_leviathan.yar
- apt_lnx_kobalos.yar
- apt_lnx_linadoor_rootkit.yar
- apt_magichound.yar
- apt_mal_ilo_board_elf.yar
- apt_mal_ru_snake_may23.yar
- apt_miniasp.yar
- apt_minidionis.yar
- apt_mofang.yar
- apt_molerats_jul17.yar
- apt_moonlightmaze.yar
- apt_muddywater.yar
- apt_naikon.yar
- apt_nanocore_rat.yar
- apt_nazar.yar
- apt_netwire_rat.yar
- apt_nk_gen.yar
- apt_nk_inkysquid.yar
- apt_oilrig_chafer_mar18.yar
- apt_onhat_proxy.yar
- apt_op_cleaver.yar
- apt_op_cloudhopper.yar
- apt_op_shadowhammer.yar
- apt_passcv.yar
- apt_passthehashtoolkit.yar
- apt_patchwork.yar
- apt_plead_downloader.yar
- apt_poisonivy.yar
- apt_poisonivy_gen3.yar
- apt_poseidon_group.yar
- apt_poshspy.yar
- apt_project_m.yar
- apt_project_sauron_extras.yar
- apt_promethium_neodymium.yar
- apt_putterpanda.yar
- apt_quarkspwdump.yar
- apt_quasar_rat.yar
- apt_quasar_vermin.yar
- apt_ransom_darkbit_feb23.yar
- apt_ransom_vicesociety_dec22.yar
- apt_revenge_rat.yar
- apt_rocketkitten_keylogger.yar
- apt_royalroad.yar
- apt_ru_crywiper.yar
- apt_rwmc_powershell_creddump.yar
- apt_sakula.yar
- apt_sandworm_cyclops_blink.yar
- apt_sandworm_exim_expl.yar
- apt_saudi_aramco_phish.yar
- apt_scanbox_deeppanda.yar
- apt_scarcruft.yar
- apt_seaduke_unit42.yar
- apt_sednit_delphidownloader.yar
- apt_servantshell.yar
- apt_shamoon.yar
- apt_shamoon2.yar
- apt_sharptongue.yar
- apt_shellcrew_streamex.yar
- apt_sidewinder.yar
- apt_skeletonkey.yar
- apt_snaketurla_osx.yar
- apt_snowglobe_babar.yar
- apt_sofacy_cannon.yar
- apt_sofacy_dec15.yar
- apt_sofacy_fysbis.yar
- apt_sofacy_jun16.yar
- apt_sofacy_zebrocy.yar
- apt_sphinx_moth.yar
- apt_stealer_cisa_ar22_277a.yar
- apt_stuxnet.yar
- apt_stuxshop.yar
- apt_sunspot.yar
- apt_sysscan.yar
- apt_ta18_074A.yar
- apt_ta459.yar
- apt_telebots.yar
- apt_terracotta.yar
- apt_terracotta_liudoor.yar
- apt_tidepool.yar
- apt_turla_neuron.yar
- apt_turla_penquin.yar
- apt_ua_caddywiper.yar
- apt_ua_hermetic_wiper.yar
- apt_ua_wiper_whispergate.yar
- apt_uboat_rat.yar
- apt_unc1151_ua.yar
- apt_unc2447_sombrat.yar
- apt_unc2546_dewmode.yar
- apt_unc2891_mal_jan23.yar
- apt_unit78020_malware.yar
- apt_uscert_ta17-1117a.yar
- apt_venom_linux_rootkit.yar
- apt_volatile_cedar.yar
- apt_vpnfilter.yar
- apt_waterbear.yar
- apt_waterbug.yar
- apt_webmonitor_rat.yar
- apt_wildneutron.yar
- apt_win_plugx.yar
- apt_winnti_hdroot.yar
- apt_winnti_linux.yar
- apt_winnti_ms_report_201701.yar
- apt_woolengoldfish.yar
- apt_xrat.yar
- bkdr_xz_util_cve_2024_3094.yar
- crime_academic_data_centers_camp_may20.yar
- crime_andromeda_jun17.yar
- crime_antifw_installrex.yar
- crime_atm_javadipcash.yar
- crime_atm_loup.yar
- crime_atm_xfsadm.yar
- crime_atm_xfscashncr.yar
- crime_bad_patch.yar
- crime_badrabbit.yar
- crime_bazarbackdoor.yar
- crime_bernhard_pos.yar
- crime_bluenoroff_pos.yar
- crime_buzus_softpulse.yar
- crime_cmstar.yar
- crime_cn_group_btc.yar
- crime_cobalt_gang_pdf.yar
- crime_covid_ransom.yar
- crime_credstealer_generic.yar
- crime_crypto_miner.yar
- crime_cryptowall_svg.yar
- crime_dearcry_ransom.yar
- crime_dexter_trojan.yar
- crime_dridex_xml.yar
- crime_enfal.yar
- crime_envrial.yar
- crime_eternalrocks.yar
- crime_fareit.yar
- crime_fireball.yar
- crime_gamaredon.yar
- crime_goldeneye.yar
- crime_gozi_crypter.yar
- crime_guloader.yar
- crime_h2miner_kinsing.yar
- crime_hermes_ransom.yar
- crime_icedid.yar
- crime_kins_dropper.yar
- crime_kr_malware.yar
- crime_kraken_bot1.yar
- crime_kriskynote.yar
- crime_locky.yar
- crime_loki_bot.yar
- crime_malumpos.yar
- crime_malware_generic.yar
- crime_malware_set_oct16.yar
- crime_maze_ransomware.yar
- crime_mikey_trojan.yar
- crime_mirai.yar
- crime_mywscript_dropper.yar
- crime_nkminer.yar
- crime_nopetya_jun17.yar
- crime_ole_loadswf_cve_2018_4878.yar
- crime_parallax_rat.yar
- crime_phish_gina_dec15.yar
- crime_ransom_conti.yar
- crime_ransom_generic.yar
- crime_ransom_germanwiper.yar
- crime_ransom_lockergoga.yar
- crime_ransom_prolock.yar
- crime_ransom_revil.yar
- crime_ransom_robinhood.yar
- crime_ransom_stealbit_lockbit.yar
- crime_rat_parallax.yar
- crime_rombertik_carbongrabber.yar
- crime_shifu_trojan.yar
- crime_socgholish.yar
- crime_stealer_exfil_zip.yar
- crime_teledoor.yar
- crime_upatre_oct15.yar
- crime_wannacry.yar
- crime_wsh_rat.yar
- crime_xbash.yar
- crime_zeus_panda.yar
- crime_zloader_maldocs.yar
- expl_adselfservice_cve_2021_40539.yar
- expl_cve_2021_1647.yar
- expl_cve_2021_40444.yar
- expl_cve_2022_41040_proxynoshell.yar
- expl_cve_2022_46169_cacti.yar
- expl_ivanti_epmm_mobileiron_cve_2023_35078.yar
- expl_keepass_cve_2023_24055.yar
- expl_libssh_cve_2023_2283_jun23.yar
- expl_log4j_cve_2021_44228.yar
- expl_macos_switcharoo_dec22.yar
- expl_manageengine_jan23.yar
- expl_proxyshell.yar
- expl_spring4shell.yar
- exploit_cve_2014_4076.yar
- exploit_cve_2015_1674.yar
- exploit_cve_2015_1701.yar
- exploit_cve_2015_2426.yar
- exploit_cve_2015_2545.yar
- exploit_cve_2015_5119.yar
- exploit_cve_2017_9800.yar
- exploit_cve_2021_33766_proxytoken.yar
- exploit_cve_2022_22954_vmware_workspace_one.yar
- exploit_cve_2023_38146.yar
- exploit_f5_bigip_cve_2021_22986_log.yar
- exploit_gitlab_cve_2021_22205.yar
- exploit_shitrix.yar
- exploit_uac_elevators.yar
- mal_avemaria_rat.yar
- mal_codecov_hack.yar
- mal_crime_unknown.yar
- mal_ducktail_compromised_certs_jun23.yar
- mal_efile_apr23.yar
- mal_lnx_implant_may22.yar
- mal_passwordstate_backdoor.yar
- mal_qbot_payloads.yar
- mal_ransom_esxi_attacks_feb23.yar
- mal_ransom_lorenz.yar
- mal_ru_sparepart_dec22.yar
- pua_cryptocoin_miner.yar
- pua_xmrig_monero_miner.yar
- pup_lightftp.yar
- spy_equation_fiveeyes.yar
- spy_querty_fiveeyes.yar
- spy_regin_fiveeyes.yar
- susp_vulndriver_hp_hardware_diagnostics_etdsupp_may23.yar
- thor-webshells.yar
- threat_lenovo_superfish.yar
- gen_Excel4Macro_Sharpshooter.yar
- gen_ace_with_exe.yar
- gen_anomalies_keyword_combos.yar
- gen_armitage.yar
- gen_autocad_lsp_malware.yar
- gen_b374k_extra.yar
- gen_bad_pdf.yar
- gen_case_anomalies.yar
- gen_cert_payloads.yar
- gen_chaos_payload.yar
- gen_cmd_script_obfuscated.yar
- gen_cn_hacktool_scripts.yar
- gen_cn_hacktools.yar
- gen_cn_webshells.yar
- gen_cobaltstrike.yar
- gen_crime_bitpaymer.yar
- gen_crimson_rat.yar
- gen_crunchrat.yar
- gen_deviceguard_evasion.yar
- gen_dropper_pdb.yar
- gen_elf_file_anomalies.yar
- gen_empire.yar
- gen_enigma_protector.yar
- gen_event_mute_hook.yar
- gen_excel_xor_obfuscation_velvetsweatshop.yar
- gen_exploit_cve_2017_10271_weblogic.yar
- gen_floxif.yar
- gen_frp_proxy.yar
- gen_gcti_sliver.yar
- gen_gen_cactustorch.yar
- gen_github_net_redteam_tools_names.yar
- gen_github_repo_compromise_myjino_ru.yar
- gen_gobfuscate.yar
- gen_hawkeye.yar
- gen_hktl_koh_tokenstealer.yar
- gen_hktl_venom_lib.yar
- gen_hta_anomalies.yar
- gen_hunting_susp_rar.yar
- gen_impacket_tools.yar
- gen_invoke_mimikatz.yar
- gen_invoke_psimage.yar
- gen_invoke_thehash.yar
- gen_javascript_powershell.yar
- gen_kerberoast.yar
- gen_lnx_malware_indicators.yar
- gen_macro_builders.yar
- gen_mal_backnet.yar
- gen_mal_link.yar
- gen_mal_scripts.yar
- gen_malware_set_qa.yar
- gen_merlin_agent.yar
- gen_metasploit_loader_rsmudge.yar
- gen_metasploit_payloads.yar
- gen_mimikittenz.yar
- gen_mimipenguin.yar
- gen_net_xorstrings.yar
- gen_nimpackt.yar
- gen_nopowershell.yar
- gen_onenote_phish.yar
- gen_osx_backdoor_bella.yar
- gen_p0wnshell.yar
- gen_pirpi.yar
- gen_powerkatz.yar
- gen_powershdll.yar
- gen_powershell_empire.yar
- gen_powershell_suite.yar
- gen_powershell_susp.yar
- gen_powershell_toolkit.yar
- gen_powersploit_dropper.yar
- gen_ps1_shellcode.yar
- gen_ps_empire_eval.yar
- gen_ps_osiris.yar
- gen_pua.yar
- gen_python_encoded_adware.yar
- gen_python_pty_shell.yar
- gen_qakbot_uninstaller.yar
- gen_rar_exfil.yar
- gen_rats_malwareconfig.yar
- gen_recon_indicators.yar
- gen_redmimicry.yar
- gen_redsails.yar
- gen_remote_potato0.yar
- gen_rottenpotato.yar
- gen_rtf_malver_objects.yar
- gen_sfx_with_microsoft_copyright.yar
- gen_sharpcat.yar
- gen_solarwinds_credential_stealer.yar
- gen_susp_bat2exe.yar
- gen_susp_bat_aux.yar
- gen_susp_cmd_var_expansion.yar
- gen_susp_hacktool.yar
- gen_susp_lnk_files.yar
- gen_susp_net_msil.yar
- gen_susp_obfuscation.yar
- gen_susp_office_dropper.yar
- gen_susp_ps_jab.yar
- gen_susp_sfx.yar
- gen_suspicious_strings.yar
- gen_sysinternals_anomaly.yar
- gen_tempracer.yar
- gen_transformed_strings.yar
- gen_unspecified_malware.yar
- gen_url_persitence.yar
- gen_url_to_local_exe.yar
- gen_vhd_anomaly.yar
- gen_webshell_csharp.yar
- gen_win_privesc.yar
- gen_winpayloads.yar
- gen_winshells.yar
- gen_wmi_implant.yar
- gen_ysoserial_payloads.yar
- gen_zoho_rcef_logs.yar
- cn_pentestset_scripts.yar
- cn_pentestset_tools.yar
- cn_pentestset_webshells.yar
- generic_cryptors.yar
- generic_exe2hex_payload.yar
- hktl_bruteratel_c4_badger.yar
- hktl_natbypass.yar
- log_teamviewer_keyboard_layouts.yar
- vul_backdoor_antitheftweb.yar
- vul_cve_2020_0688.yar
- vul_cve_2020_1938.yar
- vul_dell_bios_upd_driver.yar
- vul_drivecrypt.yar
- vul_jquery_fileupload_cve_2018_9206.yar
- vul_php_zlib_backdoor.yar
- vuln_gigabyte_driver.yar
- vuln_keepass_brute_forcible.yar
- vuln_moveit_0day_jun23.yar
- vuln_proxynotshell_cve_2022_41040.yar
- webshell_regeorg.yar
- webshell_xsl_transform.yar
- yara-rules_mal_drivers.yar
- yara-rules_vuln_drivers_strict.yar
# 85cccb3
# The Sliver rules are already covered with gen_gcti_sliver.yar
- name: Download GCTI YARA rules
ansible.builtin.get_url:
url: "https://raw.githubusercontent.com/chronicle/GCTI/main/YARA/CobaltStrike/{{ item }}"
dest: /var/lib/clamav/
owner: root
group: root
mode: '0644'
async: 20
poll: 0
loop:
- CobaltStrike__Resources_Command_Ps1_v2_5_to_v3_7_and_Resources_Compress_Ps1_v3_8_to_v4_x.yara
- CobaltStrike__Resources_Template_Py_v3_3_to_v4_x.yara
- CobaltStrike__Resources_Template_Sct_v3_3_to_v4_x.yara
- CobaltStrike__Resources_Template_Vbs_v3_3_to_v4_x.yara
- CobaltStrike__Resources_Template__x32_x64_Ps1_v1_45_to_v2_5_and_v3_11_to_v3_14.yara
- CobaltStrike__Resources_Template_x64_Ps1_v3_0_to_v4_x_excluding_3_12_3_13.yara
- CobaltStrike__Resources_Template_x86_Vba_v3_8_to_v4_x.yara
- CobaltStrike__Resources_Xor_Bin__32bit_v2_x_to_4_x.yara
- CobaltStrike__Resources_Xor_Bin__64bit_v3_12_to_4_x.yara
# 874d852
- name: Download Elastic YARA rules
ansible.builtin.get_url:
url: "https://raw.githubusercontent.com/elastic/protections-artifacts/main/yara/rules/{{ item }}"
dest: /var/lib/clamav/
owner: root
group: root
mode: '0644'
async: 20
poll: 0
loop:
- Linux_Backdoor_Bash.yar
- Linux_Backdoor_Fontonlake.yar
- Linux_Backdoor_Generic.yar
- Linux_Backdoor_Python.yar
- Linux_Backdoor_Tinyshell.yar
- Linux_Cryptominer_Attribute.yar
- Linux_Cryptominer_Bscope.yar
- Linux_Cryptominer_Bulz.yar
- Linux_Cryptominer_Camelot.yar
- Linux_Cryptominer_Casdet.yar
- Linux_Cryptominer_Ccminer.yar
- Linux_Cryptominer_Flystudio.yar
- Linux_Cryptominer_Generic.yar
- Linux_Cryptominer_Loudminer.yar
- Linux_Cryptominer_Malxmr.yar
- Linux_Cryptominer_Miancha.yar
- Linux_Cryptominer_Minertr.yar
- Linux_Cryptominer_Pgminer.yar
- Linux_Cryptominer_Presenoker.yar
- Linux_Cryptominer_Roboto.yar
- Linux_Cryptominer_Stak.yar
- Linux_Cryptominer_Ursu.yar
- Linux_Cryptominer_Uwamson.yar
- Linux_Cryptominer_Xmrig.yar
- Linux_Cryptominer_Xmrminer.yar
- Linux_Cryptominer_Xpaj.yar
- Linux_Cryptominer_Zexaf.yar
- Linux_Downloader_Generic.yar
- Linux_Exploit_Abrox.yar
- Linux_Exploit_Alie.yar
- Linux_Exploit_CVE_2009_1897.yar
- Linux_Exploit_CVE_2009_2698.yar
- Linux_Exploit_CVE_2009_2908.yar
- Linux_Exploit_CVE_2010_3301.yar
- Linux_Exploit_CVE_2012_0056.yar
- Linux_Exploit_CVE_2014_3153.yar
- Linux_Exploit_CVE_2016_4557.yar
- Linux_Exploit_CVE_2016_5195.yar
- Linux_Exploit_CVE_2017_100011.yar
- Linux_Exploit_CVE_2017_16995.yar
- Linux_Exploit_CVE_2018_10561.yar
- Linux_Exploit_CVE_2019_13272.yar
- Linux_Exploit_CVE_2021_3156.yar
- Linux_Exploit_CVE_2021_3490.yar
- Linux_Exploit_CVE_2021_4034.yar
- Linux_Exploit_CVE_2022_0847.yar
- Linux_Exploit_Cornelgen.yar
- Linux_Exploit_Courier.yar
- Linux_Exploit_Criscras.yar
- Linux_Exploit_Dirtycow.yar
- Linux_Exploit_Enoket.yar
- Linux_Exploit_Foda.yar
- Linux_Exploit_Intfour.yar
- Linux_Exploit_Local.yar
- Linux_Exploit_Log4j.yar
- Linux_Exploit_Lotoor.yar
- Linux_Exploit_Moogrey.yar
- Linux_Exploit_Openssl.yar
- Linux_Exploit_Perl.yar
- Linux_Exploit_Pulse.yar
- Linux_Exploit_Race.yar
- Linux_Exploit_Ramen.yar
- Linux_Exploit_Sorso.yar
- Linux_Exploit_Vmsplice.yar
- Linux_Exploit_Wuftpd.yar
- Linux_Hacktool_Aduh.yar
- Linux_Hacktool_Bruteforce.yar
- Linux_Hacktool_Cleanlog.yar
- Linux_Hacktool_Earthworm.yar
- Linux_Hacktool_Exploitscan.yar
- Linux_Hacktool_Flooder.yar
- Linux_Hacktool_Fontonlake.yar
- Linux_Hacktool_Infectionmonkey.yar
- Linux_Hacktool_Portscan.yar
- Linux_Hacktool_Prochide.yar
- Linux_Hacktool_Tcpscan.yar
- Linux_Hacktool_Wipelog.yar
- Linux_Packer_Patched_UPX.yar
- Linux_Proxy_Frp.yar
- Linux_Ransomware_BlackBasta.yar
- Linux_Ransomware_Conti.yar
- Linux_Ransomware_Gonnacry.yar
- Linux_Ransomware_Hive.yar
- Linux_Ransomware_RedAlert.yar
- Linux_Ransomware_Sodinokibi.yar
- Linux_Rootkit_Adore.yar
- Linux_Rootkit_Arkd.yar
- Linux_Rootkit_Dakkatoni.yar
- Linux_Rootkit_Fontonlake.yar
- Linux_Shellcode_Generic.yar
- Linux_Trojan_Adlibrary.yar
- Linux_Trojan_Asacub.yar
- Linux_Trojan_Azeela.yar
- Linux_Trojan_BPFDoor.yar
- Linux_Trojan_Backconnect.yar
- Linux_Trojan_Backegmm.yar
- Linux_Trojan_Badbee.yar
- Linux_Trojan_Banload.yar
- Linux_Trojan_Bedevil.yar
- Linux_Trojan_Bish.yar
- Linux_Trojan_Bluez.yar
- Linux_Trojan_Cerbu.yar
- Linux_Trojan_Chinaz.yar
- Linux_Trojan_Connectback.yar
- Linux_Trojan_Ddostf.yar
- Linux_Trojan_Dnsamp.yar
- Linux_Trojan_Dofloo.yar
- Linux_Trojan_Dropperl.yar
- Linux_Trojan_Ebury.yar
- Linux_Trojan_Gafgyt.yar
- Linux_Trojan_Ganiw.yar
- Linux_Trojan_Generic.yar
- Linux_Trojan_Getshell.yar
- Linux_Trojan_Godlua.yar
- Linux_Trojan_Godropper.yar
- Linux_Trojan_Gognt.yar
- Linux_Trojan_Hiddad.yar
- Linux_Trojan_Ipstorm.yar
- Linux_Trojan_Ircbot.yar
- Linux_Trojan_Iroffer.yar
- Linux_Trojan_Kaiji.yar
- Linux_Trojan_Kinsing.yar
- Linux_Trojan_Ladvix.yar
- Linux_Trojan_Lady.yar
- Linux_Trojan_Lala.yar
- Linux_Trojan_Malxmr.yar
- Linux_Trojan_Marut.yar
- Linux_Trojan_Masan.yar
- Linux_Trojan_Mech.yar
- Linux_Trojan_Mechbot.yar
- Linux_Trojan_Merlin.yar
- Linux_Trojan_Meterpreter.yar
- Linux_Trojan_Mirai.yar
- Linux_Trojan_Mobidash.yar
- Linux_Trojan_Morpes.yar
- Linux_Trojan_Mumblehard.yar
- Linux_Trojan_Ngioweb.yar
- Linux_Trojan_Nuker.yar
- Linux_Trojan_Orbit.yar
- Linux_Trojan_Patpooty.yar
- Linux_Trojan_XZBackdoor.yar
- Linux_Trojan_Pnscan.yar
- Linux_Trojan_Pornoasset.yar
- Linux_Trojan_Psybnc.yar
- Linux_Trojan_Rbot.yar
- Linux_Trojan_Rekoobe.yar
- Linux_Trojan_Roopre.yar
- Linux_Trojan_Rooter.yar
- Linux_Trojan_Rotajakiro.yar
- Linux_Trojan_Rozena.yar
- Linux_Trojan_Sambashell.yar
- Linux_Trojan_Sckit.yar
- Linux_Trojan_Sdbot.yar
- Linux_Trojan_Setag.yar
- Linux_Trojan_Sfloost.yar
- Linux_Trojan_Shark.yar
- Linux_Trojan_Shellbot.yar
- Linux_Trojan_Skidmap.yar
- Linux_Trojan_Snessik.yar
- Linux_Trojan_Sqlexp.yar
- Linux_Trojan_Sshdkit.yar