11 votes Some surprising code execution sources in Bash Posted February 28 by hungariantoast Tags: linux, source.yossarian, unix, bash, shell, scripting, author.william woodruff https://yossarian.net/til/post/some-surprising-code-execution-sources-in-bash/ Link information This data is scraped automatically and may be incorrect. Published Feb 1 2025 Word count 335 words 4 comments Collapse replies Expand all Comments sorted by most votes newest first order posted relevance OK hungariantoast (OP) February 28 Link THERE MUST BE ANOTHER WAY INTO THE BUILDING THERE MUST BE ANOTHER WAY INTO THE BUILDING 4 votes [2] xk3 February 28 Link I accidentally discovered that systemd-run can spawn a root shell even if PAM and sudo are broken. I think this relies on polkit. I accidentally discovered that systemd-run can spawn a root shell even if PAM and sudo are broken. I think this relies on polkit. 4 votes jredd23 February 28 Link Parent If it's stupid but it works, it isn't stupid. Bash, the shell that keeps on giving. If it's stupid but it works, it isn't stupid. Bash, the shell that keeps on giving. 1 vote first-must-burn February 28 Link @hungariantoast, have you considered rewriting the Linux kernel in bash? Maybe give those Rust developers a run for their money. @hungariantoast, have you considered rewriting the Linux kernel in bash? Maybe give those Rust developers a run for their money. 3 votes
hungariantoast (OP) February 28 Link THERE MUST BE ANOTHER WAY INTO THE BUILDING THERE MUST BE ANOTHER WAY INTO THE BUILDING 4 votes
[2] xk3 February 28 Link I accidentally discovered that systemd-run can spawn a root shell even if PAM and sudo are broken. I think this relies on polkit. I accidentally discovered that systemd-run can spawn a root shell even if PAM and sudo are broken. I think this relies on polkit. 4 votes jredd23 February 28 Link Parent If it's stupid but it works, it isn't stupid. Bash, the shell that keeps on giving. If it's stupid but it works, it isn't stupid. Bash, the shell that keeps on giving. 1 vote
jredd23 February 28 Link Parent If it's stupid but it works, it isn't stupid. Bash, the shell that keeps on giving. If it's stupid but it works, it isn't stupid. Bash, the shell that keeps on giving. 1 vote
first-must-burn February 28 Link @hungariantoast, have you considered rewriting the Linux kernel in bash? Maybe give those Rust developers a run for their money. @hungariantoast, have you considered rewriting the Linux kernel in bash? Maybe give those Rust developers a run for their money. 3 votes
THERE MUST BE ANOTHER WAY INTO THE BUILDING
I accidentally discovered that
systemd-run
can spawn a root shell even if PAM and sudo are broken. I think this relies on polkit.If it's stupid but it works, it isn't stupid. Bash, the shell that keeps on giving.
@hungariantoast, have you considered rewriting the Linux kernel in bash? Maybe give those Rust developers a run for their money.