Linux exposes Sudo privilege escalation vulnerability, any user can also run root commands

Linux exposes Sudo privilege escalation vulnerability, any user can also run root commands

As one of the most commonly used and important utilities in Linux, Sudo is installed on almost every UNIX and Linux distribution to allow users to invoke and implement core commands. However, a privilege escalation vulnerability recently exposed directly points to a security policy risk of sudo - even if the configuration explicitly does not allow root user access, the vulnerability can still allow malicious users or programs to execute arbitrary commands as the root user on the target Linux system.

(Title image via Hacker News)

It is reported that Sudo refers specifically to "super user". As a system command, it allows users to run programs or commands with special permissions without switching to another environment (usually running commands as the root user).

By default on most Linux distributions (as shown in the screenshot), the ALL keyword in the RunAs specification file of /etc/sudoers allows all users in the admin or sudo group to run any command as any valid user on the system.

However, because privilege separation is one of the most fundamental security paradigms in Linux, administrators can configure the sudoers file to define which users can run which commands.

As such, Baseline restricts users from running specific or any commands as root, and this vulnerability could allow users to bypass this security policy and take full control of the system.

"As long as the Runas specification explicitly disallows root access and lists the ALL keyword first, a user with sufficient sudo privileges can use it to run commands as root," the Sudo developers said.

It is reported that the vulnerability was tracked and discovered by Joe Vennix from Apple's Information Security Department (CVE-2019-14287). To exploit this bug, all you need is Sudo User ID -1 or 4294967295.

This is because the function that converts a user ID to a username mistakes -1 (or the invalid equivalent 4294967295) for 0, which happens to be the root user ID.

Additionally, because the User ID specified with the -u option does not exist in the password database, no PAM session modules are run.

In summary, this vulnerability affects all Sudo versions before the latest version 1.8.28. Fortunately, major Linux distributions have already pushed new versions to users a few hours ago.

Well, this article ends. Thank you for your support of 123WORDPRESS.COM!

You may also be interested in:
  • How to run sudo command without entering password in Linux
  • Delegating Privileges in Linux Using Sudo
  • Summary of the Differences between sudo, su and su - Commands in Linux
  • Summary of ten tips for sudo command in Linux system
  • How to use sudo su to add root permissions to ordinary users in Linux
  • Detailed explanation of the detailed configuration of sudo and its configuration file /etc/sudoers under Linux
  • Detailed explanation of sudo command in Linux system
  • How to add sudo permissions to a user in Linux environment

<<:  Detailed explanation of count without filter conditions in MySQL

>>:  A brief discussion on the pitfalls of react useEffect closure

Recommend

Tutorial on using Docker Compose to build Confluence

This article uses the "Attribution 4.0 Inter...

Linux uses NetworkManager to randomly generate your MAC address

Nowadays, whether you are on the sofa at home or ...

Example of how to upload a Docker image to a private repository

The image can be easily pushed directly to the Do...

Web Design Help: Web Font Size Data Reference

<br />The content is reproduced from the Int...

Solutions to the problem of table nesting and border merging

【question】 When the outer table and the inner tab...

Are you still Select *?

There are many reasons why an application is as s...

WeChat applet uniapp realizes the left swipe to delete effect (complete code)

WeChat applet uniapp realizes the left swipe to d...

Detailed steps to delete environment variables in Linux

How to delete environment variables in Linux? Use...

Docker network mode and configuration method

1. Docker Network Mode When docker run creates a ...

How to deploy Solidity smart contracts using ethers.js

If you have developed DApps on Ethereum, you may ...

Vue implements DingTalk's attendance calendar

This article shares the specific code of Vue to i...

Vue3 draggable left and right panel split component implementation

Table of contents Breaking down components Left P...