Skip to content

Sendai Walkthrough

Sendai is a medium-difficulty Active Directory lab from vulnlab focused on realistic enterprise misconfigurations and multi-path progression. The machine encourages thorough enumeration, analysis of delegated privileges, and thoughtful attack chaining, demonstrating how minor weaknesses can compound into significant impact.


Let’s start the lab by scanning the target using RustScan to identify open ports and exposed services. This helps us understand which services are accessible and which attack paths are viable for an initial foothold.

image.png

From the scan results, several services are exposed. The most interesting ones are:

  • HTTP (80)
  • SMB (445)
  • Kerberos (88)
  • LDAP/LDAPS (389/636)

These services are commonly leveraged during Active Directory enumeration and exploitation.

Service Enumeration:

image.png

  • We also discovered the domain name and domain controller hostname, which we can add to /etc/hosts. This ensures proper DNS resolution, which is critical for Kerberos-based enumeration and attacks.

Since HTTP is open, we began enumerating the web server to identify any exposed usernames, admin portals, or potential vulnerabilities.

image.png

  • The page appears to be hosted on a Windows Server. lets perform directory fuzzing to look for hidden or sensitive paths.

Directory fuzzing did not reveal any useful endpoints. We can now move on to enumerating other exposed services.

While directory fuzzing was running, we can enumerate the SMB shares to look for sensitive information or writable shares accessible as a guest user.

image.png

Key Discoveries:

  • Read access was available on multiple shares (Users, Sendai)
  • $IPC$ was accessible, allowing RID cycling for domain user enumeration

We can access the readable SMB shares to look for sensitive data.

Sendai Share:

image.png

Two files were downloaded:

  • incident.txt
  • guidelines.txt

The incident.txt file contained important security information indicating that user accounts with weak passwords were expired and would be required to reset their passwords upon login and the other file guidelines.txt is about Organization Acceptable Use Policy.

cat incident.txt

Terminal window
Dear 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:

image.png

  • In User share i didn’t find any sensitive info which we can make utilize off!!…

As we seen $IPC$ access was available, we can now perform RID cycling to enumerate domain users.

Terminal window
> nxc smb sendai.vl -u 'a' -p '' --rid-brute 10000
SMB 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)
  • This returned a large list of domain users, service accounts, and groups which we sort out to create our userlist’s for password spraying attacks!!…

As a prerequisite before performing the password spraying attack, we need to sort our RID cycling output to extract the usernames.

image.png

  • After extracting only user accounts (excluding groups and machines), we created a clean username list.

  • Final Usernames:

    Terminal window
    sqlsvc
    websvc
    staff
    Dorothy.Jones
    Kerry.Robinson
    Naomi.Gardner
    Anthony.Smith
    Susan.Harper
    Stephen.Simpson
    Marie.Gallagher
    Kathleen.Kelly
    Norman.Baxter
    Jason.Brady
    Elliot.Yates
    Malcolm.Smith
    Lisa.Williams
    Ross.Sullivan
    Clifford.Davey
    Declan.Jenkins
    Lawrence.Grant
    Leslie.Johnson
    Megan.Edwards
    Thomas.Powell
    ca-operators
    admsvc
    support

Password Spraying Using Null Pass

So now let’s use the username list we prepared and a null password to check whether we get any hits in the nxc tool or encounter different errors.

image.png

  • Here, we can see that two users, elliot.yates and thomas.powell, received a different error: STATUS_PASSWORD_MUST_CHANGE. This can be abused to change their passwords and take control of the accounts. This also matches what we read in the incident text file obtained from the Sendai share.

We can now abuse this condition using impacket-changepasswd to reset the password for Elliot.Yates.

image.png

  • We successfully resetted and compromised the password for Elliot.Yates!….

Verify Access:

image.png

  • We are able to log in as Elliot.Yates using the new password. From here, we can dump Active Directory object information and analyze it using BloodHound, or, with the newly obtained permissions, enumerate SMB again to look for interesting information.

Using valid credentials as Elliot.Yates, we can now collect Active Directory Domain Object Data!!..

Domain Object Data Dump:

image.png

Bloodhound Data Analysis:

We can now ingest the data to bloodhound and start the analysis for compromised Elliot.Yates user account.

image.png

  • 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.

BloodHound showed that Elliot.Yates was part of the Support group, which had GenericAll permissions over the ADMSVC group!!….

Using bloodyAD, we can now add the Elliot.Yates to the ADMSVC group.

image.png

  • Successfully added the compromised Elliot user to the ADMSVC group!!…

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.

image.png

Since the MGTSVC$ service account is a member of the Remote Desktop Users group, we can use evil-winrm to log in and enumerate the system for further privilege escalation and flags.

image.png

  • Successfully authenticated as MGTSVC$!!!.

image.png

  • The user flag was successfully retrieved and submitted successfully.

We can now run PrivEscCheck to discover any stored credentials or service vulnerabilities that could be abused to escalate our current privileges on the compromised machine.

image.png

image.png

  • We found credentials for the user clifford.davey. We can use these credentials for further escalation and lets see in BloodHound to determine the permissions and privileges assigned to this user.

Verify Access:

image.png

As this user is a member of the CA-Operators group, we can infer that Active Directory Certificate Services (AD CS) is involved and Enumerate to check for any vulnerabilities.

We can enumerate the certificate templates using certipy-ad, supplying valid domain user credentials and the domain controller IP address.

image.png

Terminal window
~
> cat 20260201001906_Certipy.txt
Certificate 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 Users
Certificate 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 SendaiComputer template was flagged as vulnerable to ESC4 due to excessive permissions granted to the CA-Operators group.
  • In this scenario, our current domain user clifford.davey under ca operators group has Full Control, including both WriteOwner and WriteDacl rights over the template.

Next, we can modify the ESC4-vulnerable certificate template to make it exploitable by applying the default ESC1 configuration using the -write-default-configuration option from certipy-ad .This action updates the template with insecure settings that enable certificate-based authentication abuse.

  1. Enable the Enrollee Supplies Subject flag
    • Allows the requester to specify a custom Subject Alternative Name (SAN), such as the username of a privileged account (e.g., Domain Admin).
  2. Set the Certificate Name Flag to ENROLLEE_SUPPLIES_SUBJECT
    • Explicitly enables the behavior above, allowing spoofed identity fields in the certificate request.
  3. 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.
  4. Grant enrollment rights to low-privileged principals
    • Ensure groups such as Authenticated Users, Domain Users, or Domain Computers have permission to enroll in the template.
  5. Disable additional approval requirements
    • Set Requires Manager Approval to false and Authorized Signatures Required to 0 to prevent any manual approval during certificate issuance.

image.png

Changes Applied

  • Enabled ENROLLEE_SUPPLIES_SUBJECT
  • Allowed Client Authentication
  • Removed approval requirements
  • Granted enrollment rights to low-privileged principals

We can verify whether the ESC4 certificate template was successfully updated by running the certipy-ad find

image.png

image.png

As shown in the screenshot above, the certificate template was successfully updated and is now marked as vulnerable to ESC1.We can now exploit this misconfiguration to escalate privileges to Domain Admin.

We can now request a certificate to impersonate Domain Admin by specifying their User Principal Name (UPN).We must also specify the Certificate Authority (CA) that hosts the vulnerable template. This is important because some environments contain multiple CAs, each associated with different certificate templates. we need to include the domain controller IP address to ensure the request is sent to the correct DC.

image.png

Using the auth command in certipy-ad we can now authenticate as administrator and grab the NT hash.

image.png

We can now use evil-winrm to obtain a shell using pass the hash and retrieve the root flag.

image.png

  • The final root flag was found and successfully submitted.

  • Unauthenticated guest SMB access permitted RID cycling, resulting in the disclosure of internal security notices and complete domain user enumeration.
  • The domain’s expired-password policy was then abused to reset the credentials of Elliot.Yates, providing us initial authenticated access to the domain.
  • Subsequent BloodHound analysis identified excessive delegated privileges. These were leveraged to abuse the account Elliot.Yates, enabling control over multiple service-related security groups.
  • Misconfigured gMSA permissions allowed extraction of the NT hash for the mgtsvc$ service account, which was used to facilitate lateral movement through remote access mechanisms.
  • While operating under the mgtsvc$ context, local enumeration revealed cached credentials for Clifford.Davey, a member of the ca-operators group.
  • Finally, Active Directory Certificate Services (AD CS) misconfigurations were exploited. A vulnerable ESC4 certificate template was modified and applied with ESC1 Vulnerabilities and abused allowing impersonation of the Administrator account and resulting in full domain compromise.