Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Create shutdown.md #419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zenVeil wants to merge 1 commit into GTFOBins:master from zenVeil:master
Closed

Create shutdown.md #419

zenVeil wants to merge 1 commit into GTFOBins:master from zenVeil:master

Conversation

@zenVeil
Copy link

@zenVeil zenVeil commented Oct 28, 2023

ref : https://exploit-notes.hdks.org/exploit/linux/privilege-escalation/sudo/sudo-shutdown-poweroff-privilege-escalation/

if user hash sudo shutdown privilege , we can use this command get root shell

NumquamScire reacted with thumbs up emoji MegaManSec and IronBit-0 reacted with thumbs down emoji
Copy link
Member

epinna commented Oct 28, 2023

nice

Copy link
Contributor

This makes no sense: PATH does not propagate through sudo.

sudo specifically has the directive secure_path which sets the PATH variable when you use sudo. On Ubuntu 2204, it's set by default to:
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

An administrator would have to specifically set secure_path to include /tmp, which there would never been a reason to do that.

Looking at the other notes from this website like https://exploit-notes.hdks.org/exploit/linux/privilege-escalation/sudo/sudo-reboot-privilege-escalation/, the situations here are completely unbelievable.

IronBit-0 reacted with thumbs up emoji

@zenVeil zenVeil closed this by deleting the head repository Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /