Detection rules › Sublime MQL

DLP: IP Address

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

Detects messages containing IP addresses (IPv4 and IPv6).

Event coverage

Rule body MQL

type.outbound
and any([body.current_thread.text, subject.subject],
        // IPv4 address
        regex.contains(., '\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b')
        // IPv6 address
        or regex.contains(., '\b(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}\b')
)
and any([body.current_thread.text, subject.subject],
        regex.icontains(., 'ip\s+address|server|network|infrastructure')
)

Detection logic

Scope: outbound message.

Detects messages containing IP addresses (IPv4 and IPv6).

  1. outbound message
  2. any of [body.current_thread.text, subject.subject] where any holds:
    • . matches '\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b'
    • . matches '\\b(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}\\b'
  3. any of [body.current_thread.text, subject.subject] where:
    • . matches 'ip\\s+address|server|network|infrastructure'

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

Indicators matched (3)

FieldMatchValue
regex.containsregex\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b
regex.containsregex\b(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}\b
regex.icontainsregexip\s+address|server|network|infrastructure