Hacking

Critical RCE Bug Affects Millions of OpenWrt-based Network Devices

A security researcher disclosed technical details of a critical remote code execution flaw affecting the OpenWrt Linux-based operating system for network devices.

Earlier this year, security expert Guido Vranken from the software firm ForAllSecure, discovered a critical vulnerability in the OpenWrt Linux-based operating system for network devices.

The flaw tracked as CVE-2020-7982 is a critical remote code execution vulnerability affecting the operating system, which is a widely used Linux-based operating system for network devices such as routers and residential gateways.

The vulnerability exists in the OPKG package manager of OpenWrt, it is related to the way it performs integrity checking of downloaded packages using the SHA-256 checksums that are embedded in the signed repository index.

opgk is a utility to install or update the software on an OpenWRT system, it is comparable to apt on Debian-based systems.

The expert discovered that when an ‘ install’ command is executed on the target system, a remote attacker could exploit the vulnerability to intercept the communication of a targeted device to execute arbitrary code by tricking it into installing a malicious package or software update.

The successful exploitation of the flaw could allow a remote attacker to gain complete control over the vulnerable OpenWrt network device.

Vranken explained that when a checksum contains any leading spaces, the OPKG utility on the vulnerable versions of the operating system fails to check the integrity of the downloaded package and installs them.

“For exploitation it is required that the attacker serves (compromised) packages from a web server. The attacker must either be in a position to intercept and replace communication between the device and downloads.openwrt.org, or control the DNS server used by the device to make downloads.openwrt.org point to a web server controlled by the attacker.” reads a post published by the expert. “Attacks on a local network using packet spoofing or ARP cache poisoning might be possible, but this has not been tested.”

The expert ethically reported the flaw to the OpenWrt development team that acknowledged the flaw.

“Due to the fact that opkg on OpenWrt runs as root and has write access to the entire filesystem, arbitrary code could be injected by means of forged .ipk packages with a malicious payload,” states the OpenWrt team.

The vulnerability affects versions 18.06.0 to 18.06.6 and 19.07.0, as well as LEDE 17.01.0 to 17.01.7.

Vranken explained that to solve the issue, OpenWRT removed the space in the SHA256sum from the package list, but this solution is only partial remediation.

“As a stopgap solution, OpenWRT removed the space in the SHA256sum from the package list shortly after I reported the bug,” Vranken added. “However, this is not an adequate long-term solution because an attacker can simply provide an older package list that was signed by the OpenWRT maintainers.”

OpenWrt addresses the flaw with the release of the versions 18.06.7 and 19.07.1.

[adrotate banner=”9″] [adrotate banner=”12″]

Pierluigi Paganini

(SecurityAffairs – networking, hacking)

[adrotate banner=”5″]

[adrotate banner=”13″]

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

FBI chief says China is preparing to attack US critical infrastructure

China-linked threat actors are preparing cyber attacks against U.S. critical infrastructure warned FBI Director Christopher…

2 hours ago

United Nations Development Programme (UNDP) investigates data breach

The United Nations Development Programme (UNDP) has initiated an investigation into an alleged ransomware attack…

4 hours ago

FIN7 targeted a large U.S. carmaker with phishing attacks

BlackBerry reported that the financially motivated group FIN7 targeted the IT department of a large…

15 hours ago

Law enforcement operation dismantled phishing-as-a-service platform LabHost

An international law enforcement operation led to the disruption of the prominent phishing-as-a-service platform LabHost.…

20 hours ago

Previously unknown Kapeka backdoor linked to Russian Sandworm APT

Russia-linked APT Sandworm employed a previously undocumented backdoor called Kapeka in attacks against Eastern Europe since…

1 day ago

Cisco warns of a command injection escalation flaw in its IMC. PoC publicly available

Cisco has addressed a high-severity vulnerability in its Integrated Management Controller (IMC) for which publicly…

1 day ago

This website uses cookies.