zoukankan      html  css  js  c++  java
  • Linux常用网络工具:hping高级主机扫描

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

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

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

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

    hping的源代码编译安装


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

    编译及安装命令:

    wget https://github.com/antirez/hping/archive/master.zip
    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

    记录,为更好的自己!

  • 相关阅读:
    C++中左移<<的使用
    学会构造素数序列
    有关lower_bound()函数的使用
    Codeforces Round #166 (Div. 2)
    暴力swap导致TLE问题解决办法
    memset的正确使用
    Codeforces Round #297 (Div. 2)
    Codeforces Round #170 (Div. 2)B
    Codeforces Round #176 (Div. 2)
    C/C++ sort函数的用法
  • 原文地址:https://www.cnblogs.com/ym123/p/4553063.html
Copyright © 2011-2022 走看看