apt-get update
apt install python3-pip
pip3 install scapy
scapy
>>> myPacket = IP(dst='172.31.7.221')/ICMP()
>>> myPacket
<IP frag=0 proto=icmp dst=172.31.7.221 |<ICMP |>>
>>> send(myPacket)
.
Sent 1 packets.
myPacket = [myPacket, myPacket2, myPacket3]
for x in myPacket:
send(x)
pcap 파일로 저장
tcpdump -neli eth0 icmp -w lee.pcap
로컬로 pcap 파일 이동
scp -i "../aws-keypair/rapa.pem" ubuntu@ec2-3-35-171-59.ap-northeast-2.compute.amazonaws.com:/home/ubuntu/lee.pcap ./