文章前言
本篇文章中我们将重点介绍如何通过SMB协议和RPC协议来枚举域内信息,下文中使用的工具为rpcclient
信息枚举
Server Information
代码语言:javascript复制rpcclient -U Administrator%Ignite@123 192.168.1.172
Domain Information
代码语言:javascript复制querydominfo
Enumerating Domain Users
代码语言:javascript复制enumdomusers
Enumerating Domain Groups
代码语言:javascript复制enumdomgroups
Group Information Queries
代码语言:javascript复制querygroup 0x200
User Information Queries
代码语言:javascript复制queryuser yashika
Enumerating Privileges
代码语言:javascript复制enumprivs
Domain Password Information
代码语言:javascript复制getdompwinfo
User Password Information
代码语言:javascript复制getusrdompwinfo 0x1f4
Enumerating SID from LSA
代码语言:javascript复制lsaenumsid
Creating Domain User
代码语言:javascript复制createdomuser hacker
setuserinfo2 hacker 24 Password@1
enumdomusers
Lookup User Names
代码语言:javascript复制lookupnames hacker
Enumerating Alias Groups
代码语言:javascript复制enumalsgroups builtin
Delete Domain User
代码语言:javascript复制deletedomuser hacker
Net Share Enumeration
代码语言:javascript复制netshareenum
netshareenumall
Net Share Get Information
代码语言:javascript复制netsharegetinfo Confidential
Enumerating Domains
代码语言:javascript复制enumdomains
Enumerating Domain Groups
代码语言:javascript复制enumdomgroups
enumdomusers
queryusersgroups 0x44f
querygroupmem 0x201
Change Password of User
代码语言:javascript复制chgpasswd raj Password@1 Password@987
Create Domain Group
代码语言:javascript复制createdomgroup newgroup
enumdomgroups
Delete Domain Group
代码语言:javascript复制deletedomgroup newgroup
enumdomgroup
Domain Lookup
代码语言:javascript复制lookupdomain ignite
SAM Lookup
代码语言:javascript复制samlookupnames domain raj
samlookuprids domain 0x44f
SID Lookup
代码语言:javascript复制lsaenumsid
LSA Query
代码语言:javascript复制lsaquery
dsroledominfo
LSA Create Account
代码语言:javascript复制lookupnames raj
lsacreateaccount S-1-5-21-3232368669-2512470540-2741904768-1103
LSA Group Privileges
代码语言:javascript复制lsaenumsid
lookupsids S-1-1-0
lsaenumacctrights S-1-1-0
代码语言:javascript复制lsaaddpriv S-1-1-0 SeCreateTokenPrivilege
lsaenumprivsaccount S-1-1-0
lsadelpriv S-1-1-0 SeCreateTokenPrivilege
lsaenumprivsaccount S-1-1-0
LSA Account Privileges
代码语言:javascript复制lookupnames raj
lsaaddacctrights S-1-5-21-3232368669-2512470540-2741904768-1103 SeCreateTokenPrivilege
lsaenumprivsaccount S-1-5-21-3232368669-2512470540-2741904768-1103
lsaremoveacctrights S-1-5-21-3232368669-2512470540-2741904768-1103 SeCreateTokenPrivilege
lsaenumprivsaccount S-1-5-21-3232368669-2512470540-2741904768-1103
代码语言:javascript复制lsalookupprivvalue SeCreateTokenPrivielge
LSA Security Objects
代码语言:javascript复制lsaquerysecobj
文末小结
在本文中,我们能够使用rpcclient工具通过域内的SMB和RPC枚举大量信息,本文可以作为红队攻击和列举域的参考,但也有助于蓝队了解和测试在域上应用的保护及其用户的措施~