Detection rules › Panther
Wiz Service Account Change
This rule detects creations, updates and deletions of service accounts.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | T1078.004 Valid Accounts: Cloud Accounts |
Rule body yaml
AnalysisType: rule
RuleID: Wiz.Service.Account.Change
Description: This rule detects creations, updates and deletions of service accounts.
DisplayName: Wiz Service Account Change
Runbook: Confirm this user acted with valid business intent and determine whether this activity was authorized.
Reference: https://www.wiz.io/blog/non-human-identities-dashboard
Enabled: true
Filename: wiz_service_account_change.py
Severity: High
Reports:
MITRE ATT&CK:
- TA0001:T1078.004 # Valid Accounts: Cloud Accounts
LogTypes:
- Wiz.Audit
DedupPeriodMinutes: 60
Threshold: 1
Tests:
- Name: DeleteServiceAccount
ExpectedResult: true
Log:
{
"id": "ac5630ca-2dd9-40a5-8137-140443cd8087",
"action": "DeleteServiceAccount",
"requestId": "a9291dc4-a17c-4af7-bb9e-17905082221f",
"status": "SUCCESS",
"timestamp": "2024-07-09T14:16:02.836387Z",
"actionParameters": {
"input": {
"id": "rsao...<redacted>"
},
"selection": [
"__typename",
"_stub"
]
},
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
"sourceIP": "12.34.56.78",
"serviceAccount": null,
"user": {
"__typename": "User",
"id": "test.user@company.com",
"name": "user@company.com"
}
}
- Name: CreateUser
ExpectedResult: false
Log:
{
"id": "220d23be-f07c-4d97-b4a6-87ad04eddb14",
"action": "CreateUser",
"requestId": "0d9521b2-c3f8-4a73-bf7c-20257788752e",
"status": "SUCCESS",
"timestamp": "2024-07-29T09:40:15.66643Z",
"actionParameters": {
"input": {
"assignedProjectIds": null,
"email": "testy@company.com",
"expiresAt": null,
"name": "Test User",
"role": "GLOBAL_ADMIN"
},
"selection": [
"__typename",
{
"user": [
"__typename",
"id"
]
}
]
},
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
"sourceIP": "8.8.8.8",
"serviceAccount": null,
"user": {
"id": "someuser@company.com",
"name": "someuser@company.com"
}
}
- Name: DeleteServiceAccount - Fail
ExpectedResult: false
Log:
{
"id": "ac5630ca-2dd9-40a5-8137-140443cd8087",
"action": "DeleteServiceAccount",
"requestId": "a9291dc4-a17c-4af7-bb9e-17905082221f",
"status": "FAILED",
"timestamp": "2024-07-09T14:16:02.836387Z",
"actionParameters": { },
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
"sourceIP": "12.34.56.78",
"serviceAccount": null,
"user": {
"__typename": "User",
"id": "test.user@company.com",
"name": "user@company.com"
}
}
Detection logic
Condition
status eq "SUCCESS"
action in ["CreateServiceAccount", "DeleteServiceAccount", "UpdateServiceAccount"]
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.
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 |
|---|---|
action | |
source_ip | sourceip |
event_id | id |
action_parameters | actionparameters |