8
OrBaruk
7y

Just added a group to my user without the -a option....

Result: my user no longer belongs to the sudo group and I do not have access to the root user or sudo.

Hopefully the group I added was docker, time for some container shenanigans to escalate my privilege back.

Comments
  • 0
    Can you not just su to full root and then apply sudo group to user?
  • 2
    @seraphimsystems not really, root isn't enabled by default on Ubuntu and I hadn't set a password for root

    Fixed it already just had to mount /etc/sudoers inside the container and add my user in it
  • 1
    @OrBaruk I thought container and host were separate?

    This could be bad if someone could do this kind of privilege escalation with docker
  • 0
    But you were able to mount without sudo?
  • 2
    @7400 docker runs as root.
    The ease of using it to escalate privilege is one of its downsides. Or upsides, in this case.
  • 3
    @DeveloperACE you can mount whatever parts of the host filesystem you desire in the container.
  • 0
    Ah, I see. A nice trick to keep in mind!
  • 1
    I feel like this could be abused way too easily
  • 2
    @DeveloperACE absolutely.
Add Comment