A tricks on how to run a script as root without sudo, in case someone needs this. I use this for toggle on and off camera without pkexec. It’s useful imho

  • mvirts@lemmy.world
    link
    fedilink
    arrow-up
    26
    arrow-down
    1
    ·
    1 year ago

    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.

  • Papamousse@beehaw.org
    link
    fedilink
    arrow-up
    12
    ·
    1 year ago

    Oh, in the 90s I worked at a big defense contractor, one of a shell script had a suid on it, so just by creating a symbolic link named “-x” pointing to the script, and executing it, you entered in a root shell ☺️

  • rotopenguin@infosec.pub
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    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()?