Saturday, November 2, 2024
HomeCVE/vulnerabilityCritical Remote Code Execution Bug in Linux Based OpenWrt OS Affects Millions...

Critical Remote Code Execution Bug in Linux Based OpenWrt OS Affects Millions of Network Devices

Published on

Malware protection

Security researcher uncovered a critical remote code execution vulnerability in OpenWrt operating system that allows attackers to inject the malicious payload on the vulnerable systems.

OpenWrt is a Linux based operating system that is mainly used in embedded devices and network routers to route the network traffic and is installed on millions of devices around the globe.

The RCE bug addressed in the package list parse the logic of OpenWrt’s opkg (Opkg Package Manager) fork let package manager ignore the SHA-256 checksums embedded in the signed repository index which allows an attacker to bypass the integrity checking of downloaded .ipk artifacts.

- Advertisement - SIEM as a Service

Guido Vranken, a researcher explained that he found this vulnerability initially by chance when he was preparing a Mayhem task for opkg. Mayhem can serve data either from a file or from a network socket.

” I set up a Mayhem task for opkg install attr (attr is a small OpenWRT package), and implicitly, Mayhem was able to find the remote code execution bug, by detecting the memory bugs in the package unpacker. If OpenWRT’s SHA256 verification had worked as intended, opkg would simply discard the package and not process it, and no segmentation faults would transpire,” researcher said.

OpenWRT RCE Vulnerability Exploitation Process

To exploit this RCE vulnerability, the attacker needs to serve compromised packages from a web server and need to intercept communication between the device and downloads.openwrt.org or the ability to control the DNS server that used by the device to make downloads.openwrt.org point to a web server controlled by the attacker.

In fact, opkg on OpenWrt running as root that allows attackers to gain the write access to the entire file systems and inject the arbitrary code remotely by forged .ipk packages with a malicious payload. 

According to OpenWRT bug fix report “During the attack, a malicious actor needs to pose as MITM, serving a valid and signed package index – e.g. one obtained from downloads.openwrt.org – and one or more forged .ipk packages having the same size as specified in the repository index while an `opkg install` command is invoked on the victim system.”

You can also read the complete technical analysis of this vulnerability here.

The vulnerability has been fixed and assigned CVE-2020-7982 and the users are urged to upgrade to the latest OpenWrt version.

How to Update:

The following commands may be used once all repositories have been updated:

 cd /tmp
 opkg update
 opkg download opkg
 zcat ./opkg-lists/openwrt_base | grep -A10 "Package: opkg" | grep SHA256sum
 sha256sum ./opkg_2020-01-25-c09fe209-1_*.ipk

Also Read:

Critical Vulnerability in ppp Daemon Let Hackers Remotely Exploit the Linux Systems & Gain Root Access

RCE Vulnerability in OpenSMTPD Mail Server Let Hackers Exploit The Linux Systems Remotely

Balaji
Balaji
BALAJI is an Ex-Security Researcher (Threat Research Labs) at Comodo Cybersecurity. Editor-in-Chief & Co-Founder - Cyber Security News & GBHackers On Security.

Latest articles

LightSpy iOS Malware Enhanced with 28 New Destructive Plugins

The LightSpy threat actor exploited publicly available vulnerabilities and jailbreak kits to compromise iOS...

ATPC Cyber Forum to Focus on Next Generation Cybersecurity and Artificial Intelligence Issues

White House National Cyber Director, CEOs, Key Financial Services Companies, Congressional and Executive Branch...

New PySilon RAT Abusing Discord Platform to Maintain Persistence

Cybersecurity experts have identified a new Remote Access Trojan (RAT) named PySilon. This Trojan...

Konni APT Hackers Attacking Organizations with New Spear-Phishing Tactics

The notorious Konni Advanced Persistent Threat (APT) group has intensified its cyber assault on...

Free Webinar

Protect Websites & APIs from Malware Attack

Malware targeting customer-facing websites and API applications poses significant risks, including compliance violations, defacements, and even blacklisting.

Join us for an insightful webinar featuring Vivek Gopalan, VP of Products at Indusface, as he shares effective strategies for safeguarding websites and APIs against malware.

Discussion points

Scan DOM, internal links, and JavaScript libraries for hidden malware.
Detect website defacements in real time.
Protect your brand by monitoring for potential blacklisting.
Prevent malware from infiltrating your server and cloud infrastructure.

More like this

Google Chrome Security, Critical Vulnerabilities Patched

Google has updated its Chrome browser, addressing critical vulnerabilities that posed potential risks to...

SMB Force-Authentication Vulnerability Impacts All OPA Versions For Windows

Open Policy Agent (OPA) recently patched a critical vulnerability that could have exposed NTLM...

Vulnerabilities in Realtek SD Card Reader Driver Impacts Dell, Lenovo, & Others Laptops

Multiple vulnerabilities have been discovered in the Realtek SD card reader driver, RtsPer.sys, affecting...