Detection rules › Sublime MQL

DLP: UK National Health Service Number

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

Detects messages containing UK NHS numbers.

Event coverage

Rule body MQL

type.outbound
and any([body.current_thread.text, subject.subject],
        // NHS number: 10 digits in XXX XXX XXXX format
        regex.contains(., '\b\d{3}[\s]?\d{3}[\s]?\d{4}\b')
)
and any([body.current_thread.text, subject.subject],
        regex.icontains(., 'NHS|national\s+health\s+service|health\s+number')
)

Detection logic

Scope: outbound message.

Detects messages containing UK NHS numbers.

  1. outbound message
  2. any of [body.current_thread.text, subject.subject] where:
    • . matches '\\b\\d{3}[\\s]?\\d{3}[\\s]?\\d{4}\\b'
  3. any of [body.current_thread.text, subject.subject] where:
    • . matches 'NHS|national\\s+health\\s+service|health\\s+number'

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

Indicators matched (2)

FieldMatchValue
regex.containsregex\b\d{3}[\s]?\d{3}[\s]?\d{4}\b
regex.icontainsregexNHS|national\s+health\s+service|health\s+number