first commit
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled

This commit is contained in:
2025-09-06 16:08:15 +08:00
commit 63285f61aa
2624 changed files with 88491 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
# DNS域传送漏洞
DNS协议支持使用axfr类型的记录进行区域传送用来解决主从同步的问题。如果管理员在配置DNS服务器的时候没有限制允许获取记录的来源将会导致DNS域传送漏洞。
参考链接:
- https://www.acunetix.com/blog/articles/dns-zone-transfers-axfr/
- https://nmap.org/nsedoc/scripts/dns-zone-transfer.html
## 环境搭建
Vulhub使用[Bind9](https://wiki.debian.org/Bind9)来搭建dns服务器但不代表只有Bind9支持AXFR记录。运行DNS服务器
```
docker compose up -d
```
环境运行后将会监听TCP和UDP的53端口DNS协议同时支持从这两个端口进行数据传输。
## 漏洞复现
在Linux下我们可以使用dig命令来发送dns请求。比如我们可以用`dig @your-ip www.vulhub.org`获取域名`www.vulhub.org`在目标dns服务器上的A记录
![](1.png)
发送axfr类型的dns请求`dig @your-ip -t axfr vulhub.org`
![](2.png)
可见,我获取到了`vulhub.org`的所有子域名记录这里存在DNS域传送漏洞。
我们也可以用nmap script来扫描该漏洞`nmap --script dns-zone-transfer.nse --script-args "dns-zone-transfer.domain=vulhub.org" -Pn -p 53 your-ip`
![](3.png)