pdfalyzer 1.16.6__py3-none-any.whl → 1.16.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pdfalyzer might be problematic. Click here for more details.

@@ -0,0 +1,3072 @@
1
+ /* From PDF_MALWARE_ANALYZER */
2
+
3
+ rule RemoteCodeExecutionPDF {
4
+ meta:
5
+ description = "Detects potential Remote Code Execution attempts in PDF files"
6
+ severity = "High"
7
+ author = "kartikey"
8
+ date = "2025-03-29"
9
+ strings:
10
+ $rce1 = "/JavaScript/launch"
11
+ $rce2 = "/JavaScript/openURL"
12
+ $rce3 = "/OpenAction"
13
+ $rce4 = "/JS (ShellExecute)"
14
+ condition:
15
+ (uint16(0) == 0x2550) and (filesize < 2MB) and all of them
16
+ }
17
+
18
+
19
+ rule ExploitPDFReaderVulnerabilities {
20
+ meta:
21
+ description = "Detects potential exploitation of PDF reader vulnerabilities"
22
+ severity = "High"
23
+ author = "kartikey"
24
+ date = "2025-03-29"
25
+ strings:
26
+ $exploit1 = "/Launch"
27
+ $exploit2 = "/Action /Launch"
28
+ $exploit3 = "/AA"
29
+ $exploit4 = "/JavaScript"
30
+ condition:
31
+ (uint16(0) == 0x2550) and (filesize < 2MB) and any of them
32
+ }
33
+
34
+
35
+ rule TrojanDownloaderPDF {
36
+ meta:
37
+ description = "Detects Trojan-Downloader functionality in PDF files"
38
+ severity = "High"
39
+ author = "kartikey"
40
+ date = "2025-03-29"
41
+ strings:
42
+ $trojan1 = "http://malicious-domain.com/download"
43
+ $trojan2 = "/SubmitForm /URL"
44
+ $trojan3 = "/JavaScript /getURL"
45
+ condition:
46
+ (uint16(0) == 0x2550) and any of them
47
+ }
48
+
49
+
50
+ rule BufferOverflowPDF {
51
+ meta:
52
+ description = "Detects Buffer Overflow exploits in PDF files"
53
+ severity = "High"
54
+ author = "kartikey"
55
+ date = "2025-03-29"
56
+ strings:
57
+ $buffer1 = "/stream"
58
+ $buffer2 = "/Length 0xFFFFFFFF"
59
+ $buffer3 = "/Filter /FlateDecode"
60
+ condition:
61
+ (uint16(0) == 0x2550) and all of them
62
+ }
63
+
64
+
65
+ rule JavaScriptFileSystemPDF {
66
+ meta:
67
+ description = "Detects malicious JavaScript manipulating file systems in PDFs"
68
+ severity = "Medium"
69
+ author = "kartikey"
70
+ date = "2025-03-29"
71
+ strings:
72
+ $js1 = "/JavaScript/createFile"
73
+ $js2 = "/JavaScript/deleteFile"
74
+ $js3 = "/JavaScript/writeToFile"
75
+ condition:
76
+ (uint16(0) == 0x2550) and any of them
77
+ }
78
+
79
+
80
+ rule MaliciousMacrosPDF {
81
+ meta:
82
+ description = "Detects presence of malicious macros in PDF files"
83
+ severity = "Medium"
84
+ author = "kartikey"
85
+ date = "2025-03-29"
86
+ strings:
87
+ $macro1 = "/EmbeddedFile"
88
+ $macro2 = "/Macro/"
89
+ $macro3 = "/RichMedia"
90
+ condition:
91
+ (uint16(0) == 0x2550) and any of them
92
+ }
93
+
94
+
95
+ rule MetadataInjectionPDF {
96
+ meta:
97
+ description = "Detects suspicious metadata injections in PDF files"
98
+ severity = "Low"
99
+ author = "kartikey"
100
+ date = "2025-03-29"
101
+ strings:
102
+ $meta1 = "/Title /<script>"
103
+ $meta2 = "/Author /<iframe>"
104
+ $meta3 = "/Keywords /javascript:"
105
+ condition:
106
+ (uint16(0) == 0x2550) and any of them
107
+ }
108
+
109
+
110
+ rule FakeErrorMessagesPDF {
111
+ meta:
112
+ description = "Detects fake error messages in PDF files"
113
+ severity = "Low"
114
+ author = "kartikey"
115
+ date = "2025-03-29"
116
+ strings:
117
+ $error1 = "Error: Your system is compromised"
118
+ $error2 = "Critical update required"
119
+ $error3 = "Click here to fix issues"
120
+ condition:
121
+ (uint16(0) == 0x2550) and any of them
122
+ }
123
+
124
+
125
+ rule PrivilegeEscalationPDF {
126
+ meta:
127
+ description = "Detects attempts at Privilege Escalation via exploits in PDF files"
128
+ severity = "High"
129
+ author = "kartikey"
130
+ date = "2025-03-29"
131
+ strings:
132
+ $privilege1 = "/OpenAction /Launch"
133
+ $privilege2 = "/Launch /WinExec"
134
+ $privilege3 = "/AppLaunch"
135
+ $privilege4 = "/JavaScript (Elevate)"
136
+ $privilege5 = "/SystemCommand"
137
+ condition:
138
+ (uint16(0) == 0x2550) and any of them
139
+ }
140
+
141
+
142
+ rule FilelessMalwareExecutionPDF {
143
+ meta:
144
+ description = "Detects indicators of Fileless Malware Execution within PDF files"
145
+ severity = "High"
146
+ author = "kartikey"
147
+ date = "2025-03-29"
148
+ strings:
149
+ $fileless1 = "/JavaScript /eval"
150
+ $fileless2 = "/JavaScript /runScript"
151
+ $fileless3 = "shellcode"
152
+ $fileless4 = "/Action /executeCommand"
153
+ $fileless5 = "/Stream /encrypted"
154
+ condition:
155
+ (uint16(0) == 0x2550) and (filesize < 2MB) and any of them
156
+ }
157
+
158
+
159
+
160
+ rule RansomwareDeliveryPDF {
161
+ meta:
162
+ description = "Detects indicators of Ransomware Delivery in PDF files"
163
+ severity = "High"
164
+ author = "kartikey"
165
+ date = "2025-03-29"
166
+ strings:
167
+ $ransom1 = "/JavaScript /encrypt"
168
+ $ransom2 = "/JavaScript /decrypt"
169
+ $ransom3 = "/OpenAction /executeCommand"
170
+ $ransom4 = "ransom_note"
171
+ $ransom5 = "/JavaScript /writeToFile"
172
+ condition:
173
+ (uint16(0) == 0x2550) and any of them
174
+ }
175
+
176
+
177
+ rule CommandInjectionPDF {
178
+ meta:
179
+ description = "Detects Command Injection patterns in PDF files"
180
+ severity = "High"
181
+ author = "kartikey"
182
+ date = "2025-03-29"
183
+ strings:
184
+ $cmd1 = "/Launch /executeCommand"
185
+ $cmd2 = "/OpenAction /cmd"
186
+ $cmd3 = "/JavaScript (exec)"
187
+ $cmd4 = "/SystemCommand"
188
+ $cmd5 = "/JavaScript /runCommand"
189
+ condition:
190
+ (uint16(0) == 0x2550) and any of them
191
+ }
192
+
193
+
194
+ rule SystemCommandExecutionPDF {
195
+ meta:
196
+ description = "Detects attempts to execute system commands through PDF files"
197
+ severity = "High"
198
+ author = "kartikey"
199
+ date = "2025-03-29"
200
+ strings:
201
+ $syscmd1 = "/Launch /cmd.exe"
202
+ $syscmd2 = "/OpenAction /ShellExecute"
203
+ $syscmd3 = "/JavaScript /executeCommand"
204
+ $syscmd4 = "/JavaScript /run"
205
+ $syscmd5 = "/SystemCommand /execute"
206
+ condition:
207
+ (uint16(0) == 0x2550) and any of them
208
+ }
209
+
210
+
211
+ rule DenialOfServicePDF {
212
+ meta:
213
+ description = "Detects potential Denial of Service (DoS) attack patterns in PDF files"
214
+ severity = "High"
215
+ author = "kartikey"
216
+ date = "2025-03-29"
217
+ strings:
218
+ $dos1 = "/Length 0xFFFFFFFF"
219
+ $dos2 = "/FlateDecode /stream"
220
+ $dos3 = "/Repeat /LargeObject"
221
+ $dos4 = "/Object /ExtremelyLargeSize"
222
+ $dos5 = "/ExcessiveNestedStreams"
223
+ condition:
224
+ (uint16(0) == 0x2550) and (filesize > 10MB) and any of them
225
+ }
226
+
227
+
228
+ rule KeyloggingViaJavaScriptPDF {
229
+ meta:
230
+ description = "Detects Keylogging attempts using JavaScript in PDF files"
231
+ severity = "Medium"
232
+ author = "kartikey"
233
+ date = "2025-03-29"
234
+ strings:
235
+ $keylog1 = "/JavaScript /keydown"
236
+ $keylog2 = "/JavaScript /keypress"
237
+ $keylog3 = "/EventListener /key"
238
+ $keylog4 = "/JavaScript /captureKeys"
239
+ $keylog5 = "/KeyStroke"
240
+ condition:
241
+ (uint16(0) == 0x2550) and any of them
242
+ }
243
+
244
+
245
+ rule SensitiveInfoExfiltrationPDF {
246
+ meta:
247
+ description = "Detects attempts to exfiltrate sensitive information using PDF files"
248
+ severity = "Medium"
249
+ author = "kartikey"
250
+ date = "2025-03-29"
251
+ strings:
252
+ $exfil1 = "/SubmitForm /URL"
253
+ $exfil2 = "/JavaScript /sendData"
254
+ $exfil3 = "/JavaScript /exfiltrate"
255
+ $exfil4 = "/mailto:"
256
+ $exfil5 = "http://"
257
+ $exfil6 = "https://"
258
+ condition:
259
+ (uint16(0) == 0x2550) and any of them
260
+ }
261
+
262
+
263
+ rule PhishingViaFakeLoginFormsPDF {
264
+ meta:
265
+ description = "Detects phishing attempts via fake login forms in PDF files"
266
+ severity = "Medium"
267
+ author = "kartikey"
268
+ date = "2025-03-29"
269
+ strings:
270
+ $phish1 = "/JavaScript /submitForm"
271
+ $phish2 = "login"
272
+ $phish3 = "password"
273
+ $phish4 = "/Form /Login"
274
+ $phish5 = "/SubmitForm /URL"
275
+ $phish6 = "http://"
276
+ $phish7 = "https://"
277
+ condition:
278
+ (uint16(0) == 0x2550) and any of them
279
+ }
280
+
281
+
282
+ rule MaliciousFormFieldsPDF {
283
+ meta:
284
+ description = "Detects malicious form fields in PDF files"
285
+ severity = "Medium"
286
+ author = "kartikey"
287
+ date = "2025-03-29"
288
+ strings:
289
+ $form1 = "/Form /Field"
290
+ $form2 = "/Field /Hidden"
291
+ $form3 = "/SubmitForm"
292
+ $form4 = "/JavaScript /FormField"
293
+ $form5 = "/Action /FormSubmit"
294
+ condition:
295
+ (uint16(0) == 0x2550) and any of them
296
+ }
297
+
298
+
299
+ rule FakeDocumentOrSoftwareUpdatesPDF {
300
+ meta:
301
+ description = "Detects fake document or software update prompts in PDF files"
302
+ severity = "Medium"
303
+ author = "kartikey"
304
+ date = "2025-03-29"
305
+ strings:
306
+ $fake1 = "Update Required"
307
+ $fake2 = "Your software is out of date"
308
+ $fake3 = "Download the latest version"
309
+ $fake4 = "/JavaScript /updatePrompt"
310
+ $fake5 = "/OpenAction /update"
311
+ condition:
312
+ (uint16(0) == 0x2550) and any of them
313
+ }
314
+
315
+
316
+ rule EmbeddingExecutablesPDF {
317
+ meta:
318
+ description = "Detects embedded executables in PDF files"
319
+ severity = "Medium"
320
+ author = "kartikey"
321
+ date = "2025-03-29"
322
+ strings:
323
+ $exe1 = "/EmbeddedFile"
324
+ $exe2 = ".exe"
325
+ $exe3 = "application/x-msdownload"
326
+ $exe4 = "/JavaScript /launchExecutable"
327
+ $exe5 = "/FileAttachment"
328
+ condition:
329
+ (uint16(0) == 0x2550) and any of them
330
+ }
331
+
332
+
333
+ rule SocialEngineeringViaFakeAlertsPDF {
334
+ meta:
335
+ description = "Detects social engineering attempts using fake alerts in PDF files"
336
+ severity = "Medium"
337
+ author = "kartikey"
338
+ date = "2025-03-29"
339
+ strings:
340
+ $alert1 = "Your system is infected"
341
+ $alert2 = "Critical warning"
342
+ $alert3 = "Click here to resolve"
343
+ $alert4 = "Immediate action required"
344
+ $alert5 = "/JavaScript /showAlert"
345
+ condition:
346
+ (uint16(0) == 0x2550) and any of them
347
+ }
348
+
349
+
350
+ rule FakeSoftwareInstallersPDF {
351
+ meta:
352
+ description = "Detects fake software installer prompts in PDF files"
353
+ severity = "Medium"
354
+ author = "kartikey"
355
+ date = "2025-03-29"
356
+ strings:
357
+ $installer1 = "Install the latest version"
358
+ $installer2 = "Setup.exe"
359
+ $installer3 = "application/x-msdownload"
360
+ $installer4 = "Run the installer"
361
+ $installer5 = "/JavaScript /launchInstaller"
362
+ condition:
363
+ (uint16(0) == 0x2550) and any of them
364
+ }
365
+
366
+
367
+ rule HiddenLayersPDF {
368
+ meta:
369
+ description = "Detects hidden layers embedded in PDF files"
370
+ severity = "Medium"
371
+ author = "kartikey"
372
+ date = "2025-03-29"
373
+ strings:
374
+ $hidden1 = "/OC /Properties"
375
+ $hidden2 = "/OptionalContent"
376
+ $hidden3 = "/Layer /Hidden"
377
+ $hidden4 = "/Content /DisplayFalse"
378
+ condition:
379
+ (uint16(0) == 0x2550) and any of them
380
+ }
381
+
382
+
383
+ rule InsertingHiddenLayersPDF {
384
+ meta:
385
+ description = "Detects hidden layers embedded in PDF files to obscure content"
386
+ severity = "Medium"
387
+ author = "kartikey"
388
+ date = "2025-03-29"
389
+ strings:
390
+ $hidden1 = "/OCProperties"
391
+ $hidden2 = "/OptionalContent"
392
+ $hidden3 = "/Group /Usage"
393
+ $hidden4 = "/Hidden /True"
394
+ $hidden5 = "/DisplayNone"
395
+ condition:
396
+ uint16(0) == 0x2550 and any of them
397
+ }
398
+
399
+
400
+ rule NetworkCommunicationViaWebSocketsPDF {
401
+ meta:
402
+ description = "Detects network communication via WebSockets in PDF files"
403
+ severity = "Medium"
404
+ author = "kartikey"
405
+ date = "2025-03-29"
406
+ strings:
407
+ $websocket1 = "WebSocket"
408
+ $websocket2 = "/JavaScript /new WebSocket"
409
+ $websocket3 = "wss://"
410
+ $websocket4 = "ws://"
411
+ $websocket5 = "/JavaScript /WebSocket.send"
412
+ condition:
413
+ uint16(0) == 0x2550 and any of them
414
+ }
415
+
416
+
417
+ rule EmbeddingFlashOrJavaObjectsPDF {
418
+ meta:
419
+ description = "Detects embedded Flash or Java objects in PDF files"
420
+ severity = "Medium"
421
+ author = "kartikey"
422
+ date = "2025-03-29"
423
+ strings:
424
+ $flash1 = "/Flash"
425
+ $flash2 = ".swf"
426
+ $flash3 = "/RichMedia"
427
+ $java1 = "/Java"
428
+ $java2 = ".jar"
429
+ $java3 = "/JavaScript /launchJavaApp"
430
+ condition:
431
+ uint16(0) == 0x2550 and any of them
432
+ }
433
+
434
+
435
+ rule RemoteAccessViaPDF {
436
+ meta:
437
+ description = "Detects remote access capabilities embedded in PDF files"
438
+ severity = "Medium"
439
+ author = "kartikey"
440
+ date = "2025-03-29"
441
+ strings:
442
+ $remote1 = "/JavaScript /connectToHost"
443
+ $remote2 = "/RemoteAccess"
444
+ $remote3 = "tcp://"
445
+ $remote4 = "http://"
446
+ $remote5 = "https://"
447
+ $remote6 = "/SocketConnection"
448
+ $remote7 = "/WebSocket"
449
+ condition:
450
+ uint16(0) == 0x2550 and any of them
451
+ }
452
+
453
+
454
+ rule QRCodeRedirectionPDF {
455
+ meta:
456
+ description = "Detects QR code redirection patterns in PDF files"
457
+ severity = "Medium"
458
+ author = "kartikey"
459
+ date = "2025-03-29"
460
+ strings:
461
+ $qr1 = "/QRCode"
462
+ $qr2 = "https://"
463
+ $qr3 = "http://"
464
+ $qr4 = "/JavaScript /generateQRCode"
465
+ $qr5 = "/JavaScript /redirectToURL"
466
+ $qr6 = "/Action /Redirect"
467
+ condition:
468
+ uint16(0) == 0x2550 and any of them
469
+ }
470
+
471
+
472
+ rule ZombiePDF {
473
+ meta:
474
+ description = "Detects Zombie PDF files that maintain persistent or malicious behavior"
475
+ severity = "Medium"
476
+ author = "kartikey"
477
+ date = "2025-03-29"
478
+ strings:
479
+ $zombie1 = "/JavaScript /setInterval"
480
+ $zombie2 = "/JavaScript /setTimeout"
481
+ $zombie3 = "/OpenAction /loop"
482
+ $zombie4 = "/AutoTrigger"
483
+ $zombie5 = "/PersistentAction"
484
+ condition:
485
+ uint16(0) == 0x2550 and any of them
486
+ }
487
+
488
+
489
+ rule Malicious_PDF_Registry_Access {
490
+ meta:
491
+ author = "kartikey"
492
+ description = "Detects malicious PDF files querying Windows registry"
493
+ date = "2025-04-03"
494
+ version = "1.0"
495
+ reference = "https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/AcrobatDC_js_api_reference.pdf"
496
+ strings:
497
+ // JavaScript function for registry access
498
+ $js_registry_query = /app\.getPath\(("HKCU|HKLM|HKEY_LOCAL_MACHINE|HKEY_CURRENT_USER)[^)]+"\)/ nocase
499
+
500
+ // Shell execution methods used in malicious PDFs
501
+ $js_exec = /app\.launchURL\(|util\.spawn\(|eval\(|new Function\(/ nocase
502
+ $js_cmd = /cmd\.exe|reg query|powershell\.exe|wscript\.shell/i
503
+ condition:
504
+ uint32(0) == 0x25504446 and // PDF file magic bytes ("%PDF")
505
+ any of ($js_registry_query) or (any of ($js_exec) and any of ($js_cmd))
506
+ }
507
+
508
+
509
+ /* https://github.com/tylabs/quicksand PDF Exploit detection signatures */
510
+ rule shellcode_hash__CloseHandle {
511
+ meta:
512
+ is_exploit = false
513
+ is_feature = false
514
+ is_warning = true
515
+ rank = 2
516
+ revision = "1"
517
+ date = "June 07 2020"
518
+ author = "@tylabs"
519
+ sigtype = "pdfexaminer_shellcode"
520
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
521
+ desc = "shellcode.hash CloseHandle"
522
+ mitre = "T1106"
523
+ strings:
524
+ $h_raw = "fb97fd0f" nocase
525
+ $h_hex = { fb97fd0f }
526
+ condition:
527
+ filesize < 1MB and any of them
528
+ }
529
+
530
+
531
+ rule shellcode_hash__CreateFileA {
532
+ meta:
533
+ is_exploit = false
534
+ is_feature = false
535
+ is_warning = true
536
+ rank = 2
537
+ revision = "1"
538
+ date = "June 07 2020"
539
+ author = "@tylabs"
540
+ sigtype = "pdfexaminer_shellcode"
541
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
542
+ desc = "shellcode.hash CreateFileA"
543
+ mitre = "T1106"
544
+ strings:
545
+ $h_raw = "a517007c" nocase
546
+ $h_hex = { a517007c }
547
+ condition:
548
+ filesize < 1MB and any of them
549
+ }
550
+
551
+
552
+ rule shellcode_hash__CreateProcessA {
553
+ meta:
554
+ is_exploit = false
555
+ is_feature = false
556
+ is_warning = true
557
+ rank = 2
558
+ revision = "1"
559
+ date = "June 07 2020"
560
+ author = "@tylabs"
561
+ sigtype = "pdfexaminer_shellcode"
562
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
563
+ desc = "shellcode.hash CreateProcessA"
564
+ mitre = "T1106"
565
+ strings:
566
+ $h_raw = "72feb316" nocase
567
+ $h_hex = { 72feb316 }
568
+ condition:
569
+ filesize < 1MB and any of them
570
+ }
571
+
572
+
573
+ rule shellcode_hash__DeleteFileA {
574
+ meta:
575
+ is_exploit = false
576
+ is_feature = false
577
+ is_warning = true
578
+ rank = 2
579
+ revision = "1"
580
+ date = "June 07 2020"
581
+ author = "@tylabs"
582
+ sigtype = "pdfexaminer_shellcode"
583
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
584
+ desc = "shellcode.hash DeleteFileA"
585
+ mitre = "T1106"
586
+ strings:
587
+ $h_raw = "25b0ffc2" nocase
588
+ $h_hex = { 25b0ffc2 }
589
+ condition:
590
+ filesize < 1MB and any of them
591
+ }
592
+
593
+
594
+ rule shellcode_hash__ExitProcess {
595
+ meta:
596
+ is_exploit = false
597
+ is_feature = false
598
+ is_warning = true
599
+ rank = 2
600
+ revision = "1"
601
+ date = "June 07 2020"
602
+ author = "@tylabs"
603
+ sigtype = "pdfexaminer_shellcode"
604
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
605
+ desc = "shellcode.hash ExitProcess"
606
+ mitre = "T1106"
607
+ strings:
608
+ $h_raw = "7ed8e273" nocase
609
+ $h_hex = { 7ed8e273 }
610
+ condition:
611
+ filesize < 1MB and any of them
612
+ }
613
+
614
+
615
+ rule shellcode_hash__ExitThread {
616
+ meta:
617
+ is_exploit = false
618
+ is_feature = false
619
+ is_warning = true
620
+ rank = 2
621
+ revision = "1"
622
+ date = "June 07 2020"
623
+ author = "@tylabs"
624
+ sigtype = "pdfexaminer_shellcode"
625
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
626
+ desc = "shellcode.hash ExitThread"
627
+ mitre = "T1106"
628
+ strings:
629
+ $h_raw = "efcee060" nocase
630
+ $h_hex = { efcee060 }
631
+ condition:
632
+ filesize < 1MB and any of them
633
+ }
634
+
635
+
636
+ rule shellcode_hash__GetProcAddress {
637
+ meta:
638
+ is_exploit = false
639
+ is_feature = false
640
+ is_warning = true
641
+ rank = 2
642
+ revision = "1"
643
+ date = "June 07 2020"
644
+ author = "@tylabs"
645
+ sigtype = "pdfexaminer_shellcode"
646
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
647
+ desc = "shellcode.hash GetProcAddress"
648
+ mitre = "T1129"
649
+ strings:
650
+ $h_raw = "aafc0d7c" nocase
651
+ $h_hex = { aafc0d7c }
652
+ condition:
653
+ filesize < 1MB and any of them
654
+ }
655
+
656
+
657
+ rule shellcode_hash__GetSystemDirectoryA {
658
+ meta:
659
+ is_exploit = false
660
+ is_feature = false
661
+ is_warning = true
662
+ rank = 2
663
+ revision = "1"
664
+ date = "June 07 2020"
665
+ author = "@tylabs"
666
+ sigtype = "pdfexaminer_shellcode"
667
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
668
+ desc = "shellcode.hash GetSystemDirectoryA"
669
+ mitre = "T1106"
670
+ strings:
671
+ $h_raw = "c179e5b8" nocase
672
+ $h_hex = { c179e5b8 }
673
+ condition:
674
+ filesize < 1MB and any of them
675
+ }
676
+
677
+
678
+ rule shellcode_hash___hwrite {
679
+ meta:
680
+ is_exploit = false
681
+ is_feature = false
682
+ is_warning = true
683
+ rank = 2
684
+ revision = "1"
685
+ date = "June 07 2020"
686
+ author = "@tylabs"
687
+ sigtype = "pdfexaminer_shellcode"
688
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
689
+ desc = "shellcode.hash _hwrite"
690
+ mitre = "T1106"
691
+ strings:
692
+ $h_raw = "d98a23e9" nocase
693
+ $h_hex = { d98a23e9 }
694
+ condition:
695
+ filesize < 1MB and any of them
696
+ }
697
+
698
+
699
+ rule shellcode_hash___lclose {
700
+ meta:
701
+ is_exploit = false
702
+ is_feature = false
703
+ is_warning = true
704
+ rank = 2
705
+ revision = "1"
706
+ date = "June 07 2020"
707
+ author = "@tylabs"
708
+ sigtype = "pdfexaminer_shellcode"
709
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
710
+ desc = "shellcode.hash _lclose"
711
+ mitre = "T1106"
712
+ strings:
713
+ $h_raw = "5b4c1add" nocase
714
+ $h_hex = { 5b4c1add }
715
+ condition:
716
+ filesize < 1MB and any of them
717
+ }
718
+
719
+
720
+ rule shellcode_hash___lcreat {
721
+ meta:
722
+ is_exploit = false
723
+ is_feature = false
724
+ is_warning = true
725
+ rank = 2
726
+ revision = "1"
727
+ date = "June 07 2020"
728
+ author = "@tylabs"
729
+ sigtype = "pdfexaminer_shellcode"
730
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
731
+ desc = "shellcode.hash _lcreat"
732
+ mitre = "T1106"
733
+ strings:
734
+ $h_raw = "ea498ae8" nocase
735
+ $h_hex = { ea498ae8 }
736
+ condition:
737
+ filesize < 1MB and any of them
738
+ }
739
+
740
+
741
+ rule shellcode_hash__LoadLibraryA {
742
+ meta:
743
+ is_exploit = false
744
+ is_feature = false
745
+ is_warning = true
746
+ rank = 2
747
+ revision = "1"
748
+ date = "June 07 2020"
749
+ author = "@tylabs"
750
+ sigtype = "pdfexaminer_shellcode"
751
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
752
+ desc = "shellcode.hash LoadLibraryA"
753
+ mitre = "T1129"
754
+ strings:
755
+ $h_raw = "8e4e0eec" nocase
756
+ $h_hex = { 8e4e0eec }
757
+ condition:
758
+ filesize < 1MB and any of them
759
+ }
760
+
761
+
762
+ rule shellcode_hash___lwrite {
763
+ meta:
764
+ is_exploit = false
765
+ is_feature = false
766
+ is_warning = true
767
+ rank = 2
768
+ revision = "1"
769
+ date = "June 07 2020"
770
+ author = "@tylabs"
771
+ sigtype = "pdfexaminer_shellcode"
772
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
773
+ desc = "shellcode.hash _lwrite"
774
+ mitre = "T1106"
775
+ strings:
776
+ $h_raw = "db8a23e9" nocase
777
+ $h_hex = { db8a23e9 }
778
+ condition:
779
+ filesize < 1MB and any of them
780
+ }
781
+
782
+
783
+ rule shellcode_hash__SetUnhandledExceptionFilter {
784
+ meta:
785
+ is_exploit = false
786
+ is_feature = false
787
+ is_warning = true
788
+ rank = 2
789
+ revision = "1"
790
+ date = "June 07 2020"
791
+ author = "@tylabs"
792
+ sigtype = "pdfexaminer_shellcode"
793
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
794
+ desc = "shellcode.hash SetUnhandledExceptionFilter"
795
+ mitre = "T1106"
796
+ strings:
797
+ $h_raw = "f08a045f" nocase
798
+ $h_hex = { f08a045f }
799
+ condition:
800
+ filesize < 1MB and any of them
801
+ }
802
+
803
+
804
+ rule shellcode_hash__WaitForSingleObject {
805
+ meta:
806
+ is_exploit = false
807
+ is_feature = false
808
+ is_warning = true
809
+ rank = 2
810
+ revision = "1"
811
+ date = "June 07 2020"
812
+ author = "@tylabs"
813
+ sigtype = "pdfexaminer_shellcode"
814
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
815
+ desc = "shellcode.hash WaitForSingleObject"
816
+ mitre = "T1106"
817
+ strings:
818
+ $h_raw = "add905ce" nocase
819
+ $h_hex = { add905ce }
820
+ condition:
821
+ filesize < 1MB and any of them
822
+ }
823
+
824
+
825
+ rule shellcode_hash__WinExec {
826
+ meta:
827
+ is_exploit = false
828
+ is_feature = false
829
+ is_warning = true
830
+ rank = 2
831
+ revision = "1"
832
+ date = "June 07 2020"
833
+ author = "@tylabs"
834
+ sigtype = "pdfexaminer_shellcode"
835
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
836
+ desc = "shellcode.hash WinExec"
837
+ mitre = "T1059.003"
838
+ strings:
839
+ $h_raw = "98fe8a0e" nocase
840
+ $h_hex = { 98fe8a0e }
841
+ condition:
842
+ filesize < 1MB and any of them
843
+ }
844
+
845
+
846
+ rule shellcode_hash__WriteFile {
847
+ meta:
848
+ is_exploit = false
849
+ is_feature = false
850
+ is_warning = true
851
+ rank = 2
852
+ revision = "1"
853
+ date = "June 07 2020"
854
+ author = "@tylabs"
855
+ sigtype = "pdfexaminer_shellcode"
856
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
857
+ desc = "shellcode.hash WriteFile"
858
+ mitre = "T1059"
859
+ strings:
860
+ $h_raw = "1f790ae8" nocase
861
+ $h_hex = { 1f790ae8 }
862
+ condition:
863
+ filesize < 1MB and any of them
864
+ }
865
+
866
+
867
+ rule shellcode_hash__accept {
868
+ meta:
869
+ is_exploit = false
870
+ is_feature = false
871
+ is_warning = true
872
+ rank = 2
873
+ revision = "1"
874
+ date = "June 07 2020"
875
+ author = "@tylabs"
876
+ sigtype = "pdfexaminer_shellcode"
877
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
878
+ desc = "shellcode.hash accept"
879
+ mitre = "T1106"
880
+ strings:
881
+ $h_raw = "e5498649" nocase
882
+ $h_hex = { e5498649 }
883
+ condition:
884
+ filesize < 1MB and any of them
885
+ }
886
+
887
+
888
+ rule shellcode_hash__bind {
889
+ meta:
890
+ is_exploit = false
891
+ is_feature = false
892
+ is_warning = true
893
+ rank = 2
894
+ revision = "1"
895
+ date = "June 07 2020"
896
+ author = "@tylabs"
897
+ sigtype = "pdfexaminer_shellcode"
898
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
899
+ desc = "shellcode.hash bind"
900
+ mitre = "T1106"
901
+ strings:
902
+ $h_raw = "a41a70c7" nocase
903
+ $h_hex = { a41a70c7 }
904
+ condition:
905
+ filesize < 1MB and any of them
906
+ }
907
+
908
+
909
+ rule shellcode_hash__closesocket {
910
+ meta:
911
+ is_exploit = false
912
+ is_feature = false
913
+ is_warning = true
914
+ rank = 2
915
+ revision = "1"
916
+ date = "June 07 2020"
917
+ author = "@tylabs"
918
+ sigtype = "pdfexaminer_shellcode"
919
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
920
+ desc = "shellcode.hash closesocket"
921
+ mitre = "T1106"
922
+ strings:
923
+ $h_raw = "e779c679" nocase
924
+ $h_hex = { e779c679 }
925
+ condition:
926
+ filesize < 1MB and any of them
927
+ }
928
+
929
+
930
+ rule shellcode_hash__connect {
931
+ meta:
932
+ is_exploit = false
933
+ is_feature = false
934
+ is_warning = true
935
+ rank = 2
936
+ revision = "1"
937
+ date = "June 07 2020"
938
+ author = "@tylabs"
939
+ sigtype = "pdfexaminer_shellcode"
940
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
941
+ desc = "shellcode.hash connect"
942
+ mitre = "T1106"
943
+ strings:
944
+ $h_raw = "ecf9aa60" nocase
945
+ $h_hex = { ecf9aa60 }
946
+ condition:
947
+ filesize < 1MB and any of them
948
+ }
949
+
950
+
951
+ rule shellcode_hash__listen {
952
+ meta:
953
+ is_exploit = false
954
+ is_feature = false
955
+ is_warning = true
956
+ rank = 2
957
+ revision = "1"
958
+ date = "June 07 2020"
959
+ author = "@tylabs"
960
+ sigtype = "pdfexaminer_shellcode"
961
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
962
+ desc = "shellcode.hash listen"
963
+ mitre = "T1106"
964
+ strings:
965
+ $h_raw = "a4ad2ee9" nocase
966
+ $h_hex = { a4ad2ee9 }
967
+ condition:
968
+ filesize < 1MB and any of them
969
+ }
970
+
971
+
972
+ rule shellcode_hash__recv {
973
+ meta:
974
+ is_exploit = false
975
+ is_feature = false
976
+ is_warning = true
977
+ rank = 2
978
+ revision = "1"
979
+ date = "June 07 2020"
980
+ author = "@tylabs"
981
+ sigtype = "pdfexaminer_shellcode"
982
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
983
+ desc = "shellcode.hash recv"
984
+ mitre = "T1106"
985
+ strings:
986
+ $h_raw = "b61918e7" nocase
987
+ $h_hex = { b61918e7 }
988
+ condition:
989
+ filesize < 1MB and any of them
990
+ }
991
+
992
+
993
+ rule shellcode_hash__send {
994
+ meta:
995
+ is_exploit = false
996
+ is_feature = false
997
+ is_warning = true
998
+ rank = 2
999
+ revision = "1"
1000
+ date = "June 07 2020"
1001
+ author = "@tylabs"
1002
+ sigtype = "pdfexaminer_shellcode"
1003
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1004
+ desc = "shellcode.hash send"
1005
+ mitre = "T1106"
1006
+ strings:
1007
+ $h_raw = "a41970e9" nocase
1008
+ $h_hex = { a41970e9 }
1009
+ condition:
1010
+ filesize < 1MB and any of them
1011
+ }
1012
+
1013
+
1014
+ rule shellcode_hash__socket {
1015
+ meta:
1016
+ is_exploit = false
1017
+ is_feature = false
1018
+ is_warning = true
1019
+ rank = 2
1020
+ revision = "1"
1021
+ date = "June 07 2020"
1022
+ author = "@tylabs"
1023
+ sigtype = "pdfexaminer_shellcode"
1024
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1025
+ desc = "shellcode.hash socket"
1026
+ mitre = "T1106"
1027
+ strings:
1028
+ $h_raw = "6e0b2f49" nocase
1029
+ $h_hex = { 6e0b2f49 }
1030
+ condition:
1031
+ filesize < 1MB and any of them
1032
+ }
1033
+
1034
+
1035
+ rule shellcode_hash__WSASocketA {
1036
+ meta:
1037
+ is_exploit = false
1038
+ is_feature = false
1039
+ is_warning = true
1040
+ rank = 2
1041
+ revision = "1"
1042
+ date = "June 07 2020"
1043
+ author = "@tylabs"
1044
+ sigtype = "pdfexaminer_shellcode"
1045
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1046
+ desc = "shellcode.hash WSASocketA"
1047
+ mitre = "T1106"
1048
+ strings:
1049
+ $h_raw = "d909f5ad" nocase
1050
+ $h_hex = { d909f5ad }
1051
+ condition:
1052
+ filesize < 1MB and any of them
1053
+ }
1054
+
1055
+
1056
+ rule shellcode_hash__WSAStartup {
1057
+ meta:
1058
+ is_exploit = false
1059
+ is_feature = false
1060
+ is_warning = true
1061
+ rank = 2
1062
+ revision = "1"
1063
+ date = "June 07 2020"
1064
+ author = "@tylabs"
1065
+ sigtype = "pdfexaminer_shellcode"
1066
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1067
+ desc = "shellcode.hash WSAStartup"
1068
+ mitre = "T1106"
1069
+ strings:
1070
+ $h_raw = "cbedfc3b" nocase
1071
+ $h_hex = { cbedfc3b }
1072
+ condition:
1073
+ filesize < 1MB and any of them
1074
+ }
1075
+
1076
+
1077
+ rule shellcode_hash__URLDownloadToFileA {
1078
+ meta:
1079
+ is_exploit = false
1080
+ is_feature = false
1081
+ is_warning = true
1082
+ rank = 2
1083
+ revision = "1"
1084
+ date = "June 07 2020"
1085
+ author = "@tylabs"
1086
+ sigtype = "pdfexaminer_shellcode"
1087
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1088
+ desc = "shellcode.hash URLDownloadToFileA"
1089
+ mitre = "T1106"
1090
+ strings:
1091
+ $h_raw = "361a2f70" nocase
1092
+ $h_hex = { 361a2f70 }
1093
+ condition:
1094
+ filesize < 1MB and any of them
1095
+ }
1096
+
1097
+
1098
+ rule suspicious_shellcode_NOP_Sled {
1099
+ meta:
1100
+ is_exploit = false
1101
+ is_feature = false
1102
+ is_warning = true
1103
+ rank = 2
1104
+ revision = "1"
1105
+ date = "June 07 2020"
1106
+ author = "@tylabs"
1107
+ sigtype = "pdfexaminer_shellcode"
1108
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1109
+ desc = "suspicious.shellcode NOP Sled"
1110
+ mitre = "T1106"
1111
+ strings:
1112
+ $h_raw = "9090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090" nocase
1113
+ $h_hex = { 9090909090909090909090909090909090909090909090909090909090909090909090909090909090909090909090 }
1114
+ condition:
1115
+ filesize < 1MB and any of them
1116
+ }
1117
+
1118
+
1119
+ rule suspicious_obfuscation_using_unescape {
1120
+ meta:
1121
+ is_exploit = false
1122
+ is_feature = false
1123
+ is_warning = true
1124
+ rank = 1
1125
+ revision = "1"
1126
+ date = "June 07 2020"
1127
+ author = "@tylabs"
1128
+ sigtype = "pdfexaminer_obfuscation"
1129
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1130
+ desc = "suspicious.obfuscation using unescape"
1131
+ mitre = "T1027"
1132
+ strings:
1133
+ $h_reg1 = /une(.{0,6}?)sca(.{0,6}?)pe([^\)]{0,6}?)\(/
1134
+ $h_reg2 = /un(.{0,6}?)esc(.{0,6}?)ape([^\)]{0,6}?)\(/
1135
+ $h_reg3 = /unesc([\W]{0,6}?)ape/
1136
+ //$h_reg4 = /u([\W]{0,6}?)n([\W]{0,6}?)e([\W]{0,6}?)s([\W]{0,6}?)c([\W]{0,6}?)a([\W]{0,6}?)p([\W]{0,6}?)e/
1137
+ $h_reg5 = /unescape([^\)]{0,6}?)\(/
1138
+ $h_raw6 = "\"u\",\"s\",\"p\",\"c\",\"n\",\"e\",\"a\"," nocase
1139
+ $h_raw7 = "\"s\",\"n\",\"a\",\"e\",\"c\",\"u\",\"e\",\"p\"" nocase
1140
+ condition:
1141
+ any of them
1142
+ }
1143
+
1144
+ /*
1145
+ rule suspicious_obfuscation_using_charCodeAt {
1146
+ meta:
1147
+ is_exploit = false
1148
+ is_feature = false
1149
+ is_warning = true
1150
+ rank = 1
1151
+ revision = "1"
1152
+ date = "June 07 2020"
1153
+ author = "@tylabs"
1154
+ sigtype = "pdfexaminer_obfuscation"
1155
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1156
+ desc = "suspicious.obfuscation using charCodeAt"
1157
+ mitre = "T1027"
1158
+ strings:
1159
+ $h_reg1 = /c([\W]{0,4}?)h([\W]{0,4}?)a([\W]{0,4}?)r([\W]{0,4}?)C([\W]{0,3}?)o([\W]{0,3}?)d([\W]{0,3}?)e([\W]{0,3}?)A(.{0,3}?)t/
1160
+ condition:
1161
+ any of them
1162
+ }*/
1163
+
1164
+
1165
+ rule suspicious_string_nopblock {
1166
+ meta:
1167
+ is_exploit = false
1168
+ is_feature = false
1169
+ is_warning = true
1170
+ rank = 1
1171
+ revision = "1"
1172
+ date = "June 07 2020"
1173
+ author = "@tylabs"
1174
+ sigtype = "pdfexaminer_obfuscation"
1175
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1176
+ desc = "suspicious.string nopblock"
1177
+ mitre = "T1027"
1178
+ strings:
1179
+ $h_raw1 = "nopblock" nocase
1180
+ condition:
1181
+ filesize < 1MB and any of them
1182
+ }
1183
+
1184
+
1185
+ rule suspicious_obfuscation_using_eval {
1186
+ meta:
1187
+ is_exploit = false
1188
+ is_feature = false
1189
+ is_warning = true
1190
+ rank = 1
1191
+ revision = "1"
1192
+ date = "June 07 2020"
1193
+ author = "@tylabs"
1194
+ sigtype = "pdfexaminer_obfuscation"
1195
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1196
+ desc = "suspicious.obfuscation using eval"
1197
+ mitre = "T1027"
1198
+ strings:
1199
+ $h_reg1 = /eval(\s{0,3}?)\(/
1200
+ $h_raw2 = "eval\\" nocase
1201
+ $h_raw3 = "eval," nocase
1202
+ $h_reg4 = /'e'(.{1,30}?)'va'(.{1,3}?)'l/
1203
+ $h_raw5 = "\"l\",\"v\",\"e\",\"a\"" nocase
1204
+ $h_raw6 = "\"e\",\"l\",\"a\",\"v\"" nocase
1205
+ $h_reg7 = /=(\s{0,6}?)eval/
1206
+ condition:
1207
+ any of them
1208
+ }
1209
+
1210
+
1211
+ rule suspicious_javascript_object {
1212
+ meta:
1213
+ is_exploit = false
1214
+ is_feature = false
1215
+ is_warning = true
1216
+ rank = 1
1217
+ revision = "1"
1218
+ date = "June 07 2020"
1219
+ author = "@tylabs"
1220
+ sigtype = "pdfexaminer_obfuscation"
1221
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1222
+ desc = "suspicious.javascript object"
1223
+ mitre = "T1027 T1059.007"
1224
+ strings:
1225
+ $h_raw1 = "/JavaScript" nocase
1226
+ $h_raw2 = "/JS "
1227
+ condition:
1228
+ any of them
1229
+ }
1230
+
1231
+
1232
+ rule suspicious_javascript_in_XFA_block {
1233
+ meta:
1234
+ is_exploit = false
1235
+ is_feature = false
1236
+ is_warning = true
1237
+ rank = 1
1238
+ revision = "1"
1239
+ date = "June 07 2020"
1240
+ author = "@tylabs"
1241
+ sigtype = "pdfexaminer_obfuscation"
1242
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1243
+ desc = "suspicious.javascript in XFA block"
1244
+ mitre = "T1027 T1059.007"
1245
+ strings:
1246
+ $h_raw1 = "application/x-javascript" nocase
1247
+ $h_raw2 = "application#2Fx-javascript" nocase
1248
+ //$h_reg3 = /(\&\#0*97;|a)(\&\#0*112;|p)(\&\#0*112;|p)(\&\#0*108;|l)(\&\#0*105;|i)(\&\#0*99;|c)(\&\#0*97;|a)(\&\#0*116;|t)(\&\#0*105;|i)(\&\#0*111;|o)(\&\#0*110;|n)(\&\#0*47;|\/)(\&\#0*120;|x)(\&\#0*45;|\-)(\&\#0*106;|j)(\&\#0*97;|a)(\&\#0*76;|v)(\&\#0*97;|a)(\&\#0*115;|s)(\&\#0*99;|c)(\&\#0*114;|r)(\&\#0*105;|i)(\&\#0*112;|p)(\&\#0*116;|t)/
1249
+ condition:
1250
+ any of them
1251
+ }
1252
+
1253
+
1254
+ rule suspicious_pdf_embedded_PDF_file {
1255
+ meta:
1256
+ is_exploit = false
1257
+ is_feature = false
1258
+ is_warning = true
1259
+ rank = 1
1260
+ revision = "1"
1261
+ date = "June 07 2020"
1262
+ author = "@tylabs"
1263
+ sigtype = "pdfexaminer_obfuscation"
1264
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1265
+ desc = "suspicious.pdf embedded PDF file"
1266
+ mitre = "T1204.002"
1267
+ strings:
1268
+ $h_raw1 = "application#2Fpdf" nocase
1269
+ condition:
1270
+ any of them
1271
+ }
1272
+
1273
+
1274
+ rule suspicious_obfuscation_toString {
1275
+ meta:
1276
+ is_exploit = false
1277
+ is_feature = false
1278
+ is_warning = true
1279
+ rank = 1
1280
+ revision = "1"
1281
+ date = "June 07 2020"
1282
+ author = "@tylabs"
1283
+ sigtype = "pdfexaminer_obfuscation"
1284
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1285
+ desc = "suspicious.obfuscation toString"
1286
+ mitre = "T1027"
1287
+ strings:
1288
+ $h_raw1 = "toString(" nocase
1289
+ condition:
1290
+ filesize < 1MB and any of them
1291
+ }
1292
+
1293
+
1294
+ rule suspicious_obfuscation_using_substr {
1295
+ meta:
1296
+ is_exploit = false
1297
+ is_feature = false
1298
+ is_warning = true
1299
+ rank = 1
1300
+ revision = "1"
1301
+ date = "June 07 2020"
1302
+ author = "@tylabs"
1303
+ sigtype = "pdfexaminer_obfuscation"
1304
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1305
+ desc = "suspicious.obfuscation using substr"
1306
+ mitre = "T1027"
1307
+ strings:
1308
+ $h_raw1 = "substr(" nocase
1309
+ condition:
1310
+ any of them
1311
+ }
1312
+
1313
+
1314
+ rule suspicious_obfuscation_using_String_replace {
1315
+ meta:
1316
+ is_exploit = false
1317
+ is_feature = false
1318
+ is_warning = true
1319
+ rank = 1
1320
+ revision = "1"
1321
+ date = "June 07 2020"
1322
+ author = "@tylabs"
1323
+ sigtype = "pdfexaminer_obfuscation"
1324
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1325
+ desc = "suspicious.obfuscation using String.replace"
1326
+ mitre = "T1027"
1327
+ strings:
1328
+ $h_reg1 = /'re'(.{1,24}?)'place'/
1329
+ $h_raw2 = ".replace" nocase
1330
+ condition:
1331
+ any of them
1332
+ }
1333
+
1334
+
1335
+ rule suspicious_obfuscation_using_String_fromCharCode {
1336
+ meta:
1337
+ is_exploit = false
1338
+ is_feature = false
1339
+ is_warning = true
1340
+ rank = 1
1341
+ revision = "1"
1342
+ date = "June 07 2020"
1343
+ author = "@tylabs"
1344
+ sigtype = "pdfexaminer_obfuscation"
1345
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1346
+ desc = "suspicious.obfuscation using String.fromCharCode"
1347
+ mitre = "T1027"
1348
+ strings:
1349
+ $h_raw1 = "\"rCo\",\"t\",\"cha\",\"\",\"deA\"" nocase
1350
+ $h_raw2 = "\"deA\",\"cha\",\"rCo\",\"t\"" nocase
1351
+ $h_reg3 = /from([\W]{0,6}?)C([\W]{0,6}?)h([\W]{0,6}?)a(.{0,6}?)r(.{0,6}?)C(.{0,6}?)o([\W]{0,6}?)d([\W]{0,6}?)e/
1352
+ $h_raw4 = ".fromCharC" nocase
1353
+ condition:
1354
+ any of them
1355
+ }
1356
+
1357
+
1358
+ rule suspicious_obfuscation_using_substring {
1359
+ meta:
1360
+ is_exploit = false
1361
+ is_feature = false
1362
+ is_warning = true
1363
+ rank = 1
1364
+ revision = "1"
1365
+ date = "June 07 2020"
1366
+ author = "@tylabs"
1367
+ sigtype = "pdfexaminer_obfuscation"
1368
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1369
+ desc = "suspicious.obfuscation using substring"
1370
+ mitre = "T1027"
1371
+ strings:
1372
+ $h_reg1 = /\.substring(\s{0,3}?)\(/
1373
+ condition:
1374
+ any of them
1375
+ }
1376
+
1377
+
1378
+ rule suspicious_obfuscation_using_util_byteToChar {
1379
+ meta:
1380
+ is_exploit = false
1381
+ is_feature = false
1382
+ is_warning = true
1383
+ rank = 1
1384
+ revision = "1"
1385
+ date = "June 07 2020"
1386
+ author = "@tylabs"
1387
+ sigtype = "pdfexaminer_obfuscation"
1388
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1389
+ desc = "suspicious.obfuscation using util.byteToChar"
1390
+ mitre = "T1027"
1391
+ strings:
1392
+ $h_raw1 = "byteToChar" nocase
1393
+ condition:
1394
+ any of them
1395
+ }
1396
+
1397
+
1398
+ rule suspicious_string_Shellcode_NOP_sled {
1399
+ meta:
1400
+ is_exploit = false
1401
+ is_feature = false
1402
+ is_warning = true
1403
+ rank = 1
1404
+ revision = "1"
1405
+ date = "June 07 2020"
1406
+ author = "@tylabs"
1407
+ sigtype = "pdfexaminer_obfuscation"
1408
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1409
+ desc = "suspicious.string Shellcode NOP sled"
1410
+ mitre = "T1027"
1411
+ strings:
1412
+ $h_raw1 = "%u9090" nocase
1413
+ condition:
1414
+ any of them
1415
+ }
1416
+
1417
+
1418
+ rule suspicious_string_heap_spray_shellcode {
1419
+ meta:
1420
+ is_exploit = false
1421
+ is_feature = false
1422
+ is_warning = true
1423
+ rank = 1
1424
+ revision = "1"
1425
+ date = "June 07 2020"
1426
+ author = "@tylabs"
1427
+ sigtype = "pdfexaminer_obfuscation"
1428
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1429
+ desc = "suspicious.string heap spray shellcode"
1430
+ mitre = "T1027"
1431
+ strings:
1432
+ $h_raw1 = "\"%\" + \"u\" + \"0\" + \"c\" + \"0\" + \"c\" + \"%u\" + \"0\" + \"c\" + \"0\" + \"c\"" nocase
1433
+ condition:
1434
+ any of them
1435
+ }
1436
+
1437
+
1438
+ rule suspicious_string_shellcode {
1439
+ meta:
1440
+ is_exploit = false
1441
+ is_feature = false
1442
+ is_warning = true
1443
+ rank = 1
1444
+ revision = "1"
1445
+ date = "June 07 2020"
1446
+ author = "@tylabs"
1447
+ sigtype = "pdfexaminer_obfuscation"
1448
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1449
+ desc = "suspicious.string shellcode"
1450
+ mitre = "T1027"
1451
+ strings:
1452
+ $h_raw1 = "%u4141%u4141" nocase
1453
+ condition:
1454
+ any of them
1455
+ }
1456
+
1457
+
1458
+ rule suspicious_string__Run_Sploit_ {
1459
+ meta:
1460
+ is_exploit = false
1461
+ is_feature = false
1462
+ is_warning = true
1463
+ rank = 1
1464
+ revision = "1"
1465
+ date = "June 07 2020"
1466
+ author = "@tylabs"
1467
+ sigtype = "pdfexaminer_obfuscation"
1468
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1469
+ desc = "suspicious.string -Run_Sploit-"
1470
+ mitre = "T1027"
1471
+ strings:
1472
+ $h_raw1 = "Run_Sploit" nocase
1473
+ condition:
1474
+ any of them
1475
+ }
1476
+
1477
+
1478
+ rule suspicious_string__HeapSpray_ {
1479
+ meta:
1480
+ is_exploit = false
1481
+ is_feature = false
1482
+ is_warning = true
1483
+ rank = 1
1484
+ revision = "1"
1485
+ date = "June 07 2020"
1486
+ author = "@tylabs"
1487
+ sigtype = "pdfexaminer_obfuscation"
1488
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1489
+ desc = "suspicious.string -HeapSpray-"
1490
+ mitre = "T1027"
1491
+ strings:
1492
+ $h_raw1 = "HeapSpray" nocase
1493
+ condition:
1494
+ any of them
1495
+ }
1496
+
1497
+
1498
+ rule suspicious_flash_writeMultiByte {
1499
+ meta:
1500
+ is_exploit = false
1501
+ is_feature = false
1502
+ is_warning = true
1503
+ rank = 1
1504
+ revision = "1"
1505
+ date = "June 07 2020"
1506
+ author = "@tylabs"
1507
+ sigtype = "pdfexaminer_obfuscation"
1508
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1509
+ desc = "suspicious.flash writeMultiByte"
1510
+ mitre = "T1027"
1511
+ strings:
1512
+ $h_raw1 = "writeMultiByte" nocase
1513
+ condition:
1514
+ any of them
1515
+ }
1516
+
1517
+
1518
+ rule suspicious_flash_addFrameScript {
1519
+ meta:
1520
+ is_exploit = false
1521
+ is_feature = false
1522
+ is_warning = true
1523
+ rank = 1
1524
+ revision = "1"
1525
+ date = "June 07 2020"
1526
+ author = "@tylabs"
1527
+ sigtype = "pdfexaminer_obfuscation"
1528
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1529
+ desc = "suspicious.flash addFrameScript"
1530
+ mitre = "T1027"
1531
+ strings:
1532
+ $h_raw1 = "addFrameScript" nocase
1533
+ condition:
1534
+ any of them
1535
+ }
1536
+
1537
+
1538
+ rule suspicious_flash_Adobe_Shockwave_Flash_in_a_PDF_define_obj_type {
1539
+ meta:
1540
+ is_exploit = false
1541
+ is_feature = false
1542
+ is_warning = true
1543
+ rank = 1
1544
+ revision = "1"
1545
+ date = "June 07 2020"
1546
+ author = "@tylabs"
1547
+ sigtype = "pdfexaminer_obfuscation"
1548
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1549
+ desc = "suspicious.flash Adobe Shockwave Flash in a PDF define obj type"
1550
+ strings:
1551
+ $h_hex1 = { (52|233532) (69|233639) (63|233633) (68|233638) (4D|233444|233464) (65|233635) (64|233634) (69|233639)(61|233631) }
1552
+ condition:
1553
+ any of them
1554
+ }
1555
+
1556
+
1557
+ rule suspicious_flash_obfuscated_name {
1558
+ meta:
1559
+ is_exploit = false
1560
+ is_feature = false
1561
+ is_warning = true
1562
+ rank = 1
1563
+ revision = "1"
1564
+ date = "June 07 2020"
1565
+ author = "@tylabs"
1566
+ sigtype = "pdfexaminer_obfuscation"
1567
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1568
+ desc = "suspicious.flash obfuscated name"
1569
+ mitre = "T1027"
1570
+ strings:
1571
+ $h_raw1 = "/R#69chM#65#64ia#53e#74ti#6e#67#73/" nocase
1572
+ condition:
1573
+ any of them
1574
+ }
1575
+
1576
+
1577
+ rule pdf_exploit_FlateDecode_Stream_Predictor_02_Integer_Overflow_CVE_2009_3459 {
1578
+ meta:
1579
+ is_exploit = true
1580
+ is_warning = false
1581
+ is_feature = false
1582
+ rank = 5
1583
+ revision = "1"
1584
+ date = "June 07 2020"
1585
+ author = "@tylabs"
1586
+ sigtype = "pdfexaminer_obfuscation"
1587
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1588
+ desc = "pdf.exploit FlateDecode Stream Predictor 02 Integer Overflow CVE-2009-3459"
1589
+ mitre = "T1203 T1204.002"
1590
+ strings:
1591
+ $h_reg1 = /Predictor 02(\s{0,2}?)\/(\s{0,2}?)Colors 1073741838/
1592
+ condition:
1593
+ any of them
1594
+ }
1595
+
1596
+
1597
+ rule pdf_exploit_colors_number_is_high_CVE_2009_3459 {
1598
+ meta:
1599
+ is_exploit = true
1600
+ is_warning = false
1601
+ is_feature = false
1602
+ rank = 5
1603
+ revision = "1"
1604
+ date = "June 07 2020"
1605
+ author = "@tylabs"
1606
+ sigtype = "pdfexaminer_obfuscation"
1607
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1608
+ desc = "pdf.exploit colors number is high CVE-2009-3459"
1609
+ mitre = "T1203 T1204.002"
1610
+ strings:
1611
+ $h_reg1 = /\/Colors \d{5,15}?/
1612
+ condition:
1613
+ any of them
1614
+ }
1615
+
1616
+
1617
+ rule pdf_exploit_URI_directory_traversal {
1618
+ meta:
1619
+ is_exploit = false
1620
+ is_feature = false
1621
+ is_warning = true
1622
+ rank = 1
1623
+ revision = "1"
1624
+ date = "June 07 2020"
1625
+ author = "@tylabs"
1626
+ sigtype = "pdfexaminer_obfuscation"
1627
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1628
+ desc = "pdf.exploit URI directory traversal"
1629
+ mitre = "T1203 T1204.002"
1630
+ strings:
1631
+ $h_reg1 = /URI.{1,30}?\/\.\.\/\.\./
1632
+ condition:
1633
+ any of them
1634
+ }
1635
+
1636
+
1637
+ rule pdf_exploit_URI_directory_traversal_system32 {
1638
+ meta:
1639
+ is_exploit = false
1640
+ is_feature = false
1641
+ is_warning = true
1642
+ rank = 1
1643
+ revision = "1"
1644
+ date = "June 07 2020"
1645
+ author = "@tylabs"
1646
+ sigtype = "pdfexaminer_obfuscation"
1647
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1648
+ desc = "pdf.exploit URI directory traversal system32"
1649
+ mitre = "T1203 T1204.002"
1650
+ strings:
1651
+ $h_reg1 = /URI.{1,65}?system32/
1652
+ condition:
1653
+ any of them
1654
+ }
1655
+
1656
+
1657
+ rule pdf_exploit_execute_EXE_file {
1658
+ meta:
1659
+ is_exploit = false
1660
+ is_warning = true
1661
+ is_feature = true
1662
+ rank = 10
1663
+ revision = "1"
1664
+ date = "June 07 2020"
1665
+ author = "@tylabs"
1666
+ sigtype = "pdfexaminer_obfuscation"
1667
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1668
+ desc = "pdf.exploit execute EXE file"
1669
+ mitre = "T1203 T1204.002"
1670
+ strings:
1671
+ $h_reg1 = /\/(A|#41)(c|#63)(t|#74)(i|#69)(o|#6F)(n|6e)(.{0,64}?)\.exe/
1672
+ condition:
1673
+ any of them
1674
+ }
1675
+
1676
+
1677
+ rule pdf_warning_openaction {
1678
+ meta:
1679
+ is_exploit = false
1680
+ is_warning = true
1681
+ is_feature = true
1682
+ rank = 1
1683
+ revision = "1"
1684
+ date = "July 14 2020"
1685
+ author = "@tylabs"
1686
+ sigtype = "pdfexaminer_obfuscation"
1687
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1688
+ desc = "pdf.warning OpenAction"
1689
+ mitre = "T1203 T1204.002"
1690
+ strings:
1691
+ $h_reg1 = /\/(O|#4F)(p|#70)(e|#65)(n|#6e)(A|#41)(c|#63)(t|#74)(i|#69)(o|#6F)(n|6e)/
1692
+ condition:
1693
+ any of them
1694
+ }
1695
+
1696
+
1697
+ rule pdf_exploit_access_system32_directory {
1698
+ meta:
1699
+ is_exploit = false
1700
+ is_feature = false
1701
+ is_warning = true
1702
+ rank = 1
1703
+ revision = "1"
1704
+ date = "June 07 2020"
1705
+ author = "@tylabs"
1706
+ sigtype = "pdfexaminer_obfuscation"
1707
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1708
+ desc = "pdf.exploit access system32 directory"
1709
+ mitre = "T1203 T1204.002"
1710
+ strings:
1711
+ $h_reg1 = /\/(A|#41)(c|#63)(t|#74)(i|#69)(o|#6F)(n|6e)(.{0,64}?)system32/
1712
+ condition:
1713
+ any of them
1714
+ }
1715
+
1716
+
1717
+ rule pdf_warning_remote_action {
1718
+ meta:
1719
+ is_exploit = false
1720
+ is_feature = false
1721
+ is_warning = true
1722
+ rank = 5
1723
+ revision = "1"
1724
+ date = "June 07 2020"
1725
+ author = "@tylabs"
1726
+ sigtype = "pdfexaminer_active"
1727
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1728
+ desc = "pdf.exploit action uri"
1729
+ mitre = "T1566.002"
1730
+ strings:
1731
+ $h_reg1 = /\/(A|#41)(c|#63)(t|#74)(i|#69)(o|#6F)(n|6e)\s*\/(U|#55)(R|#52)(I|49)/
1732
+ $h_reg2 = /\/(A|#41)(c|#63)(t|#74)(i|#69)(o|#6F)(n|6e)\s*\/(S|#53)\s*\/(U|#55)(R|#52)(I|49)/
1733
+
1734
+ condition:
1735
+ any of them
1736
+ }
1737
+
1738
+
1739
+
1740
+
1741
+ rule pdf_exploit_execute_action_command {
1742
+ meta:
1743
+ is_exploit = false
1744
+ is_feature = false
1745
+ is_warning = true
1746
+ rank = 1
1747
+ revision = "1"
1748
+ date = "June 07 2020"
1749
+ author = "@tylabs"
1750
+ sigtype = "pdfexaminer_obfuscation"
1751
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1752
+ desc = "pdf.exploit execute action command"
1753
+ mitre = "T1203 T1204.002"
1754
+ strings:
1755
+ $h_raw1 = "Launch/Type/Action/Win" nocase
1756
+ condition:
1757
+ any of them
1758
+ }
1759
+
1760
+
1761
+ rule pdf_exploit_printSeps_memory_heap_corruption_CVE_2010_4091 {
1762
+ meta:
1763
+ is_exploit = true
1764
+ is_warning = false
1765
+ is_feature = false
1766
+ rank = 5
1767
+ revision = "1"
1768
+ date = "June 07 2020"
1769
+ author = "@tylabs"
1770
+ sigtype = "pdfexaminer_obfuscation"
1771
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1772
+ desc = "pdf.exploit printSeps memory heap corruption CVE-2010-4091"
1773
+ mitre = "T1203 T1204.002"
1774
+ strings:
1775
+ $h_raw1 = "printSeps" nocase
1776
+ condition:
1777
+ any of them
1778
+ }
1779
+
1780
+
1781
+ rule suspicious_obfuscation_jjencoded_javascript {
1782
+ meta:
1783
+ is_exploit = false
1784
+ is_feature = false
1785
+ is_warning = true
1786
+ rank = 1
1787
+ revision = "1"
1788
+ date = "June 07 2020"
1789
+ author = "@tylabs"
1790
+ sigtype = "pdfexaminer_obfuscation"
1791
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1792
+ desc = "suspicious.obfuscation jjencoded javascript"
1793
+ mitre = "T1059.007"
1794
+ strings:
1795
+ $h_raw1 = ":++$,$$$$:" nocase
1796
+ $h_raw2 = "$$:++$,$$$" nocase
1797
+ condition:
1798
+ any of them
1799
+ }
1800
+
1801
+
1802
+ rule suspicious_obfuscation_getAnnots_access_blocks {
1803
+ meta:
1804
+ is_exploit = false
1805
+ is_feature = false
1806
+ is_warning = true
1807
+ rank = 1
1808
+ revision = "1"
1809
+ date = "June 07 2020"
1810
+ author = "@tylabs"
1811
+ sigtype = "pdfexaminer_obfuscation"
1812
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1813
+ desc = "suspicious.obfuscation getAnnots access blocks"
1814
+ mitre = "T1059.007"
1815
+ strings:
1816
+ $h_hex1 = {67 [0-2] 65 [0-2] 74 [0-2] 41 [0-2] 6E [0-2] 6E [0-2] 6F [0-2] 74}
1817
+
1818
+ $h_str2 = "getAnnots" nocase ascii wide
1819
+ //$h_reg1 = /g(\W{0,2}?)e(\W{0,2}?)t(\W{0,2}?)A([\W]{0,2}?)n([\W]{0,1}?)n([\W]{0,2}?)o([\W]{0,2}?)t/ //slow
1820
+ condition:
1821
+ any of them
1822
+ }
1823
+
1824
+
1825
+ rule suspicious_obfuscation_info_Trailer_to_access_blocks {
1826
+ meta:
1827
+ is_exploit = false
1828
+ is_feature = false
1829
+ is_warning = true
1830
+ rank = 1
1831
+ revision = "1"
1832
+ date = "June 07 2020"
1833
+ author = "@tylabs"
1834
+ sigtype = "pdfexaminer_obfuscation"
1835
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1836
+ desc = "suspicious.obfuscation info.Trailer to access blocks"
1837
+ mitre = "T1059.007"
1838
+ strings:
1839
+ $h_reg1 = /info([\W]{0,4}?)\.([\W]{0,4}?)Trailer/
1840
+ condition:
1841
+ any of them
1842
+ }
1843
+
1844
+
1845
+ rule suspicious_obfuscation_using_app_setTimeOut_to_eval_code {
1846
+ meta:
1847
+ is_exploit = false
1848
+ is_feature = false
1849
+ is_warning = true
1850
+ rank = 1
1851
+ revision = "1"
1852
+ date = "June 07 2020"
1853
+ author = "@tylabs"
1854
+ sigtype = "pdfexaminer_obfuscation"
1855
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1856
+ desc = "suspicious.obfuscation using app.setTimeOut to eval code"
1857
+ mitre = "T1059.007"
1858
+ strings:
1859
+ $h_raw1 = "app.setTimeOut" nocase
1860
+ condition:
1861
+ any of them
1862
+ }
1863
+
1864
+
1865
+ rule suspicious_string__shellcode_ {
1866
+ meta:
1867
+ is_exploit = false
1868
+ is_feature = false
1869
+ is_warning = true
1870
+ rank = 1
1871
+ revision = "1"
1872
+ date = "June 07 2020"
1873
+ author = "@tylabs"
1874
+ sigtype = "pdfexaminer_obfuscation"
1875
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1876
+ desc = "suspicious.string -shellcode-"
1877
+ mitre = "T1027 T1059.007"
1878
+ strings:
1879
+ $h_raw1 = "var shellcode" nocase
1880
+ condition:
1881
+ any of them
1882
+ }
1883
+
1884
+
1885
+ rule pdf_exploit_Collab_collectEmailInfo_CVE_2008_0655 {
1886
+ meta:
1887
+ is_exploit = true
1888
+ is_warning = false
1889
+ is_feature = false
1890
+ rank = 5
1891
+ revision = "1"
1892
+ date = "June 07 2020"
1893
+ author = "@tylabs"
1894
+ sigtype = "pdfexaminer_obfuscation"
1895
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1896
+ desc = "pdf.exploit Collab.collectEmailInfo CVE-2008-0655"
1897
+ mitre = "T1203 T1204.002"
1898
+ strings:
1899
+ $h_reg1 = /Collabb([\W]{0,6}?).([\W]{0,6}?)collectEmailInfo/
1900
+ $h_raw2 = "CollabcollectEmailInfo" nocase
1901
+ $h_raw3 = "Collab.collectEmailInfo" nocase
1902
+ condition:
1903
+ any of them
1904
+ }
1905
+
1906
+
1907
+ rule pdf_exploit_Collab_getIcon_CVE_2009_0927 {
1908
+ meta:
1909
+ is_exploit = true
1910
+ is_warning = false
1911
+ is_feature = false
1912
+ rank = 5
1913
+ revision = "1"
1914
+ date = "June 07 2020"
1915
+ author = "@tylabs"
1916
+ sigtype = "pdfexaminer_obfuscation"
1917
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1918
+ desc = "pdf.exploit Collab.getIcon CVE-2009-0927"
1919
+ mitre = "T1203 T1204.002"
1920
+ strings:
1921
+ $h_reg1 = /Collab([\W]{0,6}?).([\W]{0,6}?)getIcon/
1922
+ $h_reg2 = /Collab.get(.{1,24}?)Icon/
1923
+ $h_raw3 = "Collab.getIcon" nocase
1924
+ condition:
1925
+ any of them
1926
+ }
1927
+
1928
+
1929
+ rule pdf_suspicious_util_printd_used_to_fill_buffers {
1930
+ meta:
1931
+ is_exploit = false
1932
+ is_feature = false
1933
+ is_warning = true
1934
+ rank = 1
1935
+ revision = "1"
1936
+ date = "June 07 2020"
1937
+ author = "@tylabs"
1938
+ sigtype = "pdfexaminer_obfuscation"
1939
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1940
+ desc = "pdf.suspicious util.printd used to fill buffers"
1941
+ mitre = "T1027 T1059.007"
1942
+ strings:
1943
+ $h_raw1 = "util.printd" nocase
1944
+ condition:
1945
+ any of them
1946
+ }
1947
+
1948
+
1949
+ rule pdf_exploit_media_newPlayer_CVE_2009_4324 {
1950
+ meta:
1951
+ is_exploit = true
1952
+ is_warning = false
1953
+ is_feature = false
1954
+ rank = 5
1955
+ revision = "1"
1956
+ date = "June 07 2020"
1957
+ author = "@tylabs"
1958
+ sigtype = "pdfexaminer_obfuscation"
1959
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1960
+ desc = "pdf.exploit media.newPlayer CVE-2009-4324"
1961
+ mitre = "T1203 T1204.002"
1962
+ strings:
1963
+ $h_reg1 = /med(.{1,24}?)ia(.{1,24}?)new(.{1,24}?)Play(.{1,24}?)er/
1964
+ $h_reg2 = /med(.{1,24}?)ia(.{1,24}?)newPlay(.{1,24}?)er/
1965
+ $h_reg3 = /me(.{1,24}?)dia\.(.{1,24}?)new(.{1,24}?)Play(.{1,24}?)er/
1966
+ $h_reg4 = /mediaa([\W]{0,6}?)newPlayer/
1967
+ $h_reg5 = /media(.{1,24}?)newPlayer/
1968
+ $h_raw6 = "media.newPlayer" nocase
1969
+ condition:
1970
+ any of them
1971
+ }
1972
+
1973
+
1974
+ rule pdf_exploit_spell_customDictionaryOpen_CVE_2009_1493 {
1975
+ meta:
1976
+ is_exploit = true
1977
+ is_warning = false
1978
+ is_feature = false
1979
+ rank = 5
1980
+ revision = "1"
1981
+ date = "June 07 2020"
1982
+ author = "@tylabs"
1983
+ sigtype = "pdfexaminer_obfuscation"
1984
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
1985
+ desc = "pdf.exploit spell.customDictionaryOpen CVE-2009-1493"
1986
+ mitre = "T1203 T1204.002"
1987
+ strings:
1988
+ $h_reg1 = /spell(.{1,24}?)customDictionaryOpen/
1989
+ $h_raw2 = "spell.customDictionaryOpen" nocase
1990
+ condition:
1991
+ any of them
1992
+ }
1993
+
1994
+
1995
+ rule pdf_exploit_util_printf_CVE_2008_2992 {
1996
+ meta:
1997
+ is_exploit = true
1998
+ is_warning = false
1999
+ is_feature = false
2000
+ rank = 5
2001
+ revision = "1"
2002
+ date = "June 07 2020"
2003
+ author = "@tylabs"
2004
+ sigtype = "pdfexaminer_obfuscation"
2005
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2006
+ desc = "pdf.exploit util.printf CVE-2008-2992"
2007
+ mitre = "T1203 T1204.002"
2008
+ strings:
2009
+ $h_reg1 = /util(.{1,24}?)printf(.{1,24}?)45000f/
2010
+ condition:
2011
+ any of them
2012
+ }
2013
+
2014
+
2015
+ rule pdf_exploit_using_TIFF_overflow_CVE_2010_0188 {
2016
+ meta:
2017
+ is_exploit = true
2018
+ is_warning = false
2019
+ is_feature = false
2020
+ rank = 5
2021
+ revision = "1"
2022
+ date = "June 07 2020"
2023
+ author = "@tylabs"
2024
+ sigtype = "pdfexaminer_obfuscation"
2025
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2026
+ desc = "pdf.exploit using TIFF overflow CVE-2010-0188"
2027
+ mitre = "T1203 T1204.002"
2028
+ strings:
2029
+ $h_reg1 = /contentType=(.{0,6}?)image\/(.{0,30}?)CQkJCQkJCQkJCQkJCQkJCQkJ/
2030
+ $h_raw2 = "kJCQ,kJCQ,kJCQ,kJCQ,kJCQ,kJCQ" nocase
2031
+ condition:
2032
+ any of them
2033
+ }
2034
+
2035
+
2036
+ rule suspicious_string_TIFF_overflow_exploit_tif_name_CVE_2010_0188 {
2037
+ meta:
2038
+ is_exploit = true
2039
+ is_warning = false
2040
+ is_feature = false
2041
+ rank = 5
2042
+ revision = "1"
2043
+ date = "June 07 2020"
2044
+ author = "@tylabs"
2045
+ sigtype = "pdfexaminer_obfuscation"
2046
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2047
+ desc = "suspicious.string TIFF overflow exploit.tif name CVE-2010-0188"
2048
+ mitre = "T1203 T1204.002"
2049
+ strings:
2050
+ $h_raw1 = "exploit.tif" nocase
2051
+ condition:
2052
+ any of them
2053
+ }
2054
+
2055
+
2056
+ rule suspicious_string_base_64_nop_sled_used_in_TIFF_overflow_CVE_2010_0188 {
2057
+ meta:
2058
+ is_exploit = true
2059
+ is_warning = false
2060
+ is_feature = false
2061
+ rank = 5
2062
+ revision = "1"
2063
+ date = "June 07 2020"
2064
+ author = "@tylabs"
2065
+ sigtype = "pdfexaminer_obfuscation"
2066
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2067
+ desc = "suspicious.string base 64 nop sled used in TIFF overflow CVE-2010-0188"
2068
+ mitre = "T1203 T1204.002"
2069
+ strings:
2070
+ $h_raw1 = "JCQkJCQkJCQkJCQkJCQkJCQkJCQk" nocase
2071
+ $h_raw2 = "TU0AKgAAIDgMkAyQDJAMkAyQDJAMk" nocase
2072
+ $h_hex3 = { 4A [1-2] 43 [1-2] 51 [1-2] 6B [1-2] 4A [1-2] 43 [1-2] 51 [1-2] 6B}
2073
+ //$h_reg3 = /J.{1,2}?C.{1,2}?Q.{1,2}?k.{1,2}?J.{1,2}?C.{1,2}?Q.{1,2}?k.{1,2}?J.{1,2}?C.{1,2}?Q.{1,2}?k/ //slow
2074
+ $h_raw4 = "+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4" nocase
2075
+ condition:
2076
+ any of them
2077
+ }
2078
+
2079
+
2080
+ rule pdf_exploit_TIFF_overflow_CVE_2010_0188 {
2081
+ meta:
2082
+ is_exploit = true
2083
+ is_warning = false
2084
+ is_feature = false
2085
+ rank = 5
2086
+ revision = "1"
2087
+ date = "June 07 2020"
2088
+ author = "@tylabs"
2089
+ sigtype = "pdfexaminer_obfuscation"
2090
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2091
+ desc = "pdf.exploit TIFF overflow CVE-2010-0188"
2092
+ mitre = "T1203 T1204.002"
2093
+ strings:
2094
+ $h_reg1 = /ImageField1(.{0,6}?)xfa:contentType=(.{0,6}?)image\/tif/
2095
+ $h_hex2 = {BB1500070003FE7FB27F0007BB15000711000100ACA80007BB15000700010100ACA80007F772000711000100E2520007545C0007FFFFFFFF000101000000000004010100001000004000000031D70007BB1500075A526A024D15000722A70007BB15000758CD2E3C4D15000722A70007BB150007055A74F44D15000722A70007BB150007B849492A4D15000722A70007BB150007008BFAAF4D15000722A70007BB15000775EA87FE4D15000722A70007BB150007EB0A5FB94D15000722A70007BB150007}
2096
+ condition:
2097
+ any of them
2098
+ }
2099
+
2100
+
2101
+ rule pdf_execute_access_system32_directory {
2102
+ meta:
2103
+ is_exploit = false
2104
+ is_feature = false
2105
+ is_warning = true
2106
+ rank = 1
2107
+ revision = "1"
2108
+ date = "June 07 2020"
2109
+ author = "@tylabs"
2110
+ sigtype = "pdfexaminer_obfuscation"
2111
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2112
+ desc = "pdf.execute access system32 directory"
2113
+ mitre = "T1203 T1204.002"
2114
+ strings:
2115
+ $h_reg1 = /\/(A|#41)(c|#63)(t|#74)(i|#69)(o|#6F)(n|6e)(.{0,36}?)system32/
2116
+ condition:
2117
+ any of them
2118
+ }
2119
+
2120
+
2121
+ rule suspicious_string_obfuscated_unicode_NOP_sled {
2122
+ meta:
2123
+ is_exploit = false
2124
+ is_feature = false
2125
+ is_warning = true
2126
+ rank = 1
2127
+ revision = "1"
2128
+ date = "June 07 2020"
2129
+ author = "@tylabs"
2130
+ sigtype = "pdfexaminer_obfuscation"
2131
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2132
+ desc = "suspicious.string obfuscated unicode NOP sled"
2133
+ mitre = "T1027"
2134
+ strings:
2135
+ $h_raw1 = "M9090M9090M9090M9090" nocase
2136
+ condition:
2137
+ any of them
2138
+ }
2139
+
2140
+
2141
+ rule suspicious_flash_Embedded_Flash {
2142
+ meta:
2143
+ is_exploit = false
2144
+ is_feature = false
2145
+ is_warning = true
2146
+ rank = 1
2147
+ revision = "1"
2148
+ date = "June 07 2020"
2149
+ author = "@tylabs"
2150
+ sigtype = "pdfexaminer_obfuscation"
2151
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2152
+ desc = "suspicious.flash Embedded Flash"
2153
+ strings:
2154
+ $h_reg1 = /^FWS/
2155
+ $h_reg2 = /^CWS/
2156
+ $h_reg3 = /^SWF/
2157
+ $h_hex4 = {0D0A43575309A2D20000789CECBD797C54}
2158
+ $h_reg5 = /\x0aFWS/
2159
+ $h_reg6 = /\x0aCWS/
2160
+ $h_reg7 = /\x0aSWF/
2161
+
2162
+ condition:
2163
+ any of them
2164
+ }
2165
+
2166
+
2167
+ rule suspicious_flash_Embedded_Flash_define_obj {
2168
+ meta:
2169
+ is_exploit = false
2170
+ is_feature = false
2171
+ is_warning = true
2172
+ rank = 1
2173
+ revision = "1"
2174
+ date = "June 07 2020"
2175
+ author = "@tylabs"
2176
+ sigtype = "pdfexaminer_obfuscation"
2177
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2178
+ desc = "suspicious.flash Embedded Flash define obj"
2179
+ mitre = "T1204.002"
2180
+ strings:
2181
+ $h_raw1 = "application#2Fx-shockwave-flash" nocase
2182
+ $h_raw2 = "application/x-shockwave-flash" nocase
2183
+ condition:
2184
+ any of them
2185
+ }
2186
+
2187
+
2188
+ rule pdf_exploit_fontfile_SING_table_overflow_CVE_2010_2883_generic {
2189
+ meta:
2190
+ is_exploit = true
2191
+ is_warning = false
2192
+ is_feature = false
2193
+ rank = 5
2194
+ revision = "1"
2195
+ date = "June 07 2020"
2196
+ author = "@tylabs"
2197
+ sigtype = "pdfexaminer_obfuscation"
2198
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2199
+ desc = "pdf.exploit fontfile SING table overflow CVE-2010-2883 generic"
2200
+ mitre = "T1203 T1204.002"
2201
+ strings:
2202
+ $h_reg1 = "SING" nocase
2203
+ $h_hex2 = { 41414141414141414141 }
2204
+ condition:
2205
+ $h_reg1 in (0..400) and $h_hex2 in (0..500)
2206
+ }
2207
+
2208
+
2209
+ rule pdf_exploit_fontfile_SING_table_overflow_CVE_2010_2883_A {
2210
+ meta:
2211
+ is_exploit = true
2212
+ is_warning = false
2213
+ is_feature = false
2214
+ rank = 5
2215
+ revision = "1"
2216
+ date = "June 07 2020"
2217
+ author = "@tylabs"
2218
+ sigtype = "pdfexaminer_obfuscation"
2219
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2220
+ desc = "pdf.exploit fontfile SING table overflow CVE-2010-2883 A"
2221
+ mitre = "T1203 T1204.002"
2222
+ strings:
2223
+ $h_hex1 = {1045086F0000EB4C00000024686D747809C68EB20000B4C4000004306B65726EDC52D5990000BDA000002D8A6C6F6361F3CBD23D0000BB840000021A6D6178700547063A0000EB2C0000002053494E47D9BCC8B50000011C00001DDF706F7374B45A2FBB0000B8F40000028E70726570}
2224
+ condition:
2225
+ any of them
2226
+ }
2227
+
2228
+
2229
+ rule flash_exploit_CVE_2011_0609 {
2230
+ meta:
2231
+ is_exploit = true
2232
+ is_warning = false
2233
+ is_feature = false
2234
+ rank = 5
2235
+ revision = "1"
2236
+ date = "June 07 2020"
2237
+ author = "@tylabs"
2238
+ sigtype = "pdfexaminer_obfuscation"
2239
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2240
+ desc = "flash.exploit CVE-2011-0609"
2241
+ mitre = "T1203 T1204.002"
2242
+ strings:
2243
+ $h_hex1 = {4657530947CB0000480140005A0000190100441108000000BF141CCB0000000000000010002E00060080804094A8D0A001808004100002000000121212E24130F00931343134313431343134313431343134313431343134313431343134313431343134313431343134313431343134313431343134}
2244
+ $h_hex2 = {34363537353330394541433730303030373830303036343030303030304338303030303032443031303034343131313830303030303034333032463446344634383630363036303230303031303030304646303931303030303030303033303030313030383630363036303130303032303030303430303030303030424631313235}
2245
+ $h_hex3 = {3941303139413031394130313941303139064C6F61646572}
2246
+ condition:
2247
+ any of them
2248
+ }
2249
+
2250
+
2251
+ rule flash_exploit_CVE_2011_0611 {
2252
+ meta:
2253
+ is_exploit = true
2254
+ is_warning = false
2255
+ is_feature = false
2256
+ rank = 5
2257
+ revision = "1"
2258
+ date = "June 07 2020"
2259
+ author = "@tylabs"
2260
+ sigtype = "pdfexaminer_obfuscation"
2261
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2262
+ desc = "flash.exploit CVE-2011-0611"
2263
+ mitre = "T1203 T1204.002"
2264
+ strings:
2265
+ $h_hex1 = {7772697465427974650541727261799817343635373533304143433035303030303738}
2266
+ $h_hex2 = {5131645443737746414142346E453155625778545A52512B743733742B3362744B4E30596E617767552F414452654D5848334777597276757737597A643743674A734A6C76643174374E716D393959576D4B676B5A7674686C68446942556E344D694645453030514659306D456F664A2B4F45504D55594E6F69614C526D4E696A4D45494444665065652B3139663534652B35356E764F63383578376532766732514551504148514C6B45384248683175303937414B7741654943394F6A336579756277574E52793141564A475939326D4777444832794278794147636569424250524348}
2267
+ $h_hex3 = {343635373533304143433035303030303738303030353546303030303046413030303030313830313030343431313030303030303030334630334137303530303030393630433030303530303037393543333743313330374642433337433133304531323944303230303443303439443032303031383030383831353030303930303431}
2268
+ $h_hex4 = {3063306330633063306330633063306306537472696E6706}
2269
+ $h_hex5 = {410042004300440045004600470048004900A18E110064656661756C74}
2270
+ $h_hex6 = {00414243444500566B6475686752656D686677317375727772777C73680064656661756C740067657453697A650047647768317375727772777C73680077777273757277}
2271
+ $h_raw7 = "AAB4AAVfAAAPoAAAGAEARBEAAAAAPwOnBQAAlgwABQAHlcN8Ewf7w3wTDhKdAgBMBJ0CABgAiBUACQBBAEIAQwBEAEUARgBHAEgASQChjhEAZGVmYXVsdAABAAQqAAIAmAGWCgAHWMBJSAenP7a3YJ0CAAAAmQIASQBAlgUABxZ0cAtMYp0CAAwAhwEAAxeHAQABlgoAB" nocase
2272
+ condition:
2273
+ any of them
2274
+ }
2275
+
2276
+
2277
+ rule flash_suspicious_jit_spray {
2278
+ meta:
2279
+ is_exploit = false
2280
+ is_feature = false
2281
+ is_warning = true
2282
+ rank = 1
2283
+ revision = "1"
2284
+ date = "June 07 2020"
2285
+ author = "@tylabs"
2286
+ sigtype = "pdfexaminer_obfuscation"
2287
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2288
+ desc = "flash.suspicious jit_spray"
2289
+ mitre = "T1027 T1059.007"
2290
+ strings:
2291
+ $h_hex1 = {076A69745F65676708}
2292
+ condition:
2293
+ any of them
2294
+ }
2295
+
2296
+
2297
+ rule pdf_exploit_U3D_CVE_2011_2462_A {
2298
+ meta:
2299
+ is_exploit = true
2300
+ is_warning = false
2301
+ is_feature = false
2302
+ rank = 5
2303
+ revision = "1"
2304
+ date = "June 07 2020"
2305
+ author = "@tylabs"
2306
+ sigtype = "pdfexaminer_obfuscation"
2307
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2308
+ desc = "pdf.exploit U3D CVE-2011-2462 A"
2309
+ mitre = "T1203 T1204.002"
2310
+ strings:
2311
+ $h_hex1 = {066F3A40AE366A4360DFCBEF8C38CA0492794B79E942BD2BB95B866065A4750119DACF6AF72A773CDEF1117533D394744A14734B18A166C20FDE3DED19D4322E}
2312
+ condition:
2313
+ any of them
2314
+ }
2315
+
2316
+
2317
+ rule pdf_exploit_PRC_CVE_2011_4369_A {
2318
+ meta:
2319
+ is_exploit = true
2320
+ is_warning = false
2321
+ is_feature = false
2322
+ rank = 5
2323
+ revision = "1"
2324
+ date = "June 07 2020"
2325
+ author = "@tylabs"
2326
+ sigtype = "pdfexaminer_obfuscation"
2327
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2328
+ desc = "pdf.exploit PRC CVE-2011-4369 A"
2329
+ mitre = "T1203 T1204.002"
2330
+ strings:
2331
+ $h_hex1 = {ED7C7938945DF8FF9985868677108DA58C922C612A516FA9D182374A8B868AA25284242D8A3296B497B74849D2A210D14EA94654A2452ACA2B29D18268A5B7C5EF7E}
2332
+ condition:
2333
+ any of them
2334
+ }
2335
+
2336
+
2337
+ rule flash_exploit_flash_calling_malformed_MP4_CVE_2012_0754 {
2338
+ meta:
2339
+ is_exploit = true
2340
+ is_warning = false
2341
+ is_feature = false
2342
+ rank = 5
2343
+ revision = "1"
2344
+ date = "June 07 2020"
2345
+ author = "@tylabs"
2346
+ sigtype = "pdfexaminer_obfuscation"
2347
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2348
+ desc = "flash.exploit flash calling malformed MP4 CVE-2012-0754"
2349
+ mitre = "T1203 T1204.002"
2350
+ strings:
2351
+ $h_hex1 = {537472696E6706586D6C537766094D6F766965436C6970076A69745F656767086368696C645265660D446973706C61794F626A656374074D79566964656F05566964656F044D794E430D4E6574436F6E6E656374696F6E}
2352
+ condition:
2353
+ any of them
2354
+ }
2355
+
2356
+
2357
+ rule flash_exploit_MP4_Loader_CVE_2012_0754_B {
2358
+ meta:
2359
+ is_exploit = true
2360
+ is_warning = false
2361
+ is_feature = false
2362
+ rank = 5
2363
+ revision = "1"
2364
+ date = "June 07 2020"
2365
+ author = "@tylabs"
2366
+ sigtype = "pdfexaminer_obfuscation"
2367
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2368
+ desc = "flash.exploit MP4 Loader CVE-2012-0754 B"
2369
+ mitre = "T1203 T1204.002"
2370
+ strings:
2371
+ $h_hex1 = {6D703405566964656F0A6E6574436F6E6E6563740D4E6574436F6E6E656374696F6E096E657453747265616D094E657453747265616D}
2372
+ condition:
2373
+ any of them
2374
+ }
2375
+
2376
+
2377
+ rule flash_exploit_MP4_CVE_2012_0754 {
2378
+ meta:
2379
+ is_exploit = true
2380
+ is_warning = false
2381
+ is_feature = false
2382
+ rank = 5
2383
+ revision = "1"
2384
+ date = "June 07 2020"
2385
+ author = "@tylabs"
2386
+ sigtype = "pdfexaminer_obfuscation"
2387
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2388
+ desc = "flash.exploit MP4 CVE-2012-0754"
2389
+ mitre = "T1203 T1204.002"
2390
+ strings:
2391
+ $h_hex1 = {6D70343269736F6D000000246D646174018080800E1180808009029F0F808080020001C0101281302A056DC00000000D63707274}
2392
+ condition:
2393
+ any of them
2394
+ }
2395
+
2396
+
2397
+ rule pdf_exploit_Sandbox_Bypass_CVE_2013_0641 {
2398
+ meta:
2399
+ is_exploit = true
2400
+ is_warning = false
2401
+ is_feature = false
2402
+ rank = 5
2403
+ revision = "1"
2404
+ date = "June 07 2020"
2405
+ author = "@tylabs"
2406
+ sigtype = "pdfexaminer_obfuscation"
2407
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2408
+ desc = "pdf.exploit Sandbox Bypass CVE-2013-0641"
2409
+ mitre = "T1203 T1204.002"
2410
+ strings:
2411
+ $h_reg1 = /push(.{1,5}?)xfa.datasets.createNode(.{1,5}?)dataValue/
2412
+ condition:
2413
+ any of them
2414
+ }
2415
+
2416
+
2417
+ rule pdf_exploit_BMP_RLE_integer_heap_overflow_CVE_2013_2729 {
2418
+ meta:
2419
+ is_exploit = true
2420
+ is_warning = false
2421
+ is_feature = false
2422
+ rank = 5
2423
+ revision = "1"
2424
+ date = "June 07 2020"
2425
+ author = "@tylabs"
2426
+ sigtype = "pdfexaminer_obfuscation"
2427
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2428
+ desc = "pdf.exploit BMP RLE integer heap overflow CVE-2013-2729"
2429
+ mitre = "T1203 T1204.002"
2430
+ strings:
2431
+ $h_reg1 = /image.jpeg(.{1,5}?)Qk0AAAAAAAAAAAAAAABAAAAALAEAAAEAAAABAAgAAQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAUkdC/
2432
+ $h_raw2 = "<image>Qk0AAAAAAAAAAAAAAABAAAAALAEAAAEAAAABAAgAAQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAUkdC" nocase
2433
+ condition:
2434
+ any of them
2435
+ }
2436
+
2437
+
2438
+ rule pdf_exploit_ToolButton_use_after_free_CVE_2014_0496 {
2439
+ meta:
2440
+ is_exploit = true
2441
+ is_warning = false
2442
+ is_feature = false
2443
+ rank = 5
2444
+ revision = "1"
2445
+ date = "June 07 2020"
2446
+ author = "@tylabs"
2447
+ sigtype = "pdfexaminer_obfuscation"
2448
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2449
+ desc = "pdf.exploit ToolButton use-after-free CVE-2014-0496"
2450
+ mitre = "T1203 T1204.002"
2451
+ strings:
2452
+ $h_reg1 = /function(.{1,24}?)app.addToolButton/
2453
+ $h_reg2 = /function(.{1,24}?)app.removeToolButton/
2454
+ condition:
2455
+ any of them
2456
+ }
2457
+
2458
+
2459
+ rule suspicious_javascript_addToolButton {
2460
+ meta:
2461
+ is_exploit = false
2462
+ is_feature = false
2463
+ is_warning = true
2464
+ rank = 1
2465
+ revision = "1"
2466
+ date = "June 07 2020"
2467
+ author = "@tylabs"
2468
+ sigtype = "pdfexaminer_obfuscation"
2469
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2470
+ desc = "suspicious.javascript addToolButton"
2471
+ mitre = "T1059.007"
2472
+ strings:
2473
+ $h_raw1 = "app.addToolButton" nocase
2474
+ condition:
2475
+ any of them
2476
+ }
2477
+
2478
+
2479
+ rule suspicious_embedded_doc_file {
2480
+ meta:
2481
+ is_exploit = false
2482
+ is_feature = false
2483
+ is_warning = true
2484
+ rank = 1
2485
+ revision = "1"
2486
+ date = "June 07 2020"
2487
+ author = "@tylabs"
2488
+ sigtype = "pdfexaminer_obfuscation"
2489
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2490
+ desc = "suspicious.embedded doc file"
2491
+ mitre = "T1204.002"
2492
+ strings:
2493
+ $h_reg1 = /\/Type\/Filespec\/F(.{1,30}?)\.doc/
2494
+ condition:
2495
+ any of them
2496
+ }
2497
+
2498
+
2499
+ rule suspicious_embedded_xls_file {
2500
+ meta:
2501
+ is_exploit = false
2502
+ is_feature = false
2503
+ is_warning = true
2504
+ rank = 1
2505
+ revision = "1"
2506
+ date = "June 07 2020"
2507
+ author = "@tylabs"
2508
+ sigtype = "pdfexaminer_obfuscation"
2509
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2510
+ desc = "suspicious.embedded xls file"
2511
+ mitre = "T1204.002"
2512
+ strings:
2513
+ $h_reg1 = /\/Type\/Filespec\/F(.{1,30}?)\.xls/
2514
+ condition:
2515
+ any of them
2516
+ }
2517
+
2518
+
2519
+ rule suspicious_embedded_ppt_file {
2520
+ meta:
2521
+ is_exploit = false
2522
+ is_feature = false
2523
+ is_warning = true
2524
+ rank = 1
2525
+ revision = "1"
2526
+ date = "June 07 2020"
2527
+ author = "@tylabs"
2528
+ sigtype = "pdfexaminer_obfuscation"
2529
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2530
+ desc = "suspicious.embedded ppt file"
2531
+ mitre = "T1204.002"
2532
+ strings:
2533
+ $h_reg1 = /\/Type\/Filespec\/F(.{1,30}?)\.ppt/
2534
+ $h_reg2 = /\/Type\/Filespec\/F(.{1,30}?)\.pps/
2535
+ condition:
2536
+ any of them
2537
+ }
2538
+
2539
+
2540
+ rule suspicious_embedded_scr_file {
2541
+ meta:
2542
+ is_exploit = false
2543
+ is_feature = false
2544
+ is_warning = true
2545
+ rank = 1
2546
+ revision = "1"
2547
+ date = "June 07 2020"
2548
+ author = "@tylabs"
2549
+ sigtype = "pdfexaminer_obfuscation"
2550
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2551
+ desc = "suspicious.embedded scr file"
2552
+ mitre = "T1204.002"
2553
+ strings:
2554
+ $h_reg1 = /\/Type\/Filespec\/F(.{1,30}?)\.scr/
2555
+ condition:
2556
+ any of them
2557
+ }
2558
+
2559
+
2560
+ rule suspicious_embedded_exe_file {
2561
+ meta:
2562
+ is_exploit = false
2563
+ is_feature = false
2564
+ is_warning = true
2565
+ rank = 1
2566
+ revision = "1"
2567
+ date = "June 07 2020"
2568
+ author = "@tylabs"
2569
+ sigtype = "pdfexaminer_obfuscation"
2570
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2571
+ desc = "suspicious.embedded exe file"
2572
+ mitre = "T1204.002"
2573
+ strings:
2574
+ $h_reg1 = /\/Type\/Filespec\/F(.{1,30}?)\.exe/
2575
+ condition:
2576
+ any of them
2577
+ }
2578
+
2579
+
2580
+ rule suspicious_embedded_bat_file {
2581
+ meta:
2582
+ is_exploit = false
2583
+ is_feature = false
2584
+ is_warning = true
2585
+ rank = 1
2586
+ revision = "1"
2587
+ date = "June 07 2020"
2588
+ author = "@tylabs"
2589
+ sigtype = "pdfexaminer_obfuscation"
2590
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2591
+ desc = "suspicious.embedded bat file"
2592
+ mitre = "T1204.002"
2593
+ strings:
2594
+ $h_reg1 = /\/Type\/Filespec\/F(.{1,30}?)\.bat/
2595
+ condition:
2596
+ any of them
2597
+ }
2598
+
2599
+
2600
+ rule suspicious_embedded_rtf_file {
2601
+ meta:
2602
+ is_exploit = false
2603
+ is_feature = false
2604
+ is_warning = true
2605
+ rank = 1
2606
+ revision = "1"
2607
+ date = "June 07 2020"
2608
+ author = "@tylabs"
2609
+ sigtype = "pdfexaminer_obfuscation"
2610
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2611
+ desc = "suspicious.embedded rtf file"
2612
+ mitre = "T1204.002"
2613
+ strings:
2614
+ $h_reg1 = /\/Type\/Filespec\/F(.{1,30}?)\.rtf/
2615
+ condition:
2616
+ any of them
2617
+ }
2618
+
2619
+
2620
+ rule suspicious_embedded_mso_file {
2621
+ meta:
2622
+ is_exploit = false
2623
+ is_feature = false
2624
+ is_warning = true
2625
+ rank = 1
2626
+ revision = "1"
2627
+ date = "June 07 2020"
2628
+ author = "@tylabs"
2629
+ sigtype = "pdfexaminer_obfuscation"
2630
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2631
+ desc = "suspicious.embedded mso file"
2632
+ mitre = "T1204.002"
2633
+ strings:
2634
+ $h_reg1 = /\/Type\/Filespec\/F(.{1,30}?)\.mso/
2635
+ condition:
2636
+ any of them
2637
+ }
2638
+
2639
+
2640
+ rule suspicious_embedded_html_file {
2641
+ meta:
2642
+ is_exploit = false
2643
+ is_feature = false
2644
+ is_warning = true
2645
+ rank = 1
2646
+ revision = "1"
2647
+ date = "June 07 2020"
2648
+ author = "@tylabs"
2649
+ sigtype = "pdfexaminer_obfuscation"
2650
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2651
+ desc = "suspicious.embedded html file"
2652
+ mitre = "T1204.002"
2653
+ strings:
2654
+ $h_reg1 = /\/Type\/Filespec\/F(.{1,30}?)\.htm/
2655
+ condition:
2656
+ any of them
2657
+ }
2658
+
2659
+
2660
+ rule suspicious_embedded_OLE_document_header {
2661
+ meta:
2662
+ is_exploit = false
2663
+ is_feature = false
2664
+ is_warning = true
2665
+ rank = 1
2666
+ revision = "1"
2667
+ date = "June 07 2020"
2668
+ author = "@tylabs"
2669
+ sigtype = "pdfexaminer_obfuscation"
2670
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2671
+ desc = "suspicious.embedded OLE document header"
2672
+ mitre = "T1204.002"
2673
+ strings:
2674
+ $h_reg1 = { d0 cf 11 e0}
2675
+ condition:
2676
+ $h_reg1 at 0
2677
+ }
2678
+
2679
+
2680
+ rule suspicious_embedded_external_content {
2681
+ meta:
2682
+ is_exploit = false
2683
+ is_feature = false
2684
+ is_warning = true
2685
+ rank = 1
2686
+ revision = "1"
2687
+ date = "June 07 2020"
2688
+ author = "@tylabs"
2689
+ sigtype = "pdfexaminer_obfuscation"
2690
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2691
+ desc = "suspicious.embedded external content"
2692
+ mitre = "T1566.002"
2693
+ strings:
2694
+ $h_raw1 = "/S /URI" nocase
2695
+ condition:
2696
+ any of them
2697
+ }
2698
+
2699
+
2700
+ rule pdf_exploit_Corrupted_JPEG2000_CVE_2018_4990 {
2701
+ meta:
2702
+ is_exploit = true
2703
+ is_warning = false
2704
+ is_feature = false
2705
+ rank = 5
2706
+ revision = "1"
2707
+ date = "June 07 2020"
2708
+ author = "@tylabs"
2709
+ sigtype = "pdfexaminer_obfuscation"
2710
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2711
+ desc = "pdf.exploit Corrupted JPEG2000 CVE-2018-4990"
2712
+ mitre = "T1203 T1204.002"
2713
+ strings:
2714
+ $h_hex1 = { 0C6A5020 200D0A87 0A000004 1D6A7032 68000000 16696864 72000000 20000000 200001FF 07000000 0003FC63 6D617000 }
2715
+ condition:
2716
+ $h_hex1
2717
+ }
2718
+
2719
+
2720
+ rule pdf_exploit_using_jbig2decode_CVE_2009_0658 {
2721
+ meta:
2722
+ is_exploit = true
2723
+ is_warning = false
2724
+ is_feature = false
2725
+ rank = 5
2726
+ revision = "1"
2727
+ date = "July 20 2020"
2728
+ author = "@tylabs"
2729
+ sigtype = "pdfexaminer_obfuscation"
2730
+ copyright = "Copyright 2020 tylabs.com. All rights reserved."
2731
+ desc = "pdf.exploit using JBIG2Decode CVE-2009-0658"
2732
+ mitre = "T1203 T1204.002"
2733
+ url = "https://www.exploit-db.com/exploits/8099"
2734
+ strings:
2735
+ $h_raw1 = "JBIG2Decode" nocase
2736
+ $h_raw2 = "Decode [ 1 0 ]"
2737
+ $h_raw3 = "ABCD\x13"
2738
+ condition:
2739
+ all of them
2740
+ }
2741
+
2742
+
2743
+ rule PDF_Containing_JavaScript {
2744
+ meta:
2745
+ author = "InQuest Labs"
2746
+ description = "This signature detects a PDF file that contains JavaScript. JavaScript can be used to customize PDFs by implementing objects, methods, and properties. While not inherently malicious, embedding JavaScript inside of a PDF is often used for malicious purposes such as malware delivery or exploitation."
2747
+ created_date = "2022-03-15"
2748
+ updated_date = "2022-03-15"
2749
+ blog_reference = "www.sans.org/security-resources/malwarefaq/pdf-overview.php"
2750
+ labs_reference = "N/A"
2751
+ labs_pivot = "N/A"
2752
+ samples = "c82e29dcaed3c71e05449cb9463f3efb7114ea22b6f45b16e09eae32db9f5bef"
2753
+ strings:
2754
+ $pdf_tag1 = /\x25\x50\x44\x46\x2d/
2755
+ $js_tag1 = "/JavaScript" fullword
2756
+ $js_tag2 = "/JS" fullword
2757
+ condition:
2758
+ $pdf_tag1 in (0..1024) and ($js_tag1 or $js_tag2)
2759
+
2760
+ }
2761
+
2762
+
2763
+ rule PDF_Launch_Action_EXE {
2764
+ meta:
2765
+ author = "InQuest Labs"
2766
+ description = "This signature detects PDF files that launch an executable upon being opened on a host machine. This action is performed by the Launch Action feature available in the PDF file format and is commonly abused by threat actors to execute delivered malware."
2767
+ created_date = "2022-03-15"
2768
+ updated_date = "2022-03-15"
2769
+ blog_reference = "InQuest Labs Empirical Observations"
2770
+ labs_reference = "N/A"
2771
+ labs_pivot = "N/A"
2772
+ samples = "cb5e659c4ac93b335c77c9b389d8ef65d8c20ab8b0ad08e5f850cc5055e564c3"
2773
+ strings:
2774
+
2775
+ /* 8 0 obj
2776
+ <<
2777
+ /Type /Action
2778
+ /S /Launch
2779
+ /Win
2780
+ <<
2781
+ /F (cmd.exe)
2782
+ >>
2783
+ >>
2784
+ endobj
2785
+
2786
+ */
2787
+
2788
+ $magic01 = "INQUEST-PP=pdfparser"
2789
+ $magic02 = "%PDF"
2790
+
2791
+ $re1 = /\x2fType[ \t\r\n]*\x2fAction/ nocase wide ascii
2792
+ $re2 = /obj[^\x3c\x3e]+<<[^\x3e]*\x2fS[ \t\r\n]*\x2fLaunch[^\x3c\x3e]*<<[^\x3e]*\x2fF[ \t\r\n]*\x28[^\x29]+\.exe[^\x29]*\x29/ nocase wide ascii
2793
+ condition:
2794
+ ($magic01 in (filesize-30 .. filesize) or $magic02 in (0 .. 10)) and all of ($re*)
2795
+ }
2796
+
2797
+
2798
+ rule PDF_Launch_Function {
2799
+ meta:
2800
+ author = "InQuest Labs"
2801
+ description = "This signature detects the launch function within a PDF file. This function allows a document author to attach an executable file."
2802
+ created_date = "2022-03-15"
2803
+ updated_date = "2022-03-15"
2804
+ blog_reference = "http://blog.trendmicro.com/trendlabs-security-intelligence/PDF-launch-feature-abused-to-carry-zeuszbot/"
2805
+ labs_reference = "N/A"
2806
+ labs_pivot = "N/A"
2807
+ samples = "c2f2d1de6bf973b849725f1069c649ce594a907c1481566c0411faba40943ee5"
2808
+ strings:
2809
+
2810
+ $pdf_header = "%PDF-"
2811
+ $launch = "/Launch" nocase
2812
+ condition:
2813
+
2814
+ $pdf_header in (0..1024) and $launch
2815
+
2816
+ }
2817
+
2818
+
2819
+ rule PDF_with_Embedded_RTF_OLE_Newlines {
2820
+ meta:
2821
+ author = "InQuest Labs"
2822
+ description = "This signature detects suspicious PDF files embedded with RTF files that contain embedded OLE content that injects newlines into embedded OLE contents as a means of payload obfuscation and detection evasion."
2823
+ created_date = "2022-03-15"
2824
+ updated_date = "2022-03-15"
2825
+ blog_reference = "InQuest Internal Research"
2826
+ labs_reference = "N/A"
2827
+ labs_pivot = "N/A"
2828
+ samples = "d784c53b8387f1e2f1bcb56a3604a37b431638642e692540ebeaeee48c1f1a07"
2829
+
2830
+ strings:
2831
+ $rtf_magic = "{\\rt" // note that {\rtf1 is not required
2832
+
2833
+ $rtf_objdata = /\x7b[^\x7d]*\\objdata/ nocase
2834
+
2835
+ $nor = "D0CF11E0A1B11AE1" nocase
2836
+
2837
+ $obs = /D[ \r\t\n]*0[ \r\t\n]*C[ \r\t\n]*F[ \r\t\n]*1[ \r\t\n]*1[ \r\t\n]*E[ \r\t\n]*0[ \r\t\n]*A[ \r\t\n]*1[ \r\t\n]*B[ \r\t\n]*1[ \r\t\n]*1[ \r\t\n]*A[ \r\t\n]*E[ \r\t\n]*1/ nocase
2838
+ condition:
2839
+ $rtf_magic and $rtf_objdata and ($obs and not $nor)
2840
+ }
2841
+
2842
+
2843
+ rule PDF_with_Launch_Action_Function {
2844
+ meta:
2845
+ author = "InQuest Labs"
2846
+ description = "This signature detects the launch function within a PDF file. This function allows the document author to attach an executable file."
2847
+ created_date = "2022-03-15"
2848
+ updated_date = "2022-03-15"
2849
+ blog_reference = "http://blog.didierstevens.com/2010/03/29/escape-from-pdf/"
2850
+ labs_reference = "N/A"
2851
+ labs_pivot = "N/A"
2852
+ samples = "a9fbb50dedfd84e1f4a3507d45b1b16baa43123f5ae98dae6aa9a5bebeb956a8"
2853
+ strings:
2854
+ $pdf_header = "%PDF-"
2855
+ $a = "<</S/Launch/Type/Action/Win<</F"
2856
+ condition:
2857
+ $pdf_header in (0..1024) and $a
2858
+ }
2859
+
2860
+
2861
+ rule PDF_Phishing {
2862
+ meta:
2863
+ description = "Detects PDF phishing attempts"
2864
+ severity = "medium"
2865
+ strings:
2866
+ $uri = "/URI" nocase
2867
+ $acroform = "/AcroForm" nocase
2868
+ $submit = "/SubmitForm" nocase
2869
+ $login = /https*?:\/\/[^\s"]*?(login|password|banking|verify|update|secure)/ nocase
2870
+ condition:
2871
+ ($uri and any of ($acroform, $submit, $login))
2872
+ }
2873
+
2874
+
2875
+ rule brooxml_phishing {
2876
+ meta:
2877
+ description = "Detects PDF and OOXML files leading to AiTM phishing"
2878
+ author = "Proofpoint"
2879
+ category = "phishing"
2880
+ strings:
2881
+ $hex1 = { 21 20 03 20 c3 be c3 bf 09 20 [0-1] 06 20 20 20 20 20 20 20 20 20 20 20 01 20 20 20 06 20 20 20 20 20 20 20 20 10 20 20 05 20 20 20 01 20 20 20 c3 be c3 bf c3 bf c3 bf }
2882
+ $docx = { 50 4b }
2883
+ $pdf = { 25 50 44 46 2d }
2884
+ condition:
2885
+ all of ($hex*) and (($docx at 0) or ($pdf at 0))
2886
+ }
2887
+
2888
+
2889
+ rule malware_MalDocinPDF {
2890
+ meta:
2891
+ description = "Hunt Maldoc in PDF"
2892
+ author = "JPCERT/CC Incident Response Group"
2893
+ hash1 = "ef59d7038cfd565fd65bae12588810d5361df938244ebad33b71882dcf683058"
2894
+ hash2 = "098796e1b82c199ad226bff056b6310262b132f6d06930d3c254c57bdf548187"
2895
+ hash3 = "5b677d297fb862c2d223973697479ee53a91d03073b14556f421b3d74f136b9d"
2896
+ strings:
2897
+ $docfile2 = "<w:WordDocument>" ascii nocase
2898
+ $xlsfile2 = "<x:ExcelWorkbook>" ascii nocase
2899
+ $mhtfile0 = "mime" ascii nocase
2900
+ $mhtfile1 = "content-location:" ascii nocase
2901
+ $mhtfile2 = "content-type:" ascii nocase
2902
+ condition:
2903
+ (uint32(0) == 0x46445025) and
2904
+ (1 of ($mhtfile*)) and
2905
+ ((1 of ($docfile*)) or (1 of ($xlsfile*)))
2906
+ }
2907
+
2908
+
2909
+ rule phoenix_pdf : EK PDF {
2910
+ meta:
2911
+ author = "Josh Berry"
2912
+ date = "2016-06-26"
2913
+ description = "Phoenix Exploit Kit Detection"
2914
+ hash0 = "16de68e66cab08d642a669bf377368da"
2915
+ hash1 = "bab281fe0cf3a16a396550b15d9167d5"
2916
+ sample_filetype = "pdf"
2917
+ yaragenerator = "https://github.com/Xen0ph0n/YaraGenerator"
2918
+ strings:
2919
+ $string0 = "0000000254 00000 n"
2920
+ $string1 = "0000000295 00000 n"
2921
+ $string2 = "trailer<</Root 1 0 R /Size 7>>"
2922
+ $string3 = "0000000000 65535 f"
2923
+ $string4 = "3 0 obj<</JavaScript 5 0 R >>endobj"
2924
+ $string5 = "0000000120 00000 n"
2925
+ $string6 = "%PDF-1.0"
2926
+ $string7 = "startxref"
2927
+ $string8 = "0000000068 00000 n"
2928
+ $string9 = "endobjxref"
2929
+ $string10 = ")6 0 R ]>>endobj"
2930
+ $string11 = "0000000010 00000 n"
2931
+ condition:
2932
+ 11 of them
2933
+ }
2934
+
2935
+
2936
+ rule phoenix_pdf2 : EK PDF {
2937
+ meta:
2938
+ author = "Josh Berry"
2939
+ date = "2016-06-26"
2940
+ description = "Phoenix Exploit Kit Detection"
2941
+ hash0 = "33cb6c67f58609aa853e80f718ab106a"
2942
+ sample_filetype = "pdf"
2943
+ yaragenerator = "https://github.com/Xen0ph0n/YaraGenerator"
2944
+ strings:
2945
+ $string0 = "\\nQb<%"
2946
+ $string1 = "0000000254 00000 n"
2947
+ $string2 = ":S3>v0$EF"
2948
+ $string3 = "trailer<</Root 1 0 R /Size 7>>"
2949
+ $string4 = "%PDF-1.0"
2950
+ $string5 = "0000000000 65535 f"
2951
+ $string6 = "endstream"
2952
+ $string7 = "0000000010 00000 n"
2953
+ $string8 = "6 0 obj<</JS 7 0 R/S/JavaScript>>endobj"
2954
+ $string9 = "3 0 obj<</JavaScript 5 0 R >>endobj"
2955
+ $string10 = "}pr2IE"
2956
+ $string11 = "0000000157 00000 n"
2957
+ $string12 = "1 0 obj<</Type/Catalog/Pages 2 0 R /Names 3 0 R >>endobj"
2958
+ $string13 = "5 0 obj<</Names[("
2959
+ condition:
2960
+ 13 of them
2961
+ }
2962
+
2963
+
2964
+ rule phoenix_pdf3 : EK PDF {
2965
+ meta:
2966
+ author = "Josh Berry"
2967
+ date = "2016-06-26"
2968
+ description = "Phoenix Exploit Kit Detection"
2969
+ hash0 = "bab281fe0cf3a16a396550b15d9167d5"
2970
+ sample_filetype = "pdf"
2971
+ yaragenerator = "https://github.com/Xen0ph0n/YaraGenerator"
2972
+ strings:
2973
+ $string0 = "trailer<</Root 1 0 R /Size 7>>"
2974
+ $string1 = "stream"
2975
+ $string2 = ";_oI5z"
2976
+ $string3 = "0000000010 00000 n"
2977
+ $string4 = "3 0 obj<</JavaScript 5 0 R >>endobj"
2978
+ $string5 = "7 0 obj<</Filter[ /FlateDecode /ASCIIHexDecode /ASCII85Decode ]/Length 3324>>"
2979
+ $string6 = "endobjxref"
2980
+ $string7 = "L%}gE("
2981
+ $string8 = "0000000157 00000 n"
2982
+ $string9 = "1 0 obj<</Type/Catalog/Pages 2 0 R /Names 3 0 R >>endobj"
2983
+ $string10 = "0000000120 00000 n"
2984
+ $string11 = "4 0 obj<</Type/Page/Parent 2 0 R /Contents 12 0 R>>endobj"
2985
+ condition:
2986
+ 11 of them
2987
+ }
2988
+
2989
+
2990
+ rule apt_apt29_wineloader_malicious_pdf {
2991
+ meta:
2992
+ id = "b1db731e-471e-493a-b76c-38d2808ccac9"
2993
+ version = "1.0"
2994
+ description = "Detects malicious PDF used by APT29 to drop Wineloader"
2995
+ author = "Sekoia.io"
2996
+ creation_date = "2024-03-25"
2997
+ classification = "TLP:CLEAR"
2998
+ hash = "9712217ff3597468b48cdf45da588005de3a725ba554789bb7e5ae1b0f7c02a7"
2999
+ hash = "3739b2eae11c8367b576869b68d502b97676fb68d18cc0045f661fbe354afcb9"
3000
+ strings:
3001
+ $s1 = "<</Type/Annot/Subtype/Link/Border[0 0 0]/Rect["
3002
+ $s2 = "/A<</Type/Action/S/URI/URI("
3003
+ $s3 = { 2f [2-10] 2e 70 68 70 29 3e 3e }
3004
+ $s4 = "JamrulNormal"
3005
+ condition:
3006
+ uint32be(0) == 0x25504446 and
3007
+ $s2 in (@s1..@s3) and $s4
3008
+ }
3009
+
3010
+
3011
+ rule Malicious_PDF_Detector {
3012
+ meta:
3013
+ description = "Detects malicious PDF files Stage 1"
3014
+ author = "TangerangKota-CSIRT - nauliajati@tangerangkota.go.id & Mr. Naeem"
3015
+ date = "2025-05-19"
3016
+ version = "1.1"
3017
+ reference = "https://attack.mitre.org/techniques/T1203/"
3018
+ strings:
3019
+ $pdf_magic = { 25 50 44 46 2D }
3020
+ $aa = "/AA" ascii nocase
3021
+ $embedded = "/EmbeddedFile" ascii nocase
3022
+ $endobj = "endobj" ascii
3023
+ $js = "/JavaScript" ascii nocase
3024
+ $js2 = "/JS" ascii nocase
3025
+ $launch = "/Launch" ascii nocase
3026
+ $obj = "obj" ascii
3027
+ $open_action = "/OpenAction" ascii nocase
3028
+ $richmedia = "/RichMedia" ascii nocase
3029
+ $submit = "/SubmitForm" ascii nocase
3030
+ condition:
3031
+ $pdf_magic at 0 and
3032
+ 3 of ($js, $js2, $open_action, $aa, $launch, $submit, $richmedia, $embedded) and
3033
+ #obj > 5 and #endobj > 5
3034
+ }
3035
+
3036
+
3037
+ rule Ransom_MSIL_JigsawLocker_PB_MTB{
3038
+ meta:
3039
+ description = "Ransom:MSIL/JigsawLocker.PB!MTB,SIGNATURE_TYPE_PEHSTR_EXT,03 00 03 00 03 00 00 "
3040
+ strings :
3041
+ $a_01_0 = {42 69 74 63 6f 69 6e 53 74 65 61 6c 65 72 2e 65 78 65 } //1 BitcoinStealer.exe
3042
+ $a_01_1 = {4e 00 69 00 74 00 72 00 6f 00 20 00 50 00 44 00 46 00 } //1 Nitro PDF
3043
+ $a_01_2 = {50 00 72 00 69 00 6d 00 6f 00 50 00 44 00 46 00 2e 00 65 00 78 00 65 00 } //1 PrimoPDF.exe
3044
+ condition:
3045
+ ((#a_01_0 & 1)*1+(#a_01_1 & 1)*1+(#a_01_2 & 1)*1) >=3
3046
+ }
3047
+
3048
+
3049
+ rule pdf_exploit_CVE_2023_21608 {
3050
+ meta:
3051
+ is_exploit = true
3052
+ is_warning = false
3053
+ is_feature = false
3054
+ rank = 5
3055
+ revision = "1"
3056
+ date = "April 12 2025"
3057
+ author = "@tylabs"
3058
+ sigtype = "pdfexaminer_obfuscation"
3059
+ copyright = "Copyright 2025 tylabs.com. All rights reserved."
3060
+ desc = "pdf.exploit Use-After-Free Vulnerability CVE-2023-21608"
3061
+ mitre = "T1203 T1204.002"
3062
+ url = "https://github.com/hacksysteam/CVE-2023-21608"
3063
+ strings:
3064
+ $s1 = "setAction(\"Calculate\"" nocase
3065
+ $s2 = "defineProperty(this" nocase
3066
+ $s3 = "this.resetForm()" nocase
3067
+ $s4 = "event.__defineGetter__(" nocase
3068
+ $s5 = "event.richValue" nocase
3069
+ $s6 = "Object.defineProperty(" nocase
3070
+ condition:
3071
+ 3 of them
3072
+ }