Detection rules › Sublime MQL
DLP: Sweden Tax Identification Number
Detects messages containing Swedish Tax Identification Numbers.
Event coverage
| Message attribute |
|---|
| body.current_thread |
| sender.email |
| subject |
| type |
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.
- outbound message
any of
[body.current_thread.text, subject.subject]where:- . matches '\\b\\d{12}\\b'
any of
[body.current_thread.text, subject.subject]where:- . matches 'skatteregistrering|tax\\s+ID|TIN'
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)
| Field | Match | Value |
|---|---|---|
regex.contains | regex | \b\d{12}\b |
regex.icontains | regex | skatteregistrering|tax\s+ID|TIN |
strings.icontains | substring | se |
strings.icontains | substring | sweden |