Detection rules › Sublime MQL

DLP: Sweden Tax Identification Number

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

Detects messages containing Swedish Tax Identification Numbers.

Event coverage

Rule body MQL

type.outbound
and any([body.current_thread.text, subject.subject],
        // Swedish Tax ID: 12 digits (same as personnummer for individuals)
        regex.contains(., '\b\d{12}\b')
)
and any([body.current_thread.text, subject.subject],
        regex.icontains(., 'skatteregistrering|tax\s+ID|TIN')
)
and (
  strings.icontains(sender.email.domain.tld, "se")
  or strings.icontains(body.current_thread.text, "sweden")
)

Detection logic

Scope: outbound message.

Detects messages containing Swedish Tax Identification Numbers.

  1. outbound message
  2. any of [body.current_thread.text, subject.subject] where:
    • . matches '\\b\\d{12}\\b'
  3. any of [body.current_thread.text, subject.subject] where:
    • . matches 'skatteregistrering|tax\\s+ID|TIN'
  4. any of:
    • sender.email.domain.tld contains 'se'
    • body.current_thread.text contains 'sweden'

Inspects: body.current_thread.text, sender.email.domain.tld, subject.subject, type.outbound. Sensors: regex.contains, regex.icontains, strings.icontains.

Indicators matched (4)

FieldMatchValue
regex.containsregex\b\d{12}\b
regex.icontainsregexskatteregistrering|tax\s+ID|TIN
strings.icontainssubstringse
strings.icontainssubstringsweden