Monday, November 4, 2024
HomeComputer SecurityA Vulnerability In Linux Sudo Let the Restricted Linux Users to Run...

A Vulnerability In Linux Sudo Let the Restricted Linux Users to Run Commands as Root

Published on

Malware protection

A new vulnerability has been discovered in the Linux Sudo program let unprivileged users can run the command as root by specifying the user ID -1 or 4294967295.

Sudo (Superuser Do) program in Linux is responsible to allocate the security privileges to run commands for normal users and by default for Superusers.

The vulnerability affected the Sudo versions before 1.8.28 and the potential users to bypass the Runas user restrictions.

- Advertisement - SIEM as a Service

Runas basically referred to allow a Linux user to start an application with different user credentials, and it restricts the users to gain other privileged access.

Based on the Sudo users policy, If ALL keyword in a Runas specification, then any user to run commands as an arbitrary user.

By exploiting the vulnerability in Sudo let normal users with sufficient Sudo privileges to run commands as root even if the Runas specification explicitly disallows root access and allows to gain the complete control of the system.

Exploit the Sudo Bug (CVE-2019-14287 )

To exploit the bug, the users should have Sudo privilege, which means, the user’s entry in Runas specifier with special value ALL, so that users can run a command as an arbitrary user.

myhost alice = (ALL) /usr/bin/id

In the above command with (ALL) in Runas Specifier, a user can run the command as any users, also able to run it as an arbitrary user ID by using the #uid syntax.

sudo -u#1234 id -u

In this case, when we treat user ID -1 or 4294967295 (unsigned equivalent for -1 ), the result returns 0 (Not root).

sudo -u#-1 id -u

“So If a sudoers entry is written to allow the user to run a command as any user except root, the bug can be used to avoid this restriction,” Joe Vennix from Apple Information Security said.

According to Sudo report , For example, given the following sudoers entry:

myhost bob = (ALL, !root) /usr/bin/vi

User bob is allowed to run vi as any user but root. However, due to the bug, bob is actually able to run vi as root by running sudo -u#-1 vi, violating the security policy.

The vulnerability affected only sudoers entries where Runas specifier with ALL keyword and the vulnerability has been assigned CVE-2019-14287

It’s highly recommended to update the newly released Sudo 1.8.28 version in your Linux and soon the update will be rolled out for all the Linux distributions.

You can follow us on Linkedin, Twitter, Facebook for daily Cybersecurity and hacking news updates

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

Evasive Panda Attacking Cloud Services To Steal Data Using New Toolkit

The Evasive Panda group deployed a new C# framework named CloudScout to target a...

Massive Midnight Blizzard Phishing Attack Using Weaponized RDP Files

Researchers warn of ongoing spear-phishing attacks by Russian threat actor Midnight Blizzard targeting individuals...

Sophisticated Phishing Attack Targeting Ukraine Military Sectors

The Ukrainian Cyber Emergency Response Team discovered a targeted phishing campaign launched by UAC-0215...

Chinese Hackers Attacking Microsoft Customers With Sophisticated Password Spray Attacks

Researchers have identified a network of compromised devices, CovertNetwork-1658, used by Chinese threat actors...

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

A Massive Hacking Toolkit From “You Dun” Threat Group Developed To Lauch Massive Cyber Attack

The "You Dun" hacking group exploited vulnerable Zhiyuan OA software using SQL injection, leveraging...

Okta Verify Agent for Windows Flaw Let Attackers Steal User Passwords

A newly discovered vulnerability in Okta's Device Access features for Windows could allow attackers...

MediaTek High Severity Vulnerabilities Let Attackers Escalate Privileges

In its recent MediaTek Product Security Bulletin, the chipmaker disclosed two high-severity security vulnerabilities...