Hackers are conducting a large-scale campaign to exploit a critical zero-day flaw, CVE-2023-3519, in Citrix NetScaler Gateways to steal user credentials. The flaw, discovered in July, affects Citrix NetScaler ADC and NetScaler Gateway and has led to backdooring at least 2,000 Citrix servers by mid-August. Despite multiple warnings to update Citrix devices, hackers began exploiting the flaw in September by injecting JavaScript that harvests login credentials.
IBM’s X-Force discovered this credential-stealing campaign while investigating slow authentications on a client’s NetScaler device. The attackers breach systems using CVE-2023-3519, inject malicious JavaScript, and exfiltrate collected credentials via an HTTP POST request. Over 600 unique IP addresses of victims have been identified worldwide, with most in the United States and Europe. The campaign has been ongoing for two months, and a new detection artifact in NetScaler application crash logs could aid defenders in early detection and response.
The attack involves injecting a credential-stealing JavaScript script into the Citrix NetScaler device’s index.html login page, exploiting vulnerable NetScaler devices to write a PHP web shell and gain real-time access. The web shell is used to gather configuration data from the “ns.conf” file.
Attackers then append custom HTML code to the “index.html” file, referencing a remote JavaScript file for additional code execution. This last JavaScript snippet is designed to collect credentials by attaching a custom function to the “Log On” button on the VPN authentication page. The stolen credentials are ultimately exfiltrated to the attackers.
The threat actor behind this campaign registered several domains for their operation, including jscloud[.]ink, jscloud[.]live, jscloud[.]biz, jscdn[.]biz, and cloudjs[.]live. The campaign has affected almost 600 unique IP addresses of NetScaler devices whose login pages were modified for credential theft.
While the campaign’s duration spans two months, it remains unattributed to any known threat group or cluster. IBM’s analysts discovered a new artifact in the NetScaler application crash logs, which could aid in early detection. System administrators are strongly advised to follow remediation and detection guidance provided by CISA to protect their Citrix devices and networks.