ZeroHour
Security Affairspublished ()ingested @securityaffairs

China-linked APT Velvet Ant exploited zero

criticalExploit / PoC exploited in the wildimportance 60CVE-2024-20399

Vulnerabilities mentionedAll →

CVEVulnerabilityCVSSEPSSFlagsAffectedExposurePublished
CVE-2024-20399
Authenticated Command Injection in Cisco NX-OS Grants Root Privileges

CVE-2024-20399 is a command injection flaw (CWE-78) in the CLI of Cisco NX-OS Software, caused by insufficient validation of arguments passed to specific configuration CLI commands. An authenticated attacker who already holds Administrator credentials can trigger it by submitting crafted input as the argument of an affected configuration command, gaining the ability to execute arbitrary commands as root on the device's underlying operating system. Because Administrator access is required, the flaw is effectively a privilege-escalation issue following credential compromise, and it grants no additional privilege on Nexus 3000 Series, Nexus 7000 Series running NX-OS 8.1(1) or later, and Nexus 9000 Series in standalone NX-OS mode, which already allow administrative bash-shell access to the OS. Any organization running affected NX-OS on Cisco Nexus switching is in scope, with the practical risk concentrated in environments where admin credentials may have been stolen. Exploitation has been observed in the wild: the China-linked group 'Velvet Ant' (associated with Salt Typhoon) used it as a zero-day to compromise U.S. ISPs and telecom providers, and CISA added it to the Known Exploited Vulnerabilities catalog on 2024-07-02.

Do: Upgrade affected Nexus switches to a fixed NX-OS release per Cisco's security advisory, as required by the CISA KEV listing (apply mitigations per vendor instructions or discontinue use if fixes are unavailable). Restrict and audit Administrator-level CLI access on NX-OS devices, and hunt for suspicious configuration-command activity or unexplained root-level actions, given Velvet Ant/Salt Typhoon targeting of telecom and ISP networks. For Nexus 3000, Nexus 7000 (8.1(1)+), and Nexus 9000 standalone-mode devices the flaw adds no privilege, but patching is still recommended.

6.74% KEV
  • Cisco NX-OS Software (Cisco Nexus switches)
masshundreds of thousands of NX-OS/Nexus devices deployed across enterprise and data-center networks (no authoritative public install count)
Full article858 words · extracted from securityaffairs.com · click to collapse

China-linked APT group Velvet Ant exploited a recently disclosed zero-day in Cisco switches to take over the network appliance.

Researchers at cybersecurity firm Sygnia reported that the China-linked APT group Velvet Ant has exploited the recently disclosed zero-day CVE-2024-20399 in Cisco switches to take over the network devices.

In July 2024, Cisco addressed the NX-OS zero-day CVE-2024-20399 (CVSS score of 6.0) that China-linked group Velvet Ant exploited to deploy previously unknown malware as root on vulnerable switches.

The flaw resides in the CLI of Cisco NX-OS Software, an authenticated, local attacker can exploit the flaw to execute arbitrary commands as root on the underlying operating system of an affected device.

“This vulnerability is due to insufficient validation of arguments that are passed to specific configuration CLI commands. An attacker could exploit this vulnerability by including crafted input as the argument of an affected configuration CLI command.” reads the advisory published by Cisco. “A successful exploit could allow the attacker to execute arbitrary commands on the underlying operating system with the privileges of root.”

The IT giant pointed out that only attackers with Administrator credentials can successfully exploit this vulnerability on a Cisco NX-OS device.

In April 2024, researchers reported to the Cisco Product Security Incident Response Team (PSIRT) that the issue was actively exploited in the wild.

Cybersecurity firm Sygnia observed the attacks on April 2024 and reported them to Cisco.

“Sygnia identified that CVE-2024-20399 was exploited in the wild by a China-nexus threat group as a ‘zero-day’ and shared the details of the vulnerability with Cisco. By exploiting this vulnerability, a threat group – dubbed ‘Velvet Ant’ – successfully executed commands on the underlying operating system of Cisco Nexus devices.” reads the report published by Sygnia. “This exploitation led to the execution of a previously unknown custom malware that allowed the threat group to remotely connect to compromised Cisco Nexus devices, upload additional files, and execute code on the devices.“

The vulnerability impacts the following devices:

  • MDS 9000 Series Multilayer Switches (CSCwj97007)
  • Nexus 3000 Series Switches (CSCwj97009)
  • Nexus 5500 Platform Switches (CSCwj97011)
  • Nexus 5600 Platform Switches (CSCwj97011)
  • Nexus 6000 Series Switches (CSCwj97011)
  • Nexus 7000 Series Switches (CSCwj94682) *
  • Nexus 9000 Series Switches in standalone NX-OS mode (CSCwj97009)

Cisco recommends customers monitor the use of credentials for the administrative users network-admin and vdc-admin.

Cisco provides the Cisco Software Checker to help customers determine if their devices are vulnerable to this flaw.

The U.S. Cybersecurity and Infrastructure Security Agency (CISA) added the flaw to its Known Exploited Vulnerabilities (KEV) catalog.

Sygnia researchers explained that attackers exploited the zero-day exploit using valid administrator credentials to escape the NX-OS command line interface (CLI) on a switch and execute arbitrary commands on the underlying Linux operating system. Once exploited this vulnerability, Velvet Ant deployed custom malware that operates on the underlying OS and remains undetected by typical security tools.

“The zero-day exploit allows an attacker with valid administrator credentials to the Switch management console to escape the NX-OS command line interface (CLI) and execute arbitrary commands on the Linux underlying operating system. Following the exploitation, ‘Velvet Ant’ deploy tailored malware, which runs on the underlying OS and is invisible to common security tools.” reads a new report published by Sygnia.

“In recently observed attacks , Velvet Ant transitioned to operating from Cisco Nexus switch appliances and exploited a zero-day vulnerability, in order to access the underlying Linux layer of the switch to install their malware – named ‘VELVETSHELL’ by Sygnia.”

The switch appliances prevent users from accessing the underlying operating system, making it nearly impossible to scan for indicators of compromise. This shift towards using network appliances highlights the group’s sophistication and determination to maintain persistence in compromised environments for ongoing espionage activities.

The researchers discovered several suspicious Base64-encoded commands in the affected systems’ accounting logs. These commands were executed with valid administrative credentials as part of an exploit that leveraged a command injection vulnerability. The threat actor used this technique to run a malicious script, which loaded and executed a backdoor binary, effectively bypassing standard security mechanisms.

Velvet Ant Cisco zero-day

Sygnia managed to reconstruct the VELVETSHELL malware from device memory despite the threat actor’s efforts to delete it. The malware is a hybrid of two open-source tools, TinyShell and 3proxy, combined into a single binary. VELVETSHELL supports multiple capabilities, including executing arbitrary commands, downloading and uploading files, and establishing network traffic tunnels. These functionalities allowed the threat actor to maintain persistent access and control over the compromised system, facilitating data exfiltration and ongoing espionage activities.

“Over the years of espionage activities ‘Velvet Ant’ increased their sophistication, using evolving tactics to continue their cyber operations in a victim network – from operating on ordinary endpoints, shifting operations to legacy servers and finally moving towards network appliances and using 0-days.” concludes the report that includes Indicators of Compromise (IoCs). “The determination, adaptability and persistence of such threat actors highlights the sensitivity of a holistic response plan to not only contain and mitigate the threat but also monitor the network for additional attempts to exploit the network.”

Pierluigi Paganini

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

(SecurityAffairs – hacking, CISA)



Text extracted automatically; images, tables and formatting may be missing. Original: https://securityaffairs.com/167423/apt/china-velvet-ant-zero-day-cisco-switches.html