Detection rules › Sigma

Potentially Suspicious JWT Token Search Via CLI

Severity
medium
Author
Nasreddine Bencherchali (Nextron Systems), kagebunsher
Source
upstream

Detects potentially suspicious search for JWT tokens via CLI by looking for the string "eyJ0eX" or "eyJhbG". JWT tokens are often used for access-tokens across various applications and services like Microsoft 365, Azure, AWS, Google Cloud, and others. Threat actors may search for these tokens to steal them for lateral movement or privilege escalation.

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1528 Steal Application Access Token, T1552.001 Unsecured Credentials: Credentials In Files

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation
Security-Auditing4688A new process has been created.

Stages and Predicates

Stage 1: all of selection_tools

or:
CommandLine|contains: 'find '
CommandLine|contains: find.exe
CommandLine|contains: findstr
CommandLine|contains: 'select-string '
CommandLine|contains: strings

Stage 2: all of selection_jwt_string

or:
CommandLine|contains: ' ''eyJ0eX'''
CommandLine|contains: ' ''eyJhbG'''
CommandLine|contains: ' "eyJ0eX"'
CommandLine|contains: ' "eyJhbG"'
CommandLine|contains: ' eyJ0eX'
CommandLine|contains: ' eyJhbG'
CommandLine|contains: eyJ0eXAiOi
CommandLine|contains: eyJhbGciOi

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • "eyJ0eX"
  • "eyJhbG"
  • 'eyJ0eX'
  • 'eyJhbG'
  • eyJ0eX
  • eyJhbG
  • eyJ0eXAiOi
  • eyJhbGciOi
  • find
  • find.exe
  • findstr corpus 3 (sigma 3)
  • select-string
  • strings