The term "domain" typically refers to Microsoft Active Directory (AD) domains, a logical management boundary built on LDAP, Kerberos, and DNS. Unlike workgroups using NTLM local SAM verification, AD domains use Kerberos ticket authentication and NetLogon RPC, with Domain Controllers (DCs) acting as key distribution centers. The logical structure includes forests (the top security boundary), trees (continuous DNS namespaces), domains (management boundaries for policy and authentication), and OUs (containers for organization and delegation). Domains are critical in penetration testing because compromising a DC grants domain-wide access, stores all password hashes in NTDS.dit, and allows policy deployment. The standard attack chain involves: 1) Information gathering to map the domain, 2) Credential acquisition via tools like Mimikatz or attacks like Kerberoasting, 3) Lateral movement using pass-the-hash or pass-the-ticket, and 4) Domain controller attacks like DCSync or Golden Ticket creation for persistence. Defenses include strict tiered administration, credential protection, monitoring for anomalies, and periodic KRBTGT password resets.
我们提到“域”这个词一般特指Microsoft Active Directory域(AD域)。这是一个基于LDAP、Kerberos和DNS核心协议构建的逻辑管理边界。
我们提到“域”这个词一般特指Microsoft Active Directory域(AD域)。这是一个基于LDAP、Kerberos和DNS核心协议构建的逻辑管理边界。
域渗透的标准攻击链
一、信息收集:绘制域内“地图”:进入内网后的第一件事,就是摸清域环境。
二、凭证获取:拿到网络通行证
有了有效凭证,才能横向移动。
三、横向移动:在域内自由穿行
利用收集到的凭证或哈希,在各个机器间跳转,逼近核心系统。
四、域控制器攻击与持久化
当权限已经提升到域管级别,或已能操作域控时,就是夺取最终控制权并预留后门的时候。
DCSync:攻击者不需要登录域控或在上面执行代码。只需要一个域管权限的账号,就可利用目录复制协议,从域控向自己拉取任意用户的哈希,包括域管。Mimikatz中的lsadump::dcsync就是实现此功能的工具
导出NTDS.dit:直接登录域控,利用卷影拷贝技术(vssadmin)或像ntdsutil这样的系统工具,导出域数据库文件,离线解析出所有哈希。
黄金票据(Golden Ticket):伪造最高权限的票据授予票据(TGT)。一旦生成了黄金票据,就能伪装成域内任意用户,放呢任何服务,甚至任意生成权限。即时你改掉了所有域管密码,只要KRBTGT账户的哈希没变,后门依然存在。这是最经典的域持久化手段。
白银票据:(Silver Ticket):伪造服务票据(TGS),直接针对特定服务(如:某台服务器的CIFS服务),更隐蔽,不需要与域控通信。
万能密码与Skeleton Key:在域控内存中植入Skeleton Key,使原有密码和一个黑客设定的“万能密码”同时有效,不影响正常用户登录,极难发现。
五、防御
域渗透攻击往往结合多种技术,单点防御很脆弱。