Detection rules › Sublime MQL

DLP: Slack Token

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

Detects messages containing Slack API tokens and webhooks.

Event coverage

Rule body MQL

type.outbound
and any([body.current_thread.text, subject.subject],
        // Slack tokens: xoxb-, xoxp-, xoxa-, xoxr-
        regex.contains(., '\bxox[bpar]-[0-9]{10,13}-[0-9]{10,13}-[A-Za-z0-9]{24,}\b')
        // Slack webhook URLs
        or regex.contains(., 'hooks\.slack\.com/services/T[A-Z0-9]+/B[A-Z0-9]+/[A-Za-z0-9]{24}')
)

Detection logic

Scope: outbound message.

Detects messages containing Slack API tokens and webhooks.

  1. outbound message
  2. any of [body.current_thread.text, subject.subject] where any holds:
    • . matches '\\bxox[bpar]-[0-9]{10,13}-[0-9]{10,13}-[A-Za-z0-9]{24,}\\b'
    • . matches 'hooks\\.slack\\.com/services/T[A-Z0-9]+/B[A-Z0-9]+/[A-Za-z0-9]{24}'

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

Indicators matched (2)

FieldMatchValue
regex.containsregex\bxox[bpar]-[0-9]{10,13}-[0-9]{10,13}-[A-Za-z0-9]{24,}\b
regex.containsregexhooks\.slack\.com/services/T[A-Z0-9]+/B[A-Z0-9]+/[A-Za-z0-9]{24}