BishopFox/cloudfox
GitHub: BishopFox/cloudfox
CloudFox 是一款专为云渗透测试设计的开源命令行工具,旨在帮助安全人员通过枚举分析快速获取 AWS、Azure 和 GCP 环境的态势感知及潜在攻击路径。
Stars: 2304 | Forks: 222
# :fox_face: CloudFox :fox_face:
CloudFox 帮助您在陌生的云环境中获取态势感知。它是一个开源命令行工具,旨在帮助渗透测试人员和其他攻击性安全专业人员发现云基础设施中可利用的攻击路径。
**概述**
#### CloudFox 帮助您回答以下常见问题(以及更多):
* 该 AWS 账户使用了哪些区域,以及账户中大致有多少资源?
* EC2 userdata 或特定服务环境变量中潜伏着哪些机密信息?
* 哪些工作负载附加了管理权限?
* 此 [principal] 拥有哪些操作/权限?
* 哪些角色信任策略过于宽松或允许跨账户代入?
* 从外部起点(公共互联网)我可以攻击哪些端点/主机名/IP?
* 从内部起点(VPC 内的假设违规)我可以攻击哪些端点/主机名/IP?
* 从 VPC 内受损的资源中,我可能挂载哪些文件系统?
## 演示、示例、演练
* [博客 - 介绍:CloudFox](https://bishopfox.com/blog/introducing-cloudfox)
* [视频 - CloudFox + CloudFoxable 掌握识别和利用 AWS 攻击路径艺术的强大组合](https://www.youtube.com/watch?v=RdQiIvCrSzk)
* [视频 - 使用 CloudFox 进行渗透测试](https://www.youtube.com/watch?v=Ljt_JUp5HbM)
* [视频 - CloudFox 介绍演示](https://www.youtube.com/watch?v=ReWoUgpUuiQ)
* [视频 - 工具访谈:CloudFox AWS 子命令演练](https://youtu.be/KKsYfL5uVU4?t=360)
## 故意易受攻击的演练场
* [CloudFoxable - 游戏化的云黑客沙盒](https://cloudfoxable.bishopfox.com/)
## 想聊聊 CloudFox?
加入我们的 [RedSec discord 服务器](https://discord.gg/redsec)
## 快速开始
CloudFox 是模块化的(您可以一次运行一个命令),但有一个 `aws all-checks` 命令,它会使用合理的默认值为您运行其他 aws 命令:
`cloudfox aws --profile [profile-name] all-checks`


### 白盒枚举
CloudFox 设计为由具有有限只读权限的 principal 执行,但其目的是帮助您找到可在模拟妥协场景(即基于目标的渗透测试)中利用的攻击路径。
### 黑盒枚举
CloudFox 可以与“发现的”凭证一起使用,类似于您使用 [weirdAAL](https://github.com/carnal0wnage/weirdAAL) 或 [enumerate-iam](https://github.com/andresriancho/enumerate-iam) 的方式。失败的检查会静默进行,因此任何返回的数据都意味着您的“发现的”凭证具有检索它所需的访问权限。
### 文档
有关完整文档,请参阅我们的 [wiki](https://github.com/BishopFox/CloudFox/wiki)。
## 支持的云提供商
| 提供商 | CloudFox 命令 |
| - | - |
| AWS | 34 |
| Azure | 4 |
| GCP | 60 |
| Kubernetes | 支持计划中 |
# 安装
**选项 1:** 为您的平台下载 [最新二进制版本](https://github.com/BishopFox/cloudfox/releases)。
**选项 2:** 如果您使用 homebrew:`brew install cloudfox`
**选项 3:** [安装 Go](https://golang.org/doc/install),使用 `go install github.com/BishopFox/cloudfox@latest` 从远程源安装
**选项 4:** 开发者模式:
[安装 Go](https://golang.org/doc/install),克隆 CloudFox 仓库并从源代码编译
```
# git clone https://github.com/BishopFox/cloudfox.git
# cd ./cloudfox
# 进行任何必要的更改
# go build .
# ./cloudfox
```
**选项 5:** 测试错误修复
```
git clone git@github.com:BishopFox/cloudfox.git
git checkout seth-dev
go build .
./cloudfox [rest of the command options]
```
# 先决条件
### AWS
* 已安装 AWS CLI
* 支持 AWS 配置文件 (profiles)、AWS 环境变量或元数据检索(在 ec2 实例上)
* 要一次在多个配置文件上运行命令,您可以使用 `-l` 标志指定包含以换行符分隔的配置文件名称列表的文件路径,或使用 `-a` 标志传递所有存储的配置文件。
* 一个附加了推荐策略的 principal(如下所述)
* 推荐附加的策略:**`SecurityAudit` + [CloudFox 自定义策略](./misc/aws/cloudfox-policy.json)**
附加策略说明(截至 2022 年 9 月):
| 策略 | 说明 |
| - | - |
| [CloudFox 自定义策略](./misc/aws/cloudfox-policy.json) | 包含 cloudfox 使用的每个权限的完整列表,不包含其他内容 |
| `arn:aws:iam::aws:policy/SecurityAudit` | 覆盖大多数 cloudfox 检查,但缺少较新的服务或权限,如 apprunner:\*, grafana:\*, lambda:GetFunctionURL, lightsail:GetContainerServices |
| `arn:aws:iam::aws:policy/job-function/ViewOnlyAccess` | 覆盖大多数 cloudfox 检查,但缺少较新的服务或权限,如 AppRunner:\*, grafana:\*, lambda:GetFunctionURL, lightsail:GetContainerServices - 并且也缺少 iam:SimulatePrincipalPolicy。
| `arn:aws:iam::aws:policy/ReadOnlyAccess` | 仅缺少 AppRunner,但也授予了诸如 "s3:Get*" 之类的权限,这可能过于宽松。 |
| `arn:aws:iam::aws:policy/AdministratorAccess` | 这在 CloudFox 中可以正常工作,但如果您作为渗透测试人员获得了此级别的访问权限,那本身就应该是一个发现 :) |
### Azure
* 已应用 Viewer 或类似权限。
### GCP
* 已安装 Google Cloud SDK 并已通过身份验证
* 已配置 Application Default Credentials (`gcloud auth application-default login`)
* 适当层级级别的推荐权限(见下文)
#### GCP 权限:最小化 vs 全面
**最小权限(单项目):**
对于单个项目的基本枚举,`roles/viewer` 角色提供对大多数资源的读取访问权限(包括日志记录、监控和计算/网络查看)。
**全面权限(组织范围):**
针对整个组织的彻底安全评估:
| 范围 | 角色 | 目的 |
| - | - | - |
| **组织** | `roles/resourcemanager.organizationViewer` | 查看组织结构和元数据 |
| **组织** | `roles/iam.securityReviewer` | 审查整个组织的 IAM 策略 |
| **组织** | `roles/cloudasset.viewer` | 查询所有资源的 Cloud Asset Inventory |
| **组织** | `roles/cloudidentity.groupsViewer` | 枚举 Google Groups 和成员资格 |
| **文件夹** | `roles/resourcemanager.folderViewer` | 查看文件夹层次结构和元数据 |
| **项目** | `roles/viewer` | 对大多数项目资源的读取访问权限(包括 logging.viewer, monitoring.viewer, compute.viewer) |
| **工具项目** | `roles/serviceusage.serviceUsageAdmin` | (可选)管理 CloudFox 操作的 API 配额 |
#### GCP API 要求
**API 必须在您要评估的每个项目中启用。** GCP API 是项目范围的。
| API | 服务名称 | 目的 |
| - | - | - |
| Cloud Identity API | `cloudidentity.googleapis.com` | 组枚举,继承角色分析 |
| Cloud Asset API | `cloudasset.googleapis.com` | 跨项目资源发现 |
| Cloud Resource Manager API | `cloudresourcemanager.googleapis.com` | 组织映射,IAM 枚举 |
| IAM API | `iam.googleapis.com` | IAM 分析,权限提升检测 |
| Compute Engine API | `compute.googleapis.com` | 实例枚举,网络安全 |
| Secret Manager API | `secretmanager.googleapis.com` | 机密枚举 |
| Cloud Functions API | `cloudfunctions.googleapis.com` | 无服务器枚举 |
| Cloud Run API | `run.googleapis.com` | 无服务器枚举 |
| Kubernetes Engine API | `container.googleapis.com` | 容器安全分析 |
| BigQuery API | `bigquery.googleapis.com` | 数据安全分析 |
有关详细的设置说明,请参阅 [GCP 设置指南](https://github.com/BishopFox/cloudfox/wiki/GCP-Setup-Guide)。
# AWS 命令
| 提供商 | 命令名称 | 描述
| - | - | - |
| AWS | [all-checks](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#all-checks) | 使用合理的默认值运行所有其他命令。您仍然需要查看每个命令的非默认选项,但这是一个很好的起点。 |
| AWS | [access-keys](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#access-keys) | 列出所有用户的活跃访问密钥。用于交叉引用您发现的密钥与其所属的范围账户。 |
| AWS | [api-gw](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#api-gw) | 列出 API 网关端点,并为您提供自定义 curl 命令,包括存储在元数据中的 API 令牌(如果有)。 |
| AWS | [buckets](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#filesystems) | 列出账户中的存储桶,并为您提供方便的命令以进一步检查它们。 |
| AWS | [cape](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#cape) | 枚举跨账户权限提升路径。需要先运行 `pmapper` |
| AWS | [cloudformation](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#cloudformation) | 列出账户中的 CloudFormation 堆栈。生成包含堆栈详细信息、堆栈参数和堆栈输出的 loot 文件 - 查找机密信息。 |
| AWS | [codebuild](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#codebuild) | 枚举 CodeBuild 项目 |
| AWS | [databases](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#databases) | 枚举 RDS 数据库。获取包含连接字符串的 loot 文件。 |
| AWS | [ecr](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#ecr) | 列出所有存储库中最近推送的镜像 URI。使用 loot 文件通过 docker/nerdctl 拉取选定的镜像以进行检查。 |
| AWS | [ecs-tasks](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#ecs-tasks) | 列出所有 ECS 任务。返回 ECS 任务列表以及关联的集群、任务定义、容器实例、启动类型和关联的 IAM principal。 |
| AWS | [eks](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#eks) | 列出所有 EKS 集群,查看它们是否公开暴露端点,并检查关联到集群或节点组的 IAM 角色。生成包含连接到每个集群所需的 `aws eks udpate-kubeconfig` 命令的 loot 文件。 |
| AWS | [elastic-network-interfaces](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#eni) | 列出所有 ENI 信息。返回 ENI ID、类型、外部 IP、内部 IP、VPCID、附加实例和描述的列表。 |
| AWS | [endpoints](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#endpoints) | 枚举各种服务的端点。从内部和外部位置扫描这些端点,以查找不需要身份验证、配置错误等的内容。 |
| AWS | [env-vars](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#env-vars) | 从拥有它们的服务中获取环境变量(支持 App Runner, ECS, Lambda, Lightsail containers, Sagemaker)。如果您发现敏感机密,请使用 `cloudfox iam-simulator` 和 `pmapper` 查看谁有权访问它们。 |
| AWS | [filesystems](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#filesystems) | 枚举您可能能够在没有凭证的情况下挂载的 EFS 和 FSx 文件系统(如果您拥有正确的网络访问权限)。例如,当您拥有 `ec:RunInstance` 但没有 `iam:PassRole` 时,这非常有用。 |
| AWS | [iam-simulator](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#iam-simulator) | 类似于 pmapper,但使用 IAM 策略模拟器。它使用 AWS 的评估逻辑,但值得注意的是,它不考虑通过 privesc 的传递访问,这就是为什么您也应该始终使用 pmapper。 |
| AWS | [instances](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#instances) | 枚举所有区域中 EC2 实例的有用信息,如名称、公共/私有 IP 和实例配置文件。生成您可以提供给 nmap 和其他工具进行服务枚举的 loot 文件。 |
| AWS | [inventory](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#inventory) | 粗略了解账户的大小和首选区域。 |
| AWS | [lambda](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#lambda) | 列出账户中的 Lambda 函数,包括哪些函数附加了管理员角色。还为您提供下载每个函数的方便命令。 |
| AWS | [network-ports](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#network-ports) | 枚举可能暴露网络服务的 AWS 服务。为每个资源解析安全组和网络 ACL,以确定可能暴露的端口。 |
| AWS | [orgs](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#orgs) | 枚举组织中的账户 |
| AWS | [outbound-assumed-roles](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#outbound-assumed-roles) | 列出此账户中的 principals 已代入的角色。这是查找通往其他账户的出站攻击路径的绝佳方法。 |
| AWS | [permissions](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#permissions) | 枚举与所有用户和角色关联的 IAM 权限。通过 grep 此输出以查明特定 principal 拥有哪些权限,而不是登录 AWS 控制台并痛苦地展开附加到您正在调查的 principal 的每个策略。 |
| AWS | [pmapper](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#pmapper) | 查找存储在本地文件系统上的 pmapper 数据,[位置定义见此处](https://github.com/nccgroup/PMapper/wiki/Frequently-Asked-Questions#where-does-pmapper-store-its-data)。如果找到了 pmapper 数据(您已经运行了 `pmapper graph create`),则此命令将使用此数据在 cloudfox 内存中构建图谱,并让您知道谁可以 privesc 到管理员。
| AWS | [principals](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#principals) | 枚举 IAM 用户和角色,以便您掌握数据。 |
AWS | [ram](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#ram) | 列出此账户中与其他账户共享的所有资源,或来自其他账户与此账户共享的资源。用于跨账户攻击路径。 |
| AWS | [resource-trusts](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#resource-trusts) | 查看支持资源策略的多种服务,并帮助您查找任何过于宽松的资源信任。支持 KMS,但默认禁用。要在输出中包含 KMS 资源策略,请将此标志添加到命令中:`cloudfox aws resource-trusts --include-kms`.|
| AWS | [role-trusts](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#role-trusts) | 枚举 IAM 角色信任策略,以便您可以查找过于宽松的角色信任或查找信任特定服务的角色。 |
| AWS | [route53](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#route53) | 枚举所有 Route53 托管区域的所有记录。将其用于应用程序和服务枚举。 |
| AWS | [secrets](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#secrets) | 列出来自 SecretsManager 和 SSM 的机密。在列表中查找有趣的机密,然后使用 `cloudfox iam-simulator` 和/或 `pmapper` 查看谁有权访问它们。 |
| AWS | [sns](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#sns) | 此命令枚举所有 SNS 主题,并为您提供订阅主题或向主题发送消息的命令(如果您拥有所需的权限)。此命令仅处理主题,而不处理 SMS 功能。此命令还尝试汇总主题资源策略(如果存在)。|
| AWS | [sqs](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#sqs) | 此命令枚举所有 SQS 队列,并为您提供从队列接收消息和向队列发送消息的命令(如果您拥有所需的权限)。此命令还尝试汇总队列资源策略(如果存在)。|
| AWS | [tags](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#tags) | 列出所有带有标签的资源以及所有标签。这可以类似于 inventory 使用,作为识别账户中存在哪些类型资源的另一种方法。 |
| AWS | [workloads](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#workloads) | 列出所有计算工作负载及其拥有的角色。告诉您是否有任何角色是管理员(糟糕),如果您在本地有 pmapper 数据,它会告诉您是否有任何角色可以 privesc 到管理员(同样糟糕) |
| AWS | [ds](https://github.com/BishopFox/cloudfox/wiki/AWS-Commands#workloads) | 列出所有 AWS 管理的目录及其属性。还汇总了当前的信任及其方向和类型。 |
# Azure 命令
| 提供商 | 命令名称 | 描述
| - | - | - |
| Azure | [whoami](https://github.com/BishopFox/cloudfox/wiki/Azure-Commands#whoami) | 显示有关您的当前 Azure CLI 会话可用的租户、订阅和资源组的信息。这有助于提供关于在其他子命令中使用哪些租户和订阅 ID 的态势感知。 |
| Azure | [inventory](https://github.com/BishopFox/cloudfox/wiki/Azure-Commands#inventory) | 显示每个位置的所有资源的清单表。 |
| Azure | [rbac](https://github.com/BishopFox/cloudfox/wiki/Azure-Commands#rbac) | 列出订阅或租户级别的 Azure RBAC 角色分配 |
| Azure | [storage](https://github.com/BishopFox/cloudfox/wiki/Azure-Commands#storage) | storage 命令仍在开发中。目前它只显示有关存储账户的有限数据 |
| Azure | [vms](https://github.com/BishopFox/cloudfox/wiki/Azure-Commands#vms) | 枚举所有可用资源组和订阅中 Compute 实例的有用信息 |
# GCP 命令
有关每个 GCP 命令的详细文档,请参阅 [GCP 命令 Wiki](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands)。
| 提供商 | 命令名称 | 描述
| - | - | - |
| GCP | [whoami](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#whoami) | 显示已验证身份的 GCP 用户/服务账号的身份上下文 |
| GCP | [iam](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#iam) | 跨组织、文件夹和项目枚举 GCP IAM principals |
| GCP | [permissions](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#permissions) | 枚举每个 IAM 实体的所有权限,包含完全继承展开 |
| GCP | [serviceaccounts](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#serviceaccounts) | 枚举 GCP 服务账号并进行安全分析 |
| GCP | [service-agents](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#service-agents) | 枚举 Google 管理的服务代理 |
| GCP | [keys](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#keys) | 枚举所有 GCP 密钥(SA 密钥、HMAC 密钥、API 密钥) |
| GCP | [resource-iam](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#resource-iam) | 枚举 GCP 资源(存储桶、数据集、机密等)上的 IAM 策略 |
| GCP | [domain-wide-delegation](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#domain-wide-delegation) | 查找具有对 Google Workspace 域委派权限的服务账号 |
| GCP | [privesc](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#privesc) | 识别 GCP 项目中的权限提升路径 |
| GCP | [hidden-admins](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#hidden-admins) | 识别可以修改 IAM 策略的 principals(隐藏的管理员) |
| GCP | [identity-federation](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#identity-federation) | 枚举 Workload Identity Federation(外部身份) |
| GCP | [instances](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#instances) | 枚举 GCP Compute Engine 实例及其安全配置 |
| GCP | [gke](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#gke) | 枚举 GKE 集群并进行安全分析 |
| GCP | [cloudrun](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#cloudrun) | 枚举 Cloud Run 服务和作业并进行安全分析 |
| GCP | [functions](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#functions) | 枚举 GCP Cloud Functions 并进行安全分析 |
| GCP | [app-engine](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#app-engine) | 枚举 App Engine 应用程序和安全配置 |
| GCP | [composer](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#composer) | 枚举 Cloud Composer 环境 |
| GCP | [dataproc](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#dataproc) | 枚举 Dataproc 集群 |
| GCP | [dataflow](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#dataflow) | 枚举 Dataflow 作业和管道 |
| GCP | [notebooks](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#notebooks) | 枚举 Vertex AI Workbench notebooks |
| GCP | [workload-identity](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#workload-identity) | 枚举 GKE Workload Identity 和 Workload Identity Federation |
| GCP | [inventory](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#inventory) | 快速资源盘点 - 无需 Cloud Asset API 即可工作 |
| GCP | [storage](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#storage) | 枚举 GCP Cloud Storage 存储桶及其安全配置 |
| GCP | [storage-enum](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#storage-enum) | 枚举 GCS 存储桶以查找敏感文件(凭证、机密、配置) |
| GCP | [bigquery](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#bigquery) | 枚举 GCP BigQuery 数据集和表并进行安全分析 |
| GCP | [cloudsql](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#cloudsql) | 枚举 Cloud SQL 实例并进行安全分析 |
| GCP | [spanner](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#spanner) | 枚举 Cloud Spanner 实例和数据库 |
| GCP | [bigtable](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#bigtable) | 枚举 Cloud Bigtable 实例和表 |
| GCP | [filestore](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#filestore) | 枚举 Filestore NFS 实例 |
| GCP | [memorystore](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#memorystore) | 枚举 Memorystore (Redis) 实例 |
| GCP | [vpc-networks](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#vpc-networks) | 枚举 VPC 网络 |
| GCP | [firewall](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#firewall) | 枚举 VPC 网络和防火墙规则并进行安全分析 |
| GCP | [loadbalancers](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#loadbalancers) | 枚举负载均衡器 |
| GCP | [dns](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#dns) | 枚举 Cloud DNS 区域和记录并进行安全分析 |
| GCP | [endpoints](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#endpoints) | 枚举所有网络端点(外部和内部),包括 IP、端口和主机名 |
| GCP | [private-service-connect](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#private-service-connect) | 枚举 Private Service Connect 端点和服务附件 |
| GCP | [network-topology](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#network-topology) | 可视化 VPC 网络拓扑、对等连接关系和信任边界 |
| GCP | [vpc-sc](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#vpc-sc) | 枚举 VPC Service Controls |
| GCP | [access-levels](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#access-levels) | 枚举 Access Context Manager 访问级别 |
| GCP | [cloud-armor](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#cloud-armor) | 枚举 Cloud Armor 安全策略并查找弱点 |
| GCP | [iap](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#iap) | 枚举 Identity-Aware Proxy 配置 |
| GCP | [beyondcorp](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#beyondcorp) | 枚举 BeyondCorp Enterprise 配置 |
| GCP | [kms](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#kms) | 枚举 Cloud KMS 密钥环和加密密钥并进行安全分析 |
| GCP | [secrets](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#secrets) | 枚举 GCP Secret Manager 机密及其安全配置 |
| GCP | [cert-manager](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#cert-manager) | 枚举 SSL/TLS 证书并查找即将过期或配置错误的证书 |
| GCP | [org-policies](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#org-policies) | 枚举组织策略并识别安全弱点 |
| GCP | [artifact-registry](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#artifact-registry) | 枚举 GCP Artifact Registry 和 Container Registry 及其安全配置 |
| GCP | [cloudbuild](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#cloudbuild) | 枚举 Cloud Build 触发器和构建 |
| GCP | [source-repos](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#source-repos) | 枚举 Cloud Source Repositories |
| GCP | [scheduler](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#scheduler) | 枚举 Cloud Scheduler 作业并进行安全分析 |
| GCP | [pubsub](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#pubsub) | 枚举 Pub/Sub 主题和订阅并进行安全分析 |
| GCP | [logging](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#logging) | 枚举 Cloud Logging 接收器和指标并进行安全分析 |
| GCP | [organizations](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#organizations) | 枚举 GCP 组织层级结构 |
| GCP | [asset-inventory](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#asset-inventory) | 枚举 Cloud Asset Inventory,可选依赖项分析 |
| GCP | [backup-inventory](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#backup-inventory) | 枚举备份策略、受保护资源并识别备份缺口 |
| GCP | [lateral-movement](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#lateral-movement) | 映射横向移动路径、凭证窃取向量和 pivoting 机会 |
| GCP | [data-exfiltration](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#data-exfiltration) | 识别数据渗透路径、潜在向量和缺失的安全加固 |
| GCP | [public-access](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#public-access) | 查找跨 16 个 GCP 服务具有 allUsers/allAuthenticatedUsers 访问权限的资源 |
| GCP | [cross-project](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#cross-project) | 分析跨项目 IAM 绑定、日志接收器和 Pub/Sub 导出以进行横向移动 |
| GCP | [foxmapper](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#foxmapper) | 运行 FoxMapper(基于图谱的 IAM 分析)以发现权限提升路径 |
| GCP | [logging-enum](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#logging-enum) | 扫描 Cloud Logging 条目中的敏感数据(凭证、令牌、PII) |
| GCP | [bigquery-enum](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#bigquery-enum) | 扫描 BigQuery 数据集、表和列以查找敏感数据指标 |
| GCP | [bigtable-enum](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#bigtable-enum) | 扫描 Bigtable 实例、表和列族以查找敏感数据指标 |
| GCP | [spanner-enum](https://github.com/BishopFox/cloudfox/wiki/GCP-Commands#spanner-enum) | 扫描 Spanner 数据库模式以查找敏感的表名和列名 |
# 常见问题解答
**CloudFox 与 ScoutSuite、Prowler、Steampipe 的 AWS 合规模块、AWS Security Hub 等有何不同?**
CloudFox 不会创建任何警报或发现,也不会检查您的环境是否符合基线或基准。相反,它只是让您在手动的渗透测试活动中更加高效。它为您提供验证攻击路径是否可能所需的信息。
**为什么我在某些 CloudFox 命令中看到错误?**
* 并非所有区域都存在的服务 - CloudFox 尝试多种方法来确定每个区域支持哪些服务。但是,某些服务不支持 CloudFox 使用的方法,因此 CloudFox 默认仅向每个区域询问有关该服务的信息。不支持该服务的区域将返回错误。
* 您没有权限 - 您可能会看到错误的另一个原因是您没有权限进行 CloudFox 正在进行的调用。或者是因为策略不允许(例如,SecurityAudit 不允许 CloudFox 需要的所有权限。或者,可能是 SCP 阻止了您。
您始终可以查看 ~/.cloudfox/cloudfox-error.log 文件以获取有关错误的更多信息。
# 先前的工作和其他相关项目
* [SmogCloud](https://github.com/BishopFox/smogcloud) - `endpoints` 命令的灵感来源
* [SummitRoute's AWS Exposable Resources](https://github.com/SummitRoute/aws_exposable_resources) - `endpoints` 命令的灵感来源
* [Steampipe]( ) - 我们使用 steampipe 原型设计了许多 cloudfox 命令。虽然 CloudFox 专注于帮助云渗透测试人员,但 steampipe 是一种查询您任何及所有云资源的简单方法。
* [Principal Mapper](https://github.com/nccgroup/PMapper) - `iam-simulator` 命令的灵感来源,也是强烈推荐的合作伙伴
* [Cloudsplaining](https://github.com/salesforce/cloudsplaining) - `permissions` 命令的灵感来源
* [ScoutSuite](https://github.com/nccgroup/ScoutSuite) - 优秀的云安全基准工具。为 `instances` 命令中的 `--userdata` 功能、`permissions` 命令和许多其他功能提供了灵感
* [Prowler](https://github.com/prowler-cloud/prowler) - 另一个优秀的云安全基准工具。
* [Pacu](https://github.com/RhinoSecurityLabs/pacu) - 优秀的云渗透测试工具。PACU 有许多类似于 CloudFox 的枚举命令,以及许多自动化利用任务的命令(CloudFox 在设计上避免了这一点)
* [CloudMapper](https://github.com/duo-labs/cloudmapper) - `inventory` 命令的灵感来源,总体上也是 CloudFox 的灵感来源
标签:AES-256, AWS, DevSecOps, DPI, EVTX分析, HTTP/HTTPS抓包, PE 加载器, 上游代理, 二进制发布, 云渗透, 云计算, 反取证, 安全评估, 开源工具, 态势感知, 数据展示, 日志审计, 权限分析, 漏洞评估, 环境侦察, 红队, 网络安全, 规则引擎, 足迹分析, 隐私保护