This repository is a lab for NCTU course "Introduction to Computer Networks 2018".
In this lab we are going to learn how to use Scapy - a powerful interactive packet manipulation program, which can forge or decode packets of a wide number of protocols, send them on wire, capture them, match requests and replies, and much more.
- Learn how to define your own protocol and generate a packet payload
- Learn how to use Wireshark to filter packets and find your wanted information
This lab aims to learn how we use Scapy and Python to program a simple network protocol and observe the behavior of packet sending and receiving via Wireshark.
- Basic knowledge of Docker
- Linux networking
- Python with Scapy
- Wireshark
- Define our own proprietary protocol
- In this protocol, we will iteratively send to a server
- ID packet: your (ID + department + gender)
- Secret packet: a digit of the secret key
- The above procedure will repeat 14 times so that you will collect a 14-digit secret key
- E.g., 41228904512480
- Docker (Docker CE)
- Wireshark 2.6.3
- Others
- PieTTy (for Windows)
NOTICE: Please follow this slides for detail.
- In lab assignement
- Environment Setup
- Define protocol via Scapy
- Send packets
- Sniff packets
- Run sender and receiver
- Push your files to remote
- Homework assignement
- Load PCAP via Wireshark
- Filter the target packet
- Decode the secret key
- Report
Packet Manipulation/ # This is ./ in this repository
|--- docker/ # Docker configuration
|--- Dockerfile
|--- main.sh # Scripts for running Docker
|--- [Other files...]
|--- src/ # Source code
|--- data/ # Input files
|--- record.txt # Example file for R/W
|--- out/ # Output files
|--- scripts/ # Networks configuration
|--- main.sh # Scripts for build namespace
|--- [Other files...]
|--- sender.py # Send packets
|--- receiver.py # Receive and sniff packets
|--- Protocol.py # Define your own protocol
|--- decoder.py # Decode the output file
|--- LICENSE
|--- README.md