Chapter 2. Analyzing Network Traffic with Scapy

Traffic analysis is the process of intercepting and analyzing network traffic in order to deduce information from communication. The size of the packets exchanged between two hosts, details of the systems communicating, time and duration of communication are some of the valuable information to an attacker. In this chapter, we will learn how to analyze network traffic with Python scripts:

  • Networking basics
  • Raw socket programming
  • Packet sniffing with Scapy
  • Packet injection with Scapy
  • Parse DNS traffic with Scapy
  • OS fingerprinting with Scapy

Sockets modules

Network sockets is a way to talk to other computers using standard Unix file descriptors, which allow communication between two different processes on the ...

Get Effective Python Penetration Testing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.