-
Notifications
You must be signed in to change notification settings - Fork 5
/
100_days_of_yara.yar
4354 lines (3903 loc) · 137 KB
/
100_days_of_yara.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
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
/*
Goals for #100DaysofYARA:
better understanding of bitwise operators
use math module beyond general entropy of a section / resource
position specific things beyond what PE module tells us
do some funky stuff with hashing
*/
import "pe"
import "hash"
import "math"
import "console"
import "dotnet"
import "elf"
rule Logger_Find_Some_Overlaps
{
meta:
description = "mine some overlaps across a sample set - warning this may find legitimate code sharing not evil"
DaysofYARA_day = "100/100"
author = "Greg Lesnewich"
condition:
//mine the sections
for any var_sect in pe.sections: (
var_sect.characteristics and (pe.SECTION_CNT_CODE or pe.SECTION_MEM_EXECUTE) and
console.hex("Bytes at Section Start ", uint32be(var_sect.raw_data_offset))
) and
//mine the entry point
console.hex("Entry Point ", pe.entry_point) and
console.hex("Bytes at Entry Point ", uint32be(pe.entry_point)) and
//mine the exports
for all thing in pe.export_details:(
thing.offset != 0x0 and
console.log("Export Name: ", thing.name) and
console.log("ExportFunc_Partial_Hash: ", hash.md5(thing.offset, 20)))
}
rule SUSP_PE_VersionInfo_SpaceOddity_End
{
meta:
description = "check for a space at the end of any of the PE version dictionary entries"
DaysofYARA_day = "99/100"
author = "Greg Lesnewich"
condition:
for any item in pe.version_info_list:(
item.value iendswith " ")
}
rule SUSP_PE_VersionInfo_SpaceOddity_Start
{
meta:
description = "check for a space at the start of any of the PE version dictionary entries"
DaysofYARA_day = "99/100"
author = "Greg Lesnewich"
condition:
for any item in pe.version_info_list:(
item.value istartswith " " )
}
rule Logger_Export_Hash
{
meta:
description = "hash the first 20 bytes of each export, cause why not?"
DaysofYARA_day = "98/100"
author = "Greg Lesnewich"
condition:
for all thing in pe.export_details:(
thing.offset != 0x0 and
console.log("Export Name: ", thing.name) and
console.log("Export_Func_Hash: ", hash.md5(thing.offset, 20)))
}
rule Example_ExportFunc_Partial_Hash
{
meta:
description = "hash the first 20 bytes of each export to look for shared code across samples"
DaysofYARA_day = "98/100"
author = "Greg Lesnewich"
hash = "030cbd1a51f8583ccfc3fa38a28a5550dc1c84c05d6c0f5eb887d13dedf1da01"
hash = "4dcb633f75b88babc6ee3d359e7ecf0c62ee0464db50d8f9f025e4f3044f8464"
condition:
for all thing in pe.export_details:(
thing.offset != 0x0 and
hash.md5(thing.offset, 20) == "1f9091210406cbcd7f3c98426f94aa60" )
}
rule MAL_WINNTI_ExportFunc_Hash
{
meta:
description = "hash the first 20 bytes of each export to look for shared code across samples"
DaysofYARA_day = "98/100"
author = "Greg Lesnewich"
hash = "5b0b754b24c324f7b53f256e9612ddd5a422e57ae235acf4c757efdedf795f38"
hash = "48a941092fae50f6848aad632a893e677569a5b3a12672f55e99434d03d8812a"
hash = "9c2a133070adb48b168ae146da5f2d3b605fd1929453f9a5a9310a02e5966bfc"
hash = "b03e2465eaa07e46392d337a028dc1f9c1a6c5889604e282aa08e7c38d7bb2b9"
hash = "c400cae4804b1cb16e75b0a7c646bc6d90dbdec7c975f3649ec07186e2c769c7"
hash = "f6c1dba044696f8a27b158f9d9f9d36c43d6765a02baddcf999241c7d77f300a"
hash = "ff7a766f9924cf8461ec3146803879a28b34861021c5267de1cb1fcf832ae150"
hash = "a32bda4bdfe8d04b4f53d5adc82f9bbdb6dc5c7b439ba0bdc02faadd6e16550c"
condition:
for all thing in pe.export_details:(
thing.offset != 0x0 and
hash.md5(thing.offset, 20) == "9f51b30d2f7a6b094cc1f0eccfc33d22" )
}
rule MAL_WildPressure_Milum_RichHeader
{
meta:
description = "rule to detect Milum/WildPressure based on rich header "
DaysofYARA_day = "97/100"
author = "Greg Lesnewich"
condition:
hash.md5(pe.rich_signature.clear_data) == "7feb5a877b8fe9324f621491dc3a7212"
}
rule Logger_RichSignature_Hash_Gen
{
meta:
description = "autogen most of a rule based on rich header hash overlaps "
DaysofYARA_day = "97/100"
author = "Greg Lesnewich"
condition:
console.log("rule RichHeaderHash { condition: uint16(0) == 0x5A4D and hash.md5(pe.rich_signature.clear_data) == ", hash.md5(pe.rich_signature.clear_data))
}
rule Logger_RichSignature_Offset
{
meta:
description = "dump out stats from rich header data"
DaysofYARA_day = "97/100"
author = "Greg Lesnewich"
condition:
console.hex("Rich Header Offset: ", pe.rich_signature.offset) and
console.log("Rich Header Length: ", pe.rich_signature.length)
}
rule SUSP_PE_Resource_Reversed_PE
{
meta:
description = "check for MZ at the end of the of any of the resources to see if they may contain a reversed PE"
DaysofYARA_day = "96/100"
author = "Greg Lesnewich"
condition:
for any resource in pe.resources:
(
uint16be((resource.offset + resource.length) - 2 ) == 0x5a4d
)
}
rule SUSP_PE_Overlay_Reversed_PE
{
meta:
description = "check for MZ at the end of the of the overlay to see if it may contain a reversed PE"
DaysofYARA_day = "96/100"
author = "Greg Lesnewich"
condition:
pe.overlay.offset != 0x0 and
uint16be((pe.overlay.offset + pe.overlay.size) - 2) == 0x5a4d
}
rule SUSP_Reversed_PE_File
{
meta:
description = "Check for MZ at the end of a file to detect a reversed PE"
DaysofYARA_day = "96/100"
author = "Greg Lesnewich"
condition:
uint16be(filesize - 2) == 0x5a4d
}
rule Logger_Export_Bytes
{
meta:
description = "dump out bytes at export offset"
DaysofYARA_day = "95/100"
author = "Greg Lesnewich"
condition:
for all thing in pe.export_details:(
thing.offset != 0x0 and
console.log("Export Name: ", thing.name) and
console.hex("Bytes at Export: ", uint32be(thing.offset)) and
console.hex("Bytes at Export: ", uint32be(thing.offset+4)))
}
rule MAL_PLAINTEE_Export_Bytes
{
meta:
description = "Sometimes adversaries will change up their export names, but potentially keep the same relative functionality! We can see this here by looking for the bytes 0xe90b0000 at the export offset, which will catch exports named Add and OpenURLA across multiple PLAINTEE samples"
hash = "22a5bd54f15f33f4218454e53679d7cfae32c03ddb6ec186fb5e6f8b7f7c098b"
hash = "c35609822e6239934606a99cb3dbc925f4768f0b0654d6a2adc35eca473c505d"
hash = "863a9199decf36895d5d7d148ce9fd622e825f393d7ebe7591b4d37ef3f5f677"
DaysofYARA_day = "95/100"
author = "Greg Lesnewich"
condition:
for any thing in pe.export_details:(
thing.offset != 0x0 and
uint32be(thing.offset) == 0xe90b0000
)
}
rule SUSP_Oddity_Export_Bytes_DPRKMals
{
meta:
description = "Sometimes adversaries will change up their export names, but potentially keep the same relative functionality! This is a much looser association across multiple malware families from DPRK-ish actors. but at least it catches some _similar_ samples with varying export names such as: ASN2_TYPE_newW, CAST_encryptW, or OCSP_resp_findW"
DRATzarus_hash = "18dfdc113366d5361f9c06432608195d7a7467771fc904f32ea70885b8f40d29"
DRATzarus_hash = "c8707d9d7f3ade7f8aa25034e6a73060e5998db980e90452eb0190994036d781"
Klackring_hash = "84b5a89917792291e2425b64e093580ca8d2e106532e433e949cdde3c2db4053"
Klackring_hash = "9af974c4aeac4e2aab36bb0cc604fae21f09833bd0be501567dc6dda62d7ce18"
ThreatNeedle_hash = "25d8ae4678c37251e7ffbaeddc252ae2530ef23f66e4c856d98ef60f399fa3dc"
ThreatNeedle_hash = "913871432989378a042f5023351c2fa2c2f43b497b75ef2a5fd16d65aa7d0f54"
ThreatNeedle_hash = "a75886b016d84c3eaacaf01a3c61e04953a7a3adf38acf77a4a2e3a8f544f855"
DaysofYARA_day = "95/100"
author = "Greg Lesnewich"
condition:
for any thing in pe.export_details:(
thing.offset != 0x0 and
uint32be(thing.offset) == 0x498bc8e9
)
}
rule MAL_FLOWERSHOP_Export_Bytes
{
meta:
description = "detect FLOWERSHOP samples based on bytes at start of export"
hash = "32159d2a16397823bc882ddd3cd77ecdbabe0fde934e62f297b8ff4d7b89832a"
hash = "63735d555f219765d486b3d253e39bd316bbcb1c0ec595ea45ddf6e419bef3cb"
hash = "683ce2c7c80b180768fe4d2a39030dc7c4f67db79d1953ee4803522131f533a3"
hash = "c074aeef97ce81e8c68b7376b124546cabf40e2cd3aff1719d9daa6c3f780532"
hash = "ec41b029c3ff4147b6a5252cb8b659f851f4538d4af0a574f7e16bc1cd14a300"
DaysofYARA_day = "95/100"
author = "Greg Lesnewich"
condition:
for any thing in pe.export_details:(
thing.offset != 0x0 and
uint32be(thing.offset) == 0x33c0c3a1
)
}
rule APT_RU_Turla_Gazer_Embedded_Resource_RichHeader
{
meta:
description = "lets get weird - track embedded Gazer payloads based on their shared rich headers"
hash = "d0b169d2e753191a5c366a863d216bc5a9eb5e173f0bd5a61f126c4fd16484ac"
hash = "473aa2c3ace12abe8a54a088a08e00b7bd71bd66cda16673c308b903c796bec0"
hash = "a65bc4adbd61c098acf40ef81dc8b6b10269af0d9ebbdc18b48439df76c18cb3"
DaysofYARA_day = "94/100"
author = "Greg Lesnewich"
condition:
for any var_rsrc in pe.resources: (
uint16be(var_rsrc.offset) == 0x4d5a and
hash.md5(var_rsrc.offset+0x80, 0x80) == "dd006bd9a43c05c9457a9e6b9e1636ca")
}
rule Logger_PE_Embedded_PE_Resource_RichHeader
{
meta:
description = "lets get weird - try to see if the embedded PE files in the resource section have the same rich header hash. Unlike most deployments of YARA you'll see, we're just going to hash the raw bytes, not the once XOR'd bytes"
DaysofYARA_day = "94/100"
author = "Greg Lesnewich"
reference = "https://www.virusbulletin.com/virusbulletin/2020/01/vb2019-paper-rich-headers-leveraging-mysterious-artifact-pe-format/"
condition:
for any var_rsrc in pe.resources: (
uint16be(var_rsrc.offset) == 0x4d5a and
console.log("Embedded Resource Rich Header Hash: ", hash.md5(var_rsrc.offset+0x80, 0x80))
and console.log("Resource Hash: ", hash.sha256(var_rsrc.offset, var_rsrc.length))
)
}
rule Logger_PE_Resource_Hash
{
meta:
description = "hash all of the resources in an embedded PE to look for cheap overlaps! "
DaysofYARA_day = "93/100"
author = "Greg Lesnewich"
condition:
for all var_rsrc in pe.resources: (
console.log("PE Resource Hash: ", hash.sha256(var_rsrc.offset, var_rsrc.length))
)
}
rule Logger_PE_Section_Hash
{
meta:
description = "hash all of the PE sections that contain code for comparison en masse for analysis "
DaysofYARA_day = "92/100"
author = "Greg Lesnewich"
condition:
for all var_sect in pe.sections: (
var_sect.characteristics & pe.SECTION_CNT_CODE and var_sect.raw_data_size != 0 and
console.log("PE Section Hash: ", hash.md5(var_sect.raw_data_offset, var_sect.raw_data_size))
)
}
rule Logger_ELF_Section_Hash
{
meta:
description = "hash all of the ELF sections for comparison en masse for analysis "
DaysofYARA_day = "92/100"
author = "Greg Lesnewich"
condition:
for all sect in elf.sections:(
sect.size != 0 and
console.log("ELF Section hash: ", hash.md5(sect.offset, sect.size))
)
}
rule Logger_ELF_Section
{
meta:
description = "print out all the ELF section names en masse for analysis "
DaysofYARA_day = "91/100"
author = "Greg Lesnewich"
condition:
for all sec in elf.sections:(
console.log("section name: ", sec.name)
)
}
rule ELF_Feature_SymTab_chmod
{
meta:
description = "check the symbol table for references to chmod that can change a file's permissions"
DaysofYARA_day = "90/100"
author = "Greg Lesnewich"
reference = "https://man7.org/linux/man-pages/man2/chmod.2.html"
reference = "https://blogs.oracle.com/solaris/post/inside-elf-symbol-tables"
condition:
for any thing in elf.symtab: (
thing.name icontains "chmod"
)
}
rule ELF_Feature_SymTab_Manipulate_Socket
{
meta:
description = "check the symbol table for references to tools that can modify options and settings for sockets on an endpoint"
DaysofYARA_day = "90/100"
author = "Greg Lesnewich"
reference = "https://man7.org/linux/man-pages/man2/getsockopt.2.html"
reference = "https://blogs.oracle.com/solaris/post/inside-elf-symbol-tables"
condition:
for any thing in elf.symtab: (
thing.name icontains "getsockopt" or thing.name icontains "setsockopt"
)
}
rule ELF_Feature_DynSym_chmod
{
meta:
description = "check for dynamic symbol chmod that can change a file's permissions"
DaysofYARA_day = "89/100"
author = "Greg Lesnewich"
reference = "https://man7.org/linux/man-pages/man2/chmod.2.html"
reference = "https://blogs.oracle.com/solaris/post/inside-elf-symbol-tables"
condition:
for any thing in elf.dynsym: (
thing.name == "chmod"
)
}
rule ELF_Feature_DynSym_Manipulate_Socket
{
meta:
description = "check for dynamic symbols of tools that can modify options and settings for sockets on an endpoint"
DaysofYARA_day = "89/100"
author = "Greg Lesnewich"
reference = "https://man7.org/linux/man-pages/man2/getsockopt.2.html"
reference = "https://blogs.oracle.com/solaris/post/inside-elf-symbol-tables"
condition:
for any thing in elf.dynsym: (
thing.name == "getsockopt" or thing.name == "setsockopt"
)
}
//rule _broken_dont_run_SUSP_ResourceNames_QakBot_Configs
//{
// meta:
// description = " -- warning -- does not work as expected! it intends to check for odd resource name or type strings that may indicate an unpacked QakBot sample"
// DaysofYARA_day = "88/100"
// author = "Greg Lesnewich"
// reference = "https://mobile.twitter.com/kienbigmummy/status/1507247911801073668"
// condition:
// for any resource in pe.resources:(
// resource.type == 10 and (resource.name_string == "1\x008\x002\x007\x000\x00D\x002\x00E\x00" or
// resource.type_string == "1\x008\x002\x007\x000\x00D\x002\x00E\x00")
// ) and
// for any resource in pe.resources:(
// resource.type == 10 and (resource.name_string == "2\x006\x00F\x005\x001\x007\x00A\x00B\x00" or
// resource.type_string == "2\x006\x00F\x005\x001\x007\x00A\x00B\x00")
// )
//
//}
rule MAL_HeaderTip_Loader_Resource {
meta:
description = "look for PE's with 3 RCDATA resources that start with odd padding and have similar embedded filenames "
DaysofYARA_day = "87/100"
author = "Greg Lesnewich"
hash = "042271aadf2191749876fc99997d0e6bdd3b89159e7ab8cd11a9f13ae65fa6b1"
reference = "https://cert.gov.ua/article/38097"
reference = "https://twitter.com/TomHegel/status/1506393655866802191"
reference = "https://twitter.com/aRtAGGI/status/1506010831221248002"
reference = "https://twitter.com/h2jazi/status/1505887653111209994"
condition:
pe.number_of_resources > 8 and
for 3 resource in pe.resources:(
resource.type == 10 and
uint32be(resource.offset) == 0x5000000
) and
uint32be(pe.resources[9].offset + 0x4) == uint32be(pe.resources[10].offset + 0x4)
}
rule SUSP_Keylogging_Imports {
meta:
description = "look for PE's that contain likely keylogging APIs"
DaysofYARA_day = "86/100"
author = "Greg Lesnewich"
strings:
$ = "OpenClipboard" ascii wide
$ = "GetClipboardData" ascii wide
$ = "CloseClipBoard" ascii wide
$ = "GetKeyState" ascii wide
$ = "GetAsyncKey" ascii wide
condition:
uint16(0) == 0x5a4d and
4 of them
}
rule APT_CN_BlackTech_TSCookie_Embedded_DLL
{
meta:
description = "looking for BlackTech's TSCookie based on loading of RC4 key; use console to print out the key "
DaysofYARA_day = "85/100"
author = "Greg Lesnewich"
reference = "https://blogs.jpcert.or.jp/en/2019/05/tscookie3.html"
reference = "https://github.com/JPCERTCC/aa-tools/blob/master/tscookie_decode.py"
strings:
$lea_rc4 = { 80 68 80 00 00 00 50 C7 40 ?? ?? ?? ?? ?? } // loading RC4 key
//LEA EAX,[EBX + ESI*0x1 + -0x80]
//PUSH 0x80
//PUSH EAX
//MOV dword ptr [EAX + 0x7c],0x5d765a92
condition:
uint16(0) == 0x5a4d
and filesize < 1500KB
and all of them
and console.hex("RC4 Key: ", uint32be(@lea_rc4+9))
}
rule SUSP_PE_NonStandard_Number_Data_Dirs
{
meta:
description = "look for PE's that do not have the 'normal' number of data directories"
DaysofYARA_day = "84/100"
author = "Greg Lesnewich"
condition:
pe.number_of_rva_and_sizes != 16
}
rule SUSP_Dotnet_RSRC_Name_crypt
{
meta:
description = "look for dotnet resource names containing crypt"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "crypt"
)
}
rule SUSP_Dotnet_RSRC_Name_backdoor
{
meta:
description = "look for dotnet resource names containing backdoor"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "backdoor"
)
}
rule SUSP_Dotnet_RSRC_Name_hacker
{
meta:
description = "look for dotnet resource names containing hacker"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "hacker"
)
}
rule SUSP_Dotnet_RSRC_Name_loader
{
meta:
description = "look for dotnet resource names containing loader"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "loader"
)
}
rule SUSP_Dotnet_RSRC_Name_locker
{
meta:
description = "look for dotnet resource names containing locker"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "locker"
)
}
rule SUSP_Dotnet_RSRC_Name_ransom
{
meta:
description = "look for dotnet resource names containing ransom"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "ransom"
)
}
rule SUSP_Dotnet_RSRC_Name_http
{
meta:
description = "look for dotnet resource names containing http"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "http"
)
}
rule SUSP_Dotnet_RSRC_Name_dns
{
meta:
description = "look for dotnet resource names containing dns"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "dns"
)
}
rule SUSP_Dotnet_RSRC_Name_0day
{
meta:
description = "look for dotnet resource names containing "
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "0day"
)
}
rule SUSP_Dotnet_RSRC_Name_binary
{
meta:
description = "look for dotnet resource names containing "
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "binary"
)
}
rule SUSP_Dotnet_RSRC_Name_bypass
{
meta:
description = "look for dotnet resource names containing "
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "bypass"
)
}
rule SUSP_Dotnet_RSRC_Name_cve
{
meta:
description = "look for dotnet resource names containing "
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "cve-"
)
}
rule SUSP_Dotnet_RSRC_Name_hook
{
meta:
description = "look for dotnet resource names containing hook"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "hook"
)
}
rule SUSP_Dotnet_RSRC_Name_inject
{
meta:
description = "look for dotnet resource names containing inject"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "inject"
)
}
rule SUSP_Dotnet_RSRC_Name_katz
{
meta:
description = "look for dotnet resource names containing katz"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "katz"
)
}
rule SUSP_Dotnet_RSRC_Name_keylog
{
meta:
description = "look for dotnet resource names containing keylog"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "keylog"
)
}
rule SUSP_Dotnet_RSRC_Name_mimikatz
{
meta:
description = "look for dotnet resource names containing mimikatz"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "mimikatz"
)
}
rule SUSP_Dotnet_RSRC_Name_obfuscat
{
meta:
description = "look for dotnet resource names containing obfuscat"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "obfuscat"
)
}
rule SUSP_Dotnet_RSRC_Name_overflow
{
meta:
description = "look for dotnet resource names containing overflow"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "overflow"
)
}
rule SUSP_Dotnet_RSRC_Name_payload
{
meta:
description = "look for dotnet resource names containing payload"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "payload"
)
}
rule SUSP_Dotnet_RSRC_Name_reflect
{
meta:
description = "look for dotnet resource names containing reflect"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "reflect"
)
}
rule SUSP_Dotnet_RSRC_Name_registry
{
meta:
description = "look for dotnet resource names containing registry"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "registry"
)
}
rule SUSP_Dotnet_RSRC_Name_rootkit
{
meta:
description = "look for dotnet resource names containing rootkit"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "rootkit"
)
}
rule SUSP_Dotnet_RSRC_Name_shell
{
meta:
description = "look for dotnet resource names containing shell"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "shell"
)
}
rule SUSP_Dotnet_RSRC_Name_steal
{
meta:
description = "look for dotnet resource names containing steal"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "steal"
)
}
rule SUSP_Dotnet_RSRC_Name_x32
{
meta:
description = "look for dotnet resource names containing x32"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "x32"
)
}
rule SUSP_Dotnet_RSRC_Name_x64
{
meta:
description = "look for dotnet resource names containing x64"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "x64"
)
}
rule SUSP_Dotnet_RSRC_Name_x86
{
meta:
description = "look for dotnet resource names containing x86"
DaysofYARA_day = "83/100"
author = "Greg Lesnewich"
condition:
for any item in dotnet.resources: (
item.name icontains "x86"
)
}
rule PE_Feature_DLLName_taskhost
{
meta:
description = "look dll name with suspicious string taskhost"
DaysofYARA_day = "82/100"
author = "Greg Lesnewich"
condition:
pe.dll_name icontains "taskhost"
}
rule PE_Feature_DLLName_lsass
{
meta:
description = "look dll name with suspicious string lsass"
DaysofYARA_day = "82/100"
author = "Greg Lesnewich"
condition:
pe.dll_name icontains "lsass"
}
rule PE_Feature_DLLName_conhost
{
meta:
description = "look dll name with suspicious string conhost"
DaysofYARA_day = "82/100"
author = "Greg Lesnewich"
condition:
pe.dll_name icontains "conhost"
}
rule PE_Feature_DLLName_svchost
{
meta:
description = "look dll name with suspicious string svchost"
DaysofYARA_day = "82/100"
author = "Greg Lesnewich"
condition:
pe.dll_name icontains "svchost"
}
rule PE_Feature_PDB_taskhost
{
meta:
description = "look PDB path with suspicious string taskhost"
DaysofYARA_day = "82/100"
author = "Greg Lesnewich"
condition:
pe.pdb_path icontains "taskhost"
}
rule PE_Feature_PDB_lsass
{
meta:
description = "look PDB path with suspicious string lsass"
DaysofYARA_day = "82/100"
author = "Greg Lesnewich"
condition:
pe.pdb_path icontains "lsass"
}
rule PE_Feature_PDB_conhost
{
meta:
description = "look PDB path with suspicious string conhost"
DaysofYARA_day = "82/100"
author = "Greg Lesnewich"
condition:
pe.pdb_path icontains "conhost"
}
rule PE_Feature_PDB_svchost
{
meta:
description = "look PDB path with suspicious string svchost"
DaysofYARA_day = "82/100"
author = "Greg Lesnewich"
condition:
pe.pdb_path icontains "svchost"
}
rule PE_Feature_OriginalFilename_taskhost
{
meta:
description = "look for Original Filename with suspicious string taskhost"
DaysofYARA_day = "82/100"
author = "Greg Lesnewich"
condition:
pe.version_info["OriginalFilename"] icontains "taskhost"
}
rule PE_Feature_OriginalFilename_lsass
{
meta:
description = "look for Original Filename with suspicious string lsass"
DaysofYARA_day = "82/100"
author = "Greg Lesnewich"
condition:
pe.version_info["OriginalFilename"] icontains "lsass"
}
rule PE_Feature_OriginalFilename_conhost
{
meta:
description = "look for Original Filename with suspicious string conhost"
DaysofYARA_day = "82/100"
author = "Greg Lesnewich"
condition:
pe.version_info["OriginalFilename"] icontains "conhost"
}
rule PE_Feature_OriginalFilename_svchost
{
meta:
description = "look for Original Filename with suspicious string svchost"
DaysofYARA_day = "82/100"
author = "Greg Lesnewich"
condition:
pe.version_info["OriginalFilename"] icontains "svchost"
}
rule SUSP_DotNet_AssemblyName_taskhost
{
meta:
description = "look dotnet assembly name with suspicious string taskhost"
DaysofYARA_day = "82/100"
author = "Greg Lesnewich"
condition:
dotnet.assembly.name icontains "taskhost"
}
rule SUSP_DotNet_AssemblyName_lsass
{
meta:
description = "look dotnet assembly name with suspicious string lsass"