Detection rules › Sublime MQL

DLP: Brazil CPF Number

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

Detects messages containing Brazilian Natural Persons Register (CPF) numbers.

Event coverage

Rule body MQL

type.outbound
and any([body.current_thread.text, subject.subject],
        // CPF: 11 digits in XXX.XXX.XXX-XX format
        regex.contains(., '\b\d{3}\.?\d{3}\.?\d{3}-?\d{2}\b')
)
and any([body.current_thread.text, subject.subject],
        regex.icontains(., 'CPF|cadastro\s+de\s+pessoas|tax\s+ID')
)
and (
  strings.icontains(sender.email.domain.tld, "br")
  or strings.icontains(body.current_thread.text, "brazil")
  or strings.icontains(body.current_thread.text, "brasil")
)

Detection logic

Scope: outbound message.

Detects messages containing Brazilian Natural Persons Register (CPF) numbers.

  1. outbound message
  2. any of [body.current_thread.text, subject.subject] where:
    • . matches '\\b\\d{3}\\.?\\d{3}\\.?\\d{3}-?\\d{2}\\b'
  3. any of [body.current_thread.text, subject.subject] where:
    • . matches 'CPF|cadastro\\s+de\\s+pessoas|tax\\s+ID'
  4. any of:
    • sender.email.domain.tld contains 'br'
    • body.current_thread.text contains 'brazil'
    • body.current_thread.text contains 'brasil'

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

Indicators matched (5)

FieldMatchValue
regex.containsregex\b\d{3}\.?\d{3}\.?\d{3}-?\d{2}\b
regex.icontainsregexCPF|cadastro\s+de\s+pessoas|tax\s+ID
strings.icontainssubstringbr
strings.icontainssubstringbrazil
strings.icontainssubstringbrasil