悄无声息地以极速从域控制器暴力破解 Active Directory 用户名,通过(滥用)LDAP Ping 请求(cLDAP)
查找已启用的普通用户账户。不会生成 Windows 审核日志。高速 —— 每台服务器每秒高达 5 万次 —— 多台服务器并行使用,速度远超此数!

--throttle 20 在每个请求之间添加 20 毫秒延迟(会大幅降低速度)--maxrequests 1000 在每个连接中发送 1000 个请求后关闭并重建连接(尝试避免基于流量特征的检测)go install github.com/lkarlslund/ldapnomnom@latest
ldapnomnom [--server dc1.domain.suffix[,dc2.domain.suffix] | --dnsdomain domain.suffix] [--port number] [--tlsmode notls|tls|starttls] [--input filename] [--output filename] [--parallel number-of-connections] [--maxservers number-of-servers] [--maxstrategy fastest|random] [--throttle n] [--maxrequests n]
ldapnomnom version
连接到 contoso.local 域中最多 32 台服务器,每台服务器 16 个连接 —— 非常非常快
ldapnomnom --input 10m_usernames.txt --output multiservers.txt --dnsdomain contoso.local --maxservers 32 --parallel 16
连接到一台指定服务器,使用 4 个连接
ldapnomnom --input 10m_usernames.txt --output results.txt --server 192.168.0.11 --parallel 4
在其他地方查找用户名列表以供输入,例如来自此处的 1000 万列表
你也可以使用 LDAP Nom Nom 通过添加 --dump 选项来转储 rootDSE 对象的属性。
连接所有能找到的服务器,并将所有可读属性输出为 JSON:
ldapnomnom --output rootDSEs.json --dump
在一次关于定位 Kerberos 服务的 Twitter 讨论中,有人提到了 LDAP Ping 请求的存在。它们在微软开放规范页面中有文档记录,并且包含如何发起 LDAP Ping 的伪代码、所需的参数以及返回的数据。很明显,这里存在一个可被滥用的信息泄露。
发布该工具后,我发现并非只有我注意到了这个“错误”,它显然为了历史向后兼容性而保留至今。
如果你作为攻击者希望避免网络层面的检测,应该使用端口 636 上的 TLS(该工具默认使用未经加密的 LDAP,端口 389)。
如果你喜欢 Active Directory,你可能也会喜欢我的攻击图工具 Adalanche