Multi-Cloud IAM Privilege-Escalation Attack-Path Analyzer
CloudSentrix is a free, open-source command-line tool that scans GCP, AWS, and Azure IAM/RBAC policy exports for privilege-escalation risks, generates interactive attack-path graphs, scores your security posture, and produces client-ready PDF reports — all without any paid APIs.
- Detects 5 GCP IAM privilege-escalation patterns (MITRE ATT&CK mapped)
- Calculates blast radius — if one account is compromised, how much can an attacker reach?
- Generates remediation — exact
gcloudCLI commands to fix each finding - Live scanning — fetch and scan a live GCP project directly
- Detects 7 AWS IAM privilege-escalation patterns including
iam:PassRole,sts:AssumeRole, backdoor user creation - Live scanning — fetch and scan a live AWS account directly via boto3
- LocalStack support — test without a real AWS account (free, runs locally)
- Detects 5 Azure RBAC privilege-escalation patterns including Owner abuse, guest user risks, dangerous custom roles
- Blast radius calculation — per-principal scope-aware risk scoring
- Live scanning — fetch and scan a live Azure subscription via
azCLI
- Single animated HTML dashboard comparing GCP, AWS, and Azure side by side
- One professional PDF covering GCP, AWS, and Azure findings in a single document
- Cover page, executive summary table, per-cloud findings, blast radius, recommendations
- Interactive bar charts, score counters, severity breakdown, all findings in one view
- Scroll animations, floating particles, hover effects — professional SOC-level report
- Automatically send findings to Slack or Microsoft Teams after every scan
- Rich formatted messages with score, severity breakdown, and top findings
- Supports webhook URL via env var or
--webhookflag
- Scores security posture from 0–100
- Exports results as JSON, CSV, SARIF, Interactive HTML Dashboard, or PDF
- Watches a folder and auto-rescans whenever an IAM file changes
- AI summaries — plain-language executive summaries via Google Gemini
- Python 3.10 or higher
- pip
- For AWS live scan:
pip install boto3 - For Azure live scan: Azure CLI (
az) installed and authenticated
pip install cloudsentrixKali Linux / Debian:
pip install cloudsentrix --break-system-packages
# OR use pipx
pipx install cloudsentrix
# OR use virtual environment
python3 -m venv ~/cloudsentrix-env
source ~/cloudsentrix-env/bin/activate
pip install cloudsentrixWindows:
git clone https://github.com/Talha-Imran-cloud/cloudsentrix.git
cd cloudsentrix
python -m venv venv
venv\Scripts\activate
pip install -e .Linux / macOS / Kali:
git clone https://github.com/Talha-Imran-cloud/cloudsentrix.git
cd cloudsentrix
python3 -m venv venv
source venv/bin/activate
pip install -e .cloudsentrix --versiongcloud projects get-iam-policy YOUR_PROJECT_ID --format=json > my_project_iam.jsonaws iam get-account-authorization-details --output json > aws_iam.jsonaz role assignment list --all --output json > azure_rbac.jsonSample files included for testing:
sample_data/sample_gcp_iam.json— GCP basic examplesample_data/demo_enterprise_iam.json— GCP enterprise scenariosample_data/sample_aws_iam.json— AWS example with 7 escalation riskssample_data/sample_azure_rbac.json— Azure RBAC example with 5 escalation risks
# GCP (default)
cloudsentrix scan --file sample_data/sample_gcp_iam.json
cloudsentrix scan --file my_project.json --severity high
# AWS
cloudsentrix scan --file sample_data/sample_aws_iam.json --cloud aws
cloudsentrix scan --file aws_iam.json --cloud aws --severity critical
# Azure
cloudsentrix scan --file sample_data/sample_azure_rbac.json --cloud azure
cloudsentrix scan --file azure_rbac.json --cloud azure --severity critical
# With Slack / Teams alert
cloudsentrix scan --file my_project.json --notify slack
cloudsentrix scan --file aws_iam.json --cloud aws --notify teams
cloudsentrix scan --file my_project.json --notify slack --webhook https://hooks.slack.com/...# All three clouds
cloudsentrix dashboard \
--gcp sample_data/sample_gcp_iam.json \
--aws sample_data/sample_aws_iam.json \
--azure sample_data/sample_azure_rbac.json \
--output multi_cloud_dashboard.html
# Two clouds only
cloudsentrix dashboard \
--gcp my_gcp.json \
--aws my_aws.json \
--output dashboard.html
# Open the dashboard
# Windows:
start multi_cloud_dashboard.html
# Linux / macOS:
xdg-open multi_cloud_dashboard.htmlThe dashboard includes:
- Animated security score cards per cloud
- Bar charts comparing scores and severity counts
- Severity breakdown table (Critical / High / Medium / Low per cloud)
- All findings from all clouds in one filterable table
- Scroll animations, floating particles, counter animations
# All three clouds in one PDF
cloudsentrix report-multi \
--gcp sample_data/sample_gcp_iam.json \
--aws sample_data/sample_aws_iam.json \
--azure sample_data/sample_azure_rbac.json \
--output multi_cloud_report.pdf
# Two clouds only
cloudsentrix report-multi \
--gcp my_gcp.json \
--aws my_aws.json \
--output report.pdfThe PDF includes:
- Cover page with scan metadata
- Executive summary — all clouds score table side by side
- Per-cloud section — findings table + blast radius top 5
- Footer with MITRE ATT&CK note and timestamp
GCP:
gcloud auth application-default login
cloudsentrix live-scan --project my-gcp-project-id
cloudsentrix live-scan --project my-gcp-project-id --save fetched_policy.jsonAWS:
pip install boto3
cloudsentrix live-scan --cloud aws
cloudsentrix live-scan --cloud aws --profile my-profile --region us-west-2
cloudsentrix live-scan --cloud aws --save aws_policy.json
# LocalStack (no real AWS account needed)
cloudsentrix live-scan --cloud aws --endpoint http://localhost:4566Azure:
az login
cloudsentrix live-scan --cloud azure
cloudsentrix live-scan --cloud azure --subscription my-subscription-id
cloudsentrix live-scan --cloud azure --save azure_policy.json# GCP
cloudsentrix export --file my_project.json --output dashboard.html
cloudsentrix export --file my_project.json --output report.json
cloudsentrix export --file my_project.json --output report.csv
cloudsentrix export --file my_project.json --output results.sarif
# AWS
cloudsentrix export --file aws_iam.json --cloud aws --output aws_dashboard.html
cloudsentrix export --file aws_iam.json --cloud aws --output aws_report.json
# Azure
cloudsentrix export --file azure_rbac.json --cloud azure --output azure_dashboard.html
cloudsentrix export --file azure_rbac.json --cloud azure --output azure_results.sarif# GCP
cloudsentrix report --file my_project.json --output report.pdf --no-ai
# AWS
cloudsentrix report --file aws_iam.json --cloud aws --output aws_report.pdf --no-ai
# Azure
cloudsentrix report --file azure_rbac.json --cloud azure --output azure_report.pdf --no-ai
# With Gemini AI summary
cloudsentrix report --file my_project.json --output report.pdfcloudsentrix score --file my_project.json
cloudsentrix score --file aws_iam.json --cloud aws
cloudsentrix score --file azure_rbac.json --cloud azure --jsoncloudsentrix validate --file my_project.json
cloudsentrix validate --file aws_iam.json --cloud aws
cloudsentrix validate --file azure_rbac.json --cloud azurecloudsentrix list-principals --file my_project.json
cloudsentrix list-principals --file aws_iam.json --cloud aws
cloudsentrix list-principals --file azure_rbac.json --cloud azurecloudsentrix blast-radius --file my_project.json --principal admin@company.comcloudsentrix principal-path --file my_project.json \
--source intern@company.com \
--target app-backend@my-project.iam.gserviceaccount.comcloudsentrix mitre-map --file my_project.jsoncloudsentrix remediate --file my_project.json
cloudsentrix remediate --file my_project.json --severity criticalcloudsentrix compare --old january.json --new february.jsoncloudsentrix watch --path my_project.json
cloudsentrix watch --path azure_rbac.json --cloud azure
cloudsentrix watch --path /path/to/iam/ --interval 5cloudsentrix rulesStep 1 — Create webhook:
- Go to https://api.slack.com/apps
- Create New App → From Scratch
- Incoming Webhooks → Turn On
- Add New Webhook to Workspace → Select channel
- Copy the webhook URL
Step 2 — Set env var:
Windows:
$env:CLOUDSENTRIX_SLACK_WEBHOOK = "https://hooks.slack.com/services/YOUR/WEBHOOK"Linux / macOS:
export CLOUDSENTRIX_SLACK_WEBHOOK="https://hooks.slack.com/services/YOUR/WEBHOOK"Step 3 — Scan with alert:
cloudsentrix scan --file my_project.json --notify slack
cloudsentrix scan --file aws_iam.json --cloud aws --notify slackStep 1 — Create webhook:
- In Teams → open a channel →
...→ Connectors - Add Incoming Webhook → Configure → Name it → Copy URL
Step 2 — Set env var:
Windows:
$env:CLOUDSENTRIX_TEAMS_WEBHOOK = "https://your-org.webhook.office.com/..."Step 3 — Scan with alert:
cloudsentrix scan --file my_project.json --notify teams
cloudsentrix scan --file azure_rbac.json --cloud azure --notify teamscloudsentrix scan --file my_project.json \
--notify slack \
--webhook https://hooks.slack.com/services/YOUR/WEBHOOKpip install localstack awscli-local
localstack start
awslocal iam create-user --user-name test-admin
awslocal iam attach-user-policy \
--user-name test-admin \
--policy-arn arn:aws:iam::aws:policy/AdministratorAccess
cloudsentrix live-scan --cloud aws --endpoint http://localhost:4566# Get free API key from https://aistudio.google.com/app/apikey
# Windows
$env:GEMINI_API_KEY = "your_api_key_here"
# Linux / macOS
export GEMINI_API_KEY="your_api_key_here"
cloudsentrix report --file my_project.json --output report.pdf| Code | Meaning |
|---|---|
0 |
Success, no CRITICAL findings |
1 |
CRITICAL findings detected (use this to fail CI pipelines) |
2 |
Command could not complete (bad file, wrong format, etc.) |
| Rule | Title | Severity | MITRE |
|---|---|---|---|
| GCP-001 | Publicly Accessible Role Binding | CRITICAL | T1078.004 |
| GCP-002 | Service Account Token Creator | CRITICAL | T1098.001 |
| GCP-003 | Service Account Key Admin | CRITICAL | T1098.001 |
| GCP-004 | IAM Policy Administrator | CRITICAL | T1098.003 |
| GCP-005 | Service Account Impersonation via Resource Attach | HIGH | T1548.005 |
| Rule | Title | Severity | MITRE |
|---|---|---|---|
| AWS-001 | Administrator Access — Full AWS Control | CRITICAL | T1078.004 |
| AWS-002 | IAM PassRole — Privilege Escalation via Service | CRITICAL | T1098.003 |
| AWS-003 | IAM Policy Manipulation — Self-Escalation Path | CRITICAL | T1098.003 |
| AWS-004 | Publicly Assumable Role — Trust Policy Allows Anyone | CRITICAL | T1078.004 |
| AWS-005 | Access Key Creation — Long-Lived Credential Backdoor | CRITICAL | T1098.001 |
| AWS-006 | Backdoor IAM User Creation | CRITICAL | T1136.003 |
| AWS-007 | IAMFullAccess — Complete IAM Control | CRITICAL | T1098.003 |
| Rule | Title | Severity | MITRE |
|---|---|---|---|
| AZ-001 | Owner / Contributor at Broad Scope | CRITICAL | T1078.004 |
| AZ-002 | Service Principal with High-Privilege Role | CRITICAL | T1098.001 |
| AZ-003 | Guest User with Elevated Role | HIGH | T1078.006 |
| AZ-004 | Wildcard / Over-permissive Role Scope | HIGH | T1548.005 |
| AZ-005 | Custom Role with Dangerous Permissions | HIGH | T1098.003 |
pip install -e ".[dev]"
pytest tests/ -vExpected output: 144 passed
cloudsentrix/
├── src/
│ ├── cli.py # CLI entry point (15 commands)
│ ├── parser.py # GCP IAM JSON parser
│ ├── graph.py # GCP IAM permission graph engine
│ ├── detection.py # GCP privilege-escalation detection (5 rules)
│ ├── risk_score.py # 0-100 security scoring engine
│ ├── blast_radius.py # GCP attack-path blast radius calculator
│ ├── watch_handler.py # File system watcher
│ ├── live_scanner.py # Live GCP project scanner
│ ├── pdf_report.py # PDF report generator
│ ├── ai_summary.py # Gemini AI summary integration
│ ├── aws_parser.py # AWS IAM JSON parser
│ ├── aws_graph.py # AWS IAM permission graph engine
│ ├── aws_detection.py # AWS privilege-escalation detection (7 rules)
│ ├── aws_live_scanner.py # Live AWS scanner via boto3
│ ├── azure_parser.py # Azure RBAC JSON parser
│ ├── azure_detection.py # Azure privilege-escalation detection (5 rules)
│ ├── azure_risk_score.py # Azure security scoring engine
│ ├── azure_blast_radius.py # Azure blast radius calculator
│ ├── azure_exporter.py # Azure JSON/CSV/SARIF/HTML exporter
│ ├── azure_live_scanner.py # Live Azure scanner via az CLI
│ ├── multi_dashboard.py # Multi-cloud animated HTML dashboard
│ ├── multi_pdf_report.py # Multi-cloud PDF report generator
│ └── notifier.py # Slack / Teams webhook notifications
├── tests/ # 144 pytest tests
├── sample_data/
│ ├── sample_gcp_iam.json # GCP basic test file
│ ├── demo_enterprise_iam.json # GCP enterprise demo
│ ├── sample_aws_iam.json # AWS test file
│ └── sample_azure_rbac.json # Azure RBAC test file
├── .github/workflows/ci.yml # GitHub Actions CI
├── .github/workflows/publish.yml # PyPI auto-publish
├── pyproject.toml # Packaging configuration
└── README.md
| Feature | Description | Status |
|---|---|---|
| GCP Support | Full GCP IAM scanning — 5 rules, blast radius, remediation, live scan | ✅ Shipped |
| AWS Support | AWS IAM scanning — 7 rules, PassRole, AssumeRole, live scan, LocalStack | ✅ Shipped |
| Azure Support | Azure RBAC scanning — 5 rules, blast radius, live scan, HTML dashboard | ✅ Shipped |
| Multi-Cloud Dashboard | Animated HTML dashboard comparing GCP, AWS, Azure side by side | ✅ Shipped |
| Slack / Teams Alerts | Send findings to Slack or Teams webhook after every scan | ✅ Shipped |
| PDF Multi-Project | One PDF report covering GCP, AWS, and Azure findings in one document | ✅ Shipped |
| Azure AD / Entra ID | Detect risky app registrations, OAuth permissions, conditional access gaps | 🔄 Planned |
| CI/CD Integration | GitHub Actions, GitLab CI templates for automated scanning | 🔄 Planned |
MIT License — free to use, modify, and distribute.
Talha Imran — SOC Analyst | Cloud Security | Pentesting