Sendai

This is not a writeup, just my notes about the machine.

Operating System: Windows

Chain: False

Credentials

Username
Password
Method
Scope

WEBSVC

Diamond1

DNS Poisoning

Domain Account

sqlsvc

SurenessBlob85

Found in File

Service Principal Name

clifford.davey

RFmoB2WplgE_3p

PrivescCheck.ps1

Domain Account

✅ Valid Usernames

🔑 Passwords list

Information Gathering

Nmap scan

Service enumeration

DNS

  • Not vulnerable to Zone Transfer AXFR

SMB (enum4linux-ng)

Domain SID: S-1-5-21-3085872742-570972823-736764132

  • Server allows null session authentication (Medium )

  • Server allows guest session authentication (Medium)

    • SID Brute forcing enumeration returned a list of valid domain users.

    • Elliot.Yates and Thomas.Powell returned STATUS_PASSWORD_MUST_CHANGE

LDAP

  • Thomas.Powell does not have vulnerable ADCS template

  • Elliot.Yates does not have vulnerable ADCS template

Kerberoasting attack

Bloodhound enumeration

HTTP

Finding service.sendai.vl

Exploitation

Users with STATUS_PASSWORD_MUST_CHANGE

Changing the Users password

Path 1: Foothold via DACL

Either Thomas.Powell and Elliot.Yates has the same path to compromise MGTSVC$SENDAI.VL and are able to read msDS-ManagedPassword attribute.

Adding Thomas.Powell into admsvc group.

Reading the mgtsvc$ 's msDS-ManagedPassword attribute.

Winrm allowed

Path 2: Foothold via DNS Poisoning

The site issue DNS resolution which allows to create a fake computer and associated a malicious DNS to capture the NTLMv2

Checkig the MachineAccountQuota

Creating a fake computer

Adding a malicious DNS

Wait between 8 - 10 minutes to the server is able to spread the new configuration.

Capturing the NTLMv2 hash

Cracking the NTLMv2 hash

Post Exploitation

Path 1: Domain Compromise via MSSQL

Creating the tunnel

Finding sqlsvs plain text credentials credentials

The tester found sqlsvc plaintext credentials in c:\config\.sqlconfig with a MSSQL service account MSSQL/dc.sendai.vl

Obtaining SID domain account

Retrieving nt hash through plaintext password

Crafting silver ticket

Connecting and enable xp_cmdshell

Abusing seImpersonatePrivilege to compromise domain

Path 2: Domain Compromise via ADCS

Finding clifford.davey plaintext credentials

Attacking ESC4 Misconfiguration (Automatic)

To make a template vulnerable, the following attributes need to be modified with the specified values:

  • Grant Enrollment rights for the vulnerable template.

  • Disable the PEND_ALL_REQUESTS flag in mspki-enrollment-flag to deactivate Manager Approval.

  • Set the mspki-ra-signature attribute to 0 to disable the Authorized Signature requirement.

  • Enable the ENROLLEE_SUPPLIES_SUBJECT flag in mspki-certificate-name-flag to allow requesting users to specify another privileged account name as a SAN.

  • Set the mspki-certificate-application-policy to a certificate purpose for authentication:

    • Client Authentication (OID: 1.3.6.1.5.5.7.3.2)

    • Smart Card Logon (OID: 1.3.6.1.4.1.311.20.2.2)

    • PKINIT Client Authentication (OID: 1.3.6.1.5.2.3.4)

    • Any Purpose (OID: 2.5.29.37.0)

    • No Extended Key Usage (EKU)

Retrieving Adminsitrator's certificate

Retrieving Administrator's NT hash

Requesting an Ticket Granting Ticket to kerberos authentication

Performing DCSync Attack agains domain controller.

Last updated