Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on lemmy.my.id

6 replies

How to break user mode protections in 1 quick misstep!

Just like when an admin hands out sudo rights to run a custom script without locking down the script itself.

27

Avoid using sudo and setuid by writing your own sudo program using setuid?

10
lemmy.cafe

How to run a shell script with root permisions without sudo? su to root. Or set up the correct permissions for the script and whatever it needs to touch, and add your user to any required groups, so that you don't need to be root to run the script. Rolling your own solution is never a good idea for anything security-related.

7

Or create a service running with limited access to specific resources, and create an API for users to make requests to that service.

3

Do you know how many times I've made some little bit of shell code "setuid" by writing a shitty little C program that just calls system()?

2

You reached the end

Run Shell Script without sudo and with special bit permission using suid-wrapper | Spyke