Skip to content

Scanning Engine v2 - Module - NetScaler

Overview

Citrix NetScaler (https://en.wikipedia.org/wiki/Citrix_NetScaler) is a web application delivery controller that provides load balancing, SSL acceleration, application security, and other application delivery services. It is widely used in enterprise environments for managing web application traffic and ensuring high availability.

This module identifies a NetScaler device, determines its software version, and reports its SAML authentication configuration — both the service-provider (SP) and identity-provider (IdP) roles.

Version detection starts from the /vpn/js/rdx/core/lang/rdx_en.json.gz file, extracting the build timestamp from the gzip header metadata (based on research from the Fox-IT Security Research Team). When that timestamp does not resolve to a known build, the module falls back to the Last-Modified and ETag headers of a set of login/portal pages. SAML detection then checks the portal and nFactor auth-schema endpoints for SP-initiated SAML indicators.

Targeting

This module targets TCP ports by IP address or hostname, typically port 443 for HTTPS connections.

Schemas

The schema for the body object of all results generated with .task.module_name equal to netscaler can be found here. The schema for results is available both in standalone and bundled form.

Examples

These are examples of the .body object for results with .task.module_name equal to netscaler.

Live Host

This example was generated with a live NetScaler device on the internet.

{
  "rdx_en_stamp": 1749588747,
  "rdx_en_dt": "2025-06-10T20:52:27Z",
  "version": "13.1-58.32",
  "saml_enabled": false,
  "saml_sp": false,
  "saml_idp": false,
  "saml_role": "unknown"
}

Technical Details

How it works

The scan runs in three stages. Stage 1 confirms the host is a NetScaler (across the three highest-coverage paths) and is the primary version probe; if none of those paths identify a NetScaler the scan stops there.

  1. Stage 1 — NetScaler confirmation + gzip MTIME. GET https://<target>/vpn/js/rdx/core/lang/rdx_en.json.gz first: a valid gzip language file (magic 0x1f 0x8b, deflate, name flag, and the rdx_en.json body marker) confirms NetScaler, and its build timestamp (bytes 4-7, little-endian Unix time) is looked up in the embedded table. Because many live appliances no longer serve that file, confirmation does not depend on it alone: if it is absent, the next two coverage leaders — /vpn/pluginlist.xml then /logon/LogonPoint/tmindex.html — are checked for a NetScaler marker, and confirmation stops at the first path that matches. Together these are the three highest-coverage paths from the fleet scan (/vpn/pluginlist.xml 66.8%, /logon/LogonPoint/tmindex.html 65.3%, rdx_en.json.gz 24.1%). Markers: the appliance's mangled Connection / Content-Length headers, an NSC_ session cookie, an NS-CACHE Via header, or a NetScaler-specific body token (/vpn/js/rdx/, rdx_en.json, _ctxstxt_Netscaler*, gateway_login_form, <pluginlist>). A host confirmed this way is still versioned in stage 2; only a host that responds on none of these as a NetScaler (or cannot be reached at all) aborts.
  2. Stage 2 — fallback version paths: only if stage 1 did not resolve a known version. The module requests a series of login/portal pages, in descending order of real-world hit rate, and matches each response's ETag (preferred) or Last-Modified timestamp against the embedded table. It stops at the first exact match. The paths, in order, are: /vpn/pluginlist.xml, /logon/LogonPoint/tmindex.html, /logon/LogonPoint/index.html, /vpn/index.html, /logon/LogonPoint_workspace/tmindex.html, /epa/epa.html, /vpn/tmindex.html, /logon/LogonPoint_workspace/index.html.
  3. Stage 3 — SAML detection (SP and IdP): the module probes for both SAML roles and aggregates them into saml_role.
  4. SP (service provider): the portal pages and the nFactor auth-schema endpoint are probed for SP-initiated SAML — paths /, /vpn/index.html, /logon/LogonPoint/tmindex.html, /logon/LogonPoint/index.html, /nf/auth/getAuthenticationRequirements.do, /cgi/login. Indicators: a SAMLRequest in a redirect Location or an auto-POST form, a reference to the /cgi/samlauth ACS, a logon-page auth_type: 'SAML' config, and an nFactor <AuthenticateResponse> declaring a SAML (doSaml) factor. If no SP indicator has been found yet and the GET to /nf/auth/getAuthenticationRequirements.do did not return 200, the module retries that endpoint once with a credential-less empty POST (some builds answer the schema only to a POST); the POST never follows redirects and never sends a login value.
  5. IdP (identity provider): the IdP SSO endpoint /saml/login is probed — a NetScaler SAML-handler response there (e.g. "Matching policy not found while trying to process Assertion", "Malformed Assertion sent to Netscaler") confirms an IdP, while a 404 ("Object Not Found") means the IdP endpoint is absent. The body markers are NetScaler-specific, so a non-NetScaler /saml/login page (e.g. a FortiGate SAML SSO page) does not match.

A page already fetched in an earlier stage is reused rather than re-requested. This mirrors the SAML reference scanner used by the Ring-of-Fire CVE-2026-88779 / CVE-2026-107406 triage.

The reported version is the first exact match from stage 1 or stage 2 ("unknown" if none). rdx_en_stamp / rdx_en_dt reflect the gzip language file and are omitted when it is not served (a host confirmed via markers only). saml_enabled is true when any SAML indicator (SP or IdP) is observed. saml_sp / saml_idp report the individual roles, and saml_role is the aggregate: - sp — SP detected, IdP presence unconfirmed; - sp_only — SP detected and the IdP SSO endpoint confirmed absent (/saml/login 404); - idp — IdP detected; - both — SP and IdP both detected; - none — SAML confirmed absent (a non-SAML nFactor schema was retrieved, the IdP endpoint is absent, and no SP indicator was seen); - unknown — could not be determined.

Redirect handling

Login-page probes follow up to four same-host redirects to reach the real logon page. A redirect to a different host/scheme/port, or any Location carrying a SAMLRequest, is captured but never followed — so an external SAML IdP is never contacted and a version is never attributed across hosts.

Gzip Header Analysis

The module analyzes the gzip file header structure: - Bytes 0-1: Magic number 0x1f 0x8b - Byte 2: Compression method 0x08 = deflate - Byte 3: Flags — the FNAME bit (0x08) must be set (the original filename is stored in the header) - Bytes 4-7: Timestamp little endian Unix timestamp

References

Changelog

v1.3.0 (2026-10-15)

  • Added SAML IdP detection via the /saml/login SSO endpoint (NetScaler SAML-handler response), with a NetScaler-specific body-marker guard so a non-NetScaler /saml/login (e.g. FortiGate) is not a false positive
  • Added saml_sp, saml_idp, and saml_role output fields (sp / sp_only / idp / both / none / unknown); saml_enabled now reflects SP or IdP. This mirrors the role model in the Ring-of-Fire CVE-2026-107406 reference scanner
  • A /saml/login 404 is treated as "IdP endpoint absent", enabling the confident sp_only and none roles

v1.2.0 (2026-10-15)

  • NetScaler confirmation now spans the three highest-coverage paths (gzip language file, then /vpn/pluginlist.xml and /logon/LogonPoint/tmindex.html via markers), so appliances that no longer serve rdx_en.json.gz are still identified instead of dropped; rdx_en_stamp/rdx_en_dt are omitted when the gzip file is absent, and unreachable hosts surface as a transport error rather than a "not a NetScaler" verdict
  • Added fallback version detection via ETag / Last-Modified on login and portal paths when the gzip MTIME does not resolve a known build
  • Added SAML SP authentication detection (portal pages + nFactor auth schema, with a credential-less POST fallback) and a new saml_enabled output field
  • Same-host-only redirect following for all probes, including the gzip probe (external IdPs are never contacted); every probe body is read with a 256 KiB bound
  • Refreshed the embedded version database from the citrix-netscaler-version-check known-timestamps dataset (252 build timestamps + 35 ETags); the source of truth is now internal/versions/files/known_timestamps.json

v1.1.0 (2026-10-09)

  • The shared HTTP client in pkg/scanner now closes response bodies without reading them to EOF. Keep-alives are already disabled, so draining unread bytes could block the worker until the shard was killed when a target streamed or trickled a response. The NetScaler-specific drain opt-out is removed.

v1.0.0 (2025-07-23)

  • Initial release of the NetScaler module
  • Implements gzip timestamp-based version fingerprinting
  • Embedded database with 160+ NetScaler versions
  • TLS support with automatic certificate verification bypass