Credential Harvesting Campaign Targets Unpatched NetScaler Instances

A credential harvesting campaign is targeting Citrix NetScaler gateways that have not been patched against a recent vulnerability, IBM reports.

Tracked as CVE-2023-3519 (CVSS score of 9.8), the vulnerability was disclosed in July, but had been exploited since June 2023, with some of the attacks targeting critical infrastructure organizations.

By mid-August, threat actors exploited this vulnerability as part of an automated campaign, backdooring roughly 2,000 NetScaler instances. According to the Shadowserver Foundation, at least 1,350 NetScaler instances compromised in previous attacks were appearing in scans last week.

In September, IBM observed a new malicious campaign targeting unpatched NetScaler devices to inject a script on the authentication page and steal user credentials.

As part of the observed attacks, a threat actor is exploiting CVE-2023-3519 to inject a PHP web shell, which then allows them to append custom HTML code to the legitimate ‘index.html’ file, to load a JavaScript file hosted on the attacker’s infrastructure on the VPN authentication page.

The JavaScript fetches and runs additional code to attach a custom function on the ‘Log_On’ element, meant to collect the username and password supplied by the user and send it to a remote server.

As part of the campaign, the threat actor created numerous domains and registered them in August, abusing Cloudflare to hide their hosting location.

Advertisement. Scroll to continue reading.

IBM says that it has identified “at least 600 unique victim IP addresses hosting modified NetScaler Gateway login pages,” most of them located in the US and Europe. According to Shadowserver’s scans, there are at least 285 NetScaler instances compromised in this campaign.

The first infections likely occurred on August 11, though the campaign “could have begun closer to when the domains were registered”, on August 4, IBM says.

The JavaScript files observed in these attacks are almost identical, with the command-and-control (C&C) being the only difference between them. The collected credentials have been sent to the same URL.

IBM has retrieved some of the web shells and modified versions of the ‘index.html’ file and is providing information on the indicators of compromise (IoCs) that organizations should look for when hunting for potential targeting of their NetScaler instances.

According to IBM, organizations should consider not only patching their NetScaler gateways, but also changing all their certificates and passwords as part of their remediation efforts.

Related: Exploitation of Citrix ShareFile Vulnerability Spikes as CISA Issues Warning

Related: Over 20,000 Citrix Appliances Vulnerable to New Exploit

Related: Exploitation of Recent Citrix ShareFile RCE Vulnerability Begins