ZeroHour
Security Affairspublished ()ingested @securityaffairs

Attacks against Denmark 's energy sector were not carried out by Russia

criticalExploit / PoC exploited in the wildimportance 60CVE-2023-28771CVE-2020-9054CVE-2022-30525

Vulnerabilities mentionedAll →

CVEVulnerabilityCVSSEPSSFlagsAffectedExposurePublished
CVE-2020-9054
Pre-Authentication OS Command Injection in Zyxel NAS Devices

CVE-2020-9054 is a pre-authentication OS command injection flaw (CWE-78) in multiple Zyxel network-attached storage (NAS) devices. A remote, unauthenticated attacker can send crafted input to the devices' web interface to inject and execute arbitrary OS commands without logging in, resulting in remote code execution on the NAS. Successful exploitation gives the attacker control of the device, which can be used to access, alter or destroy stored data and to pivot into the network the NAS is attached to. Organizations and users running affected Zyxel NAS models are at risk, especially where the management web interface is reachable from the internet. The flaw was added to CISA's Known Exploited Vulnerabilities catalog on 2022-03-25, confirming exploitation in the wild; EPSS assigns a 100% probability of exploitation within 30 days, while no public proof-of-concept is known and any ransomware use is unconfirmed.

Do: Apply the firmware updates specified in Zyxel's advisory, per CISA's required action, prioritizing any NAS whose web interface is exposed to the internet. Until patched, restrict the NAS management interface to trusted networks or VPN access and do not expose the admin UI directly to the internet. Because exploitation is confirmed in the wild, check affected devices for indicators of compromise, such as unexpected accounts, scheduled jobs, or outbound connections.

9.8100% KEV PoC
  • Zyxel
moderateplausibly tens of thousands of affected devices installed worldwide, with only a low-thousands subset directly internet-exposed
CVE-2022-30525
OS Command Injection in Zyxel Firewalls Enables Remote Command Execution

CVE-2022-30525 is an OS command injection vulnerability (CWE-78) in the CGI program of certain Zyxel firewall firmware versions. By sending crafted requests to the vulnerable CGI program, an attacker can modify specific files on the appliance and inject and execute operating system commands. Successful exploitation yields command execution on the firewall itself, allowing an attacker to alter device files/configuration and potentially pivot into the protected network — the class of edge-device flaw commonly targeted by ransomware operators (ransomware use in this case is not yet confirmed). Organizations running affected Zyxel firewalls, particularly those with management interfaces reachable from the internet, are at risk. Exploitation is confirmed in the wild: the flaw was added to CISA's KEV on 2022-05-16, EPSS assigns a 99.9% 30-day exploitation probability (100th percentile), and no public PoC is catalogued yet.

Do: Apply Zyxel's fixed firmware per the vendor's instructions immediately, as required by the CISA KEV listing. Until patched, restrict HTTP/HTTPS management access to the firewall to trusted source addresses only. Because exploitation is confirmed in the wild, prioritize internet-facing Zyxel firewalls and review devices for indicators of compromise such as modified configurations or unexpected administrative changes.

9.8100% KEV PoC ×3
  • Zyxel Multiple firewall firmware versions; exact affected version ranges per Zyxel's advisory (not enumerated in source data)
large≈ tens of thousands of internet-exposed Zyxel firewall management interfaces (order of magnitude 10k–100k devices)
CVE-2023-28771
Unauthenticated OS Command Injection in Zyxel ATP, USG FLEX, VPN, and ZyWALL Firewalls

CVE-2023-28771 is an unauthenticated OS command injection flaw (CWE-78) in Zyxel firewall firmware, caused by improper error message handling in the IKE packet decoder. A remote attacker triggers it by sending crafted packets to an affected device, with no credentials or user interaction required (CVSS 3.1: 9.8, network vector, low complexity). Successful exploitation lets the attacker execute operating-system commands on the firewall, which typically means full device compromise of these perimeter/VPN gateway appliances. Organizations running Zyxel ZyWALL/USG, VPN, USG FLEX, or ATP series firewalls on the affected firmware ranges are exposed, especially where IKE/VPN traffic is reachable from the internet. Exploitation is confirmed in the wild: the flaw was added to CISA's KEV on 2023-05-31, carries a 99.3% EPSS score (100th percentile), is reportedly used by DDoS botnets, and was reportedly exploited in the May 2023 coordinated attacks against nearly two dozen Danish energy companies.

Do: Apply Zyxel's patched firmware to all affected devices per the vendor advisory - releases newer than 4.73 for ZyWALL/USG and newer than 5.35 for ATP, USG FLEX, and VPN series - prioritizing internet-facing and VPN gateway appliances, as this is a KEV required-action vulnerability. Where immediate patching is not possible, restrict IKE traffic (UDP 500/4500) to trusted peers or disable unneeded IPsec VPN termination. After patching, review device logs and configurations for signs of command execution or unexpected changes, given confirmed botnet and targeted-attack use.

9.899% KEV PoC
  • Zyxel ZyWALL/USG series firewalls firmware 4.60 through 4.73
  • Zyxel VPN series firewalls firmware 4.60 through 5.35
  • Zyxel USG FLEX series firewalls (USG FLEX 50, 50W, 100, 100W, 200, 500) firmware 4.60 through 5.35
  • +1 more
largetens of thousands of internet-exposed Zyxel firewall/VPN gateways (order of 10,000-100,000 devices/sites); estimate
Full article880 words · extracted from securityaffairs.com · click to collapse

Forescout experts questioned the attribution of cyber attacks that targeted the energy sector in Denmark in 2023 to the Russia-linked Sandworm.

Forescout experts shared findings from their analysis of the cyber attacks that targeted the energy sector in Denmark in 2023, attributing them to the Russia-linked Sandworm.

In May, Danish critical infrastructure faced the biggest cyber attack on record that hit the country, reported SektorCERT, Denmark’s Computer Security Incident Response Team (CSIRT) for the critical infrastructure sectors.

A first wave of attacks was launched on May 11, then after a short pause, a second wave of attacks began on May 22. SektorCERT became aware of the attacks on May 22.

SektorCERT reported that threat actors compromised the networks of 22 companies operating in the energy infrastructure. According to the report, 11 companies were immediately compromised. The attackers exploited zero-day vulnerabilities in Zyxel firewalls used by many critical infrastructure operators in Denmark.

On April 25, 2023, Zyxel disclosed a critical vulnerability (CVSS score 9.8), tracked as CVE-2023-28771, in a number of their firewalls. The vulnerability is an improper error message handling in Zyxel ZyWALL/USG series firmware versions 4.60 through 4.73, VPN series firmware versions 4.60 through 5.35, USG FLEX series firmware versions 4.60 through 5.35, and ATP series firmware versions 4.60 through 5.35. A remote, unauthenticated attacker can trigger the flaw by sending specially crafted packets to a vulnerable device and executing some OS commands remotely.

Zyxel released security patches to address the vulnerability and urges customers to install them.

“Improper error message handling in some firewall versions could allow an unauthenticated attacker to execute some OS commands remotely by sending crafted packets to an affected device.” reads the advisory published by the vendor.

“The vulnerability itself was exploited by sending a single specially crafted data packet to port 500 over the protocol UDP towards a vulnerable Zyxel device. The packet was received by the Internet Key Exchange (IKE) packet decoder on the Zyxel device. Precisely in this decoder was the said vulnerability. The result was that the attacker could execute commands with root privileges directly on the device without authentication.” reported the SektorCERT. “An attack that could be performed by sending a single packet towards the device. 11 companies were compromised immediately. This means that the attackers gained control of the firewall at these companies and thus had access to the critical infrastructure behind it.”

The SektorCERT experts believe the attackers had detailed information about the targets, likely obtained through a previously undetected reconnaissance activity. At this time, there was no public information about which organizations were using vulnerable firewalls.

Below is the Cyber Kill Chain for the overall attack described in the report:

Denmark critical infrastructure attack chain

“To this day, there is no clear explanation of how the attackers had the necessary information, but we can state that among the 300 members, they did not miss a single shot.” continues the report.

The experts also pointed out that the attackers were able to attack many companies at the same time, avoiding that impacted infrastructure could have shared information on the attack with peers. This kind of coordination requires planning and resources.

Threat actors were able to exploit the zero-day flaw in a large-scale campaign, this circumstance suggests the attackers could be an APT group.

Experts believe the attackers have been carried out by multiple threat actors, and at least one can be attributed to the Russia-linked Sandworm group.

Now evidence gathered by Forescout suggests that the two waves of attacks on Danish infrastructure reported by SektorCERT were not linked. The experts speculate that the second wave was simply part of an opportunist mass exploitation campaign against unpatched firewalls. It means that the attacks were not carried out by a nation-state actor such as Sandworm.

“Our evidence suggests that the two waves of attacks on Danish infrastructure reported by SektorCERT, the Danish CERT for critical infrastructure, were unrelated. It also suggests that the second wave was simply part of a mass exploitation campaign against unpatched firewalls, not part of a targeted attack by Sandworm or another state-sponsored actor.” reads the analysis from Forescout. “Our data reveals that the campaign described as the “second wave” of attacks in Denmark started before, and continued after, the period reported by SektorCERT, targeting firewalls indiscriminately in a very similar way – only changing staging servers periodically.”

Before the incidents reported by SektorCERT, Forescout researchers detected seven attempts to exploit CVE-2020-9054 and two attempts to exploit CVE-2022-30525 flaw in Zyxel devices between February 16 and May 14, 2023, on the AEE. All the attacks observed by the researchers targeted entities in the United States.

“While the Danish energy sector incident demonstrates the power of extensive network monitoring and a quick and coordinated response (no easy feat during massive exploitation campaigns), it also shows the uncertainty around attacker intent and incident seriousness that can arise during such an event.” concludes the analysis. “Distinguishing between a state-sponsored campaign targeted at disrupting critical infrastructure and crimeware mass-exploitation campaigns, and accounting for possible overlaps between the two, is easier in hindsight than in the heat of the moment. Yet, contextualization based on detailed threat and vulnerability intelligence can help security professionals identify where to focus.”

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, Denmark)



Text extracted automatically; images, tables and formatting may be missing. Original: https://securityaffairs.com/157438/hacking/denmark-energy-sector-attacks-attribution.html