Created
December 5, 2021 20:02
-
-
Save cfluegel/0ab8f23c4988092fca7c97ad70cb4e6a to your computer and use it in GitHub Desktop.
LLDP with Scapy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Generate a LLDP packet with scapy. Now that I understand the basic structure and was able to play a bit with it, I need to | |
find a way to put this into C/C++ code so that I can automatically identify windows computer. | |
Not sure yet if this is possible with winsock... | |
test=Ether(dst="01:80:c2:00:00:0e", src=get_if_hwaddr(conf.iface), type=0x88cc) / LLDPDUChassisID(subtype=0x4,id=get_if_hwaddr(conf.iface)) / LLDPDUPortID(subtype=0x5, id=str(conf.iface)) / LLDPDUTimeToLive(ttl=600) / LLDPDUEndOfLLDPDU() | |
<Ether dst=01:80:c2:00:00:0e src=50:ed:3c:1e:bc:89 type=LLDP |<LLDPDUChassisID subtype=MAC address id=50:ed:3c:1e:bc:89 |<LLDPDUPortID subtype=interface name id='en0' |<LLDPDUTimeToLive ttl=600 |<LLDPDUEndOfLLDPDU |>>>>> | |
>>> sendp(test) | |
Wireshark showed the packet. I did not see an error of any kind, so the packet seemed to be okay. I need to verify this with | |
an managed switch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment