Nmap:
Played around with smb but nothing came up really, let’s do some vuln scans
Alright we got one let’s exploit
Let’s try it both ways
- Msf console:
Since we have guest access and RPORT default is correct, we only need to set the RHOST right.
After running running this module we got shell as system -> root
Here we can see there are two users. Admin and haris, let’s first take the user flag.
And as last take root flag
- The manual way.
First let us look up some known exploits in exploit-db using searchsploit
We found 42315.py and copied it to our working directory
Here we analyzed it and decided to look for an already adapted script. This one is a POC which creates a pwn.txt file in the root directory. We could change that ourself but why put in effort if there are ready to go scripts on github?
https://github.com/3ndG4me/AutoBlue-MS17-010
Downloaded it in our /opt directory and started the procedure.
- Check if target is vulnerable (we know it is but we will still do the check)
As we thought, target is vulnerable
- Now we need to prep a shell, let’s do this
- Make the payload!
Go into the shellcode dir and execute the .shell_prep.sh
- Make the listener
Navigate to main dir and execute ./listener_prep.sh
- Ready to pwn
After running this command a few times our shell has come through
We know where the flags are and we have them already. Let’s seal this one.
User: 4c546aea7dbee75cbd71de245c8deea9
Root: ff548eb71e920ff6c08843ce9df4e717
ROOTED
