NetScaler Superuser Binding Followed by Authentication Control Removal

edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

NetScaler Superuser Binding Followed by Authentication Control Removal

edit

Identifies a successful NetScaler command that binds a system user to the built-in superuser command policy, followed within 15 minutes on the same appliance, from the same user and source address, by a successful command that disables endpoint analysis or unbinds an authentication or VPN session policy. Attackers with command execution on NetScaler ADC or Gateway, including after CVE-2026-88771, have used this sequence to retain a local administrator and remove login controls that would block that account.

Rule type: eql

Rule indices:

  • logs-citrix_adc.log-*

Severity: high

Risk score: 73

Runs every: 10m

Searches indices from: now-30m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

References:

Tags:

  • Domain: Network
  • Domain: Identity
  • Platform: Citrix
  • Use Case: Network Security Monitoring
  • Use Case: Threat Detection
  • Tactic: Persistence
  • Tactic: Defense Evasion
  • Data Source: Citrix ADC
  • Resources: Investigation Guide
  • Rule Type: Event Correlation (EQL)
  • Profile: Beta

Version: 1

Rule authors:

  • Elastic

Rule license: Elastic License v2

Investigation guide

edit

Triage and analysis

Investigating NetScaler Superuser Binding Followed by Authentication Control Removal

NetScaler does not grant administrative rights with add system user alone. The administrative grant is bind system user <name> superuser. This rule requires that successful grant, then a later successful CLI command from the same user and source address on the same appliance that weakens authentication: setting an endpoint-analysis action’s default group to NO_AUTH, or unbinding an authentication vserver policy, authentication policy label, or VPN vserver session policy.

Post-exploitation artifacts observed after CVE-2026-88771 exploitation have created privileged users and weakened EPA or authentication policies. This rule detects that behavior when the changes are applied through the NetScaler CLI.

Possible investigation steps

  • Review both sequence events. Confirm citrix.name is CMD_EXECUTED, then compare process.command_line, citrix_adc.log.status, user.name, source.ip, and citrix_adc.log.adm_user when present. A status of Done or Success means the command was applied. ERROR means the attempt failed.
  • Identify the bound username and whether it was created moments earlier with add system user. Search the same observer.hostname for that username’s later Gateway or AAA logins.
  • Treat set authentication epaAction ... -defaultEPAGroup NO_AUTH, unbind authentication vserver ... -policy, unbind authentication policylabel ... -policyName, or unbind vpn vserver ... -policy as removal of a login control. Record the policy and vserver names from the command so they can be restored.
  • Search back at least 48 hours on the same appliance for Pitboss or packet-engine records that contain shell syntax. CVE-2026-88771 command execution can be delayed up to 24 hours after the poisoned log is written.
  • Review other CMD_EXECUTED events from the same user and source for save ns config, configuration export, and changes to logging or additional system users.
  • Preserve remote syslog, event.original, and a copy of ns.conf before rebooting or applying a clean configuration.
FROM logs-citrix_adc.log-*
| WHERE citrix.name == "CMD_EXECUTED" AND observer.hostname == "<appliance>"
| EVAL command = TO_LOWER(COALESCE(process.command_line, citrix_adc.log.message, citrix.detail))
| WHERE command LIKE "*bind system user*"
    OR command LIKE "*set authentication epaaction*"
    OR command LIKE "*unbind authentication*"
    OR command LIKE "*unbind vpn vserver*"
    OR command LIKE "*add system user*"
    OR command LIKE "*save ns config*"
| KEEP @timestamp, observer.hostname, user.name, source.ip, process.command_line, citrix_adc.log.status, citrix.detail
| SORT @timestamp

False positive analysis

  • A single change window that creates a break-glass superuser and intentionally relaxes endpoint analysis or VPN session policies can match. Confirm the change record, the actor, and the source address.
  • Commands that only add an LDAP, RADIUS, or SAML action, or that bind an authentication policy, do not match. A superuser bind without one of the weakening commands also does not match.
  • Scope any exception to the approved actor, source, and maintenance window. Do not exclude superuser or NO_AUTH globally.

Response and remediation

  • If the change is unauthorized, disable or remove the system user, terminate its sessions, and restore the authentication and VPN policy bindings from a known-good configuration.
  • Treat the appliance as potentially compromised. Preserve off-box logs, then rebuild from a trusted image if command execution is confirmed. Rotate NetScaler, AAA, and Gateway secrets.
  • Upgrade to a Citrix-fixed build when the surrounding activity matches CVE-2026-88771. Patching does not remove an account or policy change that is already saved.

Setup

edit

Setup

This rule requires the Elastic Citrix ADC integration and NetScaler audit syslog that includes CLI CMD_EXECUTED events. Configure an audit syslog action and policy, and forward those records with the other citrix_adc.log events. RFC 5424 syslog is recommended where supported.

The integration stores a successfully parsed CLI command in process.command_line and sets citrix.name to CMD_EXECUTED. observer.hostname is taken from the appliance hostname in the syslog header. Enable Preserve original event so event.original remains available when the command text is only retained there. Local ns.conf edits that never pass through the CLI are not recorded as CMD_EXECUTED and will not match.

Rule query

edit
sequence by observer.hostname, user.name, source.ip with maxspan=15m
  [any where data_stream.dataset == "citrix_adc.log" and
    citrix.name == "CMD_EXECUTED" and
    citrix_adc.log.status in~ ("Success", "Done") and
    (
      process.command_line regex~ """(bind|.*[^a-z0-9_]bind) system user [^ ]+ superuser([ "].*)?""" or
      citrix.detail regex~ """(bind|.*[^a-z0-9_]bind) system user [^ ]+ superuser([ "].*)?""" or
      citrix_adc.log.message regex~ """(bind|.*[^a-z0-9_]bind) system user [^ ]+ superuser([ "].*)?"""
    )]
  [any where data_stream.dataset == "citrix_adc.log" and
    citrix.name == "CMD_EXECUTED" and
    citrix_adc.log.status in~ ("Success", "Done") and
    (
      process.command_line regex~ """(set|.*[^a-z0-9_]set) authentication epaaction .* -defaultepagroup no_auth([ "].*)?""" or
      citrix.detail regex~ """(set|.*[^a-z0-9_]set) authentication epaaction .* -defaultepagroup no_auth([ "].*)?""" or
      citrix_adc.log.message regex~ """(set|.*[^a-z0-9_]set) authentication epaaction .* -defaultepagroup no_auth([ "].*)?""" or
      process.command_line like~ (
        "unbind authentication vserver * -policy *",
        "unbind authentication policylabel * -policyname *",
        "unbind vpn vserver * -policy *"
      ) or
      citrix.detail like~ (
        "*unbind authentication vserver * -policy *",
        "*unbind authentication policylabel * -policyname *",
        "*unbind vpn vserver * -policy *"
      ) or
      citrix_adc.log.message like~ (
        "*unbind authentication vserver * -policy *",
        "*unbind authentication policylabel * -policyname *",
        "*unbind vpn vserver * -policy *"
      )
    )]

Framework: MITRE ATT&CKTM