• Home
  • Learn
  • DetectionHub
  • Ranking
  • About
  • Blog
  • Login
Easy·Updated on 2025-03-15

Linux sudo Root Privilege Bypass Vulnerability Detection

1,234
Submissions
67.5%
Pass Rate
5 minutes
Estimated Time
Sysmon T1548

Description

Sudo is a common privilege management tool in Linux/Unix systems that allows system administrators to grant ordinary users temporary permission to execute specific commands. Through sudo’s access control policies, administrators can precisely control which commands users can execute and under which user identity they can run these commands.

CVE-2019-14287 is a critical security vulnerability present in sudo versions prior to 1.8.27. Normally, when administrators use the !root rule in the sudoers configuration file to prohibit certain users from executing specific commands as root, this should be an effective security restriction. However, due to a logical flaw in sudo’s user ID processing, attackers can bypass this restriction by specifying a special user ID value (-1 or its unsigned integer representation 4294967295).

When a user employs the sudo -u#-1 command syntax, sudo incorrectly interprets this ID as 0 (root user), resulting in commands running with root privileges even when root execution is explicitly forbidden. This vulnerability can lead to unauthorized privilege escalation, allowing users with limited sudo permissions to gain full root access and subsequently complete control of the system.

Challenge Objective

Construct a rule to identify attempts to exploit CVE-2019-14287 for privilege escalation.

Data Sample

Data source: Sysmon, Sample data:

{	"Name": "ParentUser", 	"Guid": "{ff032593-a8d3-4f13-b0d6-01fc615a0f97}", 	"EventID": "1", 	"Version": "5", 	"Level": "4", 	"Task": "1", 	"Opcode": "0", 	"Keywords": "0x8000000000000000", 	"SystemTime": "2025-04-08T07:08:21.877054000Z", 	"EventRecordID": "1084052", 	"ProcessID": "400777", 	"ThreadID": "400777", 	"Channel": "Linux-Sysmon/Operational", 	"Computer": "ubuntulog", 	"UserId": "0", 	"RuleName": "-", 	"UtcTime": "2025-04-08 07:08:21.880", 	"ProcessGuid": "{15b7b743-cb65-67f4-d1eb-ab9490620000}", 	"ProcessId": "401512", 	"Image": "/usr/bin/sudo", 	"FileVersion": "-", 	"Description": "-", 	"Product": "-", 	"Company": "-", 	"OriginalFileName": "-", 	"CommandLine": "sudo -u#-1 /bin/bash", 	"CurrentDirectory": "/home/admin", 	"User": "admin", 	"LogonGuid": "{15b7b743-cb10-67f4-e803-000001000000}", 	"LogonId": "1000", 	"TerminalSessionId": "216", 	"IntegrityLevel": "no level", 	"Hashes": "SHA256=e5c87bb7cefefe2a6281ecc6f29e677240230eb8d04f92ba6a7513876b6d024f", 	"ParentProcessGuid": "{15b7b743-cb10-67f4-2db3-f48b5d640000}", 	"ParentProcessId": "400895", 	"ParentImage": "/usr/bin/bash", 	"ParentCommandLine": "-bash", 	"ParentUser": "admin"	}

References

loading...

Fields

No fields found

0 fields selected

Preview Results