,PasswordLastSet,LastLogonDate,ServicePrincipalName,TrustedForDelegation,TrustedtoAuthForDelegation DistinguishedName TrustedForDelegation : False TrustedToAuthForDelegation : False UserPrincipalName : DistinguishedName TrustedForDelegation : False TrustedToAuthForDelegation : False UserPrincipalName : DistinguishedName TrustedForDelegation : False TrustedToAuthForDelegation : False UserPrincipalName : DistinguishedName PasswordLastSet,LastLogonDate,ServicePrincipalName,TrustedForDelegation,Truste dtoAuthForDelegation DistinguishedName
Servers,CN=Builtin,DC=DomainName,DC=local", "ScopeOfSearch": "Base", "SearchFilter": "member=*" } "DistinguishedName Builders,CN=Builtin,DC=DomainName,DC=local", "ScopeOfSearch": "Base", "SearchFilter": "member=*" } "DistinguishedName Publishers,CN=Users,DC=DomainName,DC=local", "ScopeOfSearch": "Base", "SearchFilter": "member=*" } "DistinguishedName Servers,CN=Builtin,DC=DomainName,DC=local", "ScopeOfSearch": "Base", "SearchFilter": "member=*" } "DistinguishedName ": "CN=Infra,DC=DomainName,DC=local", "ScopeOfSearch": "Base", "SearchFilter": "member=*" } "DistinguishedName
public String mapFromAttributes(Attributes attr) throws NamingException { String distinguishedName = (String)attr.get("distinguishedName").get(); distinguishedName = StringUtils.substringBefore (distinguishedName,ldapBaseDn); return StringUtils.substringBeforeLast(distinguishedName User person = new User(); String distingugihedName = (String)attr.get("distinguishedName @Id private Name id; @DnAttribute(value = "distiguishedName") private String distinguishedName
Adfind.exe -b dc=hacke,dc=testlab -f "objectcategory=user" cn createTimeStamp 4、查找域中配置非约束委派的用户,过滤出cn和distinguishedName DC=testlab" -f "(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName 5、查找域中配置非约束委派的主机,过滤出cn和distinguishedName属性 AdFind.exe -b "DC=hacke,DC=testlab" -f "(&(samAccountType =805306369)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName 6、查询域中配置非约束委派的主机
DCsync) Get-ObjectACL -DistinguishedName "dc=dev,dc=testlab,dc=local" -ResolveGUIDs | ? ,member | ForEach-Object { $GroupDomain = $_.distinguishedname.subString($_.distinguishedname.IndexOf userAccountControl:1.2.840.113556.1.4.803:=2)" -Properties distinguishedname Get-DomainUser -UACFilter NOT_ACCOUNTDISABLE -Properties distinguishedname # all disabled users Get-DomainUser -LDAPFilter "( {$_.objectsid -match '^S-1-5-.*-[1-9]\d{2,}$'} | Select-Object -ExpandProperty distinguishedname $Domains
= Attrs['mail'][0] #distinguishedName = Attrs['name'][0] #distinguishedName = Attrs['displayName'][0] #distinguishedName = Attrs['mail'][0] #distinguishedName = Attrs['sAMAccountName'][0] #distinguishedName = Attrs['distinguishedName'][0] #distinguishedName = Attrs['title'][0] #distinguishedName = Attrs['department'][0] #distinguishedName = Attrs['manager'][0] print "Login Info for user : %s" % distinguishedName
loacl" "(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=524288))" |grep -iE "distinguishedName loacl" "(&(samAccountType=805306369)(userAccountControl:1.2.840.113556.1.4.803:=524288))" |grep -iE "distinguishedName ,DC=loacl" -f "(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName ,DC=loacl" -f "(&(samAccountType=805306369)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName 这里就要用到一个工具kekeo 1.首先查询域内配置了约束性委派的服务账号 Get-DomainUser -TrustedToAuth -Properties distinguishedname,useraccountcontrol
vulntarget,DC=com" -f "(&(samAccountType=805306369)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName vulntarget,DC=com" -f "(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName vulntarget,DC=com" -f "(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName vulntarget,DC=com" -f "(&(samAccountType=805306369)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName
searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE); searchCtls.setReturningAttributes(new String[]{"name","sn","distinguishedName objectCategory=Person)(objectClass=user)(name=*))"; private static final String defaultGroupAtts[] = {"distinguishedName ", "name"}; private static final String defaultPersonAtts[] = {"distinguishedName", "memberOf", "
鼠标右击需要还原的域账户,然后点“修改”,在弹出的对话框中,输入第一个属性:isDeleted,操作项点选“删除”,点击“输入”,这步操作表示将该账户的“已删除”的属性删除掉; 2、紧接着输入第二个属性:distinguishedName 笔者:“你漏输OU了,distinguishedName属性的值,你少输入了OU=,缺失对象,所以无法执行。” 网管:“汗......”
g1ts,DC=com" -f "(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName @#456 -b "DC=g1ts,DC=com" -f "(&(samAccountType=805306368)(msds-allowedtodelegateto=*))" cn distinguishedName =com" "(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=524288))" |grep -iE "distinguishedName =com" "(&(samAccountType=805306369)(userAccountControl:1.2.840.113556.1.4.803:=524288))" |grep -iE "distinguishedName 查询约束委派机器 Get-DomainComputer -TrustedToAuth -Domain g1ts.com -Properties distinguishedname,useraccountcontrol
luckysec,DC=cn" -f "(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName
=org" "(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=524288))" |grep -iE "distinguishedName =org" "(&(samAccountType=805306369)(userAccountControl:1.2.840.113556.1.4.803:=524288))" |grep -iE "distinguishedName \@\#45 -b "DC=0day,DC=org" "(&(samAccountType=805306368)(msds-allowedtodelegateto=*))" |grep -iE "distinguishedName \@\#45 -b "DC=0day,DC=org" "(&(samAccountType=805306369)(msds-allowedtodelegateto=*))" |grep -iE "distinguishedName AdFind.exe -b "DC=0day,DC=org" -f "(&(samAccountType=805306368)(msds-allowedtodelegateto=*))" cn distinguishedName
2) 找到要配置的用户组,右键打开属性页面,在“属性编辑器”,复制“distinguishedName”的属性值 ? ?
对 X500DistinguishedName 更严格的验证: • 类型:行为变更 • 引入版本:预览版 1 • 现在对 X500DistinguishedName 的解析和验证遵循更严格的安全规则,可能会影响依赖更宽松验证的应用程序
X509Identity : GenericIdentity, IDisposable 2: { 3: //其他成员 4: public X509Identity(X500DistinguishedName x500DistinguishedName); 5: public X509Identity(X509Certificate2 certificate); 6: 7: 我们可以通过传入一个X509Certificate2对象或者以X500DistinguishedName对象表示的证书的标识名称来创建X509Identity。
redteam,DC=club" -f "(&(samAccountType=805306369)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName redteam,DC=club" -f "(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName AdFind.exe -b "DC=redteam,DC=club" -f "(&(samAccountType=805306368)(msds-allowedtodelegateto=*))" cn distinguishedName
hiro,DC=com" -f "(&(samAccountType=805306368)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName hiro,DC=com" -f "(&(samAccountType=805306369)(userAccountControl:1.2.840.113556.1.4.803:=524288))" cn distinguishedName 查找域中配置约束委派用户: AdFind.exe -b "DC=hiro,DC=com" -f "(&(samAccountType=805306368)(msds-allowedtodelegateto=*))" cn distinguishedName 查找域中配置约束委派的主机: AdFind.exe -b "DC=hiro,DC=com" -f "(&(samAccountType=805306369)(msds-allowedtodelegateto=*))" cn distinguishedName
PSCustomObject]@{ Identity = $rule.IdentityReference OU = $OU.DistinguishedName
DistinguishedName: 这是密码策略的Distinguished Name(DN),这是在LDAP目录中唯一标识条目的字符串。