Medium Severity

Attachment: PDF with Auto-Open Embedded Smuggling File

Labels

No labels.

Description

PDF attachment containing an embedded file that auto-opens and is capable of HTML or SVG Smuggling.

@delivr_to
Created Aug 18th, 2023 • Last updated Apr 22nd, 2024
Feed Source
delivr.to Feed
Source
type.inbound
and any(attachments, 
    // Attachment is PDF
    .file_extension == "pdf" and 
    
    // PDF contains JavaScript containing indicators of 'AutoOpen' capability.
    any(file.explode(.),
        // Snippet from auto-open PDF:
        // /S /JavaScript
        // /JS (this.exportDataObject({ cName: "file.html", nLaunch: 2 });)
        any(.scan.strings.strings, strings.icontains(.,'/JavaScript')) and 
        any(.scan.strings.strings,strings.icontains(.,'exportDataObject'))
    ) and 
    
    // Within the PDF is a file capable of smuggling, including HTML and SVG formats
    any(file.explode(.),
        // The analysed HTML/SVG file is directly embedded in the PDF, rather than being contained in an archive
        .depth == 1 and 
        (
            regex.imatch(.file_extension, '^([sdx]{0,1}ht[ml]{0,2})$') or
            strings.ilike(.flavors.mime,
                "image/svg+xml",
                "text/html"
            ) or 
            any(.flavors.yara, . == 'html_file')
        )
    )
)
and (
  not profile.by_sender_email().solicited
  or sender.email.domain.domain == "delivrto.me"
)
MQL Rule Console
•Docs•Learning Labs

Playground

Test against your own EMLs or sample data.

Share

Post about this on your socials.

Get Started. Today.

Managed or self-managed. No MX changes.

Deploy and integrate a free Sublime instance in minutes.
Get Started