Home /
Expert Answers /
Computer Science /
task-1-packet-manipulation-with-scapy-scapy-is-a-powerful-packet-manipulation-tool-which-is-able-pa528
(Solved):
Task 1: Packet Manipulation with Scapy Scapy is a powerful packet manipulation tool, which is able ...
Task 1: Packet Manipulation with Scapy Scapy is a powerful packet manipulation tool, which is able to create, modify, send and capture network packets. It can be used interactively in a command line interface or as a library to construct your own program. Scapy documentation website presents detailed info about how to use this tool/library. Of which, stacking layers and sending packets are important sections that introduce how to encapsulate one layer over another layer and how to send packets. The table presented in this section lists useful functions and methods for packet inspection. The following is an example showing how to use Scapy in a Python program. \#!/usr/bin/env python 3 from scapy. layers.inet impart TCP, IP \( a=\operatorname{IP}() / \operatorname{TCP}(5 p 0 r t=6895 \), dport=8?) a. show() \# zives a detailed view of the packet In this task, you are given a partially complete scapy_tcp.py program, and your job is to use your packet encapsulation and Scapy knowledge to construct an IP packet containing an HTTP GET request to this host info. cern.ch. If your program is created successfully, then you will be able to see the following result. studentiginstance: \( \sim \) files \( \$ \) sudo python3 scapy_tcp.py Begin emission: Finished sending 1 packets. \( \cdots \) HTTP/1.1 200 OK \( \ldots \) \( \langle \) h1 http://info,cern,ch - home of the first website \( \langle/ \) h1 \( \rangle \) \( \langle p\rangle \) From here you \( c a n:\langle/ p\rangle \) \( \langle u l\rangle \) \( \langle \) li \( \rangle\langle a \) href="http://info.cern.ch/hypertext/WWW/TheProject.html" \( > \) Browse the first website \( \langle/ a\rangle\langle/ 1 i\rangle \) Note: You should use command to run this program as root privilege is required for packet receiving. If you need password for student account, then it is