ksubdomain icon indicating copy to clipboard operation
ksubdomain copied to clipboard

[feature request] 希望能够添加通配符域名过滤的功能

Open M09Ic opened this issue 2 years ago • 4 comments

在爆破子域名的时候, 可以生成10(可通过参数指定)个随机子域名进行请求, 如果这10个随机子域名都能被解析到某个或某几个ip地址, 那就认定这个能够解析到这些ip地址的子域名为通配符域名, 过滤或者标记同样解析到这个ip地址的子域名. 这种情况最好不要停止爆破, 因为通配符域名下也可能存活着一些真正被使用的域名, 如果解析到新的ip地址再将其正常输出.

M09Ic avatar Feb 21 '22 08:02 M09Ic

有无泛解析的域名的测试网站?

boy-hack avatar Feb 23 '22 07:02 boy-hack

有无泛解析的域名的测试网站?

师傅我提供一个 yiche.com 。还希望能加上旧版本过滤泛解析的功能。

nannanshen avatar Feb 28 '22 07:02 nannanshen

这功能在subfinder里有实现过

uid := xid.New().String()

		hosts, _ := r.DNSClient.Lookup(uid + "." + domain)
		if len(hosts) == 0 {
			return fmt.Errorf("%s is not a wildcard domain", domain)
		}

		// Append all wildcard ips found for domains
		for _, host := range hosts {
			r.wildcardIPs[host] = struct{}{}
		}
for _, host := range hosts {
			// Ignore the host if it exists in wildcard ips map
			if _, ok := r.wildcardIPs[host]; ok {
				skip = true
				break
			}
		}

shadow1ng avatar Mar 11 '22 03:03 shadow1ng

这个不完全是我说的办法, 因为如果存在泛解析, 现在subfinder和ksubdomain都会跳过这个域名, 但实际上泛解析不代表完全无用, 依旧有可能配置了几条有效的dns记录. 所以,我觉得就算是泛解析也要继续爆破, 只是可以将同ip的标记为无效解析记录, 只保留与随机子域名不同ip的dns记录

M09Ic avatar Mar 16 '22 09:03 M09Ic