学习小结

2017-01-21  本文已影响0人  末路穷途

1/21

NMAP部分学习

NMAP的中文文档

nmap 192.168.109.100-200
使用默认设置扫描网段,找到一台活活跃主机及其开放端口

nnmap -v scanme.nmap.org
这个选项扫描主机scanme.nmap.org中 所有的保留TCP端口。选项-v启用细节模式。

nmap -sS -O scanme.nmap.org/24
进行秘密SYN扫描,对象为主机Saznme所在的“C类”网段 的255台主机。同时尝试确定每台工作主机的操作系统类型。因为进行SYN扫描 和操作系统检测,这个扫描需要有根权限。

nmap -sV -p 22,53,110,143,4564 198.116.0-255.1-127
进行主机列举和TCP扫描,对象为B类188.116网段中255个8位子网。这 个测试用于确定系统是否运行了sshd、DNS、imapd或4564端口。如果这些端口 打开,将使用版本检测来确定哪种应用在运行。

nmap -v -iR 100000 -P0 -p 80
随机选择100000台主机扫描是否运行Web服务器(80端口)。由起始阶段 发送探测报文来确定主机是否工作非常浪费时间,而且只需探测主机的一个端口,因 此使用-P0禁止对主机列表。

nmap -P0 -p80 -oX logs/pb-port80scan.xml -oG logs/pb-port80scan.gnmap 216.163.128.20/20
扫描4096个IP地址,查找Web服务器(不ping),将结果以Grep和XML格式保存。

host -l company.com | cut -d -f 4 | nmap -v -iL -
进行DNS区域传输,以发现company.com中的主机,然后将IP地址提供给 Nmap。上述命令用于GNU/Linux -- 其它系统进行区域传输时有不同的命令。

AMAP基础

Amap是一个服务器枚举工具,使用这个工具可以识别正运行在一个指定端口或一个范围端口上的应用程序。

  1. --help 内容
amap v5.4 (c) 2011 by van Hauser <vh@thc.org> www.thc.org/thc-amap
Syntax: amap [-A|-B|-P|-W] [-1buSRHUdqv] [[-m] -o <file>] [-D <file>] [-t/-T sec] [-c cons] [-C retries] [-p proto] [-i <file>] [target port [port] ...]
Modes:
  -A         Map applications: send triggers and analyse responses (default)
            发送触发器并分析回复
  -B         Just grab banners, do not send triggers
            仅捕获banners,不发送触发器
  -P         No banner or application stuff - be a (full connect) port scanner   无banner或应用--是(全连接)端口扫描器
Options:
  -1         Only send triggers to a port until 1st identification. Speeeeed!
            仅发送触发器到一个端口直到第一次验证
  -6         Use IPv6 instead of IPv4
  -b         Print ascii banner of responses
  -i FILE    Nmap machine readable outputfile to read ports from
            从namp可读的输出文件获得端口号
  -u         Ports specified on commandline are UDP (default is TCP)
            在UDP上指定端口(默认TCP)
  -R         Do NOT identify RPC service
  -H         Do NOT send application triggers marked as potentially harmful   不发送被标记有害的应用触发器
  -U         Do NOT dump unrecognised responses (better for scripting)
            不丢弃无法识别的回应
  -d         Dump all responses  丢弃所有回应
  -v         Verbose mode, use twice (or more!) for debug (not recommended :-) 
            详细模式,使用2次或以上来测试(不推荐)
  -q         Do not report closed ports, and do not print them as unidentified 
            不报告关闭的端口,不打印为无法识别的端口
  -o FILE [-m] Write output to file FILE, -m creates machine readable output
            输出文件
  -c CONS    Amount of parallel connections to make (default 32, max 256)
            建立大量并行连接
  -C RETRIES Number of reconnects on connect timeouts (see -T) (default 3)
            超时时重建连接(见-T)
  -T SEC     Connect timeout on connection attempts in seconds (default 5)   
            重连在多少秒内尝试的超时(默认5)
  -t SEC     Response wait timeout in seconds (default 5)
            回应等待超时
  -p PROTO   Only send triggers for this protocol (e.g. ftp)
             仅在这个协议中发送触发器(如ftp)
  TARGET PORT   The target address and port(s) to scan (additional to -i)
           扫描目标地址和端口
amap is a tool to identify application protocols on target ports.
Note: this version was NOT compiled with SSL support!
Usage hint: Options "-bqv" are recommended, add "-1" for fast/rush checks.
  1. 测试
上一篇下一篇

猜你喜欢

热点阅读