Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions filters/audits/vmware.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# VMware ESXi normalization and rule review

Use origin.host, canonical authentication failures, and corresponding alert-side grouping names.

This draft targets UTMStack `v11`. It contains 1 filter changes
and 14 rule changes for this technology only. Review covered
1 filter configurations and 14 matching shipped rule files.
Unchanged rules are listed in the regression manifest; they are not duplicated in the diff.

## Contract and validation

- Compared exact standard names/types with go-sdk v1.1.31 and the supplied UTMStack dictionaries.
- Checked documented pipeline ordering, rename/move behavior, open vendor log fields,
event-side versus alert-side fields, and surviving fields used by affected rule predicates/history/grouping.
- Strict SDK configuration decoding and actual CEL compilation pass for this scope.
- 1 synthetic normalization cases pass, including SDK Event conversion and any
trigger predicate assertions recorded in the manifest.
- The scoped alerts module tests and `git diff --check` pass with the shared contract runner applied.

The shared alert-contract PR supplies the reusable Go runner for the manifest in
`plugins/alerts/testdata/filter-contracts/vmware.json`. Apply that support before running `go test ./...` in `plugins/alerts`.

The changed rules also require the shared alert-grouping fix to resolve `lastEvent.*` values correctly at runtime.

The model starts from synthetic extraction results. It does not run complex grok,
JSON/KV/XML/CSV extraction, time conversion, dynamic plugins, historical OpenSearch
queries, or the closed EventProcessor. Raw vendor logs and resulting alerts must
still be checked in staging before rollout. No customer false-positive reduction
has been measured and no production rollout is included.



## References

- [SDK schema](https://github.com/threatwinds/go-sdk/blob/v1.1.31/plugins/plugins.proto)
- [Filter steps](https://github.com/threatwinds/go-sdk/wiki/Filter-Steps-Reference)
- [Standard event schema](https://github.com/threatwinds/go-sdk/wiki/Standard-Event-Schema)
- [Rule implementation](https://github.com/threatwinds/go-sdk/wiki/Implementing-Rules)

`afterEvents`, empty noncapturing grok names, supported numeric strings, and custom
`log.*` fields are accepted. Existing textual protocol casing and vendor action names
are preserved unless a concrete consumer mismatch requires correction.
14 changes: 7 additions & 7 deletions filters/vmware/vmware-esxi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pipeline:
pattern: '\<{{.data}}\>'
- fieldName: log.deviceTime
pattern: '{{.year}}(-){{.monthNumber}}(-){{.monthDay}}(T){{.time}}(Z)'
- fieldName: origin.hostname
- fieldName: origin.host
pattern: '{{.hostname}}'
- fieldName: log.process
pattern: '{{.hostname}}(\:)'
Expand All @@ -40,7 +40,7 @@ pipeline:
pattern: '\<{{.data}}\>'
- fieldName: log.deviceTime
pattern: '{{.year}}(-){{.monthNumber}}(-){{.monthDay}}(T){{.time}}(Z)'
- fieldName: origin.hostname
- fieldName: origin.host
pattern: '{{.hostname}}'
- fieldName: log.process
pattern: '{{.hostname}}'
Expand All @@ -55,7 +55,7 @@ pipeline:
pattern: '\<{{.data}}\>'
- fieldName: log.deviceTime
pattern: '{{.year}}-{{.monthNumber}}-{{.monthDay}}T{{.time}}Z'
- fieldName: origin.hostname
- fieldName: origin.host
pattern: '{{.hostname}}'
- fieldName: log.process
pattern: '{{.hostname}}'
Expand Down Expand Up @@ -136,14 +136,14 @@ pipeline:
function: string
params:
key: actionResult
value: "failed"
where: 'exists("log.message") && contains("log.message", "authentication failed")'
value: failure
where: exists("log.message") && contains("log.message", "authentication failed")
- add:
function: string
params:
key: actionResult
value: "failed"
where: 'exists("log.message") && contains("log.message", "authentication of user") && contains("log.message", "failed") && !exists("actionResult")'
value: failure
where: exists("log.message") && contains("log.message", "authentication of user") && contains("log.message", "failed") && !exists("actionResult")
- add:
function: string
params:
Expand Down
44 changes: 44 additions & 0 deletions plugins/alerts/testdata/filter-contracts/vmware.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"technology": "VMware ESXi",
"filters": [
"filters/vmware/vmware-esxi.yml"
],
"rules": [
"rules/vmware/vmware-esxi/esxi_account_manipulation.yml",
"rules/vmware/vmware-esxi/esxi_disk_theft.yml",
"rules/vmware/vmware-esxi/esxi_firewall_modification.yml",
"rules/vmware/vmware-esxi/esxi_host_compromise.yml",
"rules/vmware/vmware-esxi/esxi_ransomware_detection.yml",
"rules/vmware/vmware-esxi/esxi_ssh_access.yml",
"rules/vmware/vmware-esxi/esxi_syslog_disruption.yml",
"rules/vmware/vmware-esxi/esxi_vib_sideloading.yml",
"rules/vmware/vmware-esxi/hypervisor_escape_attempts.yml",
"rules/vmware/vmware-esxi/powercli_script_execution.yml",
"rules/vmware/vmware-esxi/vcenter_server_attacks.yml",
"rules/vmware/vmware-esxi/vm_escape_detection.yml",
"rules/vmware/vmware-esxi/vmware_tools_vulnerabilities.yml",
"rules/vmware/vmware-esxi/vsphere_api_abuse.yml"
],
"fixtures": [
{
"name": "vmware_auth_failure",
"filter": "vmware/vmware-esxi.yml",
"input": {
"origin": {
"host": "esxi-lab"
},
"log": {
"message": "authentication failed"
}
},
"expected": {
"origin.host": "esxi-lab",
"actionResult": "failure"
},
"absent": [
"origin.hostname"
],
"rules": {}
}
]
}
2 changes: 1 addition & 1 deletion rules/vmware/vmware-esxi/esxi_account_manipulation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ where: |
))
)
groupBy:
- adversary.hostname
- adversary.host
2 changes: 1 addition & 1 deletion rules/vmware/vmware-esxi/esxi_disk_theft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ where: |
(contains("log.message", "Datastore") && contains("log.message", "browse") && contains("log.message", ".vmdk"))
)
groupBy:
- adversary.hostname
- adversary.host
- adversary.ip
4 changes: 2 additions & 2 deletions rules/vmware/vmware-esxi/esxi_firewall_modification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ where: |
contains("log.message", "set --allowed-all true") ||
contains("log.message", "set --enabled")
)) ||
(contains("log.message", "iptables") && exists("origin.hostname"))
(contains("log.message", "iptables") && exists("origin.host"))
)
groupBy:
- adversary.hostname
- adversary.host
4 changes: 2 additions & 2 deletions rules/vmware/vmware-esxi/esxi_host_compromise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ where: |
contains("log.message", "log events removed") ||
(equals("log.process", "vmkernel") && contains("log.message", "SCSI sense")) ||
(contains("log.eventInfo", "ransom") || contains("log.eventInfo", "encrypt"))) &&
exists("origin.hostname")
exists("origin.host")
groupBy:
- adversary.hostname
- adversary.host
2 changes: 1 addition & 1 deletion rules/vmware/vmware-esxi/esxi_ransomware_detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ where: |
(contains("log.message", "chmod") && contains("log.message", "+x") && contains("log.message", ".sh"))
)
groupBy:
- adversary.hostname
- adversary.host
2 changes: 1 addition & 1 deletion rules/vmware/vmware-esxi/esxi_ssh_access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ where: |
(contains("log.message", "ssh") && contains("log.message", "connection from"))
)
groupBy:
- adversary.hostname
- adversary.host
- adversary.ip
2 changes: 1 addition & 1 deletion rules/vmware/vmware-esxi/esxi_syslog_disruption.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ where: |
(contains("log.message", "Syslog.global.logHost") && contains("log.message", "changed"))
)
groupBy:
- adversary.hostname
- adversary.host
2 changes: 1 addition & 1 deletion rules/vmware/vmware-esxi/esxi_vib_sideloading.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ where: |
(contains("log.message", "esxcli software acceptance") && contains("log.message", "set"))
)
groupBy:
- adversary.hostname
- adversary.host
2 changes: 1 addition & 1 deletion rules/vmware/vmware-esxi/hypervisor_escape_attempts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ where: |
(regexMatch("log.message", "(?i)CVE-2024-37085")) ||
(regexMatch("log.message", "(?i)VMCI") && regexMatch("log.message", "(?i)(backdoor|socket|unauthorized)"))
groupBy:
- adversary.hostname
- adversary.host
2 changes: 1 addition & 1 deletion rules/vmware/vmware-esxi/powercli_script_execution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ where: |
(regexMatch("log.message", "(?i)Syslog\\.global\\.log") && regexMatch("log.message", "(?i)Set-VMHost")) ||
regexMatch("log.message", "(?i)Get-VMHostSysLogServer")
groupBy:
- adversary.hostname
- adversary.host
6 changes: 3 additions & 3 deletions rules/vmware/vmware-esxi/vcenter_server_attacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ where: |
contains("log.message", "VIB install") ||
contains("log.message", "authentication failed") ||
(equals("log.process", "vpxd") && equals("severity", "error"))) &&
exists("origin.hostname")
exists("origin.host")
afterEvents:
- indexPattern: v11-log-vmware-esxi-*
with:
- field: origin.hostname
- field: origin.host
operator: filter_term
value: '{{.origin.hostname}}'
value: '{{.origin.host}}'
within: 30m
count: 5
groupBy:
Expand Down
2 changes: 1 addition & 1 deletion rules/vmware/vmware-esxi/vm_escape_detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ where: |
(regexMatch("log.eventInfo", "(?i)(vm.*escape|breakout|containment.*breach)"))
groupBy:
- lastEvent.log.process
- adversary.hostname
- adversary.host
6 changes: 3 additions & 3 deletions rules/vmware/vmware-esxi/vmware_tools_vulnerabilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ where: |
afterEvents:
- indexPattern: v11-log-vmware-esxi-*
with:
- field: origin.hostname
- field: origin.host
operator: filter_term
value: '{{.origin.hostname}}'
value: '{{.origin.host}}'
within: 15m
count: 5
groupBy:
- adversary.hostname
- adversary.host
6 changes: 3 additions & 3 deletions rules/vmware/vmware-esxi/vsphere_api_abuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ where: |
afterEvents:
- indexPattern: v11-log-vmware-esxi-*
with:
- field: origin.hostname
- field: origin.host
operator: filter_term
value: '{{.origin.hostname}}'
value: '{{.origin.host}}'
within: 5m
count: 10
groupBy:
- lastEvent.log.eventInfo
- adversary.hostname
- adversary.host
Loading