Detection rules › Sublime MQL

DLP: Canada Social Insurance Number (SIN)

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

Detects messages containing Canadian Social Insurance Numbers.

Event coverage

Rule body MQL

type.outbound
and any([body.current_thread.text, subject.subject],
        // SIN: 9 digits in XXX-XXX-XXX format
        regex.contains(., '\b\d{3}[\s\-]?\d{3}[\s\-]?\d{3}\b')
)
and any([body.current_thread.text, subject.subject],
        regex.icontains(., 'social\s+insurance|SIN|NAS')
)

Detection logic

Scope: outbound message.

Detects messages containing Canadian Social Insurance Numbers.

  1. outbound message
  2. any of [body.current_thread.text, subject.subject] where:
    • . matches '\\b\\d{3}[\\s\\-]?\\d{3}[\\s\\-]?\\d{3}\\b'
  3. any of [body.current_thread.text, subject.subject] where:
    • . matches 'social\\s+insurance|SIN|NAS'

Inspects: body.current_thread.text, subject.subject, type.outbound. Sensors: regex.contains, regex.icontains.

Indicators matched (2)

FieldMatchValue
regex.containsregex\b\d{3}[\s\-]?\d{3}[\s\-]?\d{3}\b
regex.icontainsregexsocial\s+insurance|SIN|NAS