-
Notifications
You must be signed in to change notification settings - Fork 26
/
SUSP_Macho_Usr_Ref.yar
1749 lines (1748 loc) · 58.3 KB
/
SUSP_Macho_Usr_Ref.yar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
rule SUSP_Macho_Usr_Ref_4bdy {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like 4bdy "
strings:
$ = "usr/4b/dy" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin "
strings:
$ = "usr/bin" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_inclu {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_inclu "
strings:
$ = "usr/bin/../inclu" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_include_c {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_include_c "
strings:
$ = "usr/bin/../include/c" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_codesign {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_codesign "
strings:
$ = "usr/bin/codesign" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_curl {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_curl "
strings:
$ = "usr/bin/curl" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_defaults {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_defaults "
strings:
$ = "usr/bin/defaults" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_diskutil {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_diskutil "
strings:
$ = "usr/bin/diskutil" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_ditto {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_ditto "
strings:
$ = "usr/bin/ditto" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_find {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_find "
strings:
$ = "usr/bin/find" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_hdiutil {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_hdiutil "
strings:
$ = "usr/bin/hdiutil" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_iWorkServices {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_iWorkServices "
strings:
$ = "usr/bin/iWorkServices" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_killall {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_killall "
strings:
$ = "usr/bin/killall" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_login {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_login "
strings:
$ = "usr/bin/login" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_open {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_open "
strings:
$ = "usr/bin/open" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_passwd {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_passwd "
strings:
$ = "usr/bin/passwd" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_pkexec {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_pkexec "
strings:
$ = "usr/bin/pkexec" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_python {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_python "
strings:
$ = "usr/bin/python" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_ruby {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_ruby "
strings:
$ = "usr/bin/ruby" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_sqlite3 {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_sqlite3 "
strings:
$ = "usr/bin/sqlite3" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_tar {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_tar "
strings:
$ = "usr/bin/tar" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_bin_zip {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like bin_zip "
strings:
$ = "usr/bin/zip" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_db_dyld {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like db_dyld "
strings:
$ = "usr/db/dyld" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_dict_words {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like dict_words "
strings:
$ = "usr/dict/words" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_include_ {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like include_ "
strings:
$ = "usr/include/" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_include_c {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like include_c "
strings:
$ = "usr/include/c" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_include_ctype {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like include_ctype "
strings:
$ = "usr/include/ctype" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_include_dispatch_once {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like include_dispatch_once "
strings:
$ = "usr/include/dispatch/once" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_include_dispatch_queue {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like include_dispatch_queue "
strings:
$ = "usr/include/dispatch/queue" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_include_libkern_i386 {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like include_libkern_i386 "
strings:
$ = "usr/include/libkern/i386/" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_include_math {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like include_math "
strings:
$ = "usr/include/math" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_include_secure {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like include_secure "
strings:
$ = "usr/include/secure/" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_li {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like li "
strings:
$ = "usr/li" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib "
strings:
$ = "usr/lib" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_apple_SDKs {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_apple_SDKs "
strings:
$ = "usr/lib/apple/SDKs/" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_arc_libarclite {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_arc_libarclite "
strings:
$ = "usr/lib/arc/libarclite" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_dyld {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_dyld "
strings:
$ = "usr/lib/dyld" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_gcc {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_gcc "
strings:
$ = "usr/lib/gcc/i686" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libDiagnosticMessagesClient {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libDiagnosticMessagesClient "
strings:
$ = "usr/lib/libDiagnosticMessagesClient." ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libSystem {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libSystem "
strings:
$ = "usr/lib/libSystem" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libc {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libc "
strings:
$ = "usr/lib/libc" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libcrypto {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libcrypto "
strings:
$ = "usr/lib/libcrypto" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libcurl {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libcurl "
strings:
$ = "usr/lib/libcurl" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libgcc {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libgcc "
strings:
$ = "usr/lib/libgcc" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libiconv {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libiconv "
strings:
$ = "usr/lib/libiconv" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libicucore {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libicucore "
strings:
$ = "usr/lib/libicucore" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libobjc {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libobjc "
strings:
$ = "usr/lib/libobjc" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libpcap {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libpcap "
strings:
$ = "usr/lib/libpcap" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libresolv {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libresolv "
strings:
$ = "usr/lib/libresolv" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libsqlite3 {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libsqlite3 "
strings:
$ = "usr/lib/libsqlite3" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libstdc {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libstdc "
strings:
$ = "usr/lib/libstdc" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libutil {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libutil "
strings:
$ = "usr/lib/libutil" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC
uint32(0) == 0xcefaedfe or // Mach-O MH_CIGAM
uint32(0) == 0xfeedfacf or // Mach-O MH_MAGIC_64
uint32(0) == 0xcffaedfe or // Mach-O MH_CIGAM_64
uint32(0) == 0xcafebabe or // Mach-O FAT_MAGIC
uint32(0) == 0xbebafeca // Mach-O FAT_CIGAM
)
and all of them
}
rule SUSP_Macho_Usr_Ref_lib_libz {
meta:
author = "Greg Lesnewich"
date = "2023-02-06"
version = "1.0"
description = "check Macho files for the reference to file under /usr/ like lib_libz "
strings:
$ = "usr/lib/libz" ascii wide
condition:
(
uint32(0) == 0xfeedface or // Mach-O MH_MAGIC