Detecting the vCenter vmdir bypass: 5 Sigma rules for network, VAMI, appliances and ESXi

Detecting the vCenter vmdir bypass: 5 Sigma rules for network, VAMI, appliances and ESXi

One of the vCenter servers ARMORY CASTLE broke into had already been patched for July’s vmdir bug. Patch status told that victim nothing about whether they’d been compromised, and the same goes for anyone patching CVE-2026-123890 this week. The patch closes the bug. It doesn’t tell you whether someone already walked off with your SSO signing key, so you have to go and look.

The story of the bug, the BeyondTrust foothold and the golden SAML endgame is in my analysis of the vCenter vmdir bypass. This post is the detection side: five Sigma rules built on what Google Threat Intelligence Group (GTIG) and Mandiant published on November 20, 2026, the telemetry each one needs, the false positives I expect, a safe lab test for each, and the parts of the attack that none of them can see.

At a glance

  • Rules: 5 (four high, one medium)
  • Domains: Network (firewall), Web/App (VAMI access log), Linux (appliance process creation, ESXi shell logs)
  • Log sources: east-west firewall or flow logs, /var/log/vmware/vami/vami-httpd.log, process creation with command line on Linux appliances, ESXi shell logging forwarded over syslog
  • ATT&CK: T1210 Exploitation of Remote Services, T1021.004 SSH, T1548.001 Setuid and Setgid, T1606.002 SAML Tokens, T1003.003 NTDS, T1006 Direct Volume Access
  • Status: all test. Each condition rests on a behaviour, path or command GTIG reported from real intrusions. Where I widened a match beyond what GTIG showed, I say so in that rule’s section.
  • YAML: Detection Rules repo on GitHub

The case in brief

According to GTIG, the attackers came in through the BeyondTrust Remote Support zero-day (CVE-2026-102764) and scanned internally for ports including 443, 2012, 389, 5480 and 9080. They planted webshells on an internal Linux appliance and got root by having gdb make a privileged process run chmod u+s /bin/env, a trick GTIG also saw on the Remote Support appliance. BONESAW (/tmp/123) then exploited CVE-2026-123890 over vmdir’s DCE/RPC interface on TCP 2012 and got an administrator@vsphere.local session. It then streamed a copy of the vmdir database back over the same channel and pulled the STS signing key out of it. SAWSNAKE (/tmp/sss) used the key to forge SAML logins. The attackers then turned SSH on through the VAMI API, took the master crypto key and PostgreSQL credentials, and turned SSH off again. On ESXi they used vmfs_browser.py to copy NTDS, SYSTEM and SECURITY out of domain controller disks. BEARBONES (/tmp/dbr) and LAZYBONES (/usr/bin/vmtoolscs) kept them in.

The traces end up in four places: the network path to vCenter, the VAMI access log, process telemetry on the Linux appliances, and ESXi shell logs. The one thing that leaves almost no trace is the step that matters most. The vmdir database never gets read from disk on vCenter, because BONESAW gets it through the exploit itself. A forged SAML login looks like a normal one. The analysis covers why that makes key rotation part of the fix.

Detection map

Detection map: firewall logs, the VAMI access log, appliance process creation and ESXi shell logs feed five Sigma rules (TCP 2012 from non-allowlisted hosts, VAMI SSH API call, gdb with a /tmp command file, reported tool paths, vmfs_browser.py and NTDS extraction) mapped to T1210, T1606.002, T1021.004, T1548.001, T1003.003 and T1006, with forged SAML logins marked as a gap.
Which telemetry feeds which rule, and the one step none of them can see: logins with a stolen STS key.

Read the map left to right. Firewall logs feed the rule I trust most, the connection to 2012. The VAMI log feeds the SSH switch rule. Process creation on the Linux appliances feeds two rules: the gdb privilege escalation and the reported tool paths. ESXi shell logs feed the NTDS extraction rule. The dashed box is the gap: once the key is gone, the forged logins don’t trip any of these.

Rule overview

RuleDomainLog sourceATT&CK (tactic / technique)LevelStatus
vmdir port 2012 reached from a non-allowlisted hostNetworkfirewallLateral Movement / T1210HighTest
VAMI API call to enable or disable appliance SSHWeb/AppwebserverLateral Movement / T1021.004MediumTest
gdb attached to a process with a command file from /tmpLinuxlinux / process_creationPrivilege Escalation / T1548.001HighTest
ARMORY CASTLE tooling run from reported pathsLinuxlinux / process_creationLateral Movement / T1210, Credential Access / T1606.002HighTest
ESXi vmfs_browser.py or NTDS pulled from a guest VMDKLinux (ESXi)syslogCredential Access / T1003.003, Defense Evasion / T1006HighTest

The rules

vmdir DCE/RPC port 2012 reached from a non-allowlisted host

Context: CVE-2026-123890 lives in vmdir’s DCE/RPC interface on TCP 2012, in the rpc_srp_verifier service. In the intrusion GTIG describes, the exploit came from a compromised Linux appliance. A server like that has no reason to talk to vmdir. GTIG’s hardening advice is an iptables DROP on 2012 for non-allowlisted IPs. Their table labels that row “TCP 2010”, but the text describes 2012, so I treat it as a typo. This rule alerts on what that firewall rule would block.

Condition: alert when the destination is one of your vCenter appliances on TCP 2012 and the source isn’t on the allowlist of other vCenters and admin hosts. Both lists are Sigma placeholders (%vcenter_appliance_ips%, %vcenter_tcp2012_allowlist%) that you fill in at conversion time.

ATT&CK: Lateral Movement (TA0008) – T1210 Exploitation of Remote Services. I don’t map this to T1190: the vCenter in this case wasn’t reached from the internet but from inside, after the BeyondTrust foothold.

title: vCenter vmdir DCE/RPC Port 2012 Reached From Non-Allowlisted Host - Potential CVE-2026-123890
id: 1720f90c-85e3-4124-9f7d-8cec3b59a6c2
status: test
description: |
    Detects connections to the vCenter VMware Directory Service DCE/RPC port (TCP 2012) from hosts
    that are not other vCenters or approved admin hosts. ARMORY CASTLE exploited CVE-2026-123890 over
    this port from a compromised Linux appliance to get an administrator@vsphere.local session.
references:
    - https://cloud.google.com/blog/topics/threat-intelligence/armory-castle-exploits-vsphere
    - https://support.broadcom.com/web/ecx/support-content-notification/-/external/content/SecurityAdvisories/0/39495
    - https://github.com/mandiant/vcsa-hardening-tool
    - https://netsec101.com/?p=356
author: netsec101.com
date: 2026-11-20
tags:
    - attack.lateral-movement
    - attack.t1210
    - cve.2026-123890
    - detection.emerging-threats
logsource:
    category: firewall
detection:
    selection_vcenter:
        dst_ip|expand: '%vcenter_appliance_ips%'
        dst_port: 2012
    filter_main_allowlist:
        src_ip|expand: '%vcenter_tcp2012_allowlist%'
    condition: selection_vcenter and not 1 of filter_main_*
falsepositives:
    - Legitimate vCenter or PSC peers in your environment that are missing from the allowlist (verify before adding)
    - Backup, monitoring or vulnerability scanners that probe all ports on the appliance
level: high

View on GitHub

False positives and tuning: legitimate vCenter or PSC peers in your environment may need 2012. Check which ones actually do in your flow data and put only those on the allowlist. Vulnerability scanners that sweep all ports will fire it; I’d rather list them by IP than drop the rule. Your logs also have to cover east-west traffic. A perimeter firewall won’t see an appliance and a vCenter talking on the same VLAN, so you’ll need host firewall logging on the vCenter, a distributed firewall or flow export from the switch. (Mandiant’s hardening tool applies default-deny rules and shell command syslog. It isn’t a source of 2012 connection logs.)

How to test: from a lab host that isn’t on the allowlist, run nc -vz <vcenter> 2012. A plain TCP connect, no payload, is enough to produce the log line.

VAMI API call to enable or disable appliance SSH

Context: with admin access in hand, the attackers turned SSH on through the appliance management API on TCP 5480 (PUT /rest/appliance/access/ssh), took the vCenter master crypto key and the PostgreSQL credentials, and turned SSH off again with the same call. GTIG lists a Google SecOps rule for this called “VMware vCenter VAMI API SSH Enablement”. Google’s vSphere defender guide points to vami-httpd.log as the place it shows up. I wrote this version independently, since the SecOps rule’s logic isn’t public.

Condition: alert on any PUT whose URI ends in /rest/appliance/access/ssh. As far as I know, the request body (true or false) isn’t written to the access log (that’s general knowledge, not from the case sources), so the rule fires for both enable and disable. In this case that’s useful: GTIG describes SSH being switched on and later off again, so two hits from the same source is the pattern to look for.

ATT&CK: Lateral Movement (TA0008) – T1021.004 Remote Services: SSH. The API call opens the SSH path the attackers use next.

title: vCenter VAMI API Call to Enable or Disable Appliance SSH
id: d31199fa-ba57-40a1-a399-160d74fd4373
status: test
description: |
    Detects a PUT to the vCenter appliance management (VAMI) SSH access endpoint on TCP 5480.
    ARMORY CASTLE used this call to turn SSH on, took the master crypto key and PostgreSQL credentials,
    then used the same call to turn SSH off again.
references:
    - https://cloud.google.com/blog/topics/threat-intelligence/armory-castle-exploits-vsphere
    - https://cloud.google.com/blog/topics/threat-intelligence/vsphere-brickstorm-defender-guide/
    - https://netsec101.com/?p=356
author: netsec101.com
date: 2026-11-20
tags:
    - attack.lateral-movement
    - attack.t1021.004
    - cve.2026-123890
    - detection.emerging-threats
logsource:
    category: webserver
detection:
    selection:
        cs-method: 'PUT'
        cs-uri-stem|endswith: '/rest/appliance/access/ssh'
    condition: selection
falsepositives:
    - Administrators enabling SSH for a support case or an upgrade, through the VAMI page or the API
    - Automation tools such as the Ansible vmware_rest appliance_access_ssh module that set the SSH state
level: medium

View on GitHub

False positives and tuning: admins do turn SSH on for support cases and upgrades, and automation tools such as the Ansible vmware_rest module set the same state. That’s why it’s medium. Route it to whoever owns vCenter with a “was this you?” question, and raise it to high when the source IP isn’t an admin workstation or the call happens outside a change window. You’ll need to parse vami-httpd.log into cs-method and cs-uri-stem. In my experience it isn’t forwarded off the appliance unless you set that up (general knowledge, not from the sources).

How to test: in a lab VCSA, send the documented API call to set the SSH state (for example with the Ansible vmware_rest SSH module), first on and then off, and check that vami-httpd.log records a PUT to /rest/appliance/access/ssh each time. If you toggle SSH in the VAMI page instead, first confirm that your log records that same URI. I haven’t verified that the web page uses it.

gdb attached to a running process with a command file from /tmp

Context: on an internal Linux appliance, and also on the BeyondTrust Remote Support appliance, GTIG saw the attackers decode a small base64 blob into /tmp/gdb_file and run gdb -pid <pid> --command=/tmp/gdb_file. The file told the attached privileged process to run chmod u+s /bin/env, which leaves a SUID binary that hands out root. It’s a neat trick, and you’d almost never see it on an appliance for a legitimate reason.

Condition: alert when gdb runs with a PID attach flag and reads its commands from a file in /tmp. GTIG showed -pid with --command=/tmp/. I added the equivalent spellings --pid, -p, --command /tmp/ and -x /tmp/ myself, because changing the flag costs an attacker nothing.

ATT&CK: Privilege Escalation (TA0004) – T1548.001 Setuid and Setgid.

title: GDB Attached to a Running Process With a Command File From /tmp
id: 5810f867-7433-4016-9c66-fcbc8877ad77
status: test
description: |
    Detects gdb attaching to a running process while reading its commands from a file in /tmp.
    ARMORY CASTLE used this on a Linux appliance and on a BeyondTrust Remote Support appliance to make a
    privileged process run chmod u+s /bin/env, giving themselves a SUID root shell helper.
references:
    - https://cloud.google.com/blog/topics/threat-intelligence/armory-castle-exploits-vsphere
    - https://netsec101.com/?p=356
author: netsec101.com
date: 2026-11-20
tags:
    - attack.privilege-escalation
    - attack.t1548.001
    - detection.emerging-threats
logsource:
    product: linux
    category: process_creation
detection:
    selection_img:
        Image|endswith: '/gdb'
    selection_attach:
        CommandLine|contains:
            - ' -pid '
            - ' --pid'
            - ' -p '
    selection_cmdfile:
        CommandLine|contains:
            - '--command=/tmp/'
            - '--command /tmp/'
            - ' -x /tmp/'
    condition: all of selection_*
falsepositives:
    - Developers or support engineers debugging a live process with a scripted gdb session stored in /tmp (rare on appliances)
level: high

View on GitHub

False positives and tuning: developer boxes where people script gdb sessions. Scope the rule to appliances and servers, not build hosts. The rule needs process creation with full command lines (Sysmon for Linux, an EDR, or auditd execve exported to Sigma field names). Plenty of vendor appliances don’t let you install any of those, and that’s the uncomfortable part of this case. As a backstop, check by hand that ls -l /bin/env /usr/bin/env shows no s bit.

How to test: on a lab Linux host, start sleep 600 &, write info proc to /tmp/t.gdb and run gdb -batch -pid $! --command=/tmp/t.gdb. Nothing gets modified.

ARMORY CASTLE tooling run from reported paths

Context: GTIG published the paths the tools ran from: BONESAW at /tmp/123, SAWSNAKE at /tmp/sss, BEARBONES at /tmp/dbr, LAZYBONES at /usr/bin/vmtoolscs, plus an SSH private key at /tmp/123.key used for outbound SSH to ESXi. No hashes are in the public post (they sit in a GTI collection), so this is a path rule. Paths are cheap to change.

Condition: alert when any of those four paths is executed, or when ssh runs with /tmp/123.key on its command line.

ATT&CK: Lateral Movement (TA0008) – T1210 Exploitation of Remote Services (BONESAW); Credential Access (TA0006) – T1606.002 SAML Tokens (SAWSNAKE).

title: ARMORY CASTLE vSphere Tooling Executed From Reported Paths
id: d2c61575-a1f5-4cac-9aa8-0694918a6dad
status: test
description: |
    Detects execution of the file paths GTIG reported for ARMORY CASTLE tools in the CVE-2026-123890
    intrusions (BONESAW, SAWSNAKE, BEARBONES, LAZYBONES) and SSH using the reported /tmp/123.key.
    Paths are easy to change, so treat a miss as meaningless and a hit as an incident.
references:
    - https://cloud.google.com/blog/topics/threat-intelligence/armory-castle-exploits-vsphere
    - https://netsec101.com/?p=356
author: netsec101.com
date: 2026-11-20
tags:
    - attack.lateral-movement
    - attack.t1210
    - attack.credential-access
    - attack.t1606.002
    - cve.2026-123890
    - detection.emerging-threats
logsource:
    product: linux
    category: process_creation
detection:
    selection_tool_image:
        Image:
            - '/tmp/123'
            - '/tmp/sss'
            - '/tmp/dbr'
            - '/usr/bin/vmtoolscs'
    selection_ssh_key:
        Image|endswith: '/ssh'
        CommandLine|contains: '/tmp/123.key'
    condition: 1 of selection_*
falsepositives:
    - Unrelated scratch files with the same short names in /tmp (check the hash and the parent process before escalating)
level: high

View on GitHub

False positives and tuning: /tmp/123 is the kind of name someone might use for a scratch file, so check the parent process and the hash before you escalate. Otherwise I’d page on a hit. Treat this as a retro-hunt as much as a live rule: run it over all the process history you have, starting no later than July 2026 (GTIG says BONESAW’s build metadata reads July 13, 2026, and the group knew about the bug before July 29). If you have YARA on these hosts, GTIG’s G_Hunting_* rules catch the binaries wherever they’re stored, which this rule can’t.

How to test: on a lab host, cp /bin/true /tmp/sss && /tmp/sss, then delete the file.

ESXi vmfs_browser.py or NTDS pulled from a guest VMDK

Context: on ESXi the attackers unpacked vmfs-pydist.tar.gz into a hidden .a folder on a datastore and ran vmfs_browser.py against the raw disk device. It pulled Windows/NTDS and System32/config/SYSTEM straight out of a domain controller’s -flat.vmdk. My inference: because the copy is made from the hypervisor side, the domain controller itself probably logs nothing about it, so AD-side monitoring is unlikely to catch it. GTIG notes that the Mandiant hardening tool forwards vmfs_browser.py executions to a SIEM, so the command line is the place to catch it.

Condition: alert when an ESXi shell log line mentions vmfs_browser.py or vmfs-pydist.tar.gz, or when one line names both a -flat.vmdk and /Windows/NTDS. That last part is my generalisation, so a renamed script still trips it.

ATT&CK: Credential Access (TA0006) – T1003.003 NTDS; Defense Evasion (TA0005) – T1006 Direct Volume Access.

title: ESXi Shell Use of vmfs_browser.py or Extraction of NTDS From a Guest VMDK
id: a2fd1409-99a8-4c3c-8c71-3a6449afc584
status: test
description: |
    Detects ESXi shell command logging (shell.log forwarded over syslog) that shows the vmfs_browser.py
    tool, or a command that names both a flat VMDK and the Windows NTDS folder. ARMORY CASTLE used
    vmfs_browser.py on ESXi to copy NTDS, SYSTEM and SECURITY out of domain controller disks.
references:
    - https://cloud.google.com/blog/topics/threat-intelligence/armory-castle-exploits-vsphere
    - https://cloud.google.com/blog/topics/threat-intelligence/vsphere-brickstorm-defender-guide/
    - https://netsec101.com/?p=356
author: netsec101.com
date: 2026-11-20
tags:
    - attack.credential-access
    - attack.t1003.003
    - attack.defense-evasion
    - attack.t1006
    - detection.emerging-threats
logsource:
    service: syslog
detection:
    keywords_tool:
        - 'vmfs_browser.py'
        - 'vmfs-pydist.tar.gz'
    keywords_vmdk:
        - '-flat.vmdk'
    keywords_ntds:
        - '/Windows/NTDS'
    condition: keywords_tool or (keywords_vmdk and keywords_ntds)
falsepositives:
    - Forensic or recovery work on ESXi by your own staff using the same open-source tool
level: high

View on GitHub

False positives and tuning: your own forensics or recovery staff using the same tool. Sigma has no ESXi product, so this is a keyword rule over syslog. Scope it in your SIEM to the ESXi hosts’ syslog source, and make sure ESXi actually forwards its shell log (not on by default). I filed it under Linux in the repo because the shell log is POSIX-style. That’s a filing compromise, not a claim that ESXi is Linux.

How to test: on a lab ESXi host with syslog forwarding on, open the shell and run echo vmfs_browser.py. The command line is all the rule matches on.

Coverage and gaps

Step in the caseTacticTechniqueRuleCovered?
BeyondTrust Remote Support zero-dayInitial AccessT1190–No (out of scope)
Internal scan of 9080, 5480, 2012DiscoveryT1046–No
Webshells on Linux appliancePersistenceT1505.003–No (names only)
gdb sets SUID on /bin/envPrivilege EscalationT1548.001gdb command file ruleYes
vmdir exploit on TCP 2012Lateral MovementT1210Port 2012 rule, tool paths ruleYes, if source is outside the allowlist
STS key taken from data.mdbCredential AccessT1552.004–No (copied over the exploit)
Golden SAML loginsCredential AccessT1606.002Tool paths rulePartial (tool run, not the logins)
New SSO admin and machine accountPersistenceT1136–No (hunt)
SSH enabled via VAMILateral MovementT1021.004VAMI SSH ruleYes
Root SSH key on ESXiPersistenceT1098.004–No (hunt)
NTDS from guest VMDKCredential AccessT1003.003, T1006ESXi vmfs_browser ruleYes, if ESXi logs are forwarded
BEARBONES, LAZYBONESPersistence, C2T1543.002, T1071.001Tool paths rulePartial

The big hole is identity. Once the STS key is gone, the attacker’s logins are valid as far as vCenter can tell. To narrow it, hunt in the SSO audit_events.log (com.vmware.sso.PrincipalManagement, per Google’s defender guide) for principals and admin group changes nobody asked for. GTIG’s example was a local admin named sps-<something>@vsphere.local. I didn’t write a Sigma rule for it because I haven’t seen the field layout of that log documented publicly. On the network side, a Zeek or Suricata rule for SSH banners starting SSH-2.0-pulsesecure_ on odd ports (BEARBONES used TCP 53 and 33992) is a better fit than Sigma. GTIG also published the two DCE/RPC interface UUIDs on 2012, which could drive a Zeek dce_rpc rule. I haven’t verified that Zeek parses vmdir binds, so I’ve left that out.

For the retro-hunt, GTIG lists 11 IPs as suspected obfuscation network nodes: 103.147.251.5, 103.190.38.3, 118.174.128.34, 118.174.128.36, 118.174.128.38, 176.9.89.66, 185.71.15.109, 220.121.128.41, 222.108.77.44, 61.216.56.127 and 81.45.89.43. I kept them out of the rules on purpose. Relays get reused and recycled, so treat a hit as a lead to investigate, not proof.

Deploying the rules

Pull the YAML from the repo and convert it with sigma-cli for your backend. The firewall rule uses |expand placeholders, so either add a value-placeholder step to your pipeline or replace them with real lists before converting. The Linux rules need a pipeline that maps Image and CommandLine to whatever your Linux telemetry uses. The webserver and syslog rules need your VAMI and ESXi parsers to produce the field names the rules expect. For example:

sigma convert -t splunk --without-pipeline proc_creation_lnx_gdb_attach_with_tmp_command_file.yml
sigma convert -t splunk --without-pipeline proc_creation_lnx_armory_castle_vsphere_tool_paths.yml
sigma convert -t splunk --without-pipeline web_vcenter_vami_ssh_enablement_api_call.yml

Run them in alert-only mode for a week before they page anyone. Do the retro-hunt first, though. These rules are worth more pointed at July-to-November history than at tomorrow’s traffic. For other backends, use the pySigma pipeline that matches your Linux and web field names, and check the converted query by hand.

My take

For an intrusion this serious, it’s surprisingly detectable, but only for teams that already log their management plane. Every rule here depends on telemetry most vSphere shops don’t collect: east-west flows to vCenter, the VAMI access log, process data from vendor appliances, ESXi shell logs. If you have none of that, your realistic options are to patch, rotate the STS key on suspicion and hunt by hand.

The port 2012 rule is the one I’d turn on first. It’s cheap, it’s built on GTIG’s own advice, and on a properly segmented network it should almost never fire. If it fires a lot, that tells you something about your segmentation as well. The VAMI SSH rule comes second, because a “did you just enable SSH?” message to the vCenter owner costs nothing.

I’d like Broadcom to log SRP authentications on vmdir and STS key reads by default, and to forward them without anyone touching iptables or a third-party script. Right now the best visibility into vCenter’s own identity store comes from a Mandiant hardening tool on GitHub. To me, that’s a gap in the product, not in your SOC.

Sources

One thought on “Detecting the vCenter vmdir bypass: 5 Sigma rules for network, VAMI, appliances and ESXi”

Leave a Reply