Sendai Walkthrough
Lab Info
Section titled “Lab Info”Lab Name: Sendai
Difficulty: Medium
Platform: Vulnlab
Description
Section titled “Description”Sendai is a medium-difficulty Active Directory lab from vulnlab. We work through delegated privileges and several attack paths to compromise the domain.
1. Initial Access & Enumeration
Section titled “1. Initial Access & Enumeration”1.1 Network Discovery using RustScan
Section titled “1.1 Network Discovery using RustScan”We start with RustScan to find open ports and exposed services.

From the scan results, several services are exposed. The most interesting ones are:
- HTTP (80)
- SMB (445)
- Kerberos (88)
- LDAP/LDAPS (389/636)
Service Enumeration:

- We find the domain name and domain controller hostname and add them to
/etc/hostsfor name resolution during Kerberos-based enumeration and attacks.
1.2 HTTP Enumeration (80)
Section titled “1.2 HTTP Enumeration (80)”Since HTTP is open, we began enumerating the web server to identify any exposed usernames, admin portals, or potential vulnerabilities.

- The page appears to be hosted on a Windows Server, so the next step is directory fuzzing to look for hidden or sensitive paths.
1.3 Directory Fuzzing
Section titled “1.3 Directory Fuzzing”Directory fuzzing did not reveal any useful endpoints. We can now move on to enumerating other exposed services.
1.4 SMB Enumeration
Section titled “1.4 SMB Enumeration”While directory fuzzing runs, we enumerate SMB shares for sensitive information and guest write access.

Key Discoveries:
- Read access was available on multiple shares (
Users,Sendai) $IPC$was accessible, allowing RID cycling for domain user enumeration
1.5 SMB Access as Guest
Section titled “1.5 SMB Access as Guest”We can access the readable SMB shares to look for sensitive data.
Sendai Share:

Two files were downloaded:
incident.txtguidelines.txt
The incident.txt file says accounts with weak passwords have expired and must change their passwords at login. The guidelines.txt file contains the organization’s Acceptable Use Policy.
cat incident.txtDear valued employees,
We hope this message finds you well. We would like to inform you about an important security update regarding user account passwords. Recently, we conducted a thorough penetration test, which revealed that a significant number of user accounts have weak and insecure passwords.To address this concern and maintain the highest level of security within our organization, the IT department has taken immediate action. All user accounts with insecure passwords have been expired as a precautionary measure. This means that affected users will be required to change their passwords upon their next login.We kindly request all impacted users to follow the password reset process promptly to ensure the security and integrity of our systems. Please bear in mind that strong passwords play a crucial role in safeguarding sensitive information and protecting our network from potential threats.If you need assistance or have any questions regarding the password reset procedure, please don't hesitate to reach out to the IT support team. They will be more than happy to guide you through the process and provide any necessary support.
Thank you for your cooperation and commitment to maintaining a secure environment for all of us. Your vigilance and adherence to robust security practices contribute significantly to our collective safety.%User Share:

- I did not find any sensitive information in the User share.
2. Credential Access
Section titled “2. Credential Access”2.1 RID Cycling
Section titled “2.1 RID Cycling”Since $IPC$ is accessible, we use RID cycling to enumerate domain users.
nxc smb sendai.vl -u 'a' -p '' --rid-brute 10000SMB 10.10.71.14 445 DC [*] Windows Server 2022 Build 20348 x64 (name:DC) (domain:sendai.vl) (signing:True) (SMBv1:None) (Null Auth:True)SMB 10.10.71.14 445 DC [+] sendai.vl\a: (Guest)SMB 10.10.71.14 445 DC 498: SENDAI\Enterprise Read-only Domain Controllers (SidTypeGroup)SMB 10.10.71.14 445 DC 500: SENDAI\Administrator (SidTypeUser)SMB 10.10.71.14 445 DC 501: SENDAI\Guest (SidTypeUser)SMB 10.10.71.14 445 DC 502: SENDAI\krbtgt (SidTypeUser)SMB 10.10.71.14 445 DC 512: SENDAI\Domain Admins (SidTypeGroup)SMB 10.10.71.14 445 DC 513: SENDAI\Domain Users (SidTypeGroup)SMB 10.10.71.14 445 DC 514: SENDAI\Domain Guests (SidTypeGroup)SMB 10.10.71.14 445 DC 515: SENDAI\Domain Computers (SidTypeGroup)SMB 10.10.71.14 445 DC 516: SENDAI\Domain Controllers (SidTypeGroup)SMB 10.10.71.14 445 DC 517: SENDAI\Cert Publishers (SidTypeAlias)SMB 10.10.71.14 445 DC 518: SENDAI\Schema Admins (SidTypeGroup)SMB 10.10.71.14 445 DC 519: SENDAI\Enterprise Admins (SidTypeGroup)SMB 10.10.71.14 445 DC 520: SENDAI\Group Policy Creator Owners (SidTypeGroup)SMB 10.10.71.14 445 DC 521: SENDAI\Read-only Domain Controllers (SidTypeGroup)SMB 10.10.71.14 445 DC 522: SENDAI\Cloneable Domain Controllers (SidTypeGroup)SMB 10.10.71.14 445 DC 525: SENDAI\Protected Users (SidTypeGroup)SMB 10.10.71.14 445 DC 526: SENDAI\Key Admins (SidTypeGroup)SMB 10.10.71.14 445 DC 527: SENDAI\Enterprise Key Admins (SidTypeGroup)SMB 10.10.71.14 445 DC 553: SENDAI\RAS and IAS Servers (SidTypeAlias)SMB 10.10.71.14 445 DC 571: SENDAI\Allowed RODC Password Replication Group (SidTypeAlias)SMB 10.10.71.14 445 DC 572: SENDAI\Denied RODC Password Replication Group (SidTypeAlias)SMB 10.10.71.14 445 DC 1000: SENDAI\DC$ (SidTypeUser)SMB 10.10.71.14 445 DC 1101: SENDAI\DnsAdmins (SidTypeAlias)SMB 10.10.71.14 445 DC 1102: SENDAI\DnsUpdateProxy (SidTypeGroup)SMB 10.10.71.14 445 DC 1103: SENDAI\SQLServer2005SQLBrowserUser$DC (SidTypeAlias)SMB 10.10.71.14 445 DC 1104: SENDAI\sqlsvc (SidTypeUser)SMB 10.10.71.14 445 DC 1105: SENDAI\websvc (SidTypeUser)SMB 10.10.71.14 445 DC 1107: SENDAI\staff (SidTypeGroup)SMB 10.10.71.14 445 DC 1108: SENDAI\Dorothy.Jones (SidTypeUser)SMB 10.10.71.14 445 DC 1109: SENDAI\Kerry.Robinson (SidTypeUser)SMB 10.10.71.14 445 DC 1110: SENDAI\Naomi.Gardner (SidTypeUser)SMB 10.10.71.14 445 DC 1111: SENDAI\Anthony.Smith (SidTypeUser)SMB 10.10.71.14 445 DC 1112: SENDAI\Susan.Harper (SidTypeUser)SMB 10.10.71.14 445 DC 1113: SENDAI\Stephen.Simpson (SidTypeUser)SMB 10.10.71.14 445 DC 1114: SENDAI\Marie.Gallagher (SidTypeUser)SMB 10.10.71.14 445 DC 1115: SENDAI\Kathleen.Kelly (SidTypeUser)SMB 10.10.71.14 445 DC 1116: SENDAI\Norman.Baxter (SidTypeUser)SMB 10.10.71.14 445 DC 1117: SENDAI\Jason.Brady (SidTypeUser)SMB 10.10.71.14 445 DC 1118: SENDAI\Elliot.Yates (SidTypeUser)SMB 10.10.71.14 445 DC 1119: SENDAI\Malcolm.Smith (SidTypeUser)SMB 10.10.71.14 445 DC 1120: SENDAI\Lisa.Williams (SidTypeUser)SMB 10.10.71.14 445 DC 1121: SENDAI\Ross.Sullivan (SidTypeUser)SMB 10.10.71.14 445 DC 1122: SENDAI\Clifford.Davey (SidTypeUser)SMB 10.10.71.14 445 DC 1123: SENDAI\Declan.Jenkins (SidTypeUser)SMB 10.10.71.14 445 DC 1124: SENDAI\Lawrence.Grant (SidTypeUser)SMB 10.10.71.14 445 DC 1125: SENDAI\Leslie.Johnson (SidTypeUser)SMB 10.10.71.14 445 DC 1126: SENDAI\Megan.Edwards (SidTypeUser)SMB 10.10.71.14 445 DC 1127: SENDAI\Thomas.Powell (SidTypeUser)SMB 10.10.71.14 445 DC 1128: SENDAI\ca-operators (SidTypeGroup)SMB 10.10.71.14 445 DC 1129: SENDAI\admsvc (SidTypeGroup)SMB 10.10.71.14 445 DC 1130: SENDAI\mgtsvc$ (SidTypeUser)SMB 10.10.71.14 445 DC 1131: SENDAI\support (SidTypeGroup)- The output contains domain users, service accounts, and groups. We sort it into a user list for password spraying.
2.2 Password Spraying
Section titled “2.2 Password Spraying”We extract usernames from the RID cycling output for password spraying.

- After extracting only user accounts (excluding groups and machines), we created a clean username list.
- Final Usernames:
sqlsvcwebsvcstaffDorothy.JonesKerry.RobinsonNaomi.GardnerAnthony.SmithSusan.HarperStephen.SimpsonMarie.GallagherKathleen.KellyNorman.BaxterJason.BradyElliot.YatesMalcolm.SmithLisa.WilliamsRoss.SullivanClifford.DaveyDeclan.JenkinsLawrence.GrantLeslie.JohnsonMegan.EdwardsThomas.Powellca-operatorsadmsvcsupportPassword Spraying Using Null Pass
We test the username list with a null password in nxc and look for successful logins or different errors.

elliot.yatesandthomas.powellreturnSTATUS_PASSWORD_MUST_CHANGEfor the tested blank password. That result gives us a known current password to try in the password-change flow; an expired-password condition alone would not allow an arbitrary reset.
2.3 Reset User Password
Section titled “2.3 Reset User Password”We can now abuse this condition using impacket-changepasswd to reset the password for Elliot.Yates.

- We reset the password for
Elliot.Yates!
Verify Access:

- We log in as
Elliot.Yateswith the new password. We can now collect AD objects for BloodHound analysis or check SMB again with this account’s permissions.
3. Lateral Movement & Pivoting
Section titled “3. Lateral Movement & Pivoting”3.1 Bloodhound Analysis
Section titled “3.1 Bloodhound Analysis”With valid Elliot.Yates credentials, we collect Active Directory objects.
Domain Object Data Dump:

Bloodhound Data Analysis:
We import the data into BloodHound and look for paths from Elliot.Yates.

- BloodHound revealed an attack path from the compromised user Elliot to the MGTSVC$ service account, which was a member of the Remote Desktop Users group.
3.2 Privilege Abuse via GenericAll
Section titled “3.2 Privilege Abuse via GenericAll”Elliot.Yates belongs to the Support group, which has GenericAll permissions over ADMSVC.
We use bloodyAD to add Elliot.Yates to ADMSVC.

- Elliot is now a member of
ADMSVC.
3.3 Abusing ReadGMSAPassword
Section titled “3.3 Abusing ReadGMSAPassword”Since we have added the Elliot.Yates user to the ADMSVC group, which has gMSAReadPassword access, we can abuse this permission to retrieve the NT hash of the MGTSVC$ account.

3.4 Shell as MGTSVC$
Section titled “3.4 Shell as MGTSVC$”We test WinRM with the recovered MGTSVC$ credentials. Remote Desktop Users membership alone does not grant WinRM access; the successful session below demonstrates that the account is allowed to use this endpoint.

- We authenticated as
MGTSVC$!
3.5 User Flag
Section titled “3.5 User Flag”
- We retrieved and submitted the user flag.
4. Privilege Escalation
Section titled “4. Privilege Escalation”4.1 Local Privilege Escalation
Section titled “4.1 Local Privilege Escalation”We run PrivEscCheck to look for stored credentials or service vulnerabilities that could let us escalate privileges.


- We found credentials for
clifford.davey. We can check BloodHound for this user’s permissions.
Verify Access:

The user’s CA-Operators membership suggests AD CS is involved, so we enumerate it for vulnerabilities.
4.2 ADCS Enumeration
Section titled “4.2 ADCS Enumeration”We can enumerate the certificate templates using certipy-ad, supplying valid domain user credentials and the domain controller IP address.

cat 20260201001906_Certipy.txtCertificate Authorities 0 CA Name : DNS Name : dc.sendai.vl Certificate Subject : CN=sendai-DC-CA, DC=sendai, DC=vl Certificate Serial Number : 326E51327366FC954831ECD5C04423BE Certificate Validity Start : 2023-07-11 09:19:29+00:00 Certificate Validity End : 2123-07-11 09:29:29+00:00 Web Enrollment HTTP Enabled : False HTTPS Enabled : False User Specified SAN : Disabled Request Disposition : Issue Enforce Encryption for Requests : Enabled Active Policy : CertificateAuthority_MicrosoftDefault.Policy Permissions Access Rights Enroll : SENDAI.VL\Authenticated UsersCertificate Templates 0 Template Name : SendaiComputer Display Name : SendaiComputer Certificate Authorities : sendai-DC-CA Enabled : True Client Authentication : True Enrollment Agent : False Any Purpose : False Enrollee Supplies Subject : False Certificate Name Flag : SubjectAltRequireDns Enrollment Flag : AutoEnrollment Extended Key Usage : Server Authentication Client Authentication Requires Manager Approval : False Requires Key Archival : False Authorized Signatures Required : 0 Schema Version : 2 Validity Period : 100 years Renewal Period : 6 weeks Minimum RSA Key Length : 4096 Template Created : 2023-07-11T12:46:12+00:00 Template Last Modified : 2023-07-11T12:46:19+00:00 Permissions Enrollment Permissions Enrollment Rights : SENDAI.VL\Domain Computers Object Control Permissions Full Control Principals : SENDAI.VL\ca-operators Write Owner Principals : SENDAI.VL\ca-operators Write Dacl Principals : SENDAI.VL\ca-operators Write Property Enroll : SENDAI.VL\Domain Computers [+] User Enrollable Principals : SENDAI.VL\ca-operators SENDAI.VL\Domain Computers [+] User ACL Principals : SENDAI.VL\ca-operators [!] Vulnerabilities ESC4 : User has dangerous permissions.- The
SendaiComputertemplate was flagged as vulnerable to ESC4 due to excessive permissions granted to theCA-Operatorsgroup. - Our current user,
clifford.davey, belongs to CA-Operators and has Full Control over the template, includingWriteOwnerandWriteDacl.
4.3 Modifying the template
Section titled “4.3 Modifying the template”We use certipy-ad with -write-default-configuration to apply an ESC1 configuration to the ESC4-vulnerable template. This enables certificate-based authentication abuse through the settings below.
- Enable the
Enrollee Supplies Subjectflag- Allows the requester to specify a custom Subject Alternative Name (SAN), such as the username of a privileged account (e.g., Domain Admin).
- Set the Certificate Name Flag to
ENROLLEE_SUPPLIES_SUBJECT- Explicitly enables the behavior above, allowing spoofed identity fields in the certificate request.
- Configure the Extended Key Usage (EKU)
- EKUs define how the certificate can be used. For authentication abuse, this must be set to Client Authentication or Any Purpose.
- Grant enrollment rights to low-privileged principals
- Ensure groups such as
Authenticated Users,Domain Users, orDomain Computershave permission to enroll in the template.
- Ensure groups such as
- Disable additional approval requirements
- Set Requires Manager Approval to
falseand Authorized Signatures Required to0to prevent any manual approval during certificate issuance.
- Set Requires Manager Approval to

Changes Applied
- Enabled ENROLLEE_SUPPLIES_SUBJECT
- Allowed Client Authentication
- Removed approval requirements
- Granted enrollment rights to low-privileged principals
4.4 Verifying the Modification
Section titled “4.4 Verifying the Modification”We run certipy-ad find again to verify the template changes.


The template is now marked as vulnerable to ESC1. We can use it to escalate to Domain Admin.
4.5 Abusing ESC1
Section titled “4.5 Abusing ESC1”We request a certificate with the Domain Admin’s User Principal Name (UPN). The request must name the Certificate Authority (CA) hosting the template, since an environment can have multiple CAs with different templates. We also include the domain controller IP address.

4.6 Authenticate as Administrator
Section titled “4.6 Authenticate as Administrator”We use auth in certipy-ad to authenticate as Administrator and retrieve the NT hash.

4.7 Shell as Domain Admin
Section titled “4.7 Shell as Domain Admin”We can now use evil-winrm to obtain a shell using pass the hash and retrieve the root flag.

- We found and submitted the final root flag.
5. Attack Summary
Section titled “5. Attack Summary”- SMB access as
guestexposed internal security notices and allowed RID cycling to enumerate domain users. - We used the expired-password condition to reset the credentials of
Elliot.Yatesand gain domain access. - BloodHound showed excessive delegated privileges for
Elliot.Yates, which we used to control service-related security groups. - Misconfigured gMSA permissions let us extract the NT hash for
mgtsvc$and use it for remote access. - Local enumeration as
mgtsvc$revealed cached credentials forClifford.Davey, a member of ca-operators. - We modified an
ESC4certificate template to make it vulnerable toESC1, then used it to impersonate Administrator and compromise the domain.