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

Implementing file content deduplication and intersection and difference in Linux

1. Data Deduplication In daily work, there may be...

How to Dockerize a Python Django Application

Docker is an open source project that provides an...

Solution for Tomcat to place configuration files externally

question When we are developing normally, if we w...

Docker completely deletes private library images

First, let’s take a look at the general practices...

MYSQL custom function to determine whether it is a positive integer example code

You can write a function: Mainly use regular expr...

HTML adaptive table method

<body style="scroll:no"> <tabl...

Detailed explanation of Nginx rewrite jump application scenarios

Application scenario 1: Domain name-based redirec...

Simple use of Vue bus

Simple use of Vue bus Scenario description: Compo...

JavaScript canvas realizes the effect of nine-square grid cutting

This article shares the specific code of canvas t...

MySQL variable principles and application examples

In the MySQL documentation, MySQL variables can b...

Specific steps for Vue browser to return monitoring

Preface When sharing a page, you hope to click th...

MySQL Server 8.0.3 Installation and Configuration Methods Graphic Tutorial

This document records the installation and config...