Glass
https://www.cyberseclabs.co.uk/labs/info/Glass/
Last updated
https://www.cyberseclabs.co.uk/labs/info/Glass/
Last updated
As per standard we can start with a quick null authentication check with SMB. However, we receive no access.
Looking at ports 5800 and 5900 we do have VNC running. metasploit
has a login scanner module that we can use to enumerate VNC logins auxiliary/scanner/vnc/vnc_login
Set the RHOSTS and RPORT settings and then run with default settings.
metasploit
picks up a login of <blank>:password. Kali comes prei-nstalled with a tool called vncviewer
which we can use to try and log into the remote machine with.
When running the vncviewer
command on Kali you will be prompted for server IP and password. After entering these you should be presented with the screen below.
I will now create a reverse shell and then host it on a Python SimpleHTTPServer
and download it to the victim machine with certutil.exe
First in Kali we create a reverse shell executable with msfvenom
.
We can then move to the directory location of the payload we just created and host a Python HTTP server.
We can now open a netcat
listener on our attacking machine specifying the listening port as the one we defined in the msfvenom
payload.
On the attacking machine we can open cmd.exe
and then use certutil.exe
to download the payload we created.
When ready invoke the payload.
We now get a shell on our attacking machine.
A quick check on our groups and privileges shows we do not belong to any interesting groups or have any interesting permissions.
The systeminfo
command shows we are running on Windows Server 2019.
We can upload winPEAS.exe to the server to further help us with the privilege escalation stage of our attack.
winPEAS soon picks up AlwaysInstallElevated being set to 1 which means true.
When AlwaysInstallElevated is set to 1 MSI files that are invoked will run with SYSTEM permissions. We can use msfvenom
to create a reverse shell MSI payload which we can then run on the system.
We can then start another netcat
listener on our attacking machine and again download the payload to the victim server with certutil.exe
Our netcat
listener then picks up a shell and we confirm we are running as SYSTEM.