Hi everyone,
So far so good, in this post we are going to performa samba relay attack using IPV6 protocal. Sometimes when the IPV4 is strong securize you could use this kind of attack in order to compromise a smb communication.
Now i'm going to define step by step the SMB relay process attack using ipv6, because is a little bit different that IPV4 and use other tools:
1. The first point is create a a MItM (Man in the middle) attack over IPV6 protocol, this attack is very easy using the following tool "mitm6":
You can find it at github on the following url: https://github.com/fox-it/mitm6
This tool poisoning the network using DHCP6 and replay it'is own ipv6 link-local address and setting the attackers host as default DNS server.
On the previous image, you can saw a poisoned target machine with the attacker machine ipv6-local setting.
2. The second step is using ntlmrelayx.py tool, for intercept smb connection over iv6 network:
After user attemp to access to a non existing, smb shared folder, we could intercept the socks, for the user worker with aministrative privileges:
3. Using proxychains with crackmapexec we can access to the target machine using the socks captured over localhost without password beacuse the sock connection conatins an open session with password:

Example of dump the SAM, on the target machine, using proxychains and crackmapexec:
Impacket v0.9.21 - Copyright 2020 SecureAuth Corporation[*] SMBv3.0 dialect used[!] Launching semi-interactive shell - Careful what you execute[!] Press help for extra shell commandsC:\>whoamicorporative\worker2C:\>ipconfig[-] Decoding error detected, consider running chcp.com at the target,map the result with https://docs.python.org/3/library/codecs.html#standard-encodingsand then execute wmiexec.py again with -codec and the corresponding codecConfiguraci�n IP de WindowsAdaptador de Ethernet Ethernet:Sufijo DNS espec�fico para la conexi�n. . :V�nculo: direcci�n IPv6 local. . . : fe80::6580:58ad:d564:3e76%12Direcci�n IPv4. . . . . . . . . . . . . . : 10.0.2.15M�scara de subred . . . . . . . . . . . . : 255.255.255.0Puerta de enlace predeterminada . . . . . : 10.0.2.1C:\>hostnameWKS-001C:\>
No comments:
Post a Comment