一、被动信息收集

被动信息收集指的是通过公开渠道可获得的信息,与目标系统不产生直接交互,尽量避免留下一切痕迹的信息探测。被动探测技术收集的信息可以大致分为两类, 即配置信息和状态信息。

被动探测可收集的信息
特征 被动技术
IP地址或地址段 探测是否存活
MAC地址 内部嗅探ARP,DHCP
域名信息和主机名 外部嗅探DNS,内部嗅探NetBIOS,ARP,DHCP
操作系统和版本 指纹信息
运行的应用软件  
用户名和密码  
设备类型(服务器、客户机) 端口和协议使用,ICMP
运行的服务 端口和协议的使用
设备运行状态 活动水平和ICMP
应用状态 在应用端口上设备的对外活动水平
链路运行状态 活动水平和ICMP
链路利用 活动水平
设备逻辑位置 基于TTL的距离跳数
邮件地址,公司地址,公司组织架构,联系电话/传真号码,人员姓名/职务 为社会工程学做准备
文档图片数据  
公开商业信息  
   

关于开源智能信息收集文章:
美国军方:http://www.fas.org/irp/dodair/army/atp2-22-2.pdf
北大西洋公约组织:http://information-retireval.info/docs/NATO-OSINT.html

二、域名系统DNS

域名系统(Domain Name System,DNS)是因特网的一项服务。它作为将域名和IP地址相互映射的一个分布式数据库,能够使人更方便地访问互联网。DNS使用TCPUDP端口53。当前,对于每一级域名长度的限制是63个字符,域名总长度则不能超过253个字符。
 
DNS与FQND
FQDN:(Fully Qualified Domain Name)完全合格域名/全称域名,是指主机名加上全路径,全路径中列出了序列中所有域成员。全域名可以从逻辑上准确地表示出主机在什么地方,也可以说全域名是主机名的一种完全表示形式。(例如:DNS:sina.com;FQND:www.sina.com)
 
主机名到IP地址的映射有两种方式:
1)静态映射,每台设备上都配置主机到IP地址的映射,各设备独立维护自己的映射表,而且只供本设备使用;
2)动态映射,建立一套域名解析系统(DNS),只在专门的DNS服务器上配置主机到IP地址的映射,网络上需要使用主机名通信的设备,首先需要到DNS服务器查询主机所对应的IP地址。
 

域名结构

通常 Internet 主机域名的一般结构为:主机名.三级域名.二级域名.顶级域名。 Internet 的顶级域名由 Internet网络协会域名注册查询负责网络地址分配的委员会进行登记和管理,它还为 Internet的每一台主机分配唯一的 IP 地址。全世界现有三个大的网络信息中心: 位于美国的 Inter-NIC,负责美国及其他地区; 位于荷兰的RIPE-NIC,负责欧洲地区;位于日本的APNIC ,负责亚太地区。
 
记录类型
1.主机记录(A记录):A记录是用于名称解析的重要记录,它将特定的主机名映射到对应主机的IP地址上。
2.别名记录(CNAME记录): CNAME记录用于将某个别名指向到某个A记录上,这样就不需要再为某个新名字另外创建一条新的A记录。
3.IPv6主机记录(AAAA记录): 与A记录对应,用于将特定的主机名映射到一个主机的IPv6地址。
4.邮件交换记录(MX记录):用于将以该域名为结尾的电子邮件指向对应的邮件服务器以进行处理
5.域名服务器记录(NS记录 ):用来表明由哪台服务器对该域名进行解析。可以查询某一子域名的DNS记录
6.PTR记录,是电子邮件记录中的邮件交换记录的一种,被用于电子邮件发送过程中的反向地址解析
7.服务位置记录(SRV记录): 用于定义提供特定服务的服务器的位置,如主机(hostname),端口(port number)等。
8.NAPTR记录:它提供了正则表达式方式去映射一个域名。NAPTR记录非常著名的一个应用是用于ENUM查询。
 
域名解析
DNS查询有两种方式:递归和迭代。DNS客户端设置使用的DNS服务器一般都是递归服务器,它负责全权处理客户端的DNS查询请求,直到返回最终结果。而DNS服务器之间一般采用迭代查询方式。
 
 

三、DNS-nslookup

Nslookup 是一个监测网络中DNS服务器是否能正确实现域名解析的命令行工具。用于查询DNS的记录,查看域名解析是否正常,在网络故障的时候用来诊断网络问题它在 Windows NT/2000/XP(在之后的windows系统也都可以用的,比如win7,win8等) 中均可使用。

操作手册查询:man nslookup

<span style="font-size:18px;">NSLOOKUP(1)                         BIND9                         NSLOOKUP(1)

NAME
nslookup - query Internet name servers interactively SYNOPSIS
nslookup [-option] [name | -] [server] DESCRIPTION
Nslookup is a program to query Internet domain name servers. Nslookup
has two modes: interactive and non-interactive. Interactive mode
allows the user to query name servers for information about various
hosts and domains or to print a list of hosts in a domain.
Non-interactive mode is used to print just the name and requested
information for a host or domain. ARGUMENTS
Interactive mode is entered in the following cases: 1. when no arguments are given (the default name server will be used) 2. when the first argument is a hyphen (-) and the second argument is the host name or Internet address of a name server. Non-interactive mode is used when the name or Internet address of the host to
be looked up is given as the first argument. The optional second argument
specifies the host name or address of a name server. Options can also be specified on the command line if they precede the
arguments and are prefixed with a hyphen. For example, to change the default
query type to host information, and the initial timeout to 10 seconds, type: nslookup -query=hinfo -timeout=10 #-查询=hinfo 超时=10 INTERACTIVE COMMANDS #交互式命令
host [server]
Look up information for host using the current default server or
using server, if specified. If host is an Internet address and the
query type is A or PTR, the name of the host is returned. If host
is a name and does not have a trailing period, the search list is
used to qualify the name. To look up a host not in the current domain, append a period to
the name.
server domain lserver domain
Change the default server to domain; lserver uses the initial
server to look up information about domain, while server uses the
current default server. If an authoritative answer can't be found,
the names of servers that might have the answer are returned. root
not implemented finger
not implemented ls
not implemented view
not implemented help
not implemented ?
not implemented exit
Exits the program. set keyword[=value]
This command is used to change state information that affects the
lookups. Valid keywords are: all
Prints the current values of the frequently used options
to set. Information about the current default server and
host is also printed. class="value"
Change the query class to one of: IN
the Internet class CH
the Chaos class HS
the Hesiod class ANY
wildcard The class specifies the protocol group of the
information. (Default = IN; abbreviation = cl) [no]debug
Turn on or off the display of the full response packet and
any intermediate response packets when searching. (Default = nodebug; abbreviation = [no]deb) [no]d2
Turn debugging mode on or off. This displays more about
what nslookup is doing.
(Default = nod2) domain=name
Sets the search list to name. [no]search
If the lookup request contains at least one period but
doesn't end with a trailing period, append the domain
names in the domain search list to the request until an
answer is received. (Default = search) port=value
Change the default TCP/UDP name server port to value. (Default = 53; abbreviation = po) querytype=value type=value
Change the type of the information query. (Default = A; abbreviations = q, ty) [no]recurse
Tell the name server to query other servers if it does not
have the information. (Default = recurse; abbreviation = [no]rec) ndots=number
Set the number of dots (label separators) in a domain that
will disable searching. Absolute names always stop
searching. retry=number
Set the number of retries to number. timeout=number
Change the initial timeout interval for waiting for a
reply to number seconds. [no]vc
Always use a virtual circuit when sending requests to the
server. (Default = novc) [no]fail
Try the next nameserver if a nameserver responds with
SERVFAIL or a referral (nofail) or terminate query (fail)
on such a response. (Default = nofail) FILES
/etc/resolv.conf SEE ALSO
dig(1), host(1), named(8). AUTHOR
Andrew Cherenson COPYRIGHT
Copyright © 2004-2007, 2010, 2013, 2014 Internet Systems Consortium,
Inc. ("ISC") BIND9 Jun 30, 2000 NSLOOKUP(1)
</span>

查询范例

<span style="font-size:18px;">root@kali:~# nslookup                                                    #进入nslookup模式
> server #查询本机DNS服务器
Default server: 192.168.1.1
Address: 192.168.1.1#53
> sina.com
Server: 192.168.1.1
Address: 192.168.1.1#53 Non-authoritative answer:
Name: sina.com
Address: 66.102.251.33
> set type=a #指定类型为A
> sina.com
Server: 192.168.1.1
Address: 192.168.1.1#53 Non-authoritative answer:
Name: sina.com
Address: 66.102.251.33
> set type=MX #指定类型为MX
> sina.com #注:不能输入www.sina.com等主机域名
Server: 192.168.1.1
Address: 192.168.1.1#53 Non-authoritative answer: #优先级
sina.com mail exchanger = 10 freemx3.sinamail.sina.com.cn.
sina.com mail exchanger = 5 freemx1.sinamail.sina.com.cn.
sina.com mail exchanger = 10 freemx2.sinamail.sina.com.cn. Authoritative answers can be found from:
com nameserver = k.gtld-servers.net.
com nameserver = f.gtld-servers.net.
com nameserver = g.gtld-servers.net.
com nameserver = m.gtld-servers.net.
com nameserver = h.gtld-servers.net.
com nameserver = l.gtld-servers.net.
com nameserver = a.gtld-servers.net.
com nameserver = d.gtld-servers.net.
com nameserver = j.gtld-servers.net.
com nameserver = i.gtld-servers.net.
com nameserver = b.gtld-servers.net.
com nameserver = e.gtld-servers.net.
com nameserver = c.gtld-servers.net.
g.gtld-servers.net internet address = 192.42.93.30
j.gtld-servers.net internet address = 192.48.79.30
i.gtld-servers.net internet address = 192.43.172.30
e.gtld-servers.net internet address = 192.12.94.30
a.gtld-servers.net internet address = 192.5.6.30
a.gtld-servers.net has AAAA address 2001:503:a83e::2:30
h.gtld-servers.net internet address = 192.54.112.30
f.gtld-servers.net internet address = 192.35.51.30
b.gtld-servers.net internet address = 192.33.14.30
</span>

指定域名解析服务器

<span style="font-size:18px;">root@kali:~# nslookup
> server 156.154.70.22 #指定域名解析服务器
Default server: 156.154.70.22
Address: 156.154.70.22#53
> sina.com
Server: 156.154.70.22
Address: 156.154.70.22#53 Non-authoritative answer:
Name: sina.com
Address: 66.102.251.33
> </span>

长指令

<span style="font-size:18px;">root@kali:~# nslookup -q=ns sina.com 156.154.70.22                       #-q是type简写,156..为指定DNS服务器
Server: 156.154.70.22
Address: 156.154.70.22#53 Non-authoritative answer:
sina.com nameserver = ns2.sina.com.cn.
sina.com nameserver = ns1.sina.com.
sina.com nameserver = ns1.sina.com.cn.
sina.com nameserver = ns2.sina.com.
sina.com nameserver = ns4.sina.com.cn.
sina.com nameserver = ns4.sina.com.
sina.com nameserver = ns3.sina.com.cn.
sina.com nameserver = ns3.sina.com. Authoritative answers can be found from:
ns1.sina.com internet address = 114.134.80.144
ns2.sina.com internet address = 114.134.80.145
ns3.sina.com internet address = 61.172.201.254
ns4.sina.com internet address = 123.125.29.99
</span>

小白日记2:kali渗透测试之被动信息收集(一)的更多相关文章

  1. 小白日记6:kali渗透测试之被动信息收集(五)-Recon-ng

    Recon-ng Recon-NG是由python编写的一个开源的Web侦查(信息收集)框架.Recon-ng框架是一个全特性的工具,使用它可以自动的收集信息和网络侦查.其命令格式与Metasploi ...

  2. 小白日记3:kali渗透测试之被动信息收集(二)-dig、whios、dnsenum、fierce

    一.DIG linux下查询域名解析有两种选择,nslookup或者dig.Dig(Domain Information Groper)是一个在类Unix命令行模式下查询DNS包括NS记录,A记录,M ...

  3. 小白日记5:kali渗透测试之被动信息收集(四)--theHarvester,metagoofil,meltag,个人专属密码字典--CUPP

    1.theHarvester theHarvester是一个社会工程学工具,它通过搜索引擎.PGP服务器以及SHODAN数据库收集用户的email,子域名,主机,雇员名,开放端口和banner信息. ...

  4. 小白日记4:kali渗透测试之被动信息收集(三)--Shodan、Google

    搜索引擎 公司新闻动态 重要雇员信息 机密⽂文档 / 网络拓扑 用户名密码 目标系统软硬件技术架构一.Shodan Shodan只搜网络设备.很多设备并不应该接入互联网,却由于本地网络管理员的疏忽和懒 ...

  5. 小白日记7:kali渗透测试之主动信息收集-发现(一)--二层发现:arping/shell脚本,Netdiscover,scapy

    主动信息收集 被动信息收集可能不准确,可以用主动信息收集验证   特点:直接与目标系统交互通信,无法避免留下访问痕迹 解决方法:1.使用受控的第三方电脑进行探测,使用代理 (做好被封杀的准备)   2 ...

  6. 小白日记8:kali渗透测试之主动信息收集(二)三层发现:ping、traceroute、scapy、nmap、fping、Hping

    三层发现 三层协议有:IP以及ICMP协议(internet管理协议).icmp的作用是用来实现intenet管理的,进行路径的发现,网路通信情况,或者目标主机的状态:在三层发现中主要使用icmp协议 ...

  7. 小白日记9:kali渗透测试之主动信息收集(二)四层发现:TCP、UDP、nmap、hping、scapy

    四层发现 四层发现的目的是扫描出可能存活的IP地址,四层发现虽然涉及端口扫描,但是并不对端口的状态进行精确判断,其本质是利用四层协议的一些通信来识别主机ip是否存在. 四层发现的优点: 1.可路由且结 ...

  8. kali linux之被动信息收集(dns信息收集,区域传输,字典爆破)

    公开可获取的信息,不与目标系统产生交互,避免留下痕迹 下图来自美军方 pdf链接:http://www.fas.org/irp/doddir/army/atp2-22-9.pdf 信息收集内容(可利用 ...

  9. kali linux之被动信息收集recon-ng

    开源的全特性的web侦查框架,基于python开发 命令格式与msf一致 使用方法:模块,数据库,报告 -h 帮助信息 -v 版本信息 -w 进入工作区,如果没有此工作区,则创建该工作区 -r 批量的 ...

随机推荐

  1. Python 笔记 : 类和继承

    # -*- coding=  utf-8 -*- # 文件编码定义的语法规则是: coding[:=]/s*([-/w.]+) # 未指定编码将默认为 : ASCII # 同时要注意物理文件的编码也要 ...

  2. Google Chart API 参考 中文版

    Google Chart API 参考 中文版 文档信息 翻译: Cloudream ,最后修改:02/22/2008 06:11:08 英文版版权归 Google , 转载此中文版必须以链接形式注明 ...

  3. Python的列表排序

    Python的列表排序 本文为转载,源地址为:http://blog.csdn.net/horin153/article/details/7076321 在 Python 中, 当需要对一个 list ...

  4. 第二百三十七天 how can I 坚持

    最近好像迷上看小说了,<灵域>,而且也感觉会看小说了. 话说,今天好冷啊,真怕在路上冻着就冻萌了,寒风赤骨啊. 好想买个帽子.好想让送个帽子. 睡觉.

  5. struts2+Hibernate4+spring3+EasyUI环境搭建之一:准备工作

    SSHE环境搭建第一步:安装软件(经验:安装软件路径最好不要有空格.括弧.中文等特殊符号)1.Jdk72.tomcat73.maven34.MyEclipse10.7 破解及优化设置(设置本地安装jd ...

  6. thymeleaf中的th:assert用法

    th:assert 断言标签 th:assert属性可以指定一个以逗号分隔的表达式对其进行评估并生产适用于每一个评价,如果不抛出异常 <div th:assert="${onevar} ...

  7. Unity3D之空间转换学习笔记(二):基础数学

    这期笔记我们专注Unity提供的各种数学相关的类来学习. 时间Time API文档地址:http://docs.unity3d.com/ScriptReference/Time.html 时间加/减速 ...

  8. SQL SERVER 2008/2012/2012R2/2014 设置开启远程连接(sa配置)

    本文方案适用于Microsoft Sql Server 2008/2012/2012 r2/2014版本,以下简称MSSQLSERVER. MSSQL默认是不允许远程连接,并且禁用sa账户的.如果想要 ...

  9. SQL将本地图片文件插入到数据库

    GO RECONFIGURE GO GO RECONFIGURE GO --生成格式化文件 在此基础上再进行编辑,自己创建一个格式化文件有点问题 --10.0 -- --1 SQLBINARY 0 0 ...

  10. cocos2d-x 1970毫秒数转时间

    转自:http://www.cocos2dev.com/?p=322 做网络游戏时,服务器的时间在本地显示的时候要转成本地时间,可以利用系统函数转化. ";//假如这是服务器的时间 ] = ...