CDP Sniffing with an Arduino

Firstly full credit to Chris van Marle for his work on his CDPSniffino code, of which I have butchered (to be honest) to get it to work with ENC28J60 ethernet controllers. The packet info that is captured is slightly different, so it took a while debugging. This is also my first Arduino project (not including 3D printers). It has  been a while since I have written C code… Enough excuses… Anyway, I use a lot of Cisco equipment and I have found on many occasion that network wall ports are either not labeled or the labels have worn off. When Continue Reading →

ENC28J60 Ethernet controller with Arduino

This is a notes post for future reference Description: Cheap/cheapest ethernet controller Speed: 10MB/s (half duplex I believe) POE: no Operating voltage: 5 or 3.3v WOL: Yes, although not tested. Libraries: EtherCard (My prefered). CODE: Add the following to: enc28j60.cpp to enable promiscuous mode (disable ip filters), can be used for packet sniffing. void ENC28J60::enablePromiscuous () { //writeRegByte(ERXFCON, readRegByte(ERXFCON) & ERXFCON_CRCEN|ERXFCON_PMEN|ERXFCON_BCEN); writeRegByte(ERXFCON, 0); } Credit #include <EtherCard.h> byte Ethernet::buffer[500]; ether.begin(sizeof Ethernet::buffer, mymac,10); if (!ether.dhcpSetup()) { tft.print(“DHCP failed.”); } ENC28J60::enablePromiscuous(); Pins: Controller -> UNO/Micro/Mini Pro (Compatible) INT -> D2 SO -> D12 SI -> D11 SCK -> D13 CS -> D10 (or D8) VCC -> 5V Continue Reading →