Late

Recon

nmap scan

PORT   STATE SERVICE REASON         VERSION
22/tcp open  ssh     syn-ack ttl 63 OpenSSH 7.6p1 Ubuntu 4ubuntu0.6 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 02:5e:29:0e:a3:af:4e:72:9d:a4:fe:0d:cb:5d:83:07 (RSA)
|   256 41:e1:fe:03:a5:c7:97:c4:d5:16:77:f3:41:0c:e9:fb (ECDSA)
|   256 28:39:46:98:17:1e:46:1a:1e:a1:ab:3b:9a:57:70:48 (ED25519)
80/tcp open  http    syn-ack ttl 63 nginx 1.14.0 (Ubuntu)
|_http-favicon: Unknown favicon MD5: 1575FDF0E164C3DB0739CF05D9315BDF
|_http-title: Late - Best online image tools
| http-methods: 
|_  Supported Methods: GET HEAD
|_http-server-header: nginx/1.14.0 (Ubuntu)

Mannual Analysis

I visited “images.late.htb”

It looks like we can upload images on the site .. I uploaded a simple a simple image First and some malicious also but this is not that vulnerablity which I was thinking of. I reaserched online and got that https://book.hacktricks.xyz/pentesting-web/ssti-server-side-template-injectionarrow-up-right this type of vulnerability call SSTI (Server Side Template Injection) / from Here I used the this screenshot to upload to the server .

and boom!! magic we got our maths calculated .

And after turning off the intercept from burp and moving to the webpage we will be awarded with a “results.txt” file.

which contains the same data which we get from repeater .

So, This is the time to move Forward with this attack .

Now I used This 👍

to see if we can read the content of passwd file and we succeded.

after this I thought Can we Get Any Private SSH keys to get initial foothold on the machine.

and use this 👍👍

and got :

Now time to Escalate Our Privs:

I used Linpeas after hard manual Try and Got

this is a script which is owned by root .

After Looking at the script content I got That this Script runs every time anyone Logins through SSH .

That is Good News For Us So Let's Write Something Malicious to it . I tried to overwrite it but failed But I was able to append data to it Soo........

after this , logging in to the machine from other terminal.

and Lets Move to /tmp Directory to see If we got Success or not ??

Ohh Yaahhh !!! BOOoom #------Bling Bling-------- We are success!!!

the dash file is here so It's time to become The All Mighty “ROOT”

==========================================================

Last updated