Detection rules › Sublime MQL
DLP: IP Address
Detects messages containing IP addresses (IPv4 and IPv6).
Event coverage
| Message attribute |
|---|
| body.current_thread |
| subject |
| type |
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).
- outbound message
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'
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)
| Field | Match | Value |
|---|---|---|
regex.contains | regex | \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.contains | regex | \b(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}\b |
regex.icontains | regex | ip\s+address|server|network|infrastructure |