Sublime Security medium experimental mql

Attachment: ICS file with excessive custom properties

ICS calendar attachment contains an unusually high number of custom X- properties, which may indicate attempts to hide malicious content or exploit calendar parsing vulnerabilities.

View Source

Detection Logic

type.inbound
and any(filter(attachments,
               .file_type in~ ('ics')
               or .content_type in ("text/calendar", "application/ics")
        ),
        regex.icount(file.parse_text(.).text,
                     '[\r\n]X-[^\r\n]+\x3b\s?[^\r\n]+:\s*[a-f0-9]{32,}'
        ) > 10
        //
        // This rule makes use of a beta feature and is subject to change without notice
        // using the beta feature in custom rules is not suggested until it has been formally released
        //
        or any(beta.file.parse_ics(.).events,
               length(filter(.raw_properties,
                             strings.istarts_with(.name, 'X-')
                             and regex.icontains(.value, '^\s?[a-f0-9]{32,}$')
                      )
               ) > 10
        )
        or length(filter(beta.file.parse_ics(.).raw_properties,
                         strings.istarts_with(.name, 'X-')
                         and regex.icontains(.value, '^\s?[a-f0-9]{32,}$')
                  )
        ) > 10
)

Field Validations

Loading…

Comments (0)

Loading comments...