-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrules_linux.json
executable file
·3298 lines (3298 loc) · 165 KB
/
rules_linux.json
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
[
{
"title": "Audio Capture",
"id": "a7af2487-9c2f-42e4-9bb9-ff961f0561d5",
"description": "Detects attempts to record audio with arecord utility",
"author": "Pawel Mazur",
"tags": [
"attack.collection",
"attack.t1123"
],
"falsepositives": [
"Unknown"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND a0 = 'arecord' AND a1 = '-vv' AND a2 = '-fdat')"
],
"filename": "lnx_auditd_audio_capture.yml"
},
{
"title": "Network Sniffing - Linux",
"id": "f4d3748a-65d1-4806-bd23-e25728081d01",
"description": "Network sniffing refers to using the network interface on a system to monitor or capture information sent over a wired or wireless connection.\nAn adversary may place a network interface into promiscuous mode to passively access data in transit over the network, or use span ports to capture a larger amount of data.\n",
"author": "Timur Zinniatullin, oscd.community",
"tags": [
"attack.credential-access",
"attack.discovery",
"attack.t1040"
],
"falsepositives": [
"Legitimate administrator or user uses network sniffing tool for legitimate reasons."
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE ((type = 'execve' AND a0 = 'tcpdump' AND a1 = '-c' AND a3 LIKE '%-i%' ESCAPE '\\') OR (type = 'execve' AND a0 = 'tshark' AND a1 = '-c' AND a3 = '-i'))"
],
"filename": "lnx_auditd_network_sniffing.yml"
},
{
"title": "Password Policy Discovery - Linux",
"id": "ca94a6db-8106-4737-9ed2-3e3bb826af0a",
"description": "Detects password policy discovery commands",
"author": "Ömer Günal, oscd.community, Pawel Mazur",
"tags": [
"attack.discovery",
"attack.t1201"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE ((type = 'PATH' AND name IN ('/etc/login.defs', '/etc/pam.d/auth', '/etc/pam.d/common-account', '/etc/pam.d/common-auth', '/etc/pam.d/common-password', '/etc/pam.d/system-auth', '/etc/security/pwquality.conf')) OR (type = 'EXECVE' AND a0 = 'chage' AND a1 IN ('--list', '-l')) OR (type = 'EXECVE' AND a0 = 'passwd' AND a1 IN ('-S', '--status')))"
],
"filename": "lnx_auditd_password_policy_discovery.yml"
},
{
"title": "System Owner or User Discovery - Linux",
"id": "9a0d8ca0-2385-4020-b6c6-cb6153ca56f3",
"description": "Detects the execution of host or user discovery utilities such as \"whoami\", \"hostname\", \"id\", etc.\nAdversaries may use the information from System Owner/User Discovery during automated discovery to shape follow-on behaviors, including whether or not the adversary fully infects the target and/or attempts specific actions.\n",
"author": "Timur Zinniatullin, oscd.community",
"tags": [
"attack.discovery",
"attack.t1033"
],
"falsepositives": [
"Admin activity"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND a0 IN ('hostname', 'id', 'last', 'users', 'w', 'who', 'whoami'))"
],
"filename": "lnx_auditd_user_discovery.yml"
},
{
"title": "File or Folder Permissions Change",
"id": "74c01ace-0152-4094-8ae2-6fd776dd43e5",
"description": "Detects file and folder permission changes.",
"author": "Jakob Weinzettl, oscd.community",
"tags": [
"attack.defense-evasion",
"attack.t1222.002"
],
"falsepositives": [
"User interacting with files permissions (normal/daily behaviour)."
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND (a0 LIKE '%chmod%' ESCAPE '\\' OR a0 LIKE '%chown%' ESCAPE '\\'))"
],
"filename": "lnx_auditd_file_or_folder_permissions.yml"
},
{
"title": "Screen Capture with Import Tool",
"id": "dbe4b9c5-c254-4258-9688-d6af0b7967fd",
"description": "Detects adversary creating screen capture of a desktop with Import Tool.\nHighly recommended using rule on servers, due to high usage of screenshot utilities on user workstations.\nImageMagick must be installed.\n",
"author": "Pawel Mazur",
"tags": [
"attack.collection",
"attack.t1113"
],
"falsepositives": [
"Legitimate use of screenshot utility"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE ((type = 'EXECVE' AND a0 = 'import') AND ((a1 = '-window' AND a2 = 'root' AND (a3 LIKE '%.png' ESCAPE '\\' OR a3 LIKE '%.jpg' ESCAPE '\\' OR a3 LIKE '%.jpeg' ESCAPE '\\')) OR (a1 LIKE '%.png' ESCAPE '\\' OR a1 LIKE '%.jpg' ESCAPE '\\' OR a1 LIKE '%.jpeg' ESCAPE '\\')))"
],
"filename": "lnx_auditd_screencapture_import.yml"
},
{
"title": "Steganography Unzip Hidden Information From Picture File",
"id": "edd595d7-7895-4fa7-acb3-85a18a8772ca",
"description": "Detects extracting of zip file from image file",
"author": "Pawel Mazur",
"tags": [
"attack.defense-evasion",
"attack.t1027.003"
],
"falsepositives": [
"Unknown"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND a0 = 'unzip' AND (a1 LIKE '%.jpg' ESCAPE '\\' OR a1 LIKE '%.png' ESCAPE '\\'))"
],
"filename": "lnx_auditd_unzip_hidden_zip_files_steganography.yml"
},
{
"title": "Clipboard Collection with Xclip Tool - Auditd",
"id": "214e7e6c-f21b-47ff-bb6f-551b2d143fcf",
"description": "Detects attempts to collect data stored in the clipboard from users with the usage of xclip tool.\nXclip has to be installed.\nHighly recommended using rule on servers, due to high usage of clipboard utilities on user workstations.\n",
"author": "Pawel Mazur",
"tags": [
"attack.collection",
"attack.t1115"
],
"falsepositives": [
"Legitimate usage of xclip tools"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND a0 = 'xclip' AND a1 IN ('-selection', '-sel') AND a2 IN ('clipboard', 'clip') AND a3 = '-o')"
],
"filename": "lnx_auditd_clipboard_collection.yml"
},
{
"title": "Steganography Hide Files with Steghide",
"id": "ce446a9e-30b9-4483-8e38-d2c9ad0a2280",
"description": "Detects embedding of files with usage of steghide binary, the adversaries may use this technique to prevent the detection of hidden information.",
"author": "Pawel Mazur",
"tags": [
"attack.defense-evasion",
"attack.t1027.003"
],
"falsepositives": [
"Unknown"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND a0 = 'steghide' AND a1 = 'embed' AND a2 IN ('-cf', '-ef') AND a4 IN ('-cf', '-ef'))"
],
"filename": "lnx_auditd_steghide_embed_steganography.yml"
},
{
"title": "Suspicious Commands Linux",
"id": "1543ae20-cbdf-4ec1-8d12-7664d667a825",
"description": "Detects relevant commands often related to malware or hacking activity",
"author": "Florian Roth (Nextron Systems)",
"tags": [
"attack.execution",
"attack.t1059.004"
],
"falsepositives": [
"Admin activity"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE ((type = 'EXECVE' AND a0 = 'chmod' AND a1 = '777') OR (type = 'EXECVE' AND a0 = 'chmod' AND a1 = 'u+s') OR (type = 'EXECVE' AND a0 = 'cp' AND a1 = '/bin/ksh') OR (type = 'EXECVE' AND a0 = 'cp' AND a1 = '/bin/sh'))"
],
"filename": "lnx_auditd_susp_cmds.yml"
},
{
"title": "Systemd Service Reload or Start",
"id": "2625cc59-0634-40d0-821e-cb67382a3dd7",
"description": "Detects a reload or a start of a service.",
"author": "Jakob Weinzettl, oscd.community",
"tags": [
"attack.persistence",
"attack.t1543.002"
],
"falsepositives": [
"Installation of legitimate service.",
"Legitimate reconfiguration of service."
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND a0 LIKE '%systemctl%' ESCAPE '\\' AND (a1 LIKE '%daemon-reload%' ESCAPE '\\' OR a1 LIKE '%start%' ESCAPE '\\'))"
],
"filename": "lnx_auditd_pers_systemd_reload.yml"
},
{
"title": "Loading of Kernel Module via Insmod",
"id": "106d7cbd-80ff-4985-b682-a7043e5acb72",
"description": "Detects loading of kernel modules with insmod command.\nLoadable Kernel Modules (LKMs) are pieces of code that can be loaded and unloaded into the kernel upon demand.\nAdversaries may use LKMs to obtain persistence within the system or elevate the privileges.\n",
"author": "Pawel Mazur",
"tags": [
"attack.persistence",
"attack.privilege-escalation",
"attack.t1547.006"
],
"falsepositives": [
"Unknown"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (type = 'SYSCALL' AND comm = 'insmod' AND exe = '/usr/bin/kmod')"
],
"filename": "lnx_auditd_load_module_insmod.yml"
},
{
"title": "Disable System Firewall",
"id": "53059bc0-1472-438b-956a-7508a94a91f0",
"description": "Detects disabling of system firewalls which could be used by adversaries to bypass controls that limit usage of the network.",
"author": "Pawel Mazur",
"tags": [
"attack.t1562.004",
"attack.defense-evasion"
],
"falsepositives": [
"Admin activity"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (type LIKE 'SERVICE\\_STOP' ESCAPE '\\' AND unit IN ('firewalld', 'iptables', 'ufw'))"
],
"filename": "lnx_auditd_disable_system_firewall.yml"
},
{
"title": "Steganography Hide Zip Information in Picture File",
"id": "45810b50-7edc-42ca-813b-bdac02fb946b",
"description": "Detects appending of zip file to image",
"author": "Pawel Mazur",
"tags": [
"attack.defense-evasion",
"attack.t1027.003"
],
"falsepositives": [
"Unknown"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND a0 = 'cat' AND (a1 LIKE '%.jpg' ESCAPE '\\' OR a1 LIKE '%.png' ESCAPE '\\') AND a2 LIKE '%.zip' ESCAPE '\\')"
],
"filename": "lnx_auditd_hidden_zip_files_steganography.yml"
},
{
"title": "Linux Network Service Scanning - Auditd",
"id": "3761e026-f259-44e6-8826-719ed8079408",
"description": "Detects enumeration of local or remote network services.",
"author": "Alejandro Ortuno, oscd.community",
"tags": [
"attack.discovery",
"attack.t1046"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'SYSCALL' AND (exe LIKE '%/telnet' ESCAPE '\\' OR exe LIKE '%/nmap' ESCAPE '\\' OR exe LIKE '%/netcat' ESCAPE '\\' OR exe LIKE '%/nc' ESCAPE '\\' OR exe LIKE '%/ncat' ESCAPE '\\' OR exe LIKE '%/nc.openbsd' ESCAPE '\\') AND key LIKE 'network\\_connect\\_4' ESCAPE '\\')"
],
"filename": "lnx_auditd_network_service_scanning.yml"
},
{
"title": "Overwriting the File with Dev Zero or Null",
"id": "37222991-11e9-4b6d-8bdf-60fbe48f753e",
"description": "Detects overwriting (effectively wiping/deleting) of a file.",
"author": "Jakob Weinzettl, oscd.community",
"tags": [
"attack.impact",
"attack.t1485"
],
"falsepositives": [
"Appending null bytes to files.",
"Legitimate overwrite of files."
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND a0 LIKE '%dd%' ESCAPE '\\' AND (a1 LIKE '%if=/dev/null%' ESCAPE '\\' OR a1 LIKE '%if=/dev/zero%' ESCAPE '\\'))"
],
"filename": "lnx_auditd_dd_delete_file.yml"
},
{
"title": "Possible Coin Miner CPU Priority Param",
"id": "071d5e5a-9cef-47ec-bc4e-a42e34d8d0ed",
"description": "Detects command line parameter very often used with coin miners",
"author": "Florian Roth (Nextron Systems)",
"tags": [
"attack.privilege-escalation",
"attack.t1068"
],
"falsepositives": [
"Other tools that use a --cpu-priority flag"
],
"level": "critical",
"rule": [
"SELECT * FROM logs WHERE (a1 LIKE '--cpu-priority%' ESCAPE '\\' OR a2 LIKE '--cpu-priority%' ESCAPE '\\' OR a3 LIKE '--cpu-priority%' ESCAPE '\\' OR a4 LIKE '--cpu-priority%' ESCAPE '\\' OR a5 LIKE '--cpu-priority%' ESCAPE '\\' OR a6 LIKE '--cpu-priority%' ESCAPE '\\' OR a7 LIKE '--cpu-priority%' ESCAPE '\\')"
],
"filename": "lnx_auditd_coinminer.yml"
},
{
"title": "Split A File Into Pieces - Linux",
"id": "2dad0cba-c62a-4a4f-949f-5f6ecd619769",
"description": "Detection use of the command \"split\" to split files into parts and possible transfer.",
"author": "Igor Fits, oscd.community",
"tags": [
"attack.exfiltration",
"attack.t1030"
],
"falsepositives": [
"Legitimate administrative activity"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'SYSCALL' AND comm = 'split')"
],
"filename": "lnx_auditd_split_file_into_pieces.yml"
},
{
"title": "Modify System Firewall",
"id": "323ff3f5-0013-4847-bbd4-250b5edb62cc",
"description": "Detects the removal of system firewall rules. Adversaries may only delete or modify a specific system firewall rule to bypass controls limiting network usage or access.\nDetection rules that match only on the disabling of firewalls will miss this.\n",
"author": "IAI",
"tags": [
"attack.t1562.004",
"attack.defense-evasion"
],
"falsepositives": [
"Legitimate admin activity"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE ((type = 'EXECVE' AND a0 = 'iptables' AND a1 LIKE '%DROP%' ESCAPE '\\') OR (type = 'EXECVE' AND a0 = 'firewall-cmd' AND a1 LIKE '%remove%' ESCAPE '\\') OR (type = 'EXECVE' AND a0 = 'ufw' AND a1 LIKE '%delete%' ESCAPE '\\'))"
],
"filename": "lnx_auditd_modify_system_firewall.yml"
},
{
"title": "Data Compressed",
"id": "a3b5e3e9-1b49-4119-8b8e-0344a01f21ee",
"description": "An adversary may compress data (e.g., sensitive documents) that is collected prior to exfiltration in order to make it portable and minimize the amount of data sent over the network.",
"author": "Timur Zinniatullin, oscd.community",
"tags": [
"attack.exfiltration",
"attack.t1560.001"
],
"falsepositives": [
"Legitimate use of archiving tools by legitimate user."
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE ((type = 'execve' AND a0 = 'zip') OR (type = 'execve' AND a0 = 'gzip' AND a1 = '-k') OR (type = 'execve' AND a0 = 'tar' AND a1 LIKE '%-c%' ESCAPE '\\'))"
],
"filename": "lnx_auditd_data_compressed.yml"
},
{
"title": "Program Executions in Suspicious Folders",
"id": "a39d7fa7-3fbd-4dc2-97e1-d87f546b1bbc",
"description": "Detects program executions in suspicious non-program folders related to malware or hacking activity",
"author": "Florian Roth (Nextron Systems)",
"tags": [
"attack.t1587",
"attack.t1584",
"attack.resource-development"
],
"falsepositives": [
"Admin activity (especially in /tmp folders)",
"Crazy web applications"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (type = 'SYSCALL' AND (exe LIKE '/tmp/%' ESCAPE '\\' OR exe LIKE '/var/www/%' ESCAPE '\\' OR exe LIKE '/home/%/public\\_html/%' ESCAPE '\\' OR exe LIKE '/usr/local/apache2/%' ESCAPE '\\' OR exe LIKE '/usr/local/httpd/%' ESCAPE '\\' OR exe LIKE '/var/apache/%' ESCAPE '\\' OR exe LIKE '/srv/www/%' ESCAPE '\\' OR exe LIKE '/home/httpd/html/%' ESCAPE '\\' OR exe LIKE '/srv/http/%' ESCAPE '\\' OR exe LIKE '/usr/share/nginx/html/%' ESCAPE '\\' OR exe LIKE '/var/lib/pgsql/data/%' ESCAPE '\\' OR exe LIKE '/usr/local/mysql/data/%' ESCAPE '\\' OR exe LIKE '/var/lib/mysql/%' ESCAPE '\\' OR exe LIKE '/var/vsftpd/%' ESCAPE '\\' OR exe LIKE '/etc/bind/%' ESCAPE '\\' OR exe LIKE '/var/named/%' ESCAPE '\\'))"
],
"filename": "lnx_auditd_susp_exe_folders.yml"
},
{
"title": "Bpfdoor TCP Ports Redirect",
"id": "70b4156e-50fc-4523-aa50-c9dddf1993fc",
"description": "All TCP traffic on particular port from attacker is routed to different port. ex. '/sbin/iptables -t nat -D PREROUTING -p tcp -s 192.168.1.1 --dport 22 -j REDIRECT --to-ports 42392'\nThe traffic looks like encrypted SSH communications going to TCP port 22, but in reality is being directed to the shell port once it hits the iptables rule for the attacker host only.\n",
"author": "Rafal Piasecki",
"tags": [
"attack.defense-evasion",
"attack.t1562.004"
],
"falsepositives": [
"Legitimate ports redirect"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE ((type = 'EXECVE' AND a0 LIKE '%iptables' ESCAPE '\\' AND a1 = '-t' AND a2 = 'nat') AND (logs MATCH ('\"--to-ports 42\" OR \"--to-ports 43\"')))"
],
"filename": "lnx_auditd_bpfdoor_port_redirect.yml"
},
{
"title": "Suspicious C2 Activities",
"id": "f7158a64-6204-4d6d-868a-6e6378b467e0",
"description": "Detects suspicious activities as declared by Florian Roth in its 'Best Practice Auditd Configuration'.\nThis includes the detection of the following commands; wget, curl, base64, nc, netcat, ncat, ssh, socat, wireshark, rawshark, rdesktop, nmap.\nThese commands match a few techniques from the tactics \"Command and Control\", including not exhaustively the following; Application Layer Protocol (T1071), Non-Application Layer Protocol (T1095), Data Encoding (T1132)\n",
"author": "Marie Euler",
"tags": [
"attack.command-and-control"
],
"falsepositives": [
"Admin or User activity"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE key LIKE 'susp\\_activity' ESCAPE '\\'"
],
"filename": "lnx_auditd_susp_c2_commands.yml"
},
{
"title": "BPFDoor Abnormal Process ID or Lock File Accessed",
"id": "808146b2-9332-4d78-9416-d7e47012d83d",
"description": "detects BPFDoor .lock and .pid files access in temporary file storage facility",
"author": "Rafal Piasecki",
"tags": [
"attack.execution",
"attack.t1106",
"attack.t1059"
],
"falsepositives": [
"Unlikely"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (type = 'PATH' AND name IN ('/var/run/haldrund.pid', '/var/run/xinetd.lock', '/var/run/kdevrund.pid'))"
],
"filename": "lnx_auditd_bpfdoor_file_accessed.yml"
},
{
"title": "System and Hardware Information Discovery",
"id": "1f358e2e-cb63-43c3-b575-dfb072a6814f",
"description": "Detects system information discovery commands",
"author": "Ömer Günal, oscd.community",
"tags": [
"attack.discovery",
"attack.t1082"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "informational",
"rule": [
"SELECT * FROM logs WHERE (type = 'PATH' AND (name LIKE '/sys/class/dmi/id/bios\\_version' ESCAPE '\\' OR name LIKE '/sys/class/dmi/id/product\\_name' ESCAPE '\\' OR name LIKE '/sys/class/dmi/id/chassis\\_vendor' ESCAPE '\\' OR name LIKE '/proc/scsi/scsi' ESCAPE '\\' OR name LIKE '/proc/ide/hd0/model' ESCAPE '\\' OR name LIKE '/proc/version' ESCAPE '\\' OR name LIKE '/etc/%version' ESCAPE '\\' OR name LIKE '/etc/%release' ESCAPE '\\' OR name LIKE '/etc/issue' ESCAPE '\\'))"
],
"filename": "lnx_auditd_system_info_discovery2.yml"
},
{
"title": "Hidden Files and Directories",
"id": "d08722cd-3d09-449a-80b4-83ea2d9d4616",
"description": "Detects adversary creating hidden file or directory, by detecting directories or files with . as the first character",
"author": "Pawel Mazur",
"tags": [
"attack.defense-evasion",
"attack.t1564.001"
],
"falsepositives": [
"Unknown"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE ((type = 'EXECVE' AND a0 IN ('mkdir', 'touch', 'vim', 'nano', 'vi')) AND (a1 LIKE '%/.%' ESCAPE '\\' OR a1 LIKE '.%' ESCAPE '\\' OR a2 LIKE '%/.%' ESCAPE '\\' OR a2 LIKE '.%' ESCAPE '\\'))"
],
"filename": "lnx_auditd_hidden_files_directories.yml"
},
{
"title": "Binary Padding - Linux",
"id": "c52a914f-3d8b-4b2a-bb75-b3991e75f8ba",
"description": "Adversaries may use binary padding to add junk data and change the on-disk representation of malware.\nThis rule detect using dd and truncate to add a junk data to file.\n",
"author": "Igor Fits, oscd.community",
"tags": [
"attack.defense-evasion",
"attack.t1027.001"
],
"falsepositives": [
"Unknown"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND (( = 'truncate' AND = '-s') OR (( = 'dd' AND = 'if=') AND NOT (logs MATCH ('\"of=\"')))))"
],
"filename": "lnx_auditd_binary_padding.yml"
},
{
"title": "Credentials In Files - Linux",
"id": "df3fcaea-2715-4214-99c5-0056ea59eb35",
"description": "Detecting attempts to extract passwords with grep",
"author": "Igor Fits, oscd.community",
"tags": [
"attack.credential-access",
"attack.t1552.001"
],
"falsepositives": [
"Unknown"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND = 'grep' AND = 'password')"
],
"filename": "lnx_auditd_find_cred_in_files.yml"
},
{
"title": "Screen Capture with Xwd",
"id": "e2f17c5d-b02a-442b-9052-6eb89c9fec9c",
"description": "Detects adversary creating screen capture of a full with xwd. Highly recommended using rule on servers, due high usage of screenshot utilities on user workstations",
"author": "Pawel Mazur",
"tags": [
"attack.collection",
"attack.t1113"
],
"falsepositives": [
"Legitimate use of screenshot utility"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE ((type = 'EXECVE' AND a0 = 'xwd') AND ((a1 = '-root' AND a2 = '-out' AND a3 LIKE '%.xwd' ESCAPE '\\') OR (a1 = '-out' AND a2 LIKE '%.xwd' ESCAPE '\\')))"
],
"filename": "lnx_auditd_screencaputre_xwd.yml"
},
{
"title": "Systemd Service Creation",
"id": "1bac86ba-41aa-4f62-9d6b-405eac99b485",
"description": "Detects a creation of systemd services which could be used by adversaries to execute malicious code.",
"author": "Pawel Mazur",
"tags": [
"attack.persistence",
"attack.t1543.002"
],
"falsepositives": [
"Admin work like legit service installs."
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE ((type = 'PATH' AND nametype = 'CREATE') AND ((name LIKE '/usr/lib/systemd/system/%' ESCAPE '\\' OR name LIKE '/etc/systemd/system/%' ESCAPE '\\') OR name LIKE '%/.config/systemd/user/%' ESCAPE '\\'))"
],
"filename": "lnx_auditd_systemd_service_creation.yml"
},
{
"title": "Masquerading as Linux Crond Process",
"id": "9d4548fa-bba0-4e88-bd66-5d5bf516cda0",
"description": "Masquerading occurs when the name or location of an executable, legitimate or malicious, is manipulated or abused for the sake of evading defenses and observation.\nSeveral different variations of this technique have been observed.\n",
"author": "Timur Zinniatullin, oscd.community",
"tags": [
"attack.defense-evasion",
"attack.t1036.003"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (type = 'execve' AND a0 = 'cp' AND a1 = '/bin/sh' AND a2 LIKE '%/crond' ESCAPE '\\')"
],
"filename": "lnx_auditd_masquerading_crond.yml"
},
{
"title": "Auditing Configuration Changes on Linux Host",
"id": "977ef627-4539-4875-adf4-ed8f780c4922",
"description": "Detect changes in auditd configuration files",
"author": "Mikhail Larin, oscd.community",
"tags": [
"attack.defense-evasion",
"attack.t1562.006"
],
"falsepositives": [
"Legitimate administrative activity"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (type = 'PATH' AND (name LIKE '/etc/audit/%' ESCAPE '\\' OR name LIKE '/etc/libaudit.conf' ESCAPE '\\' OR name LIKE '/etc/audisp/%' ESCAPE '\\'))"
],
"filename": "lnx_auditd_auditing_config_change.yml"
},
{
"title": "Logging Configuration Changes on Linux Host",
"id": "c830f15d-6f6e-430f-8074-6f73d6807841",
"description": "Detect changes of syslog daemons configuration files",
"author": "Mikhail Larin, oscd.community",
"tags": [
"attack.defense-evasion",
"attack.t1562.006"
],
"falsepositives": [
"Legitimate administrative activity"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (type = 'PATH' AND name IN ('/etc/syslog.conf', '/etc/rsyslog.conf', '/etc/syslog-ng/syslog-ng.conf'))"
],
"filename": "lnx_auditd_logging_config_change.yml"
},
{
"title": "Modification of ld.so.preload",
"id": "4b3cb710-5e83-4715-8c45-8b2b5b3e5751",
"description": "Identifies modification of ld.so.preload for shared object injection. This technique is used by attackers to load arbitrary code into processes.",
"author": "E.M. Anhaus (originally from Atomic Blue Detections, Tony Lambert), oscd.community",
"tags": [
"attack.defense-evasion",
"attack.t1574.006"
],
"falsepositives": [
"Unknown"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (type = 'PATH' AND name = '/etc/ld.so.preload')"
],
"filename": "lnx_auditd_ld_so_preload_mod.yml"
},
{
"title": "Linux Keylogging with Pam.d",
"id": "49aae26c-450e-448b-911d-b3c13d178dfc",
"description": "Detect attempt to enable auditing of TTY input",
"author": "Pawel Mazur",
"tags": [
"attack.credential-access",
"attack.t1003",
"attack.t1056.001"
],
"falsepositives": [
"Administrative work"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE ((type = 'PATH' AND name IN ('/etc/pam.d/system-auth', '/etc/pam.d/password-auth')) OR (type LIKE 'TTY' ESCAPE '\\' OR type LIKE 'USER\\_TTY' ESCAPE '\\'))"
],
"filename": "lnx_auditd_keylogging_with_pam_d.yml"
},
{
"title": "Unix Shell Configuration Modification",
"id": "a94cdd87-6c54-4678-a6cc-2814ffe5a13d",
"description": "Detect unix shell configuration modification. Adversaries may establish persistence through executing malicious commands triggered when a new shell is opened.",
"author": "Peter Matkovski, IAI",
"tags": [
"attack.persistence",
"attack.t1546.004"
],
"falsepositives": [
"Admin or User activity are expected to generate some false positives"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (type = 'PATH' AND (name LIKE '/etc/shells' ESCAPE '\\' OR name LIKE '/etc/profile' ESCAPE '\\' OR name LIKE '/etc/profile.d/%' ESCAPE '\\' OR name LIKE '/etc/bash.bashrc' ESCAPE '\\' OR name LIKE '/etc/bashrc' ESCAPE '\\' OR name LIKE '/etc/zsh/zprofile' ESCAPE '\\' OR name LIKE '/etc/zsh/zshrc' ESCAPE '\\' OR name LIKE '/etc/zsh/zlogin' ESCAPE '\\' OR name LIKE '/etc/zsh/zlogout' ESCAPE '\\' OR name LIKE '/etc/csh.cshrc' ESCAPE '\\' OR name LIKE '/etc/csh.login' ESCAPE '\\' OR name LIKE '/root/.bashrc' ESCAPE '\\' OR name LIKE '/root/.bash\\_profile' ESCAPE '\\' OR name LIKE '/root/.profile' ESCAPE '\\' OR name LIKE '/root/.zshrc' ESCAPE '\\' OR name LIKE '/root/.zprofile' ESCAPE '\\' OR name LIKE '/home/%/.bashrc' ESCAPE '\\' OR name LIKE '/home/%/.zshrc' ESCAPE '\\' OR name LIKE '/home/%/.bash\\_profile' ESCAPE '\\' OR name LIKE '/home/%/.zprofile' ESCAPE '\\' OR name LIKE '/home/%/.profile' ESCAPE '\\' OR name LIKE '/home/%/.bash\\_login' ESCAPE '\\' OR name LIKE '/home/%/.bash\\_logout' ESCAPE '\\' OR name LIKE '/home/%/.zlogin' ESCAPE '\\' OR name LIKE '/home/%/.zlogout' ESCAPE '\\'))"
],
"filename": "lnx_auditd_unix_shell_configuration_modification.yml"
},
{
"title": "Linux Capabilities Discovery",
"id": "fe10751f-1995-40a5-aaa2-c97ccb4123fe",
"description": "Detects attempts to discover the files with setuid/setgid capability on them. That would allow adversary to escalate their privileges.",
"author": "Pawel Mazur",
"tags": [
"attack.collection",
"attack.privilege-escalation",
"attack.t1123",
"attack.t1548"
],
"falsepositives": [
"Unknown"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND a0 = 'getcap' AND a1 = '-r' AND a2 = '/')"
],
"filename": "lnx_auditd_capabilities_discovery.yml"
},
{
"title": "Use Of Hidden Paths Or Files",
"id": "9e1bef8d-0fff-46f6-8465-9aa54e128c1e",
"description": "Detects calls to hidden files or files located in hidden directories in NIX systems.",
"author": "David Burkett, @signalblur",
"tags": [
"attack.defense-evasion",
"attack.t1574.001"
],
"falsepositives": [
"Unknown"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE ((type = 'PATH' AND name LIKE '%/.%' ESCAPE '\\') AND NOT ((name LIKE '%/.cache/%' ESCAPE '\\' OR name LIKE '%/.config/%' ESCAPE '\\' OR name LIKE '%/.pyenv/%' ESCAPE '\\' OR name LIKE '%/.rustup/toolchains%' ESCAPE '\\')))"
],
"filename": "lnx_auditd_hidden_binary_execution.yml"
},
{
"title": "Remove Immutable File Attribute - Auditd",
"id": "a5b977d6-8a81-4475-91b9-49dbfcd941f7",
"description": "Detects removing immutable file attribute.",
"author": "Jakob Weinzettl, oscd.community",
"tags": [
"attack.defense-evasion",
"attack.t1222.002"
],
"falsepositives": [
"Administrator interacting with immutable files (e.g. for instance backups)."
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND a0 LIKE '%chattr%' ESCAPE '\\' AND a1 LIKE '%-i%' ESCAPE '\\')"
],
"filename": "lnx_auditd_chattr_immutable_removal.yml"
},
{
"title": "System Information Discovery - Auditd",
"id": "f34047d9-20d3-4e8b-8672-0a35cc50dc71",
"description": "Detects System Information Discovery commands",
"author": "Pawel Mazur",
"tags": [
"attack.discovery",
"attack.t1082"
],
"falsepositives": [
"Likely"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE ((type = 'PATH' AND name IN ('/etc/lsb-release', '/etc/redhat-release', '/etc/issue')) OR (type = 'EXECVE' AND a0 IN ('uname', 'uptime', 'lsmod', 'hostname', 'env')) OR (type = 'EXECVE' AND a0 = 'grep' AND (a1 LIKE '%vbox%' ESCAPE '\\' OR a1 LIKE '%vm%' ESCAPE '\\' OR a1 LIKE '%xen%' ESCAPE '\\' OR a1 LIKE '%virtio%' ESCAPE '\\' OR a1 LIKE '%hv%' ESCAPE '\\')) OR (type = 'EXECVE' AND a0 = 'kmod' AND a1 = 'list'))"
],
"filename": "lnx_auditd_system_info_discovery.yml"
},
{
"title": "Data Exfiltration with Wget",
"id": "cb39d16b-b3b6-4a7a-8222-1cf24b686ffc",
"description": "Detects attempts to post the file with the usage of wget utility.\nThe adversary can bypass the permission restriction with the misconfigured sudo permission for wget utility which could allow them to read files like /etc/shadow.\n",
"author": "Pawel Mazur",
"tags": [
"attack.exfiltration",
"attack.t1048.003"
],
"falsepositives": [
"Legitimate usage of wget utility to post a file"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND a0 = 'wget' AND a1 LIKE '--post-file=%' ESCAPE '\\')"
],
"filename": "lnx_auditd_data_exfil_wget.yml"
},
{
"title": "Webshell Remote Command Execution",
"id": "c0d3734d-330f-4a03-aae2-65dacc6a8222",
"description": "Detects possible command execution by web application/web shell",
"author": "Ilyas Ochkov, Beyu Denis, oscd.community",
"tags": [
"attack.persistence",
"attack.t1505.003"
],
"falsepositives": [
"Admin activity",
"Crazy web applications"
],
"level": "critical",
"rule": [
"SELECT * FROM logs WHERE (type = 'SYSCALL' AND syscall = 'execve' AND key LIKE 'detect\\_execve\\_www' ESCAPE '\\')"
],
"filename": "lnx_auditd_web_rce.yml"
},
{
"title": "Clipboard Collection of Image Data with Xclip Tool",
"id": "f200dc3f-b219-425d-a17e-c38467364816",
"description": "Detects attempts to collect image data stored in the clipboard from users with the usage of xclip tool.\nXclip has to be installed.\nHighly recommended using rule on servers, due to high usage of clipboard utilities on user workstations.\n",
"author": "Pawel Mazur",
"tags": [
"attack.collection",
"attack.t1115"
],
"falsepositives": [
"Legitimate usage of xclip tools"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND a0 = 'xclip' AND a1 IN ('-selection', '-sel') AND a2 IN ('clipboard', 'clip') AND a3 = '-t' AND a4 LIKE 'image/%' ESCAPE '\\' AND a5 = '-o')"
],
"filename": "lnx_auditd_clipboard_image_collection.yml"
},
{
"title": "Creation Of An User Account",
"id": "759d0d51-bc99-4b5e-9add-8f5b2c8e7512",
"description": "Detects the creation of a new user account. Such accounts may be used for persistence that do not require persistent remote access tools to be deployed on the system.",
"author": "Marie Euler, Pawel Mazur",
"tags": [
"attack.t1136.001",
"attack.persistence"
],
"falsepositives": [
"Admin activity"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE ((type = 'SYSCALL' AND exe LIKE '%/useradd' ESCAPE '\\') OR type LIKE 'ADD\\_USER' ESCAPE '\\')"
],
"filename": "lnx_auditd_create_account.yml"
},
{
"title": "Steganography Extract Files with Steghide",
"id": "a5a827d9-1bbe-4952-9293-c59d897eb41b",
"description": "Detects extraction of files with usage of steghide binary, the adversaries may use this technique to prevent the detection of hidden information.",
"author": "Pawel Mazur",
"tags": [
"attack.defense-evasion",
"attack.t1027.003"
],
"falsepositives": [
"Unknown"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (type = 'EXECVE' AND a0 = 'steghide' AND a1 = 'extract' AND a2 = '-sf' AND (a3 LIKE '%.jpg' ESCAPE '\\' OR a3 LIKE '%.png' ESCAPE '\\'))"
],
"filename": "lnx_auditd_steghide_extract_steganography.yml"
},
{
"title": "Persistence Via Cron Files",
"id": "6c4e2f43-d94d-4ead-b64d-97e53fa2bd05",
"description": "Detects creation of cron file or files in Cron directories which could indicates potential persistence.",
"author": "Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research), MSTIC",
"tags": [
"attack.persistence",
"attack.t1053.003"
],
"falsepositives": [
"Any legitimate cron file."
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE ((TargetFilename LIKE '/etc/cron.d/%' ESCAPE '\\' OR TargetFilename LIKE '/etc/cron.daily/%' ESCAPE '\\' OR TargetFilename LIKE '/etc/cron.hourly/%' ESCAPE '\\' OR TargetFilename LIKE '/etc/cron.monthly/%' ESCAPE '\\' OR TargetFilename LIKE '/etc/cron.weekly/%' ESCAPE '\\' OR TargetFilename LIKE '/var/spool/cron/crontabs/%' ESCAPE '\\') OR (TargetFilename LIKE '%/etc/cron.allow%' ESCAPE '\\' OR TargetFilename LIKE '%/etc/cron.deny%' ESCAPE '\\' OR TargetFilename LIKE '%/etc/crontab%' ESCAPE '\\'))"
],
"filename": "file_event_lnx_persistence_cron_files.yml"
},
{
"title": "Triple Cross eBPF Rootkit Default Persistence",
"id": "1a2ea919-d11d-4d1e-8535-06cda13be20f",
"description": "Detects the creation of \"ebpfbackdoor\" files in both \"cron.d\" and \"sudoers.d\" directories. Which both are related to the TripleCross persistence method",
"author": "Nasreddine Bencherchali (Nextron Systems)",
"tags": [
"attack.persistence",
"attack.defense-evasion",
"attack.t1053.003"
],
"falsepositives": [
"Unlikely"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE TargetFilename LIKE '%ebpfbackdoor' ESCAPE '\\'"
],
"filename": "file_event_lnx_triple_cross_rootkit_persistence.yml"
},
{
"title": "Potentially Suspicious Shell Script Creation in Profile Folder",
"id": "13f08f54-e705-4498-91fd-cce9d9cee9f1",
"description": "Detects the creation of shell scripts under the \"profile.d\" path.",
"author": "Joseliyo Sanchez, @Joseliyo_Jstnk",
"tags": [
"attack.persistence"
],
"falsepositives": [
"Legitimate shell scripts in the \"profile.d\" directory could be common in your environment. Apply additional filter accordingly via \"image\", by adding specific filenames you \"trust\" or by correlating it with other events.",
"Regular file creation during system update or software installation by the package manager"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (TargetFilename LIKE '%/etc/profile.d/%' ESCAPE '\\' AND (TargetFilename LIKE '%.csh' ESCAPE '\\' OR TargetFilename LIKE '%.sh' ESCAPE '\\'))"
],
"filename": "file_event_lnx_susp_shell_script_under_profile_directory.yml"
},
{
"title": "Wget Creating Files in Tmp Directory",
"id": "35a05c60-9012-49b6-a11f-6bab741c9f74",
"description": "Detects the use of wget to download content in a temporary directory such as \"/tmp\" or \"/var/tmp\"",
"author": "Joseliyo Sanchez, @Joseliyo_Jstnk",
"tags": [
"attack.command-and-control",
"attack.t1105"
],
"falsepositives": [
"Legitimate downloads of files in the tmp folder."
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/wget' ESCAPE '\\' AND (TargetFilename LIKE '/tmp/%' ESCAPE '\\' OR TargetFilename LIKE '/var/tmp/%' ESCAPE '\\'))"
],
"filename": "file_event_lnx_wget_download_file_in_tmp_dir.yml"
},
{
"title": "Triple Cross eBPF Rootkit Default LockFile",
"id": "c0239255-822c-4630-b7f1-35362bcb8f44",
"description": "Detects the creation of the file \"rootlog\" which is used by the TripleCross rootkit as a way to check if the backdoor is already running.",
"author": "Nasreddine Bencherchali (Nextron Systems)",
"tags": [
"attack.defense-evasion"
],
"falsepositives": [
"Unlikely"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE TargetFilename = '/tmp/rootlog'"
],
"filename": "file_event_lnx_triple_cross_rootkit_lock_file.yml"
},
{
"title": "Persistence Via Sudoers Files",
"id": "ddb26b76-4447-4807-871f-1b035b2bfa5d",
"description": "Detects creation of sudoers file or files in \"sudoers.d\" directory which can be used a potential method to persiste privileges for a specific user.",
"author": "Nasreddine Bencherchali (Nextron Systems)",
"tags": [
"attack.persistence",
"attack.t1053.003"
],
"falsepositives": [
"Creation of legitimate files in sudoers.d folder part of administrator work"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE TargetFilename LIKE '/etc/sudoers.d/%' ESCAPE '\\'"
],
"filename": "file_event_lnx_persistence_sudoers_files.yml"
},
{
"title": "Linux Doas Conf File Creation",
"id": "00eee2a5-fdb0-4746-a21d-e43fbdea5681",
"description": "Detects the creation of doas.conf file in linux host platform.",
"author": "Sittikorn S, Teoderick Contreras",
"tags": [
"attack.privilege-escalation",
"attack.t1548"
],
"falsepositives": [
"Unlikely"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE TargetFilename LIKE '%/etc/doas.conf' ESCAPE '\\'"
],
"filename": "file_event_lnx_doas_conf_creation.yml"
},
{
"title": "Suspicious Invocation of Shell via AWK - Linux",
"id": "8c1a5675-cb85-452f-a298-b01b22a51856",
"description": "Detects the execution of \"awk\" or it's sibling commands, to invoke a shell using the system() function.\nThis behavior is commonly associated with attempts to execute arbitrary commands or escalate privileges, potentially leading to unauthorized access or further exploitation.\n",
"author": "Li Ling, Andy Parkidomo, Robert Rakowski, Blake Hartstein (Bloomberg L.P.)",
"tags": [
"attack.execution",
"attack.t1059"
],
"falsepositives": [
"Unknown"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE ((Image LIKE '%/awk' ESCAPE '\\' OR Image LIKE '%/gawk' ESCAPE '\\' OR Image LIKE '%/mawk' ESCAPE '\\' OR Image LIKE '%/nawk' ESCAPE '\\') AND CommandLine LIKE '%BEGIN {system%' ESCAPE '\\' AND (CommandLine LIKE '%/bin/bash%' ESCAPE '\\' OR CommandLine LIKE '%/bin/dash%' ESCAPE '\\' OR CommandLine LIKE '%/bin/fish%' ESCAPE '\\' OR CommandLine LIKE '%/bin/sh%' ESCAPE '\\' OR CommandLine LIKE '%/bin/zsh%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_awk_shell_spawn.yml"
},
{
"title": "Triple Cross eBPF Rootkit Install Commands",
"id": "22236d75-d5a0-4287-bf06-c93b1770860f",
"description": "Detects default install commands of the Triple Cross eBPF rootkit based on the \"deployer.sh\" script",
"author": "Nasreddine Bencherchali (Nextron Systems)",
"tags": [
"attack.defense-evasion",
"attack.t1014"
],
"falsepositives": [
"Unlikely"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/sudo' ESCAPE '\\' AND CommandLine LIKE '% tc %' ESCAPE '\\' AND CommandLine LIKE '% enp0s3 %' ESCAPE '\\' AND (CommandLine LIKE '% qdisc %' ESCAPE '\\' OR CommandLine LIKE '% filter %' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_triple_cross_rootkit_install.yml"
},
{
"title": "OMIGOD SCX RunAsProvider ExecuteShellCommand",
"id": "21541900-27a9-4454-9c4c-3f0a4240344a",
"description": "Rule to detect the use of the SCX RunAsProvider Invoke_ExecuteShellCommand to execute any UNIX/Linux command using the /bin/sh shell.\nSCXcore, started as the Microsoft Operations Manager UNIX/Linux Agent, is now used in a host of products including\nMicrosoft Operations Manager, Microsoft Azure, and Microsoft Operations Management Suite.\n",
"author": "Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research), MSTIC",
"tags": [
"attack.privilege-escalation",
"attack.initial-access",
"attack.execution",
"attack.t1068",
"attack.t1190",
"attack.t1203"
],
"falsepositives": [
"Legitimate use of SCX RunAsProvider Invoke_ExecuteShellCommand."
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (User = 'root' AND LogonId = '0' AND CurrentDirectory = '/var/opt/microsoft/scx/tmp' AND CommandLine LIKE '%/bin/sh%' ESCAPE '\\')"
],