Detection rules › Sublime MQL

DLP: OAuth Client Secret

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

Detects messages containing OAuth client secrets.

Event coverage

Rule body MQL

type.outbound
and any([body.current_thread.text, subject.subject],
        regex.icontains(., 'oauth|client[_\s]secret|client[_\s]id')
)
and any([body.current_thread.text, subject.subject],
        // Long hexadecimal or alphanumeric strings
        regex.contains(., '\b[a-f0-9]{32,}\b')
        or regex.contains(., '\b[A-Za-z0-9_-]{32,}\b')
)

Detection logic

Scope: outbound message.

Detects messages containing OAuth client secrets.

  1. outbound message
  2. any of [body.current_thread.text, subject.subject] where:
    • . matches 'oauth|client[_\\s]secret|client[_\\s]id'
  3. any of [body.current_thread.text, subject.subject] where any holds:
    • . matches '\\b[a-f0-9]{32,}\\b'
    • . matches '\\b[A-Za-z0-9_-]{32,}\\b'

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

Indicators matched (3)

FieldMatchValue
regex.icontainsregexoauth|client[_\s]secret|client[_\s]id
regex.containsregex\b[a-f0-9]{32,}\b
regex.containsregex\b[A-Za-z0-9_-]{32,}\b