Kaiju (Chain)

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

Machine information

Operating System: Microsoft Windows Server 2022 Standard

Chain: True (3 Machines)

Credentials

Username
Password
Method
Scope

Administrator

NakedMelonMan25

KeePass Malicious DLL

Local Administrator on BERSRV200

clare.frost

atnTYzyew3Ok+d

Dumped via LSA

Domain User

✅ Valid Usernames

🔑 Passwords list

Information Gathering

Nmap Scan

Service Enumeration

10.10.170.134

FTP

  • FTP anonymous authentication enabled

  • Keepass database found it.kdbx

Initial foothold on BERSRV200

During the enumeration the tester found users.xml within FTP service that containing a hash FileZilla's password encrypted using PBKDF2-HMAC-SHA256 and mount point E:\Public indicate the presence of a additional disk.

The tester used the format specified in the next thread: https://hashcat.net/forum/thread-7854.htmlarrow-up-right to create the hash format and using 10900 that corresponding to PBKDF2-HMAC-SHA256.

Cracking the hash using Hashcat

Password Found: backup123

Listing the additional disk on BERSRV200

Retrieving the FileZilla's Administrator password

Cracking Administrator's hash

Password: kaiju123

Lateral Movement to sasrv200

Setting up a port forwarding

Obtaining Filezilla version

Download: https://www.fileeagle.com/software/1788/FileZilla-Server/1.8.0arrow-up-right

Connecting to Filezilla Server

Exporting configuration and importing configuration

Due to a bug in FileZilla Server 1.8.0 that prevented users from modifying configurations directly, the tester exported the configuration file, changed the backup's new_native_path attribute to C:\, and reimported it.

Creating and SSH key file for windows

Renaming key to authorized_keys

Uploading the file using FTP server to sasrv200/.ssh/

Connecting via SSH

Privilege Escalation to Administrator

Discovering and Keepass process running

Abusing Keepass database via Malicious DLL

Repository: KeeFarceRebornarrow-up-right

Code:

File: KeePass.config.xml

To abuse of the malicious plugin

  1. Upload KeeFarceRebornPlugin.dll inside E:\Public\Software\KeePass2\Plugins

  2. Replace KeePass.config.xml with the new configurations.

  3. Waiting a minutes for export.xml is exported into C:\Temp .

Disabling real time protection monitoring

Dumping LSA using netexec

Compromise Domain Controller

Discovering a vulnerable templates to ESC8

The tester faced a problem trying to exploit ESC8 due outbound SMB traffic is blocked by a firewall.

Setting up StreamDivert to redirect the port

Upload the binary and its dependencies.

Setting up the port forwarding using SSH

Setting up the ntlmrelayx

Coercing the authentication

Output of ntlmrelayx:

Retrieving NT Hash for Domain Controller

Performing DCSync Attack

Authenticating on BERSRV100

Last updated