Detection rules › Sublime MQL

DLP: Spain Social Security Number

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

Detects messages containing Spanish Social Security Numbers (Número de la Seguridad Social).

Event coverage

Rule body MQL

type.outbound
and any([body.current_thread.text, subject.subject],
        // Spanish SSN: 12 digits in XX/XXXXXXXX/XX format
        regex.contains(., '\b\d{2}[\s/]?\d{8}[\s/]?\d{2}\b')
)
and any([body.current_thread.text, subject.subject],
        regex.icontains(., 'seguridad\s+social|social\s+security|NSS')
)

Detection logic

Scope: outbound message.

Detects messages containing Spanish Social Security Numbers (Número de la Seguridad Social).

  1. outbound message
  2. any of [body.current_thread.text, subject.subject] where:
    • . matches '\\b\\d{2}[\\s/]?\\d{8}[\\s/]?\\d{2}\\b'
  3. any of [body.current_thread.text, subject.subject] where:
    • . matches 'seguridad\\s+social|social\\s+security|NSS'

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

Indicators matched (2)

FieldMatchValue
regex.containsregex\b\d{2}[\s/]?\d{8}[\s/]?\d{2}\b
regex.icontainsregexseguridad\s+social|social\s+security|NSS