Gato,即 GitHub Attack Toolkit,是一款枚举与攻击工具,可让蓝队人员和攻击性安全从业者评估在 GitHub 组织内被泄露的个人访问令牌(PAT)所造成的影响范围。
该工具还允许搜索并详尽枚举使用自托管运行器的公共仓库。GitHub 建议自托管运行器仅用于私有仓库,然而有数千个组织在使用自托管运行器。
Gato 支持 OS X 和 Linux,且至少需要 Python 3.7。
要安装该工具,只需克隆仓库并使用 pip install。我们建议在虚拟环境中执行此操作。
git clone https://github.com/praetorian-inc/gato
cd gato
python3 -m venv venv
source venv/bin/activate
pip install .
Gato 还要求系统 PATH 中安装有 2.27 或更高版本的 git。为了运行 fork PR 攻击模块,系统路径中还必须安装 sed。
安装该工具后,可以通过运行 gato 或 praetorian-gato 来启动它。
我们建议使用 gato -h 查看基础工具的参数,并通过运行以下命令查看工具各模块的参数:
gato search -hgato enum -hgato attack -h该工具需要一个 GitHub 经典 PAT 才能运行。要创建一个,请登录 GitHub 并前往 GitHub Developer
Settings
,选择 Generate New Token,然后选择 Generate new token (classic)。
创建此令牌后,通过在 shell 中运行 export GH_TOKEN=<YOUR_CREATED_TOKEN> 来设置 GH_TOKEN 环境变量。或者,将令牌存储在安全的密码管理器中,并在应用程序提示时输入。
有关故障排除和其他详细信息,例如以开发者模式安装或运行单元测试,请参阅 wiki。
请参阅 wiki 以获取详细文档,以及该工具各模块的 OpSec 注意事项!
如果您认为在软件中发现了缺陷,请提交一个 issue,其中包含该工具的输出以及您尝试执行的操作。
如果您不确定该行为是否为缺陷,请改用讨论区!
欢迎贡献!在开发新功能之前,请先查看我们的设计方法和编码 标准!
此外,如果您提议对该工具进行重大更改,请提交一个 issue 以开启关于更改动机的讨论。
Gato 采用 Apache License, Version 2.0 许可。
Copyright 2023 Praetorian Security, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.