Linux常用网络工具之高级主机扫描工具hping使用介绍

软件发布|下载排行|最新软件

当前位置:首页操作系统Linux操作系统

Linux常用网络工具之高级主机扫描工具hping使用介绍

  2020-12-11 我要评论

之前介绍了主机扫描工具fping,可以参考我写的《Linux常用网络工具:fping主机扫描》。

hping是一款更高级的主机扫描工具,它支持TCP/IP数据包构造、分析,在某些防火墙配置或运营商拦截ICMP数据包时,可用来扫描存活主机。

hping还可以伪造源IP,用来发起DDos攻击。

hping官方网站:http://www.hping.org/

hping的源代码编译安装

hping的源代码托管在GitHub,地址:https://github.com/antirez/hping

编译及安装命令:


wget <a href="https://github.com/antirez/hping/archive/master.zip">https://github.com/antirez/hping/archive/master.zip</a>
unzip master
cd hping-master
yum install libpcap-devel
./configure
make
make install

hping依赖libpcap-devel,所以需要先进行安装,make过程中还可能出现以下两个问题:

出现问题:libpcap_stuff.c:20:21: 错误:net/bpf.h:没有那个文件或目录

解决办法:ln -sf /usr/include/pcap-bpf.h /usr/include/net/bpf.h;

出现问题:/usr/bin/ld: cannot find -ltcl

解决办法:yum -y install tcl     yum -y install tcl-devel;

然后输入:


make strip
make install

hping常用参数介绍

如果防火墙或运营商屏蔽ICMP的话,hping可以对指定目标端口发起TCP探测,常用的参数:

-p 端口号
-S 发送TCP的SYN包
-A 发送TCP的ACK包
-a 伪造源IP
--flood 尽可能快的发送,慎用

输入示例:



hping 192.168.2.224 -p 80 -S
hping 192.168.2.224 -p 80 -A
hping 192.168.2.224 -p 80 -S -a 192.168.0.91

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们