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.
- Stage 1 — NetScaler confirmation + gzip MTIME. GET
https://<target>/vpn/js/rdx/core/lang/rdx_en.json.gzfirst: a valid gzip language file (magic0x1f 0x8b, deflate, name flag, and therdx_en.jsonbody 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.xmlthen/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.xml66.8%,/logon/LogonPoint/tmindex.html65.3%,rdx_en.json.gz24.1%). Markers: the appliance's mangledConnection/Content-Lengthheaders, anNSC_session cookie, anNS-CACHEViaheader, 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. - 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) orLast-Modifiedtimestamp 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. - Stage 3 — SAML detection (SP and IdP): the module probes for both SAML
roles and aggregates them into
saml_role. - 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: aSAMLRequestin a redirectLocationor an auto-POST form, a reference to the/cgi/samlauthACS, a logon-pageauth_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.dodid 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. - IdP (identity provider): the IdP SSO endpoint
/saml/loginis 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 a404("Object Not Found") means the IdP endpoint is absent. The body markers are NetScaler-specific, so a non-NetScaler/saml/loginpage (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/loginSSO 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, andsaml_roleoutput fields (sp/sp_only/idp/both/none/unknown);saml_enablednow reflects SP or IdP. This mirrors the role model in the Ring-of-Fire CVE-2026-107406 reference scanner - A
/saml/login404 is treated as "IdP endpoint absent", enabling the confidentsp_onlyandnoneroles
v1.2.0 (2026-10-15)¶
- NetScaler confirmation now spans the three highest-coverage paths (gzip language file, then
/vpn/pluginlist.xmland/logon/LogonPoint/tmindex.htmlvia markers), so appliances that no longer serverdx_en.json.gzare still identified instead of dropped;rdx_en_stamp/rdx_en_dtare 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-Modifiedon 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_enabledoutput 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-checkknown-timestamps dataset (252 build timestamps + 35 ETags); the source of truth is nowinternal/versions/files/known_timestamps.json
v1.1.0 (2026-10-09)¶
- The shared HTTP client in
pkg/scannernow 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