zoukankan      html  css  js  c++  java
  • nmap常用命令

    版本检测(sV)

    版本检测是用来扫描目标主机和端口上运行的软件的版本.它不同于其它的扫描技术,它不是用来扫描目标主机上开放的端口,不过它需要从开放的端口获取信息来判断软件的版本.使用版本检测扫描之前需要先用TCP SYN扫描开放了哪些端口.

    [root@tyzz ~]# nmap -sV 127.0.0.1
    
    Starting Nmap 6.40 ( http://nmap.org ) at 2016-10-17 10:07 CST
    Nmap scan report for localhost (127.0.0.1)
    Host is up (0.0000040s latency).
    Not shown: 997 closed ports
    PORT     STATE SERVICE VERSION
    22/tcp   open  ssh     OpenSSH 6.4 (protocol 2.0)
    25/tcp   open  smtp    Postfix smtpd
    3306/tcp open  mysql   MySQL 5.5.47-MariaDB
    Service Info: Host:  tyzz.localdomain
    
    Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
    Nmap done: 1 IP address (1 host up) scanned in 2.75 seconds

    Idle scan (sL)

    Idle scan是一种先进的扫描技术,它不是用你真实的主机Ip发送数据包,而是使用另外一个目标网络的主机发送数据包.

    #nmap -sL 192.168.1.6 192.168.1.1

    Idle scan是一种理想的匿名扫描技术,通过目标网络中的192.168.1.6向主机192.168.1.1发送数据,来获取192.168.1.1开放的端口

    有需要其它的扫描技术,如 FTP bounce(FTP反弹), fragmentation scan(碎片扫描), IP protocol scan(IP协议扫描),以上讨论的是几种最主要的扫描方式.

    Nmap的OS检测(O)

    Nmap最重要的特点之一是能够远程检测操作系统和软件,Nmap的OS检测技术在渗透测试中用来了解远程主机的操作系统和软件是非常有用的,通过获取的信息你可以知道已知的漏洞。Nmap有一个名为的nmap-OS-DB数据库,该数据库包含超过2600操作系统的信息。 Nmap把TCP和UDP数据包发送到目标机器上,然后检查结果和数据库对照。

    Initiating SYN Stealth Scan at 10:21
    Scanning localhost (www.nxadmin.com) [1000 ports]
    Discovered open port 111/tcp on www.nxadmin.com
    Completed SYN Stealth Scan at 10:21, 0.08s elapsed (1000 total ports)
    Initiating OS detection (try #1) against localhost (www.nxadmin.com)
    Retrying OS detection (try #2) against localhost (www.nxadmin.com)

    上面的例子清楚地表明,Nmap的首次发现开放的端口,然后发送数据包发现远程操作系统。操作系统检测参数是O(大写O)

    [root@tyzz ~]# nmap -O -osscan-guess 127.0.0.1
    
    Starting Nmap 6.40 ( http://nmap.org ) at 2016-10-17 10:15 CST
    Nmap scan report for localhost (127.0.0.1)
    Host is up (0.0000020s latency).
    Not shown: 997 closed ports
    PORT     STATE SERVICE
    22/tcp   open  ssh
    25/tcp   open  smtp
    3306/tcp open  mysql
    Device type: general purpose
    Running: Linux 3.X
    OS CPE: cpe:/o:linux:linux_kernel:3
    OS details: Linux 3.7 - 3.9
    Network Distance: 0 hops
    
    OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
    Nmap done: 1 IP address (1 host up) scanned in 4.80 seconds
  • 相关阅读:
    【leetcode】Binary Search Tree Iterator
    【leetcode】Palindrome Partitioning II
    【leetcode】Best Time to Buy and Sell Stock III
    【leetcode】Best Time to Buy and Sell Stock II
    【leetcode】Longest Consecutive Sequence
    【leetcode】Factorial Trailing Zeroes
    【leetcode】Simplify Path
    【leetcode】Generate Parentheses
    【leetcode】Combination Sum II
    【leetcode】Combination Sum
  • 原文地址:https://www.cnblogs.com/aallenn/p/6700595.html
Copyright © 2011-2022 走看看