Detection rules › Sublime MQL

DLP: China Resident ID Number

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

Detects messages containing Chinese Resident Identity Card numbers.

Event coverage

Rule body MQL

type.outbound
and any([body.current_thread.text, subject.subject],
        // Chinese ID: 18 digits or 15 digits
        regex.contains(., '\b\d{17}[0-9Xx]\b')
        or regex.contains(., '\b\d{15}\b')
)
and any([body.current_thread.text, subject.subject],
        regex.icontains(., 'resident\s+ID|身份证|chinese\s+ID|china')
)

Detection logic

Scope: outbound message.

Detects messages containing Chinese Resident Identity Card numbers.

  1. outbound message
  2. any of [body.current_thread.text, subject.subject] where any holds:
    • . matches '\\b\\d{17}[0-9Xx]\\b'
    • . matches '\\b\\d{15}\\b'
  3. any of [body.current_thread.text, subject.subject] where:
    • . matches 'resident\\s+ID|身份证|chinese\\s+ID|china'

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

Indicators matched (3)

FieldMatchValue
regex.containsregex\b\d{17}[0-9Xx]\b
regex.containsregex\b\d{15}\b
regex.icontainsregexresident\s+ID|身份证|chinese\s+ID|china