域是一组连接到网络的计算机,它们共享用户帐户信息和安全策略。如果使用 Windows Server,则它由运行Active Directory服务的域控制器管理。
Liunx 系统,则由运行Samba管理。这些服务允许您存储有关域本身、其所有用户、设置等的信息。要获取有关域的信息,需要使用特殊工具。
例如:Enum4linux ,该工具是用 Perl 编写的; Samba 包中工具的包装:smbclient、rpclient、net和nmblookup,因此您需要安装 Samba 包本身作为依赖项。
主要特征:
-
显示用户列表;
-
显示有关群组成员的信息;
-
共享资源的枚举;
-
确定属于工作组或域;
-
识别远程操作系统;
-
获取有关密码策略的信息。
enum4linux v0.9.1 (http://labs.portcullis.co.uk/application/enum4linux/)
Copyright (C) 2011 Mark Lowe (mrl@portcullis-security.com)
Simple wrapper around the tools in the samba package to provide similar
functionality to enum.exe (formerly from www.bindview.com). Some additional
features such as RID cycling have also been added for convenience.
Usage: ./enum4linux.pl [options] ip
Options are (like "enum"):
-U get userlist
-M get machine list*
-S get sharelist
-P get password policy information
-G get group and member list
-d be detailed, applies to -U and -S
-u user specify username to use (default "")
-p pass specify password to use (default "")
The following options from enum.exe aren't implemented: -L, -N, -D, -f
Additional options:
-a Do all simple enumeration (-U -S -G -P -r -o -n -i).
This option is enabled if you don't provide any other options.
-h Display this help message and exit
-r enumerate users via RID cycling
-R range RID ranges to enumerate (default: 500-550,1000-1050, implies -r)
-K n Keep searching RIDs until n consective RIDs don't correspond to
a username. Impies RID range ends at 999999. Useful
against DCs.
-l Get some (limited) info via LDAP 389/TCP (for DCs only)
-s file brute force guessing for share names
-k user User(s) that exists on remote system (default: administrator,guest,krbtgt,domain admins,root,bin,none)
Used to get sid with "lookupsid known_username"
Use commas to try several users: "-k admin,user1,user2"
-o Get OS information
-i Get printer information
-w wrkg Specify workgroup manually (usually found automatically)
-n Do an nmblookup (similar to nbtstat)
-v Verbose. Shows full commands being run (net, rpcclient, etc.)
-A Aggressive. Do write checks on shares etc
RID cycling should extract a list of users from Windows (or Samba) hosts
which have RestrictAnonymous set to 1 (Windows NT and 2000), or "Network
access: Allow anonymous SID/Name translation" enabled (XP, 2003).
通常,域名是自动且非常准确地确定的,因此无需指定。如果由于某种原因,Enum4linux无法确定该参数,则可以通过选项手动指定-w
,例如:-w EXAMPLE.COM
. 在收集此类信息时,您必须直接联系域控制器,否则将不会收到答复。您可以使用nslookup来确定哪个服务器是域控制器。
nslookup -q=SRV _ldap._tcp.dc._域名 DNS的服务器IP
获取域中计算机的操作系统信息
enum4linux -o DNS服务器IP
要针对 Windows 执行此命令,您还必须指定任何现有域帐户的登录名/密码。这可以使用-u
和选项来完成-p
。您可以使用-U
前面讨论过的选项获取用户列表,并且可以破解密码启用域身份验证的协议, Linux 和 Windows 分别是 SSH或RDP 。
要获取此信息,您需要另一个 Polenum 工具,以及来自域帐户的登录名/密码。这与指向它的链接一起写在帮助信息中。通过指定登录名/密码并选择两个协议选项(445/SMB 或 139/SMB)之一,将获取特定计算机的信息。
./polenum.py .....