Detection rules › Sublime MQL

DLP: UK National Insurance Number (NINO)

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

Detects messages containing UK National Insurance Numbers.

Event coverage

Rule body MQL

type.outbound
and any([body.current_thread.text, subject.subject],
        // NINO: 2 letters + 6 digits + 1 letter (e.g., AB123456C)
        regex.contains(., '\b[A-CEGHJ-PR-TW-Z][A-CEGHJ-NPR-TW-Z]\d{6}[A-D]\b')
)
and any([body.current_thread.text, subject.subject],
        regex.icontains(., 'NINO|national\s+insurance|NI\s+number')
)

Detection logic

Scope: outbound message.

Detects messages containing UK National Insurance Numbers.

  1. outbound message
  2. any of [body.current_thread.text, subject.subject] where:
    • . matches '\\b[A-CEGHJ-PR-TW-Z][A-CEGHJ-NPR-TW-Z]\\d{6}[A-D]\\b'
  3. any of [body.current_thread.text, subject.subject] where:
    • . matches 'NINO|national\\s+insurance|NI\\s+number'

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

Indicators matched (2)

FieldMatchValue
regex.containsregex\b[A-CEGHJ-PR-TW-Z][A-CEGHJ-NPR-TW-Z]\d{6}[A-D]\b
regex.icontainsregexNINO|national\s+insurance|NI\s+number