The purpose of the NetTool project is to demonstrate the use of raw structures and memory maps to achieve raw ethernet, ip, arp, icmp, tcp, and udp input and output. The demonstration tool can ping, identify, and perform a TCP port scan of a host connected via ethernet.
This is a low-level network debugging utility that utilizes raw packet i/o to construct and deconstruct tcp, udp, ipv4, arp, and icmp packets over ethernet.
NetTool provides C++ structure memory maps for numerous on-wire formats, including Ethernet, IP, TCP, UDP, ICMP, and ARP. In order for them to work nicely in the host environment, accompanying functions are provided to fix the endianness of the memory so that the stuructures can be created and used easily.
The demo program interprets IP version 4 (IPv4) packets and processes them based on their protocol. If they are TCP, UDP, or ICMP, they are processed further.
TCP packets are processed and a TCP port scan can be performed by adding a line with "portscan" to the command text file.
UDP packets are processed by the dmeo program, but not used.
The demo program can (by adding "ping" on a line by itself to the command file) send a ping every 30 seconds to the host computer.
The demo program interprets ARP requests and announces in order to determine an IP address for itself and to instruct the host how to communicate with the device. When the host announces an IP address, the next IP address is chosen and used as the device IP.
The only peripheral used by the demo program is an ethernet jack. One can be obtained from SparkFun. The Cool Components Workshop Board also has the necessary parts on it. The configuration, logging, and status reports are all available through the MBED flash drive when attached to any computer via USB.
The demo program does not emulate DHCP, so the interface that is connected to the MBED via ethernet should be configured with a static IP address. Consult your operating system documentation for how to do this.
The demonstration program reads a file off of the MBED flash drive called "ntcmd.txt" which has the following general format:
# comment command
The known commands are:
ping
The ping command sends a ping to the attached host every 30 seconds and writes the status of its replies to the file "ping.txt" for each ping (the file is overwritten every time).
portscan
The port scan command sends a TCP connection request to every legal port on the attached host system and writes the results of the port scan to the file "portscan.txt".
identify
The identify command writes the host IP address and MAC address to the file "identity.txt".
All major actions and status reports by the tool are written to "nettool.log".
No tags
|
2 comments
Please login to post comments.
Just trying the netool. It ejects the mbed every time I run the identify command (and gives me a you did not safely unmount drive warning). Using mbed with a Starboard orange development board and a Macbook Pro.