这不是一款官方支持的 Google 产品。该项目不符合 Google 开源软件漏洞奖励计划 的参与资格。
aura-inspector 是 Salesforce Experience Cloud 测试的瑞士军刀。它有助于发现配置错误的 Salesforce Experience Cloud 应用程序,并自动执行大量测试过程。更多信息,请参阅 Mandiant 博客文章:Auditing Salesforce Aura Data Exposure。
其部分功能包括:
可以使用以下命令通过 pipx 安装该工具。
pipx install git+<URL>
该工具需要 Python 3 才能运行,同时需要 pip 来下载依赖项。我们建议创建一个虚拟环境来安装依赖项。
git clone <URL>
cd aura-inspector
virtualenv env
source ./env/bin/activate
pip3 install -r requirements.txt
可以使用 -h 标志调用帮助菜单,该菜单提供配置列表。
python3 aura_cli.py -h
usage: python3 aura_cli.py [-h] [-u URL] [-c COOKIES] [-o OUTPUT_DIR] [-l OBJECT_LIST] [-d] [-v] [-p PROXY] [-k] [-a] [--app APP] [--aura AURA] [--context CONTEXT] [--token TOKEN] [--no-gql] [-r AURA_REQUEST_FILE]
options:
-h, --help show this help message and exit
-u, --url URL Root URL of Salesforce application to audit
-c, --cookies COOKIES
Cookies after authenticating to Salesforce application
-o, --output-dir OUTPUT_DIR
Output directory
-l, --object-list OBJECT_LIST
Pull records only the provided objects. Comma separated list of objects.
-d, --debug Print debug information
-v, --verbose Print verbose information
-p, --proxy PROXY Proxy requests
-k, --insecure Ignore invalid TLS certificates
--app APP Provide the target salesforce app's path (e.g: /myApp), the script will try to detect it if not provided
--aura AURA Provide the target salesforce aura's path (e.g: /aura), the script will try to detect it if not provided
--context CONTEXT Provide a context to be used as aura.context in POST requests, the script will use a dummy one if not provided
--token TOKEN Provide an aura token to be used as aura.token in POST requests, the script will use a dummy one if not provided
--no-gql Do not check for GraphQL capability and do not use it
--no-banner Do not display banner
-r, --aura-request-file AURA_REQUEST_FILE
Provide a request file to an /aura endpoint
该工具提供了多种选项,在不同场景下可能非常有用。以下涵盖了少数不同的情况。
在标准配置下使用该工具,只需运行以下命令即可。这会以未经身份验证的方式运行所有检查,并返回从访客用户视角可访问的内容。
python3 aura_cli.py -u <URL>
输出还将显示是否存在可用于创建账户的自助注册功能。如果你确实有机会在实例上注册,那么从已认证上下文中运行该工具可能会产生更多结果。
要在已认证上下文中运行该工具,请使用 -c 参数提供 SID cookie,或者提供一个包含任意请求内容的文件,让工具为你解析此参数和其他参数(该请求应指向已认证会话中的 aura 端点)。
python3 aura_cli.py -r <AURA_REQUEST_FILE>
单个实例上可能托管了多个自定义应用程序。如果你在路径中看到类似 /<custom-app-name>/s 的内容,通常可以识别出这一点。在这种情况下,我们建议查找所有应用程序,并使用 --app 参数指定它们,因为输出可能会有显著差异。此外,如果实例上托管了任何自定义应用程序,建议尝试针对默认应用程序 "/" 运行该工具。