使用 AWS Lambda 在多个区域轻松发起密码喷洒攻击,每次请求都会轮换 IP 地址。
由以下机构提供:

usage: credking.py [-h] --plugin PLUGIN [--threads THREADS] --userfile USERFILE --passwordfile PASSWORDFILE --access_key ACCESS_KEY --secret_access_key SECRET_ACCESS_KEY [--useragentfile USERAGENTFILE]
Arguments:
-h, --help show this help message and exit
--plugin PLUGIN spraying plugin
--threads THREADS thread count (default: 1)
--userfile USERFILE username file
--passwordfile PASSWORDFILE password file
--access_key ACCESS_KEY aws access key
--secret_access_key SECRET_ACCESS_KEY aws secret access key
--useragentfile useragent file
Gmail 插件不需要任何额外参数。
Okta 插件新增了一个必需的参数,名为 oktadomain。
usage: credking.py <usual arugments> --oktadomain org.okta.com
你可以使用 Python 3 通过以下命令自动安装并运行:
$ git clone https://github.com/ustayready/CredKing
$ cd CredKing
~/CredKing$ python3 credking.py
请注意,需要 Python 3。
欢迎提交错误报告、功能请求和补丁。
你可以通过以下方式创建新插件:
$ cd plugins
$ mkdir newplugin
$ cd newplugin
$ touch __init__.py
$ touch newplugin.py
接下来,确保在你的 newplugin.py 中包含 lambda 处理函数:
def lambda_handler(event, context):
return your_function(event['username'], event['password'])
CredKing 会生成一个部署 zip 文件,Lambda 函数在创建时会接收该文件。因此,CredKing 需要将依赖直接安装到 newplugin 文件夹中。你可以通过以下方式完成:
$ pip install <pre-req> -t .
无需修改 credking.py 即可指定插件特定参数,只需将其作为 --argumentname value 传递即可。
如果你的插件需要插件特定参数,可以在插件目录的 __init__.py 文件中实现一个 validate 函数,该函数会接收一个包含所有可选参数的字典。
以下是 okta 插件的 __init__.py 中使用的参数验证示例。
def validate(args):
if 'oktadomain' in args.keys():
return True,None
else:
error = "Missing oktadomain argument, specify as --oktadomain org.okta.com"
return False,error
okta.py 中的 lambda_handler 函数随后按如下方式访问 oktadomain 参数。
def lambda_handler(event, context):
domain = event['args']['oktadomain']
return okta_authenticate(domain, event['username'], event['password'], event['useragent'])
就这样,祝使用愉快!