Skip to content

busctl: add sudo shell via --show-machine and !/bin/bash#564

Closed
Ryankapa wants to merge 1 commit intoGTFOBins:masterfrom
Ryankapa:busctl-sudo-show-machine
Closed

busctl: add sudo shell via --show-machine and !/bin/bash#564
Ryankapa wants to merge 1 commit intoGTFOBins:masterfrom
Ryankapa:busctl-sudo-show-machine

Conversation

@Ryankapa
Copy link

What

Adds a sudo shell vector for busctl using --show-machine (which uses a pager) and the shell escape !/bin/bash.

How

  • Run: sudo busctl --show-machine
  • At the pager prompt, type: !/bin/bash
  • Results in an elevated shell.

Why

If busctl is allowed to run as superuser via sudo, it does not drop elevated privileges and can be used to access the file system, escalate, or maintain privileged access. This documents that vector for the sudo context.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Ryankapa Ryankapa force-pushed the busctl-sudo-show-machine branch from bc1c602 to f92b383 Compare February 23, 2026 21:32
@cyrus-and
Copy link
Member

Thanks, this is already covered.

@cyrus-and cyrus-and closed this Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants