Detection rules › Sublime MQL

Attachment: .csproj with suspicious commands

Severity
high
Type
rule
Source
github.com/sublime-security/sublime-rules

Attached .csproj file contains suspicious commands.

Threat classification

Sublime's own taxonomy (not MITRE ATT&CK).

CategoryValues
Attack typesMalware/Ransomware
Tactics and techniquesEvasion, Scripting

Event coverage

Rule body MQL

type.inbound
and any(attachments,
        .file_extension == "csproj"
        and any(file.explode(.),
                (
                  (any(.scan.strings.strings, strings.contains(., 'DllImport')))
                  and (
                    any(.scan.strings.strings,
                        strings.icontains(., 'CreateProcess')
                    )
                  )
                )
        )
)

Detection logic

Scope: inbound message.

Attached .csproj file contains suspicious commands.

  1. inbound message
  2. any of attachments where all hold:
    • .file_extension is 'csproj'
    • any of file.explode(.) where all hold:
      • any of .scan.strings.strings where:
        • . contains 'DllImport'
      • any of .scan.strings.strings where:
        • . contains 'CreateProcess'

Inspects: attachments[].file_extension, type.inbound. Sensors: file.explode, strings.contains, strings.icontains.

Indicators matched (3)

FieldMatchValue
attachments[].file_extensionequalscsproj
strings.containssubstringDllImport
strings.icontainssubstringCreateProcess