Privilege escalation
Misconfigured SUID Binaries

No, I cannot see any binary which can be abused here.
Checking for sudo permission

It is asking for a password and currently. We don't have it.
Running linpeas and collection result


Interesting result:











Privilege escalation
I saw that there is .htpasswd file in web directory. I will see it's content.

We can see this file has the password for Mike's user.

You can see that mike is a normal user with one extra privilege of "lxd" group. We can exploit this group.

Exploiting LXD group member.
In order to take escalate the root privilege of the host machine you have to create an image for lxd thus you need to perform the following the action:
Steps to be performed on the attacker machine:
Download build-alpine in your local machine through the git repository.
Execute the script “build -alpine” that will build the latest Alpine image as a compressed file, this step must be executed by the root user.
Transfer the tar file to the host machine
Steps to be performed on the host machine:
Download the alpine image
Import image for lxd
Initialize the image inside a new container.
Mount the container inside the /root directory
Download build-alpine in our kali linux.


Although, I am getting errors. I can see that a tar file has been made.
Sending the Alpine linux container to the target

Configuring the container on the target machine


Last updated
Was this helpful?
