Detection rules › Sublime MQL

DLP: Saudi Arabia SWIFT Code

Severity
medium
Type
dlp
Source
github.com/sublime-security/sublime-rules

Detects messages containing Saudi Arabian SWIFT/BIC codes for financial institutions.

Event coverage

Rule body MQL

type.outbound
and any(ml.logo_detect(beta.message_screenshot()).brands, strings.ilike(.name, "*bank*", "*financial*"))
and any([body.current_thread.text, subject.subject],
        // SWIFT code: 4 letters (bank) + 2 letters (SA) + 2 chars (location) + optional 3 chars (branch)
        regex.contains(., '\b[A-Z]{4}SA[A-Z0-9]{2}(?:[A-Z0-9]{3})?\b')
)

Detection logic

Scope: outbound message.

Detects messages containing Saudi Arabian SWIFT/BIC codes for financial institutions.

  1. outbound message
  2. any of ml.logo_detect(beta.message_screenshot()).brands where:
    • .name matches any of 2 patterns
      • *bank*
      • *financial*
  3. any of [body.current_thread.text, subject.subject] where:
    • . matches '\\b[A-Z]{4}SA[A-Z0-9]{2}(?:[A-Z0-9]{3})?\\b'

Inspects: body.current_thread.text, subject.subject, type.outbound. Sensors: beta.message_screenshot, ml.logo_detect, regex.contains, strings.ilike.

Indicators matched (3)

FieldMatchValue
strings.ilikesubstring*bank*
strings.ilikesubstring*financial*
regex.containsregex\b[A-Z]{4}SA[A-Z0-9]{2}(?:[A-Z0-9]{3})?\b