Add 55 new skills across 3 new domains + 6 undercovered areas (762 -> 817)

Demand-driven expansion targeting the fastest-growing 2025-2026 threat and
skills categories (ISC2/WEF/CrowdStrike/Mandiant signals):

- AI Security (NEW domain, 12 skills): LLM red-teaming with garak/PyRIT,
  prompt injection (direct/indirect/RAG), MCP tool-poisoning, agentic tool
  invocation, guardrails, model/data poisoning, system-prompt leakage,
  embedding/vector weaknesses, model extraction, continuous red-teaming
- Supply Chain Security (NEW domain, 5 skills): SBOMs, dependency confusion,
  malicious-npm triage, typosquatting, SLSA/Sigstore provenance
- Hardware & Firmware Security (NEW domain, 4 skills): CHIPSEC/UEFI audit,
  Secure Boot bypass, TPM measured-boot attestation, ESP bootkit hunting
- Identity (10): Entra ID/ROADtools, GraphRunner, AADInternals, ADCS/Certipy,
  shadow credentials, coercion, BloodHound CE, device-code phishing, SSO abuse
- Cloud-native (8): Stratus, Pacu, CloudFox, container escape, K8s RBAC,
  Falco, Trivy, kube-bench
- Offensive C2 (6): Sliver, Havoc, NetExec, DPAPI, NTLM relay ESC8, redirectors
- DFIR (6): Hayabusa, Chainsaw, KAPE, Velociraptor, EZ Tools, Plaso
- Backfill (4): OpenCTI, MISP, honeytokens, post-quantum crypto migration

Each skill follows the repo taxonomy (SKILL.md + references/{standards,api-reference}.md
+ scripts/agent.py + LICENSE), with researched real tool commands (no placeholders),
complete frontmatter, and ATT&CK/ATLAS + NIST CSF mappings. Updates README domain
table, skill count, and index.json.
This commit is contained in:
mukul975
2026-06-22 19:08:16 +02:00
parent 13a1c4afd9
commit 8cae0648ec
279 changed files with 36389 additions and 34 deletions
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to the Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by the Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding any notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. Please do not remove or change
the license header comment from a contributed file except when
necessary.
Copyright 2026 mukul975
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.
@@ -0,0 +1,207 @@
---
name: enumerating-cloud-with-cloudfox
description: Map AWS and Azure attack paths and find exploitable misconfigurations with
CloudFox.
domain: cybersecurity
subdomain: cloud-security
tags:
- cloudfox
- aws
- azure
- cloud-pentest
- attack-paths
- situational-awareness
- enumeration
- offensive-security
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- ID.AM-03
mitre_attack:
- T1526
---
# Enumerating Cloud with CloudFox
> **Legal Notice:** This skill is for authorized cloud penetration testing and assessment only. CloudFox makes read/describe API calls against the cloud account whose credentials you supply. Run it ONLY against accounts you own or are authorized to test under a signed scope. Although CloudFox is read-only by design, the enumeration it performs is reconnaissance against a live environment and must be in scope.
## Overview
CloudFox is an open-source command-line tool from Bishop Fox that helps penetration testers and red teamers gain *situational awareness* in unfamiliar cloud environments. Where tools like ScoutSuite focus on a defender-style configuration audit, CloudFox is built from the attacker's perspective: it answers questions like "what are the most attackable secrets, endpoints, and instances in this account, and what can the identity I just compromised actually reach?" It is read-only — it only performs `Describe`/`List`/`Get` style calls — and writes its findings to per-command CSV/TXT/loot files plus a combined report directory, so output can be triaged offline.
CloudFox covers AWS most deeply (30+ commands) and supports Azure. The workhorse is `cloudfox aws all-checks`, which runs the full battery of enumeration commands with sensible defaults: inventory, internet-reachable `endpoints`, EC2 `instances` (with IPs and instance-profile roles), `iam-simulator` and `permissions` for IAM analysis, `principals`, `secrets` from Secrets Manager/SSM, `buckets`, `role-trusts` (which identities can assume which roles — a core attack-path primitive), `access-keys`, `route53`, `ecr`, `lambda`, and more. CloudFox also emits ready-to-run command suggestions (e.g. `aws s3 ls` lines, `aws ssm start-session` lines) in its "loot" files so an operator can pivot immediately.
This skill covers installing CloudFox, authenticating to AWS and Azure, running targeted and full enumeration, interpreting the high-value outputs (role-trusts, secrets, endpoints), and feeding the results into attack-path planning. Source: github.com/BishopFox/cloudfox.
## When to Use
- Establishing situational awareness immediately after compromising a cloud credential
- Quickly identifying internet-exposed endpoints, instances, and exposed secrets
- Mapping `sts:AssumeRole` trust relationships to plan lateral movement / privesc
- Triaging an unfamiliar AWS or Azure account during an authorized assessment
- Producing attacker-centric inventory artifacts that complement a defensive audit
## Prerequisites
- CloudFox installed:
```bash
# Homebrew
brew install cloudfox
# Go (1.21+)
go install github.com/BishopFox/cloudfox@latest
# or download a release binary from GitHub and chmod +x
```
- Valid cloud credentials in scope:
```bash
# AWS — configure a named profile and verify
aws configure --profile assess
aws sts get-caller-identity --profile assess
# Azure
az login
az account show
```
- A signed authorization / Rules of Engagement defining the in-scope accounts
- `awscli` (AWS) and/or `azure-cli` (Azure) installed for credential setup and follow-up
## Objectives
- Install CloudFox and confirm cloud credentials
- Run full and targeted enumeration across AWS and Azure
- Identify internet-reachable endpoints, instances, and exposed secrets
- Enumerate IAM principals, permissions, and role-trust attack paths
- Triage CloudFox loot files for immediate pivot commands
- Export findings to a structured output directory for reporting
## MITRE ATT&CK Mapping
| ID | Name | Use in this skill |
|----|------|-------------------|
| T1526 | Cloud Service Discovery | CloudFox enumerates the available cloud services and resources in an account |
| T1580 | Cloud Infrastructure Discovery | `inventory`, `instances`, `buckets` map the infrastructure footprint |
| T1087.004 | Account Discovery: Cloud Account | `principals`, `access-keys` enumerate cloud identities |
| T1069.003 | Permission Groups Discovery: Cloud Groups | `permissions`, `iam-simulator`, `role-trusts` reveal entitlements |
| T1538 | Cloud Service Dashboard | Aggregated situational-awareness reporting across services |
## Workflow
### 1. Confirm the identity and run all AWS checks
```bash
aws sts get-caller-identity --profile assess
cloudfox aws --profile assess all-checks -o ./loot
```
### 2. Inventory the account footprint
```bash
cloudfox aws --profile assess inventory
```
### 3. Find internet-reachable endpoints and exposed instances
```bash
cloudfox aws --profile assess endpoints
cloudfox aws --profile assess instances
```
### 4. Enumerate IAM principals, permissions, and role-trust attack paths
`role-trusts` is the key lateral-movement primitive — it shows who can assume what.
```bash
cloudfox aws --profile assess principals
cloudfox aws --profile assess permissions
cloudfox aws --profile assess role-trusts
cloudfox aws --profile assess access-keys
```
### 5. Hunt for exposed secrets
```bash
cloudfox aws --profile assess secrets
```
### 6. Enumerate storage, registries, and serverless
```bash
cloudfox aws --profile assess buckets
cloudfox aws --profile assess ecr
cloudfox aws --profile assess lambda
cloudfox aws --profile assess route53
```
### 7. Use IAM simulator to confirm what a principal can do
```bash
cloudfox aws --profile assess iam-simulator
```
### 8. Enumerate Azure
CloudFox Azure works against the subscriptions the `az` session can see.
```bash
cloudfox azure inventory --outdir ./azure-loot
cloudfox azure rbac
cloudfox azure storage
cloudfox azure vms
```
### 9. Triage the loot
CloudFox writes per-command CSV/TXT plus a `loot` directory of pivot commands.
```bash
ls -R ./loot/cloudfox-output/
# Loot files contain ready-to-run follow-ups, e.g. aws s3 ls / ssm start-session lines
```
See `scripts/agent.py` to run a curated set of commands and summarize output files.
## Tools and Resources
| Resource | Purpose | Link |
|----------|---------|------|
| CloudFox GitHub | Source, releases, full command list | https://github.com/BishopFox/cloudfox |
| CloudFox docs/wiki | Per-command output explanations | https://github.com/BishopFox/cloudfox/wiki |
| Bishop Fox CloudFox blog | Design and usage walkthrough | https://bishopfox.com/blog/introducing-cloudfox |
| AWS CLI reference | Follow-up exploitation commands | https://docs.aws.amazon.com/cli/latest/reference/ |
| Pacu | Active exploitation after enumeration | https://github.com/RhinoSecurityLabs/pacu |
## OPSEC and Detection Considerations
CloudFox is read-only, but its enumeration is far from silent. Each command issues
many `Describe*`/`List*`/`Get*` API calls in a short burst, which is highly visible
to defenders:
- **CloudTrail** records every read call. A spike of `iam:ListUsers`, `iam:ListRoles`,
`secretsmanager:ListSecrets`, `ec2:DescribeInstances`, and `sts:GetCallerIdentity`
from one principal within seconds is a strong enumeration signal.
- **GuardDuty** finding types such as `Discovery:IAMUser/AnomalousBehavior` and
`Discovery:S3/MaliciousIPCaller` can fire on this burst pattern.
- Defenders should baseline normal API-call rates per principal and alert on
enumeration bursts, especially from new IPs/ASNs or newly created credentials.
For an authorized assessment, document the source IP and timestamp of CloudFox runs
so the blue team can correlate, and prefer running from an in-scope, attributable host.
## Recommended Operator Workflow
1. Run `all-checks` once to populate the full output directory.
2. Open `role-trusts` first — it reveals the assume-role graph for lateral movement.
3. Cross-reference `secrets` and `env-vars` for credentials that unlock new principals.
4. Use `endpoints` + `instances` to map externally reachable attack surface.
5. Feed confirmed assume-role / privesc candidates into Pacu for active exploitation.
## High-Value Command Reference
| Command | Why it matters |
|---------|----------------|
| `all-checks` | Runs the full enumeration battery with defaults |
| `role-trusts` | Maps assume-role paths — core for lateral movement/privesc |
| `endpoints` | Surfaces internet-reachable attack surface |
| `secrets` | Exposes credentials in Secrets Manager / SSM |
| `permissions` | Lists effective IAM permissions per principal |
| `instances` | EC2 with IPs and attached instance-profile roles |
| `access-keys` | Active access keys (potential credential targets) |
## Validation Criteria
- [ ] CloudFox installed and runs `cloudfox aws --help`
- [ ] Cloud credentials confirmed via `sts get-caller-identity` / `az account show`
- [ ] `all-checks` completed and output directory populated
- [ ] Internet-reachable endpoints and instances identified
- [ ] IAM principals, permissions, and role-trusts enumerated
- [ ] Exposed secrets located and documented
- [ ] Azure enumeration run (if Azure in scope)
- [ ] Loot files triaged for pivot opportunities
- [ ] Findings exported to a structured directory for reporting
- [ ] Enumeration confirmed to stay within authorized scope
@@ -0,0 +1,53 @@
# CloudFox — Command Reference
## Global Invocation
```
cloudfox <provider> [global-flags] <command>
```
| Flag | Description |
|------|-------------|
| `--profile <name>` | AWS named profile to use |
| `-o, --outdir <dir>` | Output directory for results/loot |
| `--region <region>` | Restrict to a region (where applicable) |
| `-v` | Verbosity level |
| `AWS_PROFILE` (env) | Alternative to `--profile` |
## AWS Commands (selection)
| Command | Description |
|---------|-------------|
| `all-checks` | Run all AWS enumeration commands with defaults |
| `inventory` | Account size / resource counts by region |
| `endpoints` | Internet-reachable service endpoints |
| `instances` | EC2 instances with IPs and instance-profile roles |
| `principals` | IAM users and roles |
| `permissions` | Effective IAM permissions per principal |
| `iam-simulator` | Simulate whether principals can perform actions |
| `role-trusts` | Who can assume which roles (assume-role paths) |
| `access-keys` | Active IAM access keys |
| `secrets` | Secrets from Secrets Manager and SSM Parameter Store |
| `buckets` | S3 buckets |
| `ecr` | Elastic Container Registry repositories/images |
| `lambda` | Lambda functions and configuration |
| `route53` | Hosted zones and records |
| `ram` | Resource Access Manager shares |
| `sns` / `sqs` | Messaging resources |
| `env-vars` | Environment variables across services |
## Azure Commands
| Command | Description |
|---------|-------------|
| `inventory` | Resource inventory by location/subscription |
| `rbac` | Role-based access control assignments |
| `storage` | Storage accounts and access data |
| `vms` | Virtual machines |
## Output Layout
CloudFox writes to `<outdir>/cloudfox-output/<provider>/<account-or-sub>/`:
- `table/` and `csv/` — per-command findings
- `loot/` — ready-to-run follow-up commands (e.g., `aws s3 ls`, `ssm start-session`)
- A combined log of the run
@@ -0,0 +1,22 @@
# Standards and Framework Mapping
## NIST Cybersecurity Framework 2.0
| ID | Name | Rationale |
|----|------|-----------|
| ID.AM-03 | Organizational communication and data flows are mapped (asset/inventory management) | CloudFox builds an attacker-centric inventory of cloud assets, identities, and trust relationships, informing asset-management gaps. |
## MITRE ATT&CK (Enterprise / Cloud)
| ID | Name | Rationale |
|----|------|-----------|
| T1526 | Cloud Service Discovery | CloudFox enumerates available cloud services and resources. |
| T1580 | Cloud Infrastructure Discovery | Inventory/instances/buckets map the infrastructure footprint. |
| T1087.004 | Account Discovery: Cloud Account | `principals`/`access-keys` enumerate cloud identities. |
| T1069.003 | Permission Groups Discovery: Cloud Groups | `permissions`/`role-trusts` reveal cloud entitlements. |
| T1538 | Cloud Service Dashboard | Aggregated cross-service situational awareness. |
## Supporting References
- BishopFox CloudFox — https://github.com/BishopFox/cloudfox
- NIST CSF 2.0 — https://www.nist.gov/cyberframework
@@ -0,0 +1,105 @@
#!/usr/bin/env python3
"""
CloudFox enumeration driver.
Runs a curated set of CloudFox commands against an AWS profile (or `all-checks`),
captures output into a structured directory, and prints a triage summary that
highlights the high-value findings (role-trusts, secrets, endpoints).
Authorized-use only: CloudFox performs reconnaissance against a live cloud
account. Run ONLY within a signed scope/Rules of Engagement.
Examples:
python agent.py --profile assess --all
python agent.py --profile assess --commands endpoints secrets role-trusts -o ./loot
"""
import argparse
import os
import shutil
import subprocess
import sys
HIGH_VALUE = {"role-trusts", "secrets", "endpoints", "access-keys", "permissions"}
DEFAULT_COMMANDS = [
"inventory", "endpoints", "instances", "principals",
"permissions", "role-trusts", "access-keys", "secrets", "buckets",
]
def require_cloudfox():
if shutil.which("cloudfox") is None:
sys.exit("error: 'cloudfox' not found in PATH. Install: brew install cloudfox "
"or go install github.com/BishopFox/cloudfox@latest")
def run_command(provider, profile, command, outdir):
cmd = ["cloudfox", provider]
if provider == "aws" and profile:
cmd += ["--profile", profile]
if outdir:
cmd += ["-o", outdir]
cmd += [command]
print(f"[*] cloudfox {provider} {command} ...")
try:
proc = subprocess.run(cmd, capture_output=True, text=True, timeout=1200)
except subprocess.TimeoutExpired:
print(f" [!] {command} timed out")
return None
except OSError as exc:
print(f" [!] failed to run {command}: {exc}")
return None
if proc.returncode != 0:
print(f" [!] {command} rc={proc.returncode}: {proc.stderr.strip()[:200]}")
return proc.stdout
def summarize_outdir(outdir):
base = os.path.join(outdir, "cloudfox-output")
if not os.path.isdir(base):
print("[!] no cloudfox-output directory produced")
return
print("\n=== Output files ===")
for root, _dirs, files in os.walk(base):
for f in sorted(files):
path = os.path.join(root, f)
try:
size = os.path.getsize(path)
except OSError:
size = -1
rel = os.path.relpath(path, outdir)
flag = " <-- HIGH VALUE" if any(h in f for h in HIGH_VALUE) else ""
print(f" {rel} ({size} bytes){flag}")
def main():
p = argparse.ArgumentParser(description="CloudFox enumeration driver")
p.add_argument("--provider", default="aws", choices=["aws", "azure"])
p.add_argument("--profile", help="AWS named profile")
p.add_argument("--all", action="store_true", help="run all-checks (AWS) / inventory (Azure)")
p.add_argument("--commands", nargs="+", help="specific CloudFox commands to run")
p.add_argument("-o", "--outdir", default="./cloudfox-loot", help="output directory")
args = p.parse_args()
require_cloudfox()
print("[!] AUTHORIZED USE ONLY — confirm the target account is in scope.")
os.makedirs(args.outdir, exist_ok=True)
if args.all:
commands = ["all-checks"] if args.provider == "aws" else ["inventory"]
elif args.commands:
commands = args.commands
else:
commands = DEFAULT_COMMANDS if args.provider == "aws" else ["inventory", "rbac", "storage", "vms"]
for c in commands:
out = run_command(args.provider, args.profile, c, args.outdir)
if out and c in HIGH_VALUE:
lines = [l for l in out.splitlines() if l.strip()]
print(f" [+] {c}: {len(lines)} output lines")
summarize_outdir(args.outdir)
print(f"\n[+] done. Review loot under {args.outdir}/cloudfox-output/")
if __name__ == "__main__":
main()