Eighteen¶
Initial Scan¶
Port 22 is SSH, port 80 is HTTP.
Enumeration¶
MSSQL is running on the target. Using mssqlclient with discovered credentials:
Exploitation¶
NTLM Hash Capture via Responder¶
Start Responder to capture NTLM hashes:
Force MSSQL to authenticate to our machine:
This captures the mssqlsvc NTLM hash:
The hash could not be cracked.
SQL Database Enumeration¶
Using MSSQL impersonation and privilege escalation:
Query the financial_planner database:
USE financial_planner;
SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE';
SELECT * FROM users;
| id | username | is_admin | |
|---|---|---|---|
| 1002 | admin | admin@eighteen.htb | 1 |
| 1005 | aegaegeag | aegaegaeg@aegaeg.aeg | 1 |
| 1006 | hello | hello@hello.hello | 0 |
Create a user on the web app, then promote to admin:
Cracking the Admin Hash¶
The admin password hash from the web application:
pbkdf2:sha256:600000$AMtzteQIG7yAbZIa$0673ad90a0b4afb19d662336f0fce3a9edd0b7b19193717be28ce4d66c887133
Convert for hashcat:
pbkdf2-to-hashcat.py 'pbkdf2:sha256:600000$AMtzteQIG7yAbZIa$0673ad90a0b4afb19d662336f0fce3a9edd0b7b19193717be28ce4d66c887133'
# sha256:600000:QU10enRlUUlHN3lBYlpJYQ==:BnOtkKC0r7GdZiM28Pzjqe3Qt7GRk3F74ozk1myIcTM=
Crack with hashcat:
Privilege Escalation¶
Details on the final privilege escalation vector to root require additional enumeration of the target system.
Flags¶
user.txt: *** root.txt: ***