SecNotes

OS: Windows, Difficulty: Medium, IP: 10.10.10.97

Initial Enumeration

# Nmap 7.70 scan initiated Sun Jul 28 22:30:37 2019 as: nmap -sV -sC -O -A -oN O-Detailed -p 80,445,8808 10.10.10.97
Nmap scan report for 10.10.10.97
Host is up (0.41s latency).

PORT     STATE SERVICE      VERSION
80/tcp   open  http         Microsoft IIS httpd 10.0
| http-methods: 
|_  Potentially risky methods: TRACE
|_http-server-header: Microsoft-IIS/10.0
| http-title: Secure Notes - Login
|_Requested resource was login.php
445/tcp  open  microsoft-ds Windows 10 Enterprise 17134 microsoft-ds (workgroup: HTB)
8808/tcp open  http         Microsoft IIS httpd 10.0
| http-methods: 
|_  Potentially risky methods: TRACE
|_http-server-header: Microsoft-IIS/10.0
|_http-title: IIS Windows
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose
Running (JUST GUESSING): Microsoft Windows XP|7 (86%)
OS CPE: cpe:/o:microsoft:windows_xp::sp2 cpe:/o:microsoft:windows_7
Aggressive OS guesses: Microsoft Windows XP SP2 (86%), Microsoft Windows 7 (85%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 2 hops
Service Info: Host: SECNOTES; OS: Windows; CPE: cpe:/o:microsoft:windows

Host script results:
|_clock-skew: mean: 2h13m10s, deviation: 4h02m31s, median: -6m51s
| smb-os-discovery: 
|   OS: Windows 10 Enterprise 17134 (Windows 10 Enterprise 6.3)
|   OS CPE: cpe:/o:microsoft:windows_10::-
|   Computer name: SECNOTES
|   NetBIOS computer name: SECNOTES\x00
|   Workgroup: HTB\x00
|_  System time: 2019-07-28T09:54:12-07:00
| smb-security-mode: 
|   account_used: guest
|   authentication_level: user
|   challenge_response: supported
|_  message_signing: disabled (dangerous, but default)
| smb2-security-mode: 
|   2.02: 
|_    Message signing enabled but not required
| smb2-time: 
|   date: 2019-07-28 22:24:14
|_  start_date: N/A

TRACEROUTE (using port 445/tcp)
HOP RTT       ADDRESS
1   243.88 ms 10.10.14.1
2   478.09 ms 10.10.10.97

OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
# Nmap done at Sun Jul 28 22:31:41 2019 -- 1 IP address (1 host up) scanned in 65.43 seconds
Port 80

We'll execute 2 level SQL Injection on this website, with 1 on Registration and the other on Login with the following credentials.

This attack gets us credentials for the user Tyler. We'll use these to get into the SMB account of this user.

As you can see, we have access to the other web-server found during the initial enumeration phase, running at port 8808

Now we'll upload a simple PHP reverse shell and netcat.exe onto the SMB share to get a reverse shell on the system.

User Own

Root Own

Another thing to notice in the Desktop folder is a link to bash, this means we have WSL installed, let's go and explore that.

We have root on the WSL

There's nothing in the root directory however, bash history has some interesting contents.

It has the connection string for the administrator account. Let's use that and connect via SMB.

Learning Outcome

This box was mostly SMB focused, so had to do a lot of research to understand all the attacks that failed :P

Last updated

Was this helpful?