Detection rules › Panther
Databricks TruffleHog Scan Detected
Detects TruffleHog secret scanning activity in Databricks. TruffleHog is a tool used to scan repositories and systems for exposed credentials and secrets. While it can be used legitimately for security audits, unauthorized scanning may indicate credential harvesting attempts. External IP sources are elevated to HIGH severity.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Credential Access | T1552 Unsecured Credentials |
| Collection | T1213 Data from Information Repositories |
Rule body yaml
AnalysisType: rule
Filename: databricks_trufflehog_scan_detected.py
RuleID: "Databricks.Audit.TrufflehogScanDetected"
DisplayName: "Databricks TruffleHog Scan Detected"
Enabled: true
Status: Experimental
LogTypes:
- Databricks.Audit
Tags:
- Databricks
- Collection
- Credential Access
Reports:
MITRE ATT&CK:
- TA0006:T1552 # Unsecured Credentials
- TA0009:T1213 # Data from Information Repositories
Severity: Medium
Description: >
Detects TruffleHog secret scanning activity in Databricks. TruffleHog is a tool used to scan
repositories and systems for exposed credentials and secrets. While it can be used legitimately
for security audits, unauthorized scanning may indicate credential harvesting attempts. External
IP sources are elevated to HIGH severity.
Runbook: |
1. Query audit logs for all secret access attempts (getSecret action) by this user in the 24 hours before and after the TruffleHog scan
2. Check if the source IP (sourceIPAddress) matches known security scanning tools or is from an unexpected geographic location
3. Find all other unusual secret access patterns from this IP or user in the past 7 days
Reference: https://github.com/databricks-solutions/cybersec-workspace-detection-app/blob/main/base/detections/event-based/trufflehog_scan_detected.py
Tests:
- Name: TruffleHog Scan from External IP
ExpectedResult: true
Log:
timestamp: 1234567890000
serviceName: "accounts"
actionName: "login"
sourceIPAddress: "203.0.113.50"
userAgent: "TruffleHog/3.0"
userIdentity:
email: "scanner@external.com"
requestParams:
tokenId: "token-123"
- Name: TruffleHog Scan from Internal IP
ExpectedResult: true
Log:
timestamp: 1234567890000
serviceName: "workspace"
actionName: "listSecrets"
sourceIPAddress: "10.0.1.100"
userAgent: "TruffleHog/3.0 (Security Audit)"
userIdentity:
email: "security@example.com"
- Name: Normal User Activity
ExpectedResult: false
Log:
timestamp: 1234567890000
serviceName: "accounts"
actionName: "login"
sourceIPAddress: "198.51.100.1"
userAgent: "Mozilla/5.0"
userIdentity:
email: "user@example.com"
- Name: Service Agent Activity
ExpectedResult: false
Log:
timestamp: 1234567890000
serviceName: "workspace"
actionName: "executeCommand"
sourceIPAddress: "10.0.1.50"
userAgent: "Databricks-Runtime/12.0"
userIdentity:
email: "system@databricks.com"
Detection logic
Condition
not (userAgent contains "Databricks-Service/driver" or userAgent contains "Databricks-Runtime" or userAgent contains "Delta-Sharing-SparkStructuredStreaming" or userAgent contains "RawDBHttpClient" or userAgent contains "mlflow-python" or userAgent contains "obsSDK-scala" or userAgent contains "wsfs" or userAgent contains "feature-store" or requestParams.path contains "/telemetry" or requestParams.path contains "/delta-commit" or requestParams.path contains "/health" or requestParams.path contains "/metrics" or requestParams.path contains "/status" or userIdentity.email regex_match "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}")
userAgent contains "TruffleHog"
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
requestParams.path | contains | /delta-commit |
requestParams.path | contains | /health |
requestParams.path | contains | /metrics |
requestParams.path | contains | /status |
requestParams.path | contains | /telemetry |
userAgent | contains | Databricks-Runtime |
userAgent | contains | Databricks-Service/driver |
userAgent | contains | Delta-Sharing-SparkStructuredStreaming |
userAgent | contains | RawDBHttpClient |
userAgent | contains | feature-store |
userAgent | contains | mlflow-python |
userAgent | contains | obsSDK-scala |
userAgent | contains | wsfs |
userIdentity.email | regex_match | [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12} |
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.
| Field | Kind | Values |
|---|---|---|
userAgent | contains |
|
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 | Source |
|---|---|
sourceIPAddress | |
email | userIdentity.email |