Detection rules › Sublime MQL
DLP: UK Passport Number
Detects messages containing UK passport 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],
// UK passport: 9 digits or alphanumeric
regex.contains(., '\b\d{9}|[A-Z]{2}\d{7}\b')
)
and any([body.current_thread.text, subject.subject],
regex.icontains(., 'passport')
)
and (
strings.icontains(sender.email.domain.tld, "uk")
or strings.icontains(sender.email.domain.tld, "gb")
or strings.icontains(body.current_thread.text, "united kingdom")
or strings.icontains(body.current_thread.text, "UK")
)
Detection logic
Scope: outbound message.
Detects messages containing UK passport numbers.
- outbound message
any of
[body.current_thread.text, subject.subject]where:- . matches '\\b\\d{9}|[A-Z]{2}\\d{7}\\b'
any of
[body.current_thread.text, subject.subject]where:- . matches 'passport'
any of:
- sender.email.domain.tld contains 'uk'
- sender.email.domain.tld contains 'gb'
- body.current_thread.text contains 'united kingdom'
- body.current_thread.text contains 'UK'
Inspects: body.current_thread.text, sender.email.domain.tld, subject.subject, type.outbound. Sensors: regex.contains, regex.icontains, strings.icontains.
Indicators matched (6)
| Field | Match | Value |
|---|---|---|
regex.contains | regex | \b\d{9}|[A-Z]{2}\d{7}\b |
regex.icontains | regex | passport |
strings.icontains | substring | uk |
strings.icontains | substring | gb |
strings.icontains | substring | united kingdom |
strings.icontains | substring | UK |