NAMP
被认为是最强大的扫描器
所有参数
root@kali:~# nmap
Nmap 7.01 ( https://nmap.org )
Usage: nmap [Scan Type(s)] [Options] {target specification}
TARGET SPECIFICATION: <strong> #目标发现</strong>
Can pass hostnames, IP addresses, networks, etc.
Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254 #例子
<strong> -iL <inputfilename>: Input from list of hosts/networks #指定IP地址列表
-iR <num hosts>: Choose random targets #随机选定目标 +<主机IP>
--exclude <host1[,host2][,host3],...>: Exclude hosts/networks #过滤某些IP,不对其进行扫描
--excludefile <exclude_file>: Exclude list from file #过滤整个文件中的ip,不对其进行扫描</strong>
HOST DISCOVERY:
<strong>-sL: List Scan - simply list targets to scan #列出要进行扫描的的IP
-sn: Ping Scan - disable port scan #不做端口扫描
-Pn: Treat all hosts as online -- skip host discovery <span style="color:#ff0000;"> #防止防火墙拒绝扫描,继续后面的端口扫描</span>
-PS/PA/PU/PY[portlist]: TCP SYN/ACK, UDP or SCTP discovery to given ports
-PE/PP/PM: ICMP echo, timestamp, and netmask request discovery probes #PM适用于老系统
-PO[protocol list]: IP Protocol Ping
-n/-R: Never do DNS resolution/Always resolve [default: sometimes] #不做DNS解析/-R做反向解析
--dns-servers <serv1[,serv2],...>: Specify custom DNS servers #调用指定服务器
--system-dns: Use OS's DNS resolver #默认DNS,加不加没区别
--traceroute: Trace hop path to each host #路由路径</strong>
SCAN TECHNIQUES: #端口扫描
<strong>-sS/sT/sA/sW/sM: TCP SYN/Connect()/ACK/Window/Maimon scans #默认用sS(SYN),加-sT使用TCP扫描,结果准确 #-sM:ACK+FIN
-sU: UDP Scan
-sN/sF/sX: TCP Null, FIN, and Xmas scans #-sN:flags全为0;
--scanflags <flags>: Customize TCP scan flags #自定义flags 【8个flags】 需熟悉协议操作
-sI <zombie host[:probeport]>: Idle scan #僵尸扫描
-sY/sZ: SCTP INIT/COOKIE-ECHO scans #SCTP
-sO: IP protocol scan
-b <FTP relay host>: FTP bounce scan #针对FTP中继</strong>
PORT SPECIFICATION AND SCAN ORDER:
<strong>-p <port ranges>: Only scan specified ports #指定端口
Ex: -p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080,S:9
--exclude-ports <port ranges>: Exclude the specified ports from scanning #指定端口范围
-F: Fast mode - Scan fewer ports than the default scan #快速扫描,即默认的部分端口
-r: Scan ports consecutively - don't randomize #端口顺序连续扫描
--top-ports <number>: Scan <number> most common ports #扫默认1000端口中的指定数量个数
--port-ratio <ratio>: Scan ports more common than <ratio> #扫描更常用端口</strong>
SERVICE/VERSION DETECTION: #服务扫描
<strong>-sV: Probe open ports to determine service/version info #默认情况下,匹配结果可能不够准确 #该部分命令均加上-sV
--version-intensity <level>: Set from 0 (light) to 9 (try all probes) #扫描强度(0-9)
--version-light: Limit to most likely probes (intensity 2) #2级
--version-all: Try every single probe (intensity 9) #9级
--version-trace: Show detailed version scan activity (for debugging) #跟踪扫描过程</strong>
SCRIPT SCAN: #脚本扫描
-sC: equivalent to --script=default
--script=<Lua scripts>: <Lua scripts> is a comma separated list of
directories, script-files or script-categories
--script-args=<n1=v1,[n2=v2,...]>: provide arguments to scripts
--script-args-file=filename: provide NSE script args in a file
--script-trace: Show all data sent and received
--script-updatedb: Update the script database.
<strong><span style="color:#ff0000;"> --script-help=<Lua scripts>: Show help about scripts. #查询脚本作用
<Lua scripts> is a comma-separated list of script-files or
script-categories.</span></strong>
OS DETECTION: #系统
-O: Enable OS detection
--osscan-limit: Limit OS detection to promising targets
--osscan-guess: Guess OS more aggressively
TIMING AND PERFORMANCE: #时间设定
Options which take <time> are in seconds, or append 'ms' (milliseconds),
's' (seconds), 'm' (minutes), or 'h' (hours) to the value (e.g. 30m).
-T<0-5>: Set timing template (higher is faster)
--min-hostgroup/max-hostgroup <size>: Parallel host scan group sizes #最少一次扫多少主机
--min-parallelism/max-parallelism <numprobes>: Probe parallelization
--min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <time>: Specifies #来回访问时间
probe round trip time.
--max-retries <tries>: Caps number of port scan probe retransmissions. #最大探测次数
--host-timeout <time>: Give up on target after this long
--scan-delay/--max-scan-delay <time>: Adjust delay between probes <strong> #扫描延迟,将时间设大一点,避免被发现</strong>
--min-rate <number>: Send packets no slower than <number> per second
--max-rate <number>: Send packets no faster than <number> per second
<strong>FIREWALL/IDS EVASION AND SPOOFING: </strong> #防火墙和IDS的躲避或欺骗
-f; --mtu <val>: fragment packets (optionally w/given MTU) #最大传输单元
-D <decoy1,decoy2[,ME],...>: Cloak a scan with decoys #伪造源地址,增加噪声IP
-S <IP_Address>: Spoof source address #欺骗源地址,得不到回包 建议与-e一起使用
-e <iface>: Use specified interface #指定网卡
-g/--source-port <portnum>: Use given port number #指定源端口
--proxies <url1,[url2],...>: Relay connections through HTTP/SOCKS4 proxies <strong>#指定代理</strong>
--data <hex string>: Append a custom payload to sent packets #在包的数据字段加上内容(16进制数)
--data-string <string>: Append a custom ASCII string to sent packets #加ASCII码
--data-length <num>: Append random data to sent packets
--ip-options <options>: Send packets with specified ip options #加在IP包头
--ttl <val>: Set IP time-to-live field
--spoof-mac <mac address/prefix/vendor name>: Spoof your MAC address #欺骗mac地址
--badsum: Send packets with a bogus TCP/UDP/SCTP checksum #差错检验
OUTPUT:
-oN/-oX/-oS/-oG <file>: Output scan in normal, XML, s|<rIpt kIddi3, #选择输出格式
and Grepable format, respectively, to the given filename.
-oA <basename>: Output in the three major formats at once
-v: Increase verbosity level (use -vv or more for greater effect)
-d: Increase debugging level (use -dd or more for greater effect)
--reason: Display the reason a port is in a particular state
--open: Only show open (or possibly open) ports
--packet-trace: Show all packets sent and received
--iflist: Print host interfaces and routes (for debugging)
--append-output: Append to rather than clobber specified output files
--resume <filename>: Resume an aborted scan
--stylesheet <path/URL>: XSL stylesheet to transform XML output to HTML
--webxml: Reference stylesheet from Nmap.Org for more portable XML
--no-stylesheet: Prevent associating of XSL stylesheet w/XML output
MISC:
-6: Enable IPv6 scanning #IPv6
-A: Enable OS detection, version detection, script scanning, and traceroute #参数组合键
--datadir <dirname>: Specify custom Nmap data file location
--send-eth/--send-ip: Send using raw ethernet frames or IP packets
--privileged: Assume that the user is fully privileged
--unprivileged: Assume the user lacks raw socket privileges
-V: Print version number
-h: Print this help summary page.
EXAMPLES:
nmap -v -A scanme.nmap.org
nmap -v -sn 192.168.0.0/16 10.0.0.0/8
nmap -v -iR 10000 -Pn -p 80
SEE THE MAN PAGE (https://nmap.org/book/man.html) FOR MORE OPTIONS AND EXAMPLES

man nmap:查看操作手册

 
Nmap脚本
查询脚本数量
root@kali:/usr/share/nmap/scripts# less script.db | wc -l
515
 

exploit:漏洞利用 vuln:漏洞识别

某漏洞脚本:smb-vuln-ms10-061.nse
Stuxnet蠕虫利用的4个漏洞之一;Print Spooler权限不当,打印请求可在系统目录可创建文件、执行任意代码;LANMAN API枚举共享打印机;探测远程共享打印机名称
 
若没发现共享打印机:smb-enum-shares枚举共享
身份认证参数——smbuser、smbpassword
 

nmap -p445 --script=smb-enum-shares.nse --script-args=smbuser=admin,smbpassword=pass 1.1.1.1  #判断目标机器是否有共享打印机

 
###先检测是否有共享打印机,再扫描是否存在漏洞###
 
#对象:Windows XP,Server 2003 SP2,Vista,Server 2008, win 7
 
 
 
 
 
 
 
 
 
小白日记,未完待续……
 

小白日记14:kali渗透测试--NMAP的更多相关文章

  1. 小白日记20:kali渗透测试之后渗透测试阶段(一)--上传工具

    后渗透测试阶段--上传工具 为防止管理员将漏洞补上后,我们无法再通过该漏洞控制对方主机,所以需要进行后渗透测试阶段 1.上传各种工具 2.提权:为了全面控制目标系统 3.擦除攻击痕迹:防止管理员通过日 ...

  2. 渗透测试--Nmap主机识别

    通过本篇博客可以学到:Nmap的安装和使用,列举远程机器服务端口,识别目标机器上的服务,指纹,发现局域网中存活主机,端口探测技巧,NSE脚本使用,使用特定网卡进行检测,对比扫描结果ndiff,可视化N ...

  3. kali渗透测试阅读目录

    一.渗透测试介绍 渗透测试介绍及渗透环境配置 二.信息收集 kali 信息收集 三.漏洞扫描 kali 漏洞扫描 四.漏洞利用 kali msf漏洞利用

  4. 如何以最简单的方式安装 KALI 渗透测试框架系统

    0x01 第一步下载 KALI 百度搜索 KALI 官网,找到下载区,我选的是 64 位标准版,但是推荐下载 32 位(功能貌似更全) 这个为下载后的 iso 镜像文件 0x02 第二步打开虚拟机,配 ...

  5. Kali渗透测试工具-netcat

    netcat被称作是网络工具当中的瑞士军刀,短小却功能强大 1.端口扫描 nc -nvz 目标IP 端口范围 eg: nc -nvz 192.168.1.105 1-65535 -n参数是不要使用DN ...

  6. kali渗透测试基础

    一侦查 研究如何收集有关目标的情报,比如开发那些端口用来通信,托管在哪里,提供给客户的服务类型等. 交付内容应该包括需要攻击的所有目标资产清单,与那些资产关联的应用,使用的服务以及可能的资产所有者. ...

  7. [UWP小白日记-14]正则表达式

    匹配2位浮点数:  ^(([1-9]+[0-9]*\.{1}[0-9]{1,2})|([0]\.{1}[1-9]+[0-9]{1,2})|([0]\.\d{1,2})|([1-9][0-9]{1,2} ...

  8. Kali渗透测试学习

    http://blog.chinaunix.net/uid-26349264-id-4041727.html

  9. Kali渗透测试2-抓包/DNS工具

    转载请注明出处. TCPDUMP:命令行网络抓包工具tcpdump -h tcpdump version 4.9.2 libpcap version 1.8.1 OpenSSL 1.1.0h 27 M ...

随机推荐

  1. J2SE7规范_2013.2_类

    8.1 类的定义   包括普通类和枚举类,枚举(略) 下面都是指普通类:   public只能用于外部类,成员类,不能用于局部类,匿名类 protected和private用于成员类时(待解) sta ...

  2. MapReduce的执行过程.

    作业在运行时,数据或者是作业调用的一个运行图. 用户写的代码通过JobClient提交给JobTracker Job对象中封装了JobClient JobConf和我们的Job对象几乎是一回事. 把我 ...

  3. Unity中的单实例

    static GUIManager myInstance; public static GUIManager Instance { get { if (myInstance == null) myIn ...

  4. Hadoop应用开发实战案例 第1周

    本课程的基础课程是,Hadoop数据分析平台课程.相信,能看我本博文的朋友,是有一定的基础了. 只是前个课程是讲解,这个课程是应用. 第一层是:数据源层,代表有生产线上的数据,比如关系型数据库orca ...

  5. homework-05 GoldNumberServer

    作业要求 这次作业要求实现一个黄金数游戏服务器,游戏流程如下,每个client向服务器提交一个有理数,服务器接收到所有客户端的提交后计算这些数字的平均数,再将其乘以黄金分割得到一个GoldNumber ...

  6. Cygwin的包管理器:apt-cyg

    参考<Cygwin的包管理器:apt-cyg> cygwin下安装每次需要启动set_up,比较蛋疼,还是debian的apt方便,在网上看到应该cygwin 下的apt,觉得不错. 从h ...

  7. UVALive 7327 Digit Division (模拟)

    Digit Division 题目链接: http://acm.hust.edu.cn/vjudge/contest/127407#problem/D Description We are given ...

  8. hdu 4496 (并差集)

    题意:给出一个图,m条边,输出删除前i条边后该图的联通块的个数. 思路:刚开始想着是不是联通问题,后来看明白题意后知道,如果从最后一条边添加的话,答案就会出来了,就是并差集的操作. #include& ...

  9. hibernate AOP

    摘自:http://pandonix.iteye.com/blog/336873/ 此前对于AOP的使用仅限于声明式事务,除此之外在实际开发中也没有遇到过与之相关的问题.最近项目中遇到了以下几点需求, ...

  10. 有关static静态修饰符的学习心得

    初学java,面对着这个static修饰符,愣是琢磨了两天时间,还在今天琢磨透了,现在将悟到的东西记录下来: 1.static修饰符表示静态修饰符,其所修饰的内容(变量.方法.代码块暂时学到这三种)统 ...