Detection rules › Panther

Carbon Black API Key Created or Retrieved

Severity
medium
Log types
CarbonBlack.Audit
Tags
Persistence, Create Account
Reference
https://docs.vmware.com/en/VMware-Carbon-Black-Cloud/services/carbon-black-cloud-user-guide/GUID-F3816FB5-969F-4113-80FC-03981C65F969.html
Source
github.com/panther-labs/panther-analysis

Detects when a user creates a new API key or retrieves an existing key.

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1136 Create Account

Rule body yaml

AnalysisType: rule
RuleID: "CarbonBlack.Audit.API.Key.Created.Retrieved"
LogTypes:
  - CarbonBlack.Audit
Description: "Detects when a user creates a new API key or retrieves an existing key."
DisplayName: "Carbon Black API Key Created or Retrieved"
Enabled: true
Filename: cb_audit_api_key_created_retrieved.py
Severity: Medium
Tags:
  - Persistence
  - Create Account
Reports:
  MITRE ATT&CK:
    - TA0003:T1136
Reference: https://docs.vmware.com/en/VMware-Carbon-Black-Cloud/services/carbon-black-cloud-user-guide/GUID-F3816FB5-969F-4113-80FC-03981C65F969.html
Threshold: 1
DedupPeriodMinutes: 60
Tests:
  - Name: API Key Retrieved
    ExpectedResult: true
    Log:
      {
        "clientIp": "12.34.56.78",
        "description": "User bob.ross@acme.com retrieved secret for API ID JFDNIPS464 in org 12345",
        "eventId": "66443924833011eeac3cb393f3d07f9f",
        "eventTime": "2023-11-14 20:57:19.186000000",
        "flagged": false,
        "loginName": "bob.ross@acme.com",
        "orgName": "acme.com",
        "verbose": false,
      }
  - Name: Admin granted
    ExpectedResult: true
    Log:
      {
        "clientIp": "12.34.56.78",
        "description": "Added API ID JFDNIPS464 with name evil-key in org 12345",
        "eventId": "66443924833011eeac3cb393f3d07f9f",
        "eventTime": "2023-11-14 20:57:19.186000000",
        "flagged": false,
        "loginName": "bob.ross@acme.com",
        "orgName": "acme.com",
        "verbose": false,
      }
  - Name: Other role granted
    ExpectedResult: false
    Log:
      {
        "clientIp": "12.34.56.78",
        "description": "Created grant: psc:cnn:A1234567:BC1234567890 with role Read Only",
        "eventId": "66443924833011eeac3cb393f3d07f9f",
        "eventTime": "2023-11-14 20:57:19.186000000",
        "flagged": false,
        "loginName": "bob.ross@acme.com",
        "orgName": "acme.com",
        "requestUrl": "/access/v2/orgs/A1234567/grants",
        "verbose": false,
      }

Detection logic

Condition

description contains " retrieved secret for API ID " or description contains "Added API ID " or description contains "Regenerated API key for API ID " or description contains "Updated API ID "

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
descriptioncontains
  • retrieved secret for API ID
  • Added API ID
  • Regenerated API key for API ID
  • Updated API ID

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

Field
loginName
clientIp
description