批量TCP/UDP/ICMP traceroute

 

 
  
  1. 目标网段:8.8.8.1-8.8.8.10 
  2. 1. 
  3. root@ubuntu:~# lsb_release -a 
  4. No LSB modules are available. 
  5. Distributor ID: Ubuntu 
  6. Description:    Ubuntu 11.10 
  7. Release:        11.10 
  8. Codename:       oneiric 
  9. ##### 

2.

 
  
  1. 2a).TCP
  2. nping --tr --tcp -p 80 8.8.8.8 | grep -i icmp 
  3. RCVD (6.0371s) ICMP 202.97.33.106 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=249 id=46643 iplen=56 
  4. RCVD (7.0383s) ICMP 202.97.60.70 >  10.1.1.1 TTL=0 during transit (type=11/code=0ttl=248 id=54216 iplen=56 
  5. RCVD (8.0418s) ICMP 202.97.60.26 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=247 id=0 iplen=56 
  6. RCVD (9.0465s) ICMP 202.97.61.102 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=246 id=0 iplen=56 

 

 
  
  1. 2b).root@ubuntu:~# nping -c 100 --tr --tcp -p 80 8.8.8.1-10 | grep 202.97.61. 
  2. RCVD (73.1864s) ICMP 202.97.61.218 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=248 id=62163 iplen=56 
  3. RCVD (75.1936s) ICMP 202.97.61.218 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=248 id=62205 iplen=56 
  4. RCVD (76.1968s) ICMP 202.97.61.230 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=248 id=21075 iplen=56 
  5. RCVD (90.2412s) ICMP 202.97.61.46 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=246 id=0 iplen=56 
  6. RCVD (91.2441s) ICMP 202.97.61.46 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=246 id=0 iplen=56 
  7. RCVD (92.2474s) ICMP 202.97.61.46 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=246 id=0 iplen=56 
  8. RCVD (93.2503s) ICMP 202.97.61.46 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=246 id=0 iplen=56 
  9. RCVD (94.2557s) ICMP 202.97.61.90 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=246 id=0 iplen=56 
  10. RCVD (95.2589s) ICMP 202.97.61.110 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=246 id=0 iplen=56 
  11. RCVD (96.2628s) ICMP 202.97.61.110 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=246 id=0 iplen=56 
  12. RCVD (97.2651s) ICMP 202.97.61.102 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=246 id=0 iplen=56 
  13. RCVD (98.2715s) ICMP 202.97.61.90 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=246 id=0 iplen=56 
  14. RCVD (99.2728s) ICMP 202.97.61.110 > 10.1.1.1 TTL=0 during transit (type=11/code=0ttl=246 id=0 iplen=56 

 

 
  
  1. 3.ICMP 
  2. nping -c 100 --tr --icmp 8.8.8.8 

 

 
  
  1. 4.UDP 
  2.  nping -c 100 --tr --udp -p53 8.8.8.8 

 

 
  
  1. Tips: 
  2. ICMP time ping  
  3. nping -c4 --icmp --icmp-type 13 google.com 
  4. #######################################################
  5. Nmap - port redirection detection
    1.nmap -sS -PN -n --max-parallelism 1 --packet-trace -p1723,3389 x.x.x.x
    If SYN/ACK TTLs for both ports are different then sometimes it means that there is port redirection on a router
    2.nping --tcp -flags syn -p3389,22,1723 -c 1 -H x.x.x.x

    NAT Detection with NPing
    nping --echo-client "public" echo.nmap.org

    Some general questions about Nping/Ncat
    http://seclists.org/nmap-dev/2011/q3/910