Detection rules › Sublime MQL

DLP: JSON Web Token (JWT)

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

Detects messages containing JSON Web Tokens.

Event coverage

Rule body MQL

type.outbound
and any([body.current_thread.text, subject.subject],
        // JWT format: base64.base64.base64
        regex.contains(., '\beyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b')
)

Detection logic

Scope: outbound message.

Detects messages containing JSON Web Tokens.

  1. outbound message
  2. any of [body.current_thread.text, subject.subject] where:
    • . matches '\\beyJ[A-Za-z0-9_-]+\\.eyJ[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\b'

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

Indicators matched (1)

FieldMatchValue
regex.containsregex\beyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b