|_ message_signing: disabled (dangerous, but default)
| smb2-security-mode:
| 2.02:
|_ Message signing enabled but not required
| smb2-time:
| date: 2020-12-11T21:44:31
|_ start_date: N/A
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 54.45 seconds s
```
From the nmap scan we can anonymously login into ftp since it's enabled
## FTP (PORT 21)
<imgsrc="https://imgur.com/lgkDur4.png"/>
<imgsrc="https://imgur.com/orbnWlZ.png"/>
These are the files that we see on the ftp server
<imgsrc="https://imgur.com/Vc3APQQ.png"/>
There wasn't anything on the ftp server so just a Rabbit Hole...but there is another port open which is `SMB` on port 445 and by running `smbmap` to check if `anonymous` user read any share
<imgsrc="https://imgur.com/Rwq5D7A.png"/>
So it looks like we can read share `pics` on the box , now we are going to use `smbclient` to access that share
<imgsrc="https://imgur.com/v2TfQwl.png"/>
We only have two image files `.jpg` and `.jpeg`
<imgsrc="https://imgur.com/nw9vyJk.png"/>
And through `strings` and `steghide` I couldn't find anything, But then I thought about that ftp server and went back and it had all permissions setup means that we can write files on it so I edited the `clean.sh` and put a bash reverse sehll in it
<imgsrc="https://imgur.com/XUoA7M5.png"/>
Then putted it on the ftp server and I saw that `removed_files.log` is modified so when downloaded it to see what changes happened it I got a reverse shell on my netcat
Now I ran a find command to look for SUID's
<imgsrc="https://imgur.com/QTu3Vtv.png"/>
<imgsrc="https://imgur.com/rJpXRGd.png"/>
Here I found that `env` has a SUID so I visited `GTFOBIN` to see I can become root with it
<imgsrc="https://imgur.com/zR9e4PF.png"/>
So we can become root , let's put this into practice
This could have also been done with `lxd` but for that you have to make image , transfer to target then run 4-5 commands and I was lazy to do that so we got root that's the only thing that matters ( :