Analyzing Network Traffic and Packet Sniffing
This chapter will introduce you to some of the basics of analyzing network traffic using the pcapy-ng and scapy modules in Python. These modules provide you with the ability to write small Python scripts that can understand network traffic. Scapy is a network packet manipulation tool written in Python that can forge or decode packets, forward packets, capture packets, and match requests and responses.
The following topics will be covered in this chapter:
- Understanding the pcapy-ng module to capture and inject packets on the network.
- Exploring the scapy module to capture, analyze, manipulate and inject network packets.
- Implementing the scapy module for network port scanning.
- Using the scapy module to read a pcap file.
- Understanding the scapy module for packet sniffing.
- Working with scapy to detect ARP spoofing attacks.