Sudo Rights Abuse

ALL : ALL

sudo -l
[sudo] password for user1:
...SNIP...

User user1 may run the following commands on ExampleServer:
    (ALL : ALL) ALL

sudo su -

[sudo] password for user1:
whoami
root

(ALL, !root)

Services & Internals Enum

NOPASSWD

Example 1 - USER

Example 2 - USER2 - Lateral Movement

Example 3 - ROOT - tcpdump

Example 4 - Python

See Privilege Escalation using PYTHONPATH Environment Variable

Python Library Hijacking

Example 5 - script - write permission

Change script content:

Example 6 - LD_PRELOADES

This user has rights to restart the Apache service as root, but since this is NOT a GTFOBin and the /etc/sudoers entry is written specifying the absolute path, this could not be used to escalate privileges under normal circumstances

Could be absue with LD_PRELOADES

Shared Libraries

Example 7 - Openssl

Last updated