scapy 安装及简单测试

关于scapy

Scapy的是一个强大的交互式数据包处理程序(使用python编写)。它能够伪造或者解码大量的网络协议数据包,能够发送、捕捉、匹配请求和回复包等等。它可以很容易地处理一些典型操作,比如端口扫描,tracerouting,探测,单元测试,攻击或网络发现(可替代hping,NMAP,arpspoof,ARP-SK,arping,tcpdump,tethereal,P0F等)。最重要的他还有很多更优秀的特性——发送无效数据帧、注入修改的802.11数据帧、在WEP上解码加密通道(VOIP)、ARP缓存攻击(VLAN)等,这也是其他工具无法处理完成的。

安装:

sudo apt-get install scapy

测试:

885822-20161127142124175-1935392839.png

安装barefoot修改过的scapy(支持vxlan)

git clone git@github.com:Wasdns/scapy-vxlan.git

sudo python setup.py install

885822-20161127142643956-752337318.png

barefoot ReadMe

Barefoot modified scapy, which supports VXLAN. Waiting for VXLAN support to be
added to the main scapy repo.
This modified repo now also supports a ERSPAN-like header.

To install:
sudo python setup.py install

To check that the modifications work, open a scapy CLI (just type 'scapy' in a
terminal) and type the following:

Welcome to Scapy (2.2.0-dev)
>>> load_contrib('vxlan')
>>> Ether()/IP()/UDP()/VXLAN()/Ether()/IP()/TCP()
<Ether  type=0x800 |<IP  frag=0 proto=udp |<UDP  dport=4789 |<VXLAN  |<Ether
type=0x800 |<IP  frag=0 proto=tcp |<TCP  |>>>>>>>
>>> load_contrib('erspan')
>>> Ether()/IP()/GRE()/ERSPAN()/Ether()/IP()/TCP()
<Ether  type=0x800 |<IP  frag=0 proto=gre |<GRE  proto=0x22eb |<ERSPAN  |<Ether
type=0x800 |<IP  frag=0 proto=tcp |<TCP  |>>>>>>>
>>>

Note how the UDP dport and the GRE proto number are updated automatically.

测试结果

./run_scapy

885822-20161127144133487-427982177.png

参考:
Scapy基础学习之一
Scapy介绍官方文档翻译
scapy-vxlan

2016/11/27

转载于:https://www.cnblogs.com/qq952693358/p/6106438.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值