-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrules_linux.json
executable file
·3279 lines (3279 loc) · 163 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": "Chmod Suspicious Directory",
"id": "6419afd1-3742-47a5-a7e6-b50386cd15f8",
"description": "Detects chmod targeting files in abnormal directory paths.",
"author": "Christopher Peacock @SecurePeacock, SCYTHE @scythe_io",
"tags": [
"attack.defense-evasion",
"attack.t1222.002"
],
"falsepositives": [
"Admin changing file permissions."
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/chmod' ESCAPE '\\' AND (CommandLine LIKE '%/tmp/%' ESCAPE '\\' OR CommandLine LIKE '%/.Library/%' ESCAPE '\\' OR CommandLine LIKE '%/etc/%' ESCAPE '\\' OR CommandLine LIKE '%/opt/%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_susp_chmod_directories.yml"
},
{
"title": "Bash Interactive Shell",
"id": "6104e693-a7d6-4891-86cb-49a258523559",
"description": "Detects execution of the bash shell with the interactive flag \"-i\".",
"author": "@d4ns4n_",
"tags": [
"attack.execution"
],
"falsepositives": [
"Unknown"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/bash' ESCAPE '\\' AND CommandLine LIKE '% -i %' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_bash_interactive_shell.yml"
},
{
"title": "Atlassian Confluence CVE-2022-26134",
"id": "7fb14105-530e-4e2e-8cfb-99f7d8700b66",
"description": "Detects spawning of suspicious child processes by Atlassian Confluence server which may indicate successful exploitation of CVE-2022-26134",
"author": "Nasreddine Bencherchali (Nextron Systems)",
"tags": [
"attack.initial-access",
"attack.execution",
"attack.t1190",
"attack.t1059",
"cve.2022-26134"
],
"falsepositives": [
"Unknown"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (ParentImage LIKE '/opt/atlassian/confluence/%' ESCAPE '\\' AND ParentImage LIKE '%/java' ESCAPE '\\' AND (CommandLine LIKE '%/bin/sh%' ESCAPE '\\' OR CommandLine LIKE '%bash%' ESCAPE '\\' OR CommandLine LIKE '%dash%' ESCAPE '\\' OR CommandLine LIKE '%ksh%' ESCAPE '\\' OR CommandLine LIKE '%zsh%' ESCAPE '\\' OR CommandLine LIKE '%csh%' ESCAPE '\\' OR CommandLine LIKE '%fish%' ESCAPE '\\' OR CommandLine LIKE '%curl%' ESCAPE '\\' OR CommandLine LIKE '%wget%' ESCAPE '\\' OR CommandLine LIKE '%python%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_cve_2022_26134_atlassian_confluence.yml"
},
{
"title": "Clear Linux Logs",
"id": "80915f59-9b56-4616-9de0-fd0dea6c12fe",
"description": "Detects attempts to clear logs on the system. Adversaries may clear system logs to hide evidence of an intrusion",
"author": "Ömer Günal, oscd.community",
"tags": [
"attack.defense-evasion",
"attack.t1070.002"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE ((Image LIKE '%/rm' ESCAPE '\\' OR Image LIKE '%/shred' ESCAPE '\\' OR Image LIKE '%/unlink' ESCAPE '\\') AND (CommandLine LIKE '%/var/log%' ESCAPE '\\' OR CommandLine LIKE '%/var/spool/mail%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_clear_logs.yml"
},
{
"title": "Pnscan Binary Data Transmission Activity",
"id": "97de11cd-4b67-4abf-9a8b-1020e670aa9e",
"description": "Detects command line patterns associated with the use of Pnscan for sending and receiving binary data across the network.\nThis behavior has been identified in a Linux malware campaign targeting Docker, Apache Hadoop, Redis, and Confluence and was previously used by the threat actor known as TeamTNT\n",
"author": "David Burkett (@signalblur)",
"tags": [
"attack.discovery",
"attack.t1046"
],
"falsepositives": [
"Unknown"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE CommandLine REGEXP '-(W|R)\\s?(\\s|\"|')([0-9a-fA-F]{2}\\s?){2,20}(\\s|\"|')'"
],
"filename": "proc_creation_lnx_pnscan_binary_cli_pattern.yml"
},
{
"title": "ESXi System Information Discovery Via ESXCLI",
"id": "e80273e1-9faf-40bc-bd85-dbaff104c4e9",
"description": "Detects execution of the \"esxcli\" command with the \"system\" flag in order to retrieve information about the different component of the system. Such as accounts, modules, NTP, etc.",
"author": "Cedric Maurugeon",
"tags": [
"attack.discovery",
"attack.t1033",
"attack.t1007"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/esxcli' ESCAPE '\\' AND CommandLine LIKE '%system%' ESCAPE '\\' AND (CommandLine LIKE '% get%' ESCAPE '\\' OR CommandLine LIKE '% list%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_esxcli_system_discovery.yml"
},
{
"title": "Clipboard Collection with Xclip Tool",
"id": "ec127035-a636-4b9a-8555-0efd4e59f316",
"description": "Detects attempts to collect data stored in the clipboard from users with the usage of xclip tool. Xclip has to be installed.\nHighly recommended using rule on servers, due to high usage of clipboard utilities on user workstations.\n",
"author": "Pawel Mazur, Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research), MSTIC",
"tags": [
"attack.collection",
"attack.t1115"
],
"falsepositives": [
"Legitimate usage of xclip tools."
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%xclip%' ESCAPE '\\' AND CommandLine LIKE '%-sel%' ESCAPE '\\' AND CommandLine LIKE '%clip%' ESCAPE '\\' AND CommandLine LIKE '%-o%' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_clipboard_collection.yml"
},
{
"title": "System Network Connections Discovery - Linux",
"id": "4c519226-f0cd-4471-bd2f-6fbb2bb68a79",
"description": "Detects usage of system utilities to discover system network connections",
"author": "Daniil Yugoslavskiy, oscd.community",
"tags": [
"attack.discovery",
"attack.t1049"
],
"falsepositives": [
"Legitimate activities"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE ((Image LIKE '%/who' ESCAPE '\\' OR Image LIKE '%/w' ESCAPE '\\' OR Image LIKE '%/last' ESCAPE '\\' OR Image LIKE '%/lsof' ESCAPE '\\' OR Image LIKE '%/netstat' ESCAPE '\\') AND NOT ((ParentCommandLine LIKE '%/usr/bin/landscape-sysinfo%' ESCAPE '\\' AND Image LIKE '%/who' ESCAPE '\\')))"
],
"filename": "proc_creation_lnx_system_network_connections_discovery.yml"
},
{
"title": "Connection Proxy",
"id": "72f4ab3f-787d-495d-a55d-68c2ff46cf4c",
"description": "Detects setting proxy configuration",
"author": "Ömer Günal",
"tags": [
"attack.defense-evasion",
"attack.t1090"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (CommandLine LIKE '%http\\_proxy=%' ESCAPE '\\' OR CommandLine LIKE '%https\\_proxy=%' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_proxy_connection.yml"
},
{
"title": "Crontab Enumeration",
"id": "403ed92c-b7ec-4edd-9947-5b535ee12d46",
"description": "Detects usage of crontab to list the tasks of the user",
"author": "Joseliyo Sanchez, @Joseliyo_Jstnk",
"tags": [
"attack.discovery",
"attack.t1007"
],
"falsepositives": [
"Legitimate use of crontab"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/crontab' ESCAPE '\\' AND CommandLine LIKE '% -l%' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_crontab_enumeration.yml"
},
{
"title": "ESXi VM List Discovery Via ESXCLI",
"id": "5f1573a7-363b-4114-9208-ad7a61de46eb",
"description": "Detects execution of the \"esxcli\" command with the \"vm\" flag in order to retrieve information about the installed VMs.",
"author": "Cedric Maurugeon",
"tags": [
"attack.discovery",
"attack.t1033",
"attack.t1007"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/esxcli' ESCAPE '\\' AND CommandLine LIKE '%vm process%' ESCAPE '\\' AND CommandLine LIKE '% list' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_esxcli_vm_discovery.yml"
},
{
"title": "ESXi Network Configuration Discovery Via ESXCLI",
"id": "33e814e0-1f00-4e43-9c34-31fb7ae2b174",
"description": "Detects execution of the \"esxcli\" command with the \"network\" flag in order to retrieve information about the network configuration.",
"author": "Cedric Maurugeon",
"tags": [
"attack.discovery",
"attack.t1033",
"attack.t1007"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/esxcli' ESCAPE '\\' AND CommandLine LIKE '%network%' ESCAPE '\\' AND (CommandLine LIKE '% get%' ESCAPE '\\' OR CommandLine LIKE '% list%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_esxcli_network_discovery.yml"
},
{
"title": "Shell Execution via Find - Linux",
"id": "6adfbf8f-52be-4444-9bac-81b539624146",
"description": "Detects the use of the find command to execute a shell. Such behavior may be associated with privilege escalation, unauthorized command execution, or exploitation attempt.\n",
"author": "Li Ling, Andy Parkidomo, Robert Rakowski, Blake Hartstein (Bloomberg L.P.)",
"tags": [
"attack.discovery",
"attack.t1083"
],
"falsepositives": [
"Unknown"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/find' ESCAPE '\\' AND CommandLine LIKE '% . %' ESCAPE '\\' AND CommandLine LIKE '%-exec%' 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_find_shell_execution.yml"
},
{
"title": "BPFtrace Unsafe Option Usage",
"id": "f8341cb2-ee25-43fa-a975-d8a5a9714b39",
"description": "Detects the usage of the unsafe bpftrace option",
"author": "Andreas Hunkeler (@Karneades)",
"tags": [
"attack.execution",
"attack.t1059.004"
],
"falsepositives": [
"Legitimate usage of the unsafe option"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%bpftrace' ESCAPE '\\' AND CommandLine LIKE '%--unsafe%' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_bpftrace_unsafe_option_usage.yml"
},
{
"title": "Potential Netcat Reverse Shell Execution",
"id": "7f734ed0-4f47-46c0-837f-6ee62505abd9",
"description": "Detects execution of netcat with the \"-e\" flag followed by common shells. This could be a sign of a potential reverse shell setup.",
"author": "@d4ns4n_, Nasreddine Bencherchali (Nextron Systems)",
"tags": [
"attack.execution",
"attack.t1059"
],
"falsepositives": [
"Unlikely"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE ((Image LIKE '%/nc' ESCAPE '\\' OR Image LIKE '%/ncat' ESCAPE '\\') AND (CommandLine LIKE '% -c %' ESCAPE '\\' OR CommandLine LIKE '% -e %' ESCAPE '\\') AND (CommandLine LIKE '% ash%' ESCAPE '\\' OR CommandLine LIKE '% bash%' ESCAPE '\\' OR CommandLine LIKE '% bsh%' ESCAPE '\\' OR CommandLine LIKE '% csh%' ESCAPE '\\' OR CommandLine LIKE '% ksh%' ESCAPE '\\' OR CommandLine LIKE '% pdksh%' ESCAPE '\\' OR CommandLine LIKE '% sh%' ESCAPE '\\' OR CommandLine LIKE '% tcsh%' ESCAPE '\\' OR CommandLine LIKE '%/bin/ash%' ESCAPE '\\' OR CommandLine LIKE '%/bin/bash%' ESCAPE '\\' OR CommandLine LIKE '%/bin/bsh%' ESCAPE '\\' OR CommandLine LIKE '%/bin/csh%' ESCAPE '\\' OR CommandLine LIKE '%/bin/ksh%' ESCAPE '\\' OR CommandLine LIKE '%/bin/pdksh%' ESCAPE '\\' OR CommandLine LIKE '%/bin/sh%' ESCAPE '\\' OR CommandLine LIKE '%/bin/tcsh%' ESCAPE '\\' OR CommandLine LIKE '%/bin/zsh%' ESCAPE '\\' OR CommandLine LIKE '%$IFSash%' ESCAPE '\\' OR CommandLine LIKE '%$IFSbash%' ESCAPE '\\' OR CommandLine LIKE '%$IFSbsh%' ESCAPE '\\' OR CommandLine LIKE '%$IFScsh%' ESCAPE '\\' OR CommandLine LIKE '%$IFSksh%' ESCAPE '\\' OR CommandLine LIKE '%$IFSpdksh%' ESCAPE '\\' OR CommandLine LIKE '%$IFSsh%' ESCAPE '\\' OR CommandLine LIKE '%$IFStcsh%' ESCAPE '\\' OR CommandLine LIKE '%$IFSzsh%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_netcat_reverse_shell.yml"
},
{
"title": "Container Residence Discovery Via Proc Virtual FS",
"id": "746c86fb-ccda-4816-8997-01386263acc4",
"description": "Detects potential container discovery via listing of certain kernel features in the \"/proc\" virtual filesystem",
"tags": [
"attack.discovery",
"attack.t1082"
],
"author": "Seth Hanford",
"falsepositives": [
"Legitimate system administrator usage of these commands",
"Some container tools or deployments may use these techniques natively to determine how they proceed with execution, and will need to be filtered"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE ((Image LIKE '%awk' ESCAPE '\\' OR Image LIKE '%/cat' ESCAPE '\\' OR Image LIKE '%grep' ESCAPE '\\' OR Image LIKE '%/head' ESCAPE '\\' OR Image LIKE '%/less' ESCAPE '\\' OR Image LIKE '%/more' ESCAPE '\\' OR Image LIKE '%/nl' ESCAPE '\\' OR Image LIKE '%/tail' ESCAPE '\\') AND (CommandLine LIKE '%/proc/2/%' ESCAPE '\\' OR (CommandLine LIKE '%/proc/%' ESCAPE '\\' AND (CommandLine LIKE '%/cgroup' ESCAPE '\\' OR CommandLine LIKE '%/sched' ESCAPE '\\'))))"
],
"filename": "proc_creation_lnx_susp_container_residence_discovery.yml"
},
{
"title": "Named Pipe Created Via Mkfifo",
"id": "9d779ce8-5256-4b13-8b6f-b91c602b43f4",
"description": "Detects the creation of a new named pipe using the \"mkfifo\" utility",
"author": "Nasreddine Bencherchali (Nextron Systems)",
"tags": [
"attack.execution"
],
"falsepositives": [
"Unknown"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE Image LIKE '%/mkfifo' ESCAPE '\\'"
],
"filename": "proc_creation_lnx_mkfifo_named_pipe_creation.yml"
},
{
"title": "Potential Container Discovery Via Inodes Listing",
"id": "43e26eb5-cd58-48d1-8ce9-a273f5d298d8",
"description": "Detects listing of the inodes of the \"/\" directory to determine if the we are running inside of a container.",
"tags": [
"attack.discovery",
"attack.t1082"
],
"author": "Seth Hanford",
"falsepositives": [
"Legitimate system administrator usage of these commands",
"Some container tools or deployments may use these techniques natively to determine how they proceed with execution, and will need to be filtered"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/ls' ESCAPE '\\' AND CommandLine LIKE '% -%i%' ESCAPE '\\' AND CommandLine LIKE '% -%d%' ESCAPE '\\' AND CommandLine LIKE '% /' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_susp_inod_listing.yml"
},
{
"title": "Python Spawning Pretty TTY Via PTY Module",
"id": "c4042d54-110d-45dd-a0e1-05c47822c937",
"description": "Detects a python process calling to the PTY module in order to spawn a pretty tty which could be indicative of potential reverse shell activity.\n",
"author": "Nextron Systems",
"tags": [
"attack.execution",
"attack.t1059"
],
"falsepositives": [
"Unknown"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (((Image LIKE '%/python' ESCAPE '\\' OR Image LIKE '%/python2' ESCAPE '\\' OR Image LIKE '%/python3' ESCAPE '\\') OR (Image LIKE '%/python2.%' ESCAPE '\\' OR Image LIKE '%/python3.%' ESCAPE '\\')) AND (CommandLine LIKE '%import pty%' ESCAPE '\\' OR CommandLine LIKE '%from pty %' ESCAPE '\\') AND CommandLine LIKE '%spawn%' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_python_pty_spawn.yml"
},
{
"title": "Linux Recon Indicators",
"id": "0cf7a157-8879-41a2-8f55-388dd23746b7",
"description": "Detects events with patterns found in commands used for reconnaissance on linux systems",
"author": "Florian Roth (Nextron Systems)",
"tags": [
"attack.reconnaissance",
"attack.t1592.004",
"attack.credential-access",
"attack.t1552.001"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (CommandLine LIKE '% -name .htpasswd%' ESCAPE '\\' OR CommandLine LIKE '% -perm -4000 %' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_susp_recon_indicators.yml"
},
{
"title": "Download File To Potentially Suspicious Directory Via Wget",
"id": "cf610c15-ed71-46e1-bdf8-2bd1a99de6c4",
"description": "Detects the use of wget to download content to a suspicious directory",
"author": "Joseliyo Sanchez, @Joseliyo_Jstnk",
"tags": [
"attack.command-and-control",
"attack.t1105"
],
"falsepositives": [
"Unknown"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/wget' ESCAPE '\\' AND (CommandLine REGEXP '\\s-O\\s' OR CommandLine LIKE '%--output-document%' ESCAPE '\\') AND CommandLine LIKE '%/tmp/%' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_wget_download_suspicious_directory.yml"
},
{
"title": "Copy Passwd Or Shadow From TMP Path",
"id": "fa4aaed5-4fe0-498d-bbc0-08e3346387ba",
"description": "Detects when the file \"passwd\" or \"shadow\" is copied from tmp path",
"author": "Joseliyo Sanchez, @Joseliyo_Jstnk",
"tags": [
"attack.credential-access",
"attack.t1552.001"
],
"falsepositives": [
"Unknown"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/cp' ESCAPE '\\' AND CommandLine LIKE '%/tmp/%' ESCAPE '\\' AND (CommandLine LIKE '%passwd%' ESCAPE '\\' OR CommandLine LIKE '%shadow%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_cp_passwd_or_shadow_tmp.yml"
},
{
"title": "File and Directory Discovery - Linux",
"id": "d3feb4ee-ff1d-4d3d-bd10-5b28a238cc72",
"description": "Detects usage of system utilities such as \"find\", \"tree\", \"findmnt\", etc, to discover files, directories and network shares.\n",
"author": "Daniil Yugoslavskiy, oscd.community, CheraghiMilad",
"tags": [
"attack.discovery",
"attack.t1083"
],
"falsepositives": [
"Legitimate activities"
],
"level": "informational",
"rule": [
"SELECT * FROM logs WHERE ((Image LIKE '%/file' ESCAPE '\\' AND CommandLine REGEXP '(.){200,}') OR (Image LIKE '%/ls' ESCAPE '\\' AND CommandLine LIKE '%-R%' ESCAPE '\\') OR Image LIKE '%/find' ESCAPE '\\' OR Image LIKE '%/tree' ESCAPE '\\' OR Image LIKE '%/findmnt' ESCAPE '\\' OR Image LIKE '%/mlocate' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_file_and_directory_discovery.yml"
},
{
"title": "Ufw Force Stop Using Ufw-Init",
"id": "84c9e83c-599a-458a-a0cb-0ecce44e807a",
"description": "Detects attempts to force stop the ufw using ufw-init",
"author": "Joseliyo Sanchez, @Joseliyo_Jstnk",
"tags": [
"attack.defense-evasion",
"attack.t1562.004"
],
"falsepositives": [
"Network administrators"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE ((CommandLine LIKE '%-ufw-init%' ESCAPE '\\' AND CommandLine LIKE '%force-stop%' ESCAPE '\\') OR (CommandLine LIKE '%ufw%' ESCAPE '\\' AND CommandLine LIKE '%disable%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_disable_ufw.yml"
},
{
"title": "History File Deletion",
"id": "1182f3b3-e716-4efa-99ab-d2685d04360f",
"description": "Detects events in which a history file gets deleted, e.g. the ~/bash_history to remove traces of malicious activity",
"author": "Florian Roth (Nextron Systems)",
"tags": [
"attack.impact",
"attack.t1565.001"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE ((Image LIKE '%/rm' ESCAPE '\\' OR Image LIKE '%/unlink' ESCAPE '\\' OR Image LIKE '%/shred' ESCAPE '\\') AND ((CommandLine LIKE '%/.bash\\_history%' ESCAPE '\\' OR CommandLine LIKE '%/.zsh\\_history%' ESCAPE '\\') OR (CommandLine LIKE '%\\_history' ESCAPE '\\' OR CommandLine LIKE '%.history' ESCAPE '\\' OR CommandLine LIKE '%zhistory' ESCAPE '\\')))"
],
"filename": "proc_creation_lnx_susp_history_delete.yml"
},
{
"title": "ESXi Storage Information Discovery Via ESXCLI",
"id": "f41dada5-3f56-4232-8503-3fb7f9cf2d60",
"description": "Detects execution of the \"esxcli\" command with the \"storage\" flag in order to retrieve information about the storage status and other related information. Seen used by malware such as DarkSide and LockBit.",
"author": "Nasreddine Bencherchali (Nextron Systems), Cedric Maurugeon",
"tags": [
"attack.discovery",
"attack.t1033",
"attack.t1007"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/esxcli' ESCAPE '\\' AND CommandLine LIKE '%storage%' ESCAPE '\\' AND (CommandLine LIKE '% get%' ESCAPE '\\' OR CommandLine LIKE '% list%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_esxcli_storage_discovery.yml"
},
{
"title": "ESXi Account Creation Via ESXCLI",
"id": "b28e4eb3-8bbc-4f0c-819f-edfe8e2f25db",
"description": "Detects user account creation on ESXi system via esxcli",
"author": "Cedric Maurugeon",
"tags": [
"attack.persistence",
"attack.t1136"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/esxcli' ESCAPE '\\' AND CommandLine LIKE '%system %' ESCAPE '\\' AND CommandLine LIKE '%account %' ESCAPE '\\' AND CommandLine LIKE '%add %' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_esxcli_user_account_creation.yml"
},
{
"title": "Suspicious Nohup Execution",
"id": "457df417-8b9d-4912-85f3-9dbda39c3645",
"description": "Detects execution of binaries located in potentially suspicious locations via \"nohup\"",
"author": "Joseliyo Sanchez, @Joseliyo_Jstnk",
"tags": [
"attack.execution"
],
"falsepositives": [
"Unknown"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/nohup' ESCAPE '\\' AND CommandLine LIKE '%/tmp/%' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_nohup_susp_execution.yml"
},
{
"title": "Potential GobRAT File Discovery Via Grep",
"id": "e34cfa0c-0a50-4210-9cb3-5632d08eb041",
"description": "Detects the use of grep to discover specific files created by the GobRAT malware",
"author": "Joseliyo Sanchez, @Joseliyo_Jstnk",
"tags": [
"attack.discovery",
"attack.t1082"
],
"falsepositives": [
"Unknown"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/grep' ESCAPE '\\' AND (CommandLine LIKE '%apached%' ESCAPE '\\' OR CommandLine LIKE '%frpc%' ESCAPE '\\' OR CommandLine LIKE '%sshd.sh%' ESCAPE '\\' OR CommandLine LIKE '%zone.arm%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_malware_gobrat_grep_payload_discovery.yml"
},
{
"title": "Shell Invocation via Env Command - Linux",
"id": "bed978f8-7f3a-432b-82c5-9286a9b3031a",
"description": "Detects the use of the env command to invoke a shell. This may indicate an attempt to bypass restricted environments, escalate privileges, or execute arbitrary commands.\n",
"author": "Li Ling, Andy Parkidomo, Robert Rakowski, Blake Hartstein (Bloomberg L.P.)",
"tags": [
"attack.execution",
"attack.t1059"
],
"falsepositives": [
"Github operations such as ghe-backup"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/env' 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_env_shell_invocation.yml"
},
{
"title": "Potential Suspicious Change To Sensitive/Critical Files",
"id": "86157017-c2b1-4d4a-8c33-93b8e67e4af4",
"description": "Detects changes of sensitive and critical files. Monitors files that you don't expect to change without planning on Linux system.",
"author": "@d4ns4n_ (Wuerth-Phoenix)",
"tags": [
"attack.impact",
"attack.t1565.001"
],
"falsepositives": [
"Some false positives are to be expected on user or administrator machines. Apply additional filters as needed."
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE ((((Image LIKE '%/cat' ESCAPE '\\' OR Image LIKE '%/echo' ESCAPE '\\' OR Image LIKE '%/grep' ESCAPE '\\' OR Image LIKE '%/head' ESCAPE '\\' OR Image LIKE '%/more' ESCAPE '\\' OR Image LIKE '%/tail' ESCAPE '\\') AND CommandLine LIKE '%>%' ESCAPE '\\') OR (Image LIKE '%/emacs' ESCAPE '\\' OR Image LIKE '%/nano' ESCAPE '\\' OR Image LIKE '%/sed' ESCAPE '\\' OR Image LIKE '%/vi' ESCAPE '\\' OR Image LIKE '%/vim' ESCAPE '\\')) AND (CommandLine LIKE '%/bin/login%' ESCAPE '\\' OR CommandLine LIKE '%/bin/passwd%' ESCAPE '\\' OR CommandLine LIKE '%/boot/%' ESCAPE '\\' OR CommandLine LIKE '%/etc/%.conf%' ESCAPE '\\' OR CommandLine LIKE '%/etc/cron.%' ESCAPE '\\' OR CommandLine LIKE '%/etc/crontab%' ESCAPE '\\' OR CommandLine LIKE '%/etc/hosts%' ESCAPE '\\' OR CommandLine LIKE '%/etc/init.d%' ESCAPE '\\' OR CommandLine LIKE '%/etc/sudoers%' ESCAPE '\\' OR CommandLine LIKE '%/opt/bin/%' ESCAPE '\\' OR CommandLine LIKE '%/sbin%' ESCAPE '\\' OR CommandLine LIKE '%/usr/bin/%' ESCAPE '\\' OR CommandLine LIKE '%/usr/local/bin/%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_susp_sensitive_file_access.yml"
},
{
"title": "Linux Remote System Discovery",
"id": "11063ec2-de63-4153-935e-b1a8b9e616f1",
"description": "Detects the enumeration of other remote systems.",
"author": "Alejandro Ortuno, oscd.community",
"tags": [
"attack.discovery",
"attack.t1018"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE ((Image LIKE '%/arp' ESCAPE '\\' AND CommandLine LIKE '%-a%' ESCAPE '\\') OR (Image LIKE '%/ping' ESCAPE '\\' AND (CommandLine LIKE '% 10.%' ESCAPE '\\' OR CommandLine LIKE '% 192.168.%' ESCAPE '\\' OR CommandLine LIKE '% 172.16.%' ESCAPE '\\' OR CommandLine LIKE '% 172.17.%' ESCAPE '\\' OR CommandLine LIKE '% 172.18.%' ESCAPE '\\' OR CommandLine LIKE '% 172.19.%' ESCAPE '\\' OR CommandLine LIKE '% 172.20.%' ESCAPE '\\' OR CommandLine LIKE '% 172.21.%' ESCAPE '\\' OR CommandLine LIKE '% 172.22.%' ESCAPE '\\' OR CommandLine LIKE '% 172.23.%' ESCAPE '\\' OR CommandLine LIKE '% 172.24.%' ESCAPE '\\' OR CommandLine LIKE '% 172.25.%' ESCAPE '\\' OR CommandLine LIKE '% 172.26.%' ESCAPE '\\' OR CommandLine LIKE '% 172.27.%' ESCAPE '\\' OR CommandLine LIKE '% 172.28.%' ESCAPE '\\' OR CommandLine LIKE '% 172.29.%' ESCAPE '\\' OR CommandLine LIKE '% 172.30.%' ESCAPE '\\' OR CommandLine LIKE '% 172.31.%' ESCAPE '\\' OR CommandLine LIKE '% 127.%' ESCAPE '\\' OR CommandLine LIKE '% 169.254.%' ESCAPE '\\')))"
],
"filename": "proc_creation_lnx_remote_system_discovery.yml"
},
{
"title": "OS Architecture Discovery Via Grep",
"id": "d27ab432-2199-483f-a297-03633c05bae6",
"description": "Detects the use of grep to identify information about the operating system architecture. Often combined beforehand with the execution of \"uname\" or \"cat /proc/cpuinfo\"\n",
"author": "Joseliyo Sanchez, @Joseliyo_Jstnk",
"tags": [
"attack.discovery",
"attack.t1082"
],
"falsepositives": [
"Unknown"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/grep' ESCAPE '\\' AND (CommandLine LIKE '%aarch64' ESCAPE '\\' OR CommandLine LIKE '%arm' ESCAPE '\\' OR CommandLine LIKE '%i386' ESCAPE '\\' OR CommandLine LIKE '%i686' ESCAPE '\\' OR CommandLine LIKE '%mips' ESCAPE '\\' OR CommandLine LIKE '%x86\\_64' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_grep_os_arch_discovery.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": "OMIGOD SCX RunAsProvider ExecuteScript",
"id": "6eea1bf6-f8d2-488a-a742-e6ef6c1b67db",
"description": "Rule to detect the use of the SCX RunAsProvider ExecuteScript to execute any UNIX/Linux script using the /bin/sh shell.\nScript being executed gets created as a temp file in /tmp folder with a scx* prefix.\nThen it is invoked from the following directory /etc/opt/microsoft/scx/conf/tmpdir/.\nThe file in that directory has the same prefix scx*. SCXcore, 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 ExecuteScript."
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (User = 'root' AND LogonId = '0' AND CurrentDirectory = '/var/opt/microsoft/scx/tmp' AND CommandLine LIKE '%/etc/opt/microsoft/scx/conf/tmpdir/scx%' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_omigod_scx_runasprovider_executescript.yml"
},
{
"title": "Shell Execution via Git - Linux",
"id": "47b3bbd4-1bf7-48cc-84ab-995362aaa75a",
"description": "Detects the use of the \"git\" utility to execute a shell. Such behavior may be associated with privilege escalation, unauthorized command execution, or to break out from restricted environments.\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 (ParentImage LIKE '%/git' ESCAPE '\\' AND ParentCommandLine LIKE '% -p %' ESCAPE '\\' AND ParentCommandLine LIKE '%help%' ESCAPE '\\' AND (CommandLine LIKE '%bash 0<&1%' ESCAPE '\\' OR CommandLine LIKE '%dash 0<&1%' ESCAPE '\\' OR CommandLine LIKE '%sh 0<&1%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_git_shell_execution.yml"
},
{
"title": "User Has Been Deleted Via Userdel",
"id": "08f26069-6f80-474b-8d1f-d971c6fedea0",
"description": "Detects execution of the \"userdel\" binary. Which is used to delete a user account and related files. This is sometimes abused by threat actors in order to cover their tracks",
"author": "Tuan Le (NCSGroup)",
"tags": [
"attack.impact",
"attack.t1531"
],
"falsepositives": [
"Legitimate administrator activities"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE Image LIKE '%/userdel' ESCAPE '\\'"
],
"filename": "proc_creation_lnx_userdel.yml"
},
{
"title": "System Network Discovery - Linux",
"id": "e7bd1cfa-b446-4c88-8afb-403bcd79e3fa",
"description": "Detects enumeration of local network configuration",
"author": "Ömer Günal and remotephone, oscd.community",
"tags": [
"attack.discovery",
"attack.t1016"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "informational",
"rule": [
"SELECT * FROM logs WHERE ((Image LIKE '%/firewall-cmd' ESCAPE '\\' OR Image LIKE '%/ufw' ESCAPE '\\' OR Image LIKE '%/iptables' ESCAPE '\\' OR Image LIKE '%/netstat' ESCAPE '\\' OR Image LIKE '%/ss' ESCAPE '\\' OR Image LIKE '%/ip' ESCAPE '\\' OR Image LIKE '%/ifconfig' ESCAPE '\\' OR Image LIKE '%/systemd-resolve' ESCAPE '\\' OR Image LIKE '%/route' ESCAPE '\\') OR CommandLine LIKE '%/etc/resolv.conf%' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_system_network_discovery.yml"
},
{
"title": "Shell Execution via Nice - Linux",
"id": "093d68c7-762a-42f4-9f46-95e79142571a",
"description": "Detects the use of the \"nice\" utility to execute a shell. Such behavior may be associated with privilege escalation, unauthorized command execution, or to break out from restricted environments.\n",
"author": "Li Ling, Andy Parkidomo, Robert Rakowski, Blake Hartstein (Bloomberg L.P.)",
"tags": [
"attack.discovery",
"attack.t1083"
],
"falsepositives": [
"Unknown"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/nice' 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_nice_shell_execution.yml"
},
{
"title": "Shell Execution GCC - Linux",
"id": "9b5de532-a757-4d70-946c-1f3e44f48b4d",
"description": "Detects the use of the \"gcc\" utility to execute a shell. Such behavior may be associated with privilege escalation, unauthorized command execution, or to break out from restricted environments.\n",
"author": "Li Ling, Andy Parkidomo, Robert Rakowski, Blake Hartstein (Bloomberg L.P.)",
"tags": [
"attack.discovery",
"attack.t1083"
],
"falsepositives": [
"Unknown"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE ((Image LIKE '%/c89' ESCAPE '\\' OR Image LIKE '%/c99' ESCAPE '\\' OR Image LIKE '%/gcc' ESCAPE '\\') AND CommandLine LIKE '%-wrapper%' ESCAPE '\\' AND (CommandLine LIKE '%/bin/bash,-s%' ESCAPE '\\' OR CommandLine LIKE '%/bin/dash,-s%' ESCAPE '\\' OR CommandLine LIKE '%/bin/fish,-s%' ESCAPE '\\' OR CommandLine LIKE '%/bin/sh,-s%' ESCAPE '\\' OR CommandLine LIKE '%/bin/zsh,-s%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_gcc_shell_execution.yml"
},
{
"title": "Local System Accounts Discovery - Linux",
"id": "b45e3d6f-42c6-47d8-a478-df6bd6cf534c",
"description": "Detects enumeration of local systeam accounts. This information can help adversaries determine which local accounts exist on a system to aid in follow-on behavior.",
"author": "Alejandro Ortuno, oscd.community, CheraghiMilad",
"tags": [
"attack.discovery",
"attack.t1087.001"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/lastlog' ESCAPE '\\' OR CommandLine LIKE '%''x:0:''%' ESCAPE '\\' OR ((Image LIKE '%/cat' ESCAPE '\\' OR Image LIKE '%/ed' ESCAPE '\\' OR Image LIKE '%/head' ESCAPE '\\' OR Image LIKE '%/more' ESCAPE '\\' OR Image LIKE '%/nano' ESCAPE '\\' OR Image LIKE '%/tail' ESCAPE '\\' OR Image LIKE '%/vi' ESCAPE '\\' OR Image LIKE '%/vim' ESCAPE '\\' OR Image LIKE '%/less' ESCAPE '\\' OR Image LIKE '%/emacs' ESCAPE '\\' OR Image LIKE '%/sqlite3' ESCAPE '\\' OR Image LIKE '%/makemap' ESCAPE '\\') AND (CommandLine LIKE '%/etc/passwd%' ESCAPE '\\' OR CommandLine LIKE '%/etc/shadow%' ESCAPE '\\' OR CommandLine LIKE '%/etc/sudoers%' ESCAPE '\\' OR CommandLine LIKE '%/etc/spwd.db%' ESCAPE '\\' OR CommandLine LIKE '%/etc/pwd.db%' ESCAPE '\\' OR CommandLine LIKE '%/etc/master.passwd%' ESCAPE '\\')) OR Image LIKE '%/id' ESCAPE '\\' OR (Image LIKE '%/lsof' ESCAPE '\\' AND CommandLine LIKE '%-u%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_local_account.yml"
},
{
"title": "Inline Python Execution - Spawn Shell Via OS System Library",
"id": "2d2f44ff-4611-4778-a8fc-323a0e9850cc",
"description": "Detects execution of inline Python code via the \"-c\" in order to call the \"system\" function from the \"os\" library, and spawn a shell.\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 '%/python' ESCAPE '\\' OR Image LIKE '%/python2' ESCAPE '\\' OR Image LIKE '%/python3' ESCAPE '\\') OR (Image LIKE '%/python2.%' ESCAPE '\\' OR Image LIKE '%/python3.%' ESCAPE '\\')) AND (CommandLine LIKE '% -c %' ESCAPE '\\' AND CommandLine LIKE '%os.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_python_shell_os_system.yml"
},
{
"title": "Scheduled Task/Job At",
"id": "d2d642d7-b393-43fe-bae4-e81ed5915c4b",
"description": "Detects the use of at/atd which are utilities that are used to schedule tasks.\nThey are often abused by adversaries to maintain persistence or to perform task scheduling for initial or recurring execution of malicious code\n",
"author": "Ömer Günal, oscd.community",
"tags": [
"attack.persistence",
"attack.t1053.002"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/at' ESCAPE '\\' OR Image LIKE '%/atd' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_at_command.yml"
},
{
"title": "Shell Invocation Via Ssh - Linux",
"id": "8737b7f6-8df3-4bb7-b1da-06019b99b687",
"description": "Detects the use of the \"ssh\" utility to execute a shell. Such behavior may be associated with privilege escalation, unauthorized command execution, or to break out from restricted environments.\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 '%/ssh' ESCAPE '\\' AND (CommandLine LIKE '%ProxyCommand=;%' ESCAPE '\\' OR CommandLine LIKE '%permitlocalcommand=yes%' ESCAPE '\\' OR CommandLine LIKE '%localhost%' 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 '\\' OR CommandLine LIKE '%sh 0<&2 1>&2%' ESCAPE '\\' OR CommandLine LIKE '%sh 1>&2 0<&2%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_ssh_shell_execution.yml"
},
{
"title": "Disable Or Stop Services",
"id": "de25eeb8-3655-4643-ac3a-b662d3f26b6b",
"description": "Detects the usage of utilities such as 'systemctl', 'service'...etc to stop or disable tools and services",
"author": "Nasreddine Bencherchali (Nextron Systems)",
"tags": [
"attack.defense-evasion"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE ((Image LIKE '%/service' ESCAPE '\\' OR Image LIKE '%/systemctl' ESCAPE '\\' OR Image LIKE '%/chkconfig' ESCAPE '\\') AND (CommandLine LIKE '%stop%' ESCAPE '\\' OR CommandLine LIKE '%disable%' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_services_stop_and_disable.yml"
},
{
"title": "Linux Base64 Encoded Pipe to Shell",
"id": "ba592c6d-6888-43c3-b8c6-689b8fe47337",
"description": "Detects suspicious process command line that uses base64 encoded input for execution with a shell",
"author": "pH-T (Nextron Systems)",
"tags": [
"attack.defense-evasion",
"attack.t1140"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (CommandLine LIKE '%base64 %' ESCAPE '\\' AND ((CommandLine LIKE '%| bash %' ESCAPE '\\' OR CommandLine LIKE '%| sh %' ESCAPE '\\' OR CommandLine LIKE '%|bash %' ESCAPE '\\' OR CommandLine LIKE '%|sh %' ESCAPE '\\') OR (CommandLine LIKE '% |sh' ESCAPE '\\' OR CommandLine LIKE '%| bash' ESCAPE '\\' OR CommandLine LIKE '%| sh' ESCAPE '\\' OR CommandLine LIKE '%|bash' ESCAPE '\\')))"
],
"filename": "proc_creation_lnx_base64_execution.yml"
},
{
"title": "Curl Usage on Linux",
"id": "ea34fb97-e2c4-4afb-810f-785e4459b194",
"description": "Detects a curl process start on linux, which indicates a file download from a remote location or a simple web request to a remote server",
"author": "Nasreddine Bencherchali (Nextron Systems)",
"tags": [
"attack.command-and-control",
"attack.t1105"
],
"falsepositives": [
"Scripts created by developers and admins",
"Administrative activity"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE Image LIKE '%/curl' ESCAPE '\\'"
],
"filename": "proc_creation_lnx_curl_usage.yml"
},
{
"title": "Linux Crypto Mining Indicators",
"id": "9069ea3c-b213-4c52-be13-86506a227ab1",
"description": "Detects command line parameters or strings often used by crypto miners",
"author": "Florian Roth (Nextron Systems)",
"tags": [
"attack.impact",
"attack.t1496"
],
"falsepositives": [
"Legitimate use of crypto miners"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE (CommandLine LIKE '% --cpu-priority=%' ESCAPE '\\' OR CommandLine LIKE '%--donate-level=0%' ESCAPE '\\' OR CommandLine LIKE '% -o pool.%' ESCAPE '\\' OR CommandLine LIKE '% --nicehash%' ESCAPE '\\' OR CommandLine LIKE '% --algo=rx/0 %' ESCAPE '\\' OR CommandLine LIKE '%stratum+tcp://%' ESCAPE '\\' OR CommandLine LIKE '%stratum+udp://%' ESCAPE '\\' OR CommandLine LIKE '%sh -c /sbin/modprobe msr allow\\_writes=on%' ESCAPE '\\' OR CommandLine LIKE '%LS1kb25hdGUtbGV2ZWw9%' ESCAPE '\\' OR CommandLine LIKE '%0tZG9uYXRlLWxldmVsP%' ESCAPE '\\' OR CommandLine LIKE '%tLWRvbmF0ZS1sZXZlbD%' ESCAPE '\\' OR CommandLine LIKE '%c3RyYXR1bSt0Y3A6Ly%' ESCAPE '\\' OR CommandLine LIKE '%N0cmF0dW0rdGNwOi8v%' ESCAPE '\\' OR CommandLine LIKE '%zdHJhdHVtK3RjcDovL%' ESCAPE '\\' OR CommandLine LIKE '%c3RyYXR1bSt1ZHA6Ly%' ESCAPE '\\' OR CommandLine LIKE '%N0cmF0dW0rdWRwOi8v%' ESCAPE '\\' OR CommandLine LIKE '%zdHJhdHVtK3VkcDovL%' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_crypto_mining.yml"
},
{
"title": "Linux Package Uninstall",
"id": "95d61234-7f56-465c-6f2d-b562c6fedbc4",
"description": "Detects linux package removal using builtin tools such as \"yum\", \"apt\", \"apt-get\" or \"dpkg\".",
"author": "Tuan Le (NCSGroup), Nasreddine Bencherchali (Nextron Systems)",
"tags": [
"attack.defense-evasion",
"attack.t1070"
],
"falsepositives": [
"Administrator or administrator scripts might delete packages for several reasons (debugging, troubleshooting)."
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE ((Image LIKE '%/yum' ESCAPE '\\' AND (CommandLine LIKE '%erase%' ESCAPE '\\' OR CommandLine LIKE '%remove%' ESCAPE '\\')) OR ((Image LIKE '%/apt' ESCAPE '\\' OR Image LIKE '%/apt-get' ESCAPE '\\') AND (CommandLine LIKE '%remove%' ESCAPE '\\' OR CommandLine LIKE '%purge%' ESCAPE '\\')) OR (Image LIKE '%/dpkg' ESCAPE '\\' AND (CommandLine LIKE '%--remove %' ESCAPE '\\' OR CommandLine LIKE '% -r %' ESCAPE '\\')) OR (Image LIKE '%/rpm' ESCAPE '\\' AND CommandLine LIKE '% -e %' ESCAPE '\\'))"
],
"filename": "proc_creation_lnx_remove_package.yml"
},
{
"title": "ESXi VM Kill Via ESXCLI",
"id": "2992ac4d-31e9-4325-99f2-b18a73221bb2",
"description": "Detects execution of the \"esxcli\" command with the \"vm\" and \"kill\" flag in order to kill/shutdown a specific VM.",
"author": "Nasreddine Bencherchali (Nextron Systems), Cedric Maurugeon",
"tags": [
"attack.execution"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/esxcli' ESCAPE '\\' AND CommandLine LIKE '%vm process%' ESCAPE '\\' AND CommandLine LIKE '%kill%' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_esxcli_vm_kill.yml"
},
{
"title": "Install Root Certificate",
"id": "78a80655-a51e-4669-bc6b-e9d206a462ee",
"description": "Detects installation of new certificate on the system which attackers may use to avoid warnings when connecting to controlled web servers or C2s",
"author": "Ömer Günal, oscd.community",
"tags": [
"attack.defense-evasion",
"attack.t1553.004"
],
"falsepositives": [
"Legitimate administration activities"
],
"level": "low",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%/update-ca-certificates' ESCAPE '\\' OR Image LIKE '%/update-ca-trust' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_install_root_certificate.yml"
},
{
"title": "Interactive Bash Suspicious Children",
"id": "ea3ecad2-db86-4a89-ad0b-132a10d2db55",
"description": "Detects suspicious interactive bash as a parent to rather uncommon child processes",
"author": "Florian Roth (Nextron Systems)",
"tags": [
"attack.execution",
"attack.defense-evasion",
"attack.t1059.004",
"attack.t1036"
],
"falsepositives": [
"Legitimate software that uses these patterns"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (ParentCommandLine = 'bash -i' AND ((CommandLine LIKE '%-c import %' ESCAPE '\\' OR CommandLine LIKE '%base64%' ESCAPE '\\' OR CommandLine LIKE '%pty.spawn%' ESCAPE '\\') OR (Image LIKE '%whoami' ESCAPE '\\' OR Image LIKE '%iptables' ESCAPE '\\' OR Image LIKE '%/ncat' ESCAPE '\\' OR Image LIKE '%/nc' ESCAPE '\\' OR Image LIKE '%/netcat' ESCAPE '\\')))"
],
"filename": "proc_creation_lnx_susp_interactive_bash.yml"
},
{
"title": "Remove Scheduled Cron Task/Job",
"id": "c2e234de-03a3-41e1-b39a-1e56dc17ba67",
"description": "Detects usage of the 'crontab' utility to remove the current crontab.\nThis is a common occurrence where cryptocurrency miners compete against each other by removing traces of other miners to hijack the maximum amount of resources possible\n",
"author": "Nasreddine Bencherchali (Nextron Systems)",
"tags": [
"attack.defense-evasion"
],
"falsepositives": [
"Unknown"
],
"level": "medium",
"rule": [
"SELECT * FROM logs WHERE (Image LIKE '%crontab' ESCAPE '\\' AND CommandLine LIKE '% -r%' ESCAPE '\\')"
],
"filename": "proc_creation_lnx_crontab_removal.yml"
},
{
"title": "Potentially Suspicious Execution From Tmp Folder",
"id": "312b42b1-bded-4441-8b58-163a3af58775",
"description": "Detects a potentially suspicious execution of a process located in the '/tmp/' folder",
"author": "Joseliyo Sanchez, @Joseliyo_Jstnk",
"tags": [
"attack.defense-evasion",
"attack.t1036"
],
"falsepositives": [
"Unknown"
],
"level": "high",
"rule": [
"SELECT * FROM logs WHERE Image LIKE '/tmp/%' ESCAPE '\\'"
],
"filename": "proc_creation_lnx_susp_execution_tmp_folder.yml"
},
{
"title": "Suspicious Curl Change User Agents - Linux",
"id": "b86d356d-6093-443d-971c-9b07db583c68",
"description": "Detects a suspicious curl process start on linux with set useragent options",
"author": "Nasreddine Bencherchali (Nextron Systems)",
"tags": [
"attack.command-and-control",
"attack.t1071.001"
],
"falsepositives": [
"Scripts created by developers and admins",
"Administrative activity"
],
"level": "medium",
"rule": [