Linux sudo vulnerability could lead to unauthorized privileged access

Linux sudo vulnerability could lead to unauthorized privileged access

Exploiting a newly discovered sudo vulnerability in Linux could allow certain users to run commands as root, although there are restrictions on this.

A serious vulnerability was recently discovered in the sudo command that, if exploited, could allow a normal user to run commands as root, even if the user was explicitly prohibited from doing so in the /etc/sudoers file.

Updating sudo to version 1.8.28 should resolve the issue, so Linux administrators are advised to do so as soon as possible.

How this vulnerability is exploited depends on the specific permissions granted in /etc/sudoers . For example, a rule that allows a user to edit files as any user except root will actually allow that user to edit files as root as well. In this case, the vulnerability could lead to very serious problems.

For a user to be able to exploit this vulnerability, they need to have been assigned privileges in /etc/sudoers that allow that user to run commands as another user, and the vulnerability is limited to command privileges assigned in this way.

This issue affects versions prior to 1.8.28. To check your sudo version, use the following command:

$ sudo -V
Sudo version 1.8.27 <===
Sudoers policy plugin version 1.8.27
Sudoers file grammar version 46
Sudoers I/O plugin version 1.8.27

The vulnerability has been assigned the number CVE-2019-14287 in the CVE database. The risk is that any user who is specified to be able to run a command as any user, even if explicitly prohibited from running as root, can escape restrictions.

The following lines allow jdoe to edit files using vi as anyone other than root (!root means "non-root"), while giving nemo the ability to run id commands as any user other than root:

# affected entries on host "dragonfly"
jdoe dragonfly = (ALL, !root) /usr/bin/vi
nemo dragonfly = (ALL, !root) /usr/bin/id

However, due to a vulnerability, any of these users could either bypass restrictions and edit files as root, or run the id command as root.

An attacker can run commands as root by specifying a user ID of -1 or 4294967295.

sudo -u#-1 id -u

or

sudo -u#4294967295 id -u

A response of 1 indicates that the command was run as root (displaying root's user ID).

Joe Vennix from Apple's Information Security team found and analyzed the issue.

Summarize

The above is the Linux sudo vulnerability that I introduced to you that may lead to unauthorized privileged access. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • How to use lynis to scan Linux vulnerabilities
  • Linux exposes Sudo privilege escalation vulnerability, any user can also run root commands
  • A Brief Analysis of Linux Kernel Vulnerabilities
  • Linux users should pay attention to fix the vulnerability
  • How to parse and format JSON output using Linux command line tools
  • clamscan - Linux virus detection tool command detailed explanation
  • Best tools for taking screenshots and editing them in Linux
  • Analysis of the use of Linux vulnerability scanning tool lynis

<<:  MySQL query duplicate data (delete duplicate data and keep the one with the smallest id as the only data)

>>:  How to use native JS to implement touch sliding monitoring events

Recommend

Why not use UTF-8 encoding in MySQL?

MySQL UTF-8 encoding MySQL has supported UTF-8 si...

Writing and understanding of arrow functions and this in JS

Table of contents Preface 1. How to write functio...

Docker meets Intellij IDEA, Java development improves productivity tenfold

Table of contents 1. Preparation before developme...

Basic operations of mysql learning notes table

Create Table create table table name create table...

Is your website suitable for IE8?

During the Olympic Games, IE 8 Beta 2 will be rele...

mysql 5.7.18 winx64 password change

After MySQL 5.7.18 is successfully installed, sin...

Linux completely removes node.js and reinstalls it through the yum command

first step Delete it once with the built-in packa...

Understanding JavaScript prototype chain

Table of contents 1. Understanding the Equality R...

Detailed installation tutorial of Docker under CentOS

Docker is divided into CE and EE. The CE version ...

Vue3.0 handwriting magnifying glass effect

The effect to be achieved is: fixed zoom in twice...

Use of MySQL DATE_FORMAT function

Suppose Taobao encourages people to shop during D...

Example of how to implement value transfer between WeChat mini program pages

Passing values ​​between mini program pages Good ...

Some key points of website visual design

From handicraft design to graphic design to web de...