7
donuts
5y

Don't quite get this.

There's some bug where u run sudo -u#-1 cmd, it lets you run it as root.

But then it says only if you have permission to do so.

Does that just mean "run sudo" or something else?

I'm thinking sudo -u#-1 /bin/bash would basically give anyone root?

https://bleepingcomputer.com/news/...

Comments
  • 1
    The bug applies specifically to cases where the user is allowed to use sudo to run commands as other users that are not root.
  • 1
    At the place where you specify the user to run it must be: (ALL, !root).
  • 0
    @stop but the user is -1 which gets inteprettes as root bc of bug? I'm not rely sure as just read the news and used sudo -u root before... But busy just seeing it as is won't get me root permission?
  • 1
    @billgates #-1 was interpretet as "do not change the default". And since it was not root or uid 0 itself the check did not fail.
  • 0
    @stop what do you mean by "do not change the default"?
  • 0
    @zcoder if the -u parameter wouldnt be given as an argument.
  • 3
    `sudo` lets you run commands as any user in the system if configured to do so. Usually it's used to run as root, but it others are possible too. It can also be configured to let someone run commands as everyone but root. In that case, the user can use the user ID -1 which sudo will accept because it's not 0 (root), but then will proceed as if it was 0, effectively running the command as root.
Add Comment