Skip to content

Commit fcdce56

Browse files
committed
更新子域名文档
1 parent 1c86a9d commit fcdce56

File tree

5 files changed

+77
-55
lines changed

5 files changed

+77
-55
lines changed

docs/assets/configuration/cui.svg

-1
This file was deleted.

docs/assets/configuration/terminalui.svg

-1
This file was deleted.

docs/assets/report_example.html

+13-10
Large diffs are not rendered by default.

docs/configration/cli.md

+32-16
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,46 @@ xray 的命令有 6 个,抛开 `version` 和 `help` 这两个信息展示型
6969

7070
这里介绍一下后面两个命令。
7171

72-
## subdomain 子域名扫描
72+
## subdomain 子域名扫描 (仅高级版)
7373

74-
扫描 `example.com`,并将结果输出到 example.txt
74+
运行 `./xray_darwin_amd64 subdomain -h`,可以看到
7575

7676
```
77-
./xray_darwin_amd64 subdomain --target example.com --text-output example.txt
77+
NAME:
78+
subdomain - Run a subdomain task
79+
80+
USAGE:
81+
subdomain [command options] [arguments...]
82+
83+
OPTIONS:
84+
--target value, -t value SubDomain scan targets
85+
--no-brute disable subdomain brute runner
86+
--web-only only output domains that have web services
87+
--ip-only only output domains that had been resolved successfully
88+
--json-output FILE output xray results to FILE in json format
89+
--html-output FILE output xray results to FILE in HTML format
90+
--text-output FILE output xray results to FILE in plain text format
91+
--webhook-output value post xray result to url in json format
92+
```
93+
94+
扫描 `example.com`,并将结果输出到 example 报告
95+
96+
```
97+
./xray_darwin_amd64 subdomain --target example.com --html-output example.html
7898
```
7999

80-
扫描 `example.com`,并使用 console ui 交互式界面,同时记录结果到 example.txt
100+
扫描 `example.com`,输出到 html 报告,且结果仅保留成功解析到 IP 的
81101

82102
```
83-
./xray_darwin_amd64 subdomain --target example.com --console-ui --text-output example.txt
103+
./xray_darwin_amd64 subdomain --target example.com --html-output example.html --ip-only
84104
```
85-
![cui.svg](../assets/configuration/cui.svg)
86105

87-
其他用法请参照 subdomain 配置文件中的内容
106+
107+
扫描 `example.com`,输出到 html 报告,且结果仅保留域名存在 web 应用的 (80, 443)
108+
109+
```
110+
./xray_darwin_amd64 subdomain --target example.com --html-output example.html --web-only
111+
```
88112

89113
## webscan web 漏洞检测
90114
运行 `./xray_darwin_amd64 webscan -h`,可以看到
@@ -192,12 +216,4 @@ a=b&x=y
192216
./xray_darwin_amd64 webscan --url http://example.com --data "x=y" --html-output 2.html --json-output 1.json
193217
194218
./xray_darwin_amd64 webscan --url http://example.com/ --webhook-output http://host:port/path
195-
```
196-
197-
## 交互式命令行
198-
199-
如果你已经理解了上面的这些内容,但感觉内容繁多记不住,那这个交互式的命令行就是新手福利了。
200-
201-
直接运行 xray 而不加任何参数即可启动交互式命令行。
202-
203-
![ui](../assets/configuration/terminalui.svg)
219+
```

docs/configration/subdomain.md

+32-27
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,37 @@
22

33
```yaml
44
subdomain:
5-
modes: # 使用哪些方式获取子域名
6-
- brute # 字典爆破模式
7-
- api # 使用各大 api 获取
8-
- zone_transfer # 尝试使用域传送漏洞获取
9-
worker_count: 100 # 决定同时允许多少个 DNS 查询
10-
dns_servers: # 查询使用的 DNS server
11-
- 1.1.1.1
12-
- 8.8.8.8
13-
allow_recursive: false # 是否允许递归扫描,开了后如果发现 a.example.com 将继续扫描 a.example.com 的子域名
14-
max_depth: 5 # 最大允许的子域名深度
15-
main_dictionary: "" # 一级子域名字典, 绝对路径
16-
sub_dictionary: "" # 其它层级子域名字典, 绝对路径
5+
max_parallel: 50 # 并发的 worker 数,类似线程数
6+
allow_recursion: false # 是否允许递归的处理子域名,开启后,扫描完一级域名后,会自动将一级的每个域名作为新的目标,去找二级域名, 递归层数由下面的配置决定
7+
max_recursion_depth: 3 # 最大允许的子域名层数,3 意为 3 级子域名
8+
web_only: false # 结果中仅显示有 web 应用的, 没有 web 应用的将被丢弃
9+
ip_only: false # 结果中仅展示解析出 IP 的,没有解析成功的将被丢弃
10+
servers: ["8.8.8.8", "8.8.4.4", "223.5.5.5", "223.6.6.6", "4.2.2.1", "114.114.114.114"] # 子域名扫描过程中使用的 DNS Server
11+
sources:
12+
brute: # 字典爆破模式, 会自动处理泛解析问题
13+
enabled: true
14+
main_dict: "" # 一级大字典路径,为空将使用内置的 TOP 30000 字典
15+
sub_dict: "" # 其他级小字典路径,为空将使用内置过的 TOP 100 字典
16+
httpfinder: # http 的一些方式来抓取子域名,包括 js, 配置文件,http header 等等
17+
enabled: true
18+
dnsfinder: # 使用 dns 的一些错误配置来找寻子域名,如区域传送(zone transfer)
19+
enabled: true
20+
certspotter: # 下面的都是 API 类的了
21+
enabled: true
22+
crt:
23+
enabled: true
24+
hackertarget:
25+
enabled: true
26+
qianxun:
27+
enabled: true
28+
rapiddns:
29+
enabled: true
30+
sublist3r:
31+
enabled: true
32+
threatminer:
33+
enabled: true
34+
virusTotal:
35+
enabled: true
1736
```
1837
19-
子域名的配置项相对比较简洁,对照注释大都可以理解。
20-
21-
## worker_count
22-
23-
这个 worker_count 对应于 goroutine, 如果没写过 go,可以理解为其他语言的协程、线程。如果设置为 100,指的是同时可能有 100 个 DNS 查询请求发出。这和 http 配置中的 `max_qps` 不一样,`max_qps` 指的是 1s 内最大运行的请求数。
24-
25-
## `allow_recursive` 和 `max_depth`
26-
27-
假设子域名扫描的目标为 `example.com`, 发现有子域名 `a.example.com`。
28-
当开启 `allow_recurisive` 后,将自动把 `a.example.com` 视为新的扫描目标,进而可能获得 `b.a.example.com` 等二级子域。 而最大的子域深度由 `max_depth` 控制。
29-
30-
## `main_dictionary` 和 `sub_dictionary`
31-
32-
与 `dirscan` 插件类似,当没有配置这两项时将使用内置字典,默认 main 字典为 Top3000, 默认 sub 字典为 top200。
33-
当配置了自定义字典时,将使用用户配置的字典而禁用内直字典,两个配置项可以单独配置。
38+
子域名的配置项相对比较简洁,对照注释大都可以理解。

0 commit comments

Comments
 (0)