Cicada Walkthrough
Lab Info
Section titled “Lab Info”Lab Name: Cicada
Difficulty: Medium
Platform: Vulnlab
Lab Overview
Section titled “Lab Overview”In Cicada, we recover credentials from an exposed NFS share, then investigate AD CS and use Kerberos relaying to compromise the Domain Controller.
1. Initial Access and Enumeration
Section titled “1. Initial Access and Enumeration”1.1 Network Discovery Using RustScan
Section titled “1.1 Network Discovery Using RustScan”We begin by identifying open ports and services to map potential attack paths.

- Multiple services related to
SMB,LDAP, andKerberosare exposed, indicating that this is an Active Directory environment.

- To simplify DNS resolution and support Kerberos-based attacks, we add the
domain nameandDNS domain nameto the/etc/hostsfile.
1.2 HTTP Enumeration (80)
Section titled “1.2 HTTP Enumeration (80)”An HTTP service is running on port 80, so we enumerate it to look for an initial foothold.

- The application appears to be the default
IIS Windows Server page. - Directory brute-forcing using
gobusterdid not reveal any useful content. - Since no interesting endpoints were discovered, we move on to enumerate other exposed services.
1.3 NFS Enumeration (2049)
Section titled “1.3 NFS Enumeration (2049)”Since NFS is open, we can now enumerate available file shares.
Note: NFS allows remote file access similar to local storage, making it a potential source of sensitive data.




Two image files were discovered:
- The image
marketing.pngcontains credentials. - The other image did not contain useful information.
- Initial credentials for the user
rosie.powellwere recovered from an image located inside therosie.powelldirectory on the NFS share.
1.4 Password Spraying
Section titled “1.4 Password Spraying”We add the directory names to a user list and spray the password from marketing.png: Cicada123.

- Attempted SMB authentication with these credentials resulted in a
STATUS_NOT_SUPPORTEDerror. - SMB rejects the authentication method, so we request a TGT and try again.
2. Credential Access
Section titled “2. Credential Access”2.1 TGT creation for rosie.powell
Section titled “2.1 TGT creation for rosie.powell”To resolve the authentication issue, we can manually request a Kerberos TGT for the user rosie.powell and retry SMB access.


2.2 SMB access as rosie.powell
Section titled “2.2 SMB access as rosie.powell”We use the TGT for rosie.powell to check SMB for useful files.

SMB authentication works with the TGT.

- The
CertEnrollfolder and the user’s certificate-related group membership suggest AD CS is present. We can enumerate it next.
2.3 BloodHound Analysis
Section titled “2.3 BloodHound Analysis”We collect Active Directory objects to inspect privilege relationships and attack paths.

We import the data into BloodHound for analysis.

- BloodHound reveals that
rosie.powellis a member of the Certificate Service DCOM Access group. - This gives us another reason to investigate AD CS abuse.
3. Privilege Escalation via Kerberos Relay to AD CS
Section titled “3. Privilege Escalation via Kerberos Relay to AD CS”3.1 ADCS Enumeration
Section titled “3.1 ADCS Enumeration”

- Further enumeration reveals an AD CS
ESC8vulnerability. - ESC8 conventionally describes NTLM relay to AD CS web enrollment. This walkthrough uses a Kerberos relay variant; the protocol and its prerequisites should be stated separately.
- I had not used this attack before. The research and tools linked below helped me understand it and complete the attack.
Helpful resources:
- Antisyphon Training - ADCS ESC Attacks and Examples.
- Synacktiv research on Kerberos relaying using
krbrelayx
3.2 Adding Machine to Domain
Section titled “3.2 Adding Machine to Domain”Before executing the Kerberos relay attack, we must add a machine account to the domain.
- We use
[bloodyAD](https://github.com/CravateRouge/bloodyAD)to add the account, which saves setting up a Windows VM and joining it manually.

3.3 Setting Up Kerberos Relay with krbrelayx
Section titled “3.3 Setting Up Kerberos Relay with krbrelayx”Next, we configure krbrelayx to relay Kerberos authentication and steal a certificate from the vulnerable AD CS service.

- With
krbrelayxrunning, we launch the attack to request a certificate.

- The relay gives us a certificate from the misconfigured enrollment endpoint. We can use it for certificate-based authentication and privilege escalation.
3.4 Certificate-Based Authentication as Administrator
Section titled “3.4 Certificate-Based Authentication as Administrator”The stolen certificate can now be used to authenticate directly to Active Directory.
We use certipy-ad auth with administrator.pfx to obtain a Kerberos TGT and the Administrator account’s RC4-HMAC (NTLM) hash.

3.5 Credential Dumping using Secretsdump
Section titled “3.5 Credential Dumping using Secretsdump”With the recovered Administrator credential material, we run impacket-secretsdump. A normal domain user hash alone would not authorize replication of domain credentials.

3.6 Shell as Domain Admin
Section titled “3.6 Shell as Domain Admin”- Note: Evil-WinRM did not work with the Administrator NT hash, so I tried a TGT.
We use the Administrator NT hash to request a Kerberos TGT, often called overpass-the-hash, then use the ticket for authentication.

Root Flag Retrieval:
We authenticate using wmiexec and retrieve the flag!

We obtained and submitted the root flag.
4. Attack Summary
Section titled “4. Attack Summary”- Enumerated services and identified an Active Directory environment
- Discovered credentials for
rosie.powellthrough NFS enumeration - Requested a Kerberos TGT for
rosie.powelland accessed SMB shares - Identified the exposed AD CS enrollment endpoint and used Kerberos relay to obtain an Administrator certificate
- Authenticated as Administrator, compromised the Domain Controller, and retrieved the root flag