目标识别

来源:互联网 发布:北京java工程师待遇 编辑:程序博客网 时间:2024/05/01 00:22

最基本的是使用ping 指令
-c count :方的echo request 数据包的总量
-I interface address :设置源地址或者网络借口
-s packet size : 每个数据包的大小(字节数)默认56,再加上IPV4 中8字节的ICMP 包头,默认情况下发送64 字节

ping -c 1 192.168.56.102

arping: 局域网中使用
使用arping 判断某MAC地址的主机是否在线

arping 192.168.56.102 -c 1

使用arping还可以判断某个IP地址是否被同一局域网中的其他主机占用

arping -d -i eth00 192.168.56.102 -c 2

返回1 则说明ip地址被其他主机占用

lbd : 查看主机是否使用负载均衡

lbd 是Load Blancing Detector 的缩写

lbd example.com

使用traceroute 和Otrace
traceroute其中防火墙拦截是使用* 标出

hping 查看服务的启动状态

hping 是TCP/IP 协议免费数据包组装分析工具,而且是用于安全审计、测试防火墙和网络频段的工具之一。目前用于网络扫描技术恶意利用到Nmap端口扫描器。
hping 与大部分电脑安全维护工具类似,拥有诸多网络测试或系统管理先关的应用程序,对于安全专家来说很实用。
主要功能:


防火墙测试
高级端口扫描
用不同的协议、TOS、分片进行网络测试
手动探测MTU路径
高级路由跟踪
操作系统识别
运行时间推测
TCP/IP栈审计


hping的最新版本 hping3

-h  --help      show this help  -v  --version   show version  -c  --count     packet count  -i  --interval  wait (uX for X microseconds, for example -i u1000)      --fast      alias for -i u10000 (10 packets for second)      --faster    alias for -i u1000 (100 packets for second)      --flood      sent packets as fast as possible. Don't show replies.  -n  --numeric   输出数字  -q  --quiet     quiet  -I  --interface 界面名称 (otherwise default routing interface)  -V  --verbose   详细查看  -D  --debug     调试信息  -z  --bind      bind函数  使用 ctrl+z to ttl           (default 目标端口)  -Z  --unbind    unbind ctrl+z      --beep      beep for every matching packet receivedMode  default mode     TCP  -0  --rawip      RAW IP mode  -1  --icmp       ICMP mode  -2  --udp        UDP mode  -8  --scan       扫描模式.                   Example: hping --scan 1-30,70-90 -S www.target.host  -9  --listen     listen modeIP  -a  --spoof      指定用于+spoof的源IP  --rand-dest      随机目标地址模式. see the man.  --rand-source    随机源地址模式. see the man.  -t  --ttl        ttl (default 64)  -N  --id         id (default random)  -W  --winid      use win* id byte ordering  -r  --rel        relativize id field          (to estimate host traffic)  -f  --frag       split packets in more frag.  (may pass weak acl)  -x  --morefrag   设置更多的分片  -y  --dontfrag   不设置分片  -g  --fragoff    设置分片偏移  -m  --mtu        set virtual mtu, implies --frag if packet size > mtu  -o  --tos        type of service (default 0x00), try --tos help  -G  --rroute     includes RECORD_ROUTE option and display the route buffer  --lsrr           loose source routing and record route  --ssrr           strict source routing and record route  -H  --ipproto    设定IP协议栈, only in RAW IP modeICMP  -C  --icmptype   设置icmp type (default echo request)  -K  --icmpcode   设置icmp code (default 0)      --force-icmp 使用所有类型的ICMP (default send only supported types)      --icmp-gw    set gateway address for ICMP redirect (default 0.0.0.0)      --icmp-ts    Alias for --icmp --icmptype 13 (ICMP timestamp)      --icmp-addr  Alias for --icmp --icmptype 17 (ICMP address subnet mask)      --icmp-help  display help for others icmp optionsUDP/TCP  -s  --baseport   默认源端口         (default random)  -p  --destport   [+][+]<port> destination port(default 0) ctrl+z inc/dec  -k  --keep       继续维持源端口  -w  --win        winsize (default 64)  -O  --tcpoff     设置虚拟TCP数据偏移     (instead of tcphdrlen / 4)  -Q  --seqnum     显示TCP序列号  -b  --badcksum   (try to) send packets with a bad IP checksum                   many systems will fix the IP checksum sending the packet                   so you'll get bad UDP/TCP checksum instead.  -M  --setseq     设置TCP序列号  -L  --setack     set TCP ack  -F  --fin        set FIN flag  -S  --syn        set SYN flag  -R  --rst        set RST flag  -P  --push       set PUSH flag  -A  --ack        set ACK flag  -U  --urg        set URG flag  -X  --xmas       set X unused flag (0x40)  -Y  --ymas       set Y unused flag (0x80)  --tcpexitcode    use last tcp->th_flags as exit code  --tcp-mss        enable the TCP MSS option with the given value  --tcp-timestamp  enable the TCP timestamp option to guess the HZ/uptimeCommon  -d  --data       data size                    (default is 0)  -E  --file       data from file  -e  --sign       add 'signature'  -j  --dump       以16进制转储数据包  -J  --print      用可印刷的字符转储数据包  -B  --safe       enable 'safe' protocol  -u  --end        tell you when --file reached EOF and prevent rewind  -T  --traceroute 路由跟踪模式              (implies --bind and --ttl 1)  --tr-stop        Exit when receive the first not ICMP in traceroute mode  --tr-keep-ttl    Keep the source TTL fixed, useful to monitor just one hop  --tr-no-rtt       Don't calculate/show RTT information in traceroute modeARS packet description (new, unstable)  --apd-send       Send the packet described with APD (see docs/APD.txt)

例如hping 端口扫描:

 hping3 --scan 1-300  42.156.141.96

利用hping3 生成ICMP数据包以及查看结果,传输给自己时:

hping3hping send {ip(daddr=192.168.10.130)+icmp(type=8,code=0)}

最后利用

hping recv eth2

执行数据包转储

0 0
原创粉丝点击