Attachment with auto-opening VBA macro (unsolicited)

Recursively scans files and archives to detect embedded VBA files with an auto open exec.

Sublime rule (View on GitHub)

 1name: "Attachment with auto-opening VBA macro (unsolicited)"
 2description: |
 3    Recursively scans files and archives to detect embedded VBA files with an auto open exec.
 4references:
 5  - "https://threatpost.com/microsoft-outlook-users-targeted-by-gamaredons-new-vba-macro/156484/"
 6type: "rule"
 7severity: "medium"
 8source: |
 9  type.inbound
10  and any(attachments,
11          (
12            .file_extension in~ $file_extensions_macros
13            or .file_extension in~ $file_extensions_common_archives
14            or (
15                .file_extension is null
16                and .file_type == "unknown"
17                and .content_type == "application/octet-stream"
18                and .size < 100000000
19              )
20          )
21          and any(file.explode(.), any(.scan.vba.auto_exec, . == "AutoOpen"))
22  )
23  and (
24    not profile.by_sender().solicited
25    or (
26      profile.by_sender().any_messages_malicious_or_spam
27      and not profile.by_sender().any_false_positives
28    )
29  )  
30attack_types:
31  - "Malware/Ransomware"
32tactics_and_techniques:
33  - "Macros"
34detection_methods:
35  - "Archive analysis"
36  - "File analysis"
37  - "Macro analysis"
38  - "Sender analysis"
39id: "d48b3e53-dee4-546b-b81a-0c781929fdfb"
to-top