安全矩阵

 找回密码
 立即注册
搜索
查看: 2580|回复: 0

SharpSpray:一款功能强大的活动目录密码喷射安全工具

[复制链接]

855

主题

862

帖子

2940

积分

金牌会员

Rank: 6Rank: 6

积分
2940
发表于 2021-11-24 10:54:59 | 显示全部楼层 |阅读模式
原文链接:SharpSpray:一款功能强大的活动目录密码喷射安全工具

关于SharpSpraySharpSpray是一款功能强大的活动目录密码喷射安全工具,该工具基于.NET C#开发,可以帮助广大研究人员对活动目录的安全性进行分析。
SharpSpray是DomainPasswordSpray工具的C#实现,并且还引入了很多增强功能以及额外功能。除此之外,该工具还使用了LDAP协议来跟域活动目录服务进行通信。
功能介绍

可以从域上下文的内部和外部进行操作。
从列表中排除禁用域的帐户。
自动从活动目录中收集域用户信息。
通过在一次锁定尝试中排除帐户,避免潜在的帐户锁定。
通过自动收集域锁定账户来观察窗口设置,避免潜在的帐户锁定。
与域细粒度密码策略兼容。
用户自定义LDAP筛选器,例如(description=admin)。
支持设置每次身份验证尝试之间的延迟(秒)。
支持设置每次身份验证尝试之间的抖动。
支持单个密码或密码列表。
单文件控制台终端应用程序。
工具下载广大研究人员可以使用下列命令将该项目源码克隆至本地:

git clone https://github.com/iomoath/SharpSpray.git
工具使用命令行参数
  1. > SharpSpray.exe --help



  2.   -v, --Verbose       Show verbose messages.

  3.   -u                  (Optional) Username list file path. This will be

  4.                       automatically fetched from the active directory if not specified.

  5.   -p                  A single password that will be used to perform the password spray.

  6.   -k, --pl            (Optional) Password List file path.

  7.   -d                  (Optional) Specify a domain name.

  8.   -m                  Use this option if spraying from a host located outside the Domain context.

  9.   -q, --dc-ip         Required when the option 'm' OutsideDomain is checked

  10.   -x                  Attempts to exclude disabled accounts

  11.                       from the user list (Not supported with the option -m)

  12.   -z                  Exclude accounts within 1 attempt of

  13.                       locking out (Not supported with the option -m)

  14.   -f                  Custom LDAP filter for users, e.g. "(description=*admin*)"

  15.   -o                  A file to output the results to.

  16.   -w                  Do not relay on domain lockout observation window settings and use this specific value. (Default 32 minute)

  17.   -s                  (Optional) Delay in seconds between each authentication attempt.

  18.   -j                  (Optional) Jitter in seconds.

  19.   --Force             Force start without asking for confirmation.

  20.   --get-users-list    Get the domain users list from the active directory.

  21.   --show-examples     Get domain users list from the active directory.

  22.   --show-args         Show command line args

  23.   --help              Display this help screen.
复制代码


参数介绍
  1. -v, --Verbose       显示Verbose信息

  2.   -u                (可选)用户名列表文件路径,如果不指定,则自动从活动目录获取

  3.   -p                用于执行密码喷射的单个密码

  4.   -k, --pl            (可选)密码列表文件路径

  5.   -d               (可选)指定目标域名

  6.   -m              如果目标主机位于域上下文之外的位置,则可以使用该选项

  7.   -q, --dc-ip         检测’m’参数时要求使用该选项

  8.   -x                尝试从用户列表中排除已禁用的账号

  9.   -z                 通过在一次锁定尝试中排除帐户,避免潜在的帐户锁定

  10.   -f                 自定义LDAP过滤器,例如"(description=*admin*)"

  11.   -o                 存储处理结果的文件

  12.   -s                  (可选)每次身份验证尝试之间的延迟(秒)

  13.   -j                  (可选)以秒为单位的抖动

  14.   --Force              强制执行任务,无需进行确认

  15.   --get-users-list        从活动目录获取域用户列表

  16.   --show-examples      从活动目录获取域用户列表

  17.   --show-args          显示命令行参数

  18.   --help              显示帮助信息
复制代码


工具使用样例样例1
  1. SharpSpray.exe -v -x -z --pl password.txt

  2. SharpSpray.exe -x -z -u users.txt --pl psswd.txt

  3. SharpSpray.exe -x -z -u users.txt -p Passw0rd!

  4. SharpSpray.exe -x -z -s 3 -j 1 -u users.txt -k psswd.txt -o sprayed.txt
复制代码


样例2
  1. SharpSpray.exe -w 32 -m -d DC-1.local --dc-ip 10.10.20.20 -u users.txt --pl psswd.txt

  2. SharpSpray.exe -w 32 -s 3 -j 1 -m -d DC-1.local --dc-ip 10.10.20.20 -u users.txt --pl psswd.txt
复制代码


样例3
  1. SharpSpray.exe --get-users-list

  2. SharpSpray.exe --get-users-list > users.txt

  3. PS> .\SharpSpray.exe --get-users-list | Out-File -Encoding ascii users.txt
复制代码


如何从活动目录中仅获取用户列表
下列命令可以从目标活动目录中获取域用户信息,并打印在终端窗口中:

  1. SharpSpray.exe -x -z --get-users-list


  2. -x: Exclude disabled accounts from the user list.

  3. -z: Exclude accounts within 1 attempt of locking out.
复制代码


参数介绍
  1. -x: 从用户列表中排除已禁用的账号

  2. -z: 一次尝试锁定后排除目标账号
复制代码


项目地址https://github.com/iomoath/SharpSpray
参考资料https://c99.sh/sharpspray-active-directory-password-spraying-tool/



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|安全矩阵

GMT+8, 2025-4-23 00:20 , Processed in 0.014745 second(s), 18 queries .

Powered by Discuz! X4.0

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表