Cyber Security Aegis IAM Dashboard
Enterprise-grade IAM risk-analysis HUD engineered for rapid incident-response triage, featuring privilege escalation graph traversal, MITRE ATT&CK heatmapping, and dynamic remediation playbooks.
#🛡️ AEGIS-IAM DASHBOARD
#👾 Authors
#📋 Table of Contents
#🎯 Project Summary
Aegis-IAM Dashboard is an enterprise-grade IAM risk-analysis HUD built for blue teams who need a fast, visual second-opinion on real-world identity exports — without standing up a full data pipeline.
Drop in any AWS aws iam get-account-authorization-details JSON and the engine immediately returns:
- Privilege escalation chains — graph-traversed user → role → admin pathways with severity scoring.
- Over-privileged principals — wildcard, admin-equivalent, and dangerous IAM/STS verb detection.
- Separation-of-Duties conflicts — six-pair conflict matrix flags audit-bypass and rogue-trust conditions.
- MITRE ATT&CK heatmap — 57-verb mapping across all 10 ATT&CK enterprise tactics.
- Composite posture score — 0–100 with letter-grade (A+ → F) and transparent factor breakdown.
- Dynamic remediation playbooks — auto-generated CLI patches and strategic guidance per finding.
The entire HUD is single-binary Flask + Jinja with a Tailwind CDN frontend. No build step. No database. No cloud dependency.
| Metric | Value |
|---|---|
| 🗺️ MITRE Verbs Mapped | 57 distinct IAM/STS verbs |
| 🎯 Tactics Covered | 10 / 10 ATT&CK Enterprise tactics |
| 🧪 Test Coverage | 38/38 E2E · 11/11 adversarial security tests |
| ☁️ Cloud Support | AWS · Azure · GCP |
| 🏗️ Backend | Flask 3.0 · NetworkX 3.2 · Python 3.9+ |
| 🎨 Frontend | Tailwind CDN · Chart.js · vis-network · html2pdf |
| 🔒 Security Controls | CSRF · CSP · rate-limiting · XSS-tested · JSON bomb guard |
| 📦 Deployment | Gunicorn · Docker · Render / Railway / Heroku compatible |
| 📄 No Build Step | No webpack · no npm · no database · runs offline |
#💡 Core Idea
Most cloud security tools are heavy: agents, ingestion pipelines, query languages, paid SaaS dashboards. The first 5 minutes of incident-response triage rarely needs any of that — the responder just wants to point at an IAM JSON dump and ask:
| Question | Aegis Answer |
|---|---|
| Who can become admin from where? | Privilege Escalation Chains module |
| Who already has too much power? | Over-Privileged Principals module |
| Who can change and hide policy state? | Separation-of-Duties Conflicts module |
| What ATT&CK techniques does this surface enable? | MITRE Heatmap module |
| How exposed is this account, on a single number? | Posture Score Engine |
| What do I do now to fix it? | Dynamic Playbook module |
Aegis treats the IAM export as the only source of truth for a single shot of analysis. Stateless, self-contained, runs offline. Useful as a SOC analyst's pocket scanner, an interview takehome, a security-class lab, or a quick Friday-afternoon audit.
#🔁 Complete Pipeline
┌──────────────────┐ ┌─────────────────┐ ┌────────────────────┐ ┌──────────────────┐
│ IAM JSON Upload │ → │ Schema Detect │ → │ Normalized Model │ → │ Graph Builder │
│ (AWS / Simple) │ │ + Validation │ │ (users / roles / │ │ (NetworkX) │
│ ≤ 2 MB │ │ │ │ actions / trust) │ │ │
└──────────────────┘ └─────────────────┘ └────────────────────┘ └────────┬─────────┘
│
┌─────────────────────────────────────────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────────────────────────────┐
│ ANALYSIS LAYER — runs in parallel for every loaded dataset │
├────────────────────────────────────────────────────────────────────────────────────────┤
│ • Escalation paths (DiGraph traversal: user → role → admin, severity by edge depth) │
│ • Over-privileged detection (wildcards, admin-equivalent ARNs, dangerous verbs) │
│ • SoD conflict matrix (six write+read pairs out of the box) │
│ • MITRE ATT&CK tag resolution (case-insensitive, multi-tactic decomposition) │
│ • Posture scoring (weighted negative deltas, A+ to F grading, factor breakdown) │
│ • Heatmap aggregation (per-tactic technique rollup with principal counts) │
└────────────────────────────────────────────────────────────────────────────────────────┘
│
▼
┌──────────────────┐ ┌─────────────────┐ ┌────────────────────┐ ┌──────────────────┐
│ Cyberpunk HUD │ ⇄ │ Detail Drawer │ ⇄ │ Cmd+K Palette │ ⇄ │ PDF / JSON / CSV│
│ (Tailwind+SVG) │ │ (per-finding) │ │ (fuzzy launcher) │ │ Export │
└──────────────────┘ └─────────────────┘ └────────────────────┘ └──────────────────┘
#✨ Key Features
| Module | Capability |
|---|---|
| 🎯 Posture Score Engine | 0–100 composite score with letter grade (A+ → F) and transparent factor breakdown. Animated SVG ring fills proportional to score. |
| 🗺️ MITRE ATT&CK Heatmap | Live grid across 10 enterprise tactics — Initial Access, Execution, Persistence, Privilege Escalation, Defense Evasion, Credential Access, Discovery, Lateral Movement, Collection, Impact. Click any technique cell for full intel. |
| 🪟 Detail Drawer | Click any finding to expand chain, root cause, patch CLI steps, strategy, and per-permission MITRE references. |
| ⚡ Command Palette | Ctrl/Cmd + K opens a fuzzy launcher — jump to modules, run exports, or search every finding by principal. |
| 🎚️ Filter Chips | Multi-axis filter: severity (Critical / High / Medium / Low) × type (Escalation / Over-Priv / SoD). |
| 📈 Stat Sparklines + Diff Deltas | Each stat tile shows live count, severity micro-bars, and +/− delta vs the previous analysis. |
| 🔔 Toast Notifications | Slide-in alerts mirror Flask flash messages with severity coloring. |
| 📥 JSON / CSV API Exports | /api/export/json and /api/export/csv stream the full intelligence payload. |
| ✨ Animated Particle Field | Lightweight canvas with connecting lines. Respects prefers-reduced-motion. |
| 📄 Themed PDF Report | One-click html2pdf export — dark-mode safe, branded, ready to send to leadership. |
| 🌐 Trust Graph | vis-network rendering of users / roles / assume-role edges. |
| 📚 Dynamic Playbooks | Auto-generated CLI patch steps + strategic guidance per finding. |
| 🛡️ Hardened Inputs | XSS-tested. tojson | safe payload encoding. 2 MB upload cap. CSP / X-Frame-Options / Referrer-Policy headers. |
#🗺️ MITRE ATT&CK Coverage
Every IAM/STS verb in the map is tagged with one or more ATT&CK tactics. Compound tactics (e.g. Lateral Movement / Privilege Escalation / Persistence) decompose across all matching tactic columns in the heatmap.
| Tactic | Coverage | Example Permissions |
|---|---|---|
| TA0001 — Initial Access | ✅ 3 | sts:AssumeRoleWithSAML, iam:CreateLoginProfile |
| TA0002 — Execution | ✅ 1 | ssm:SendCommand |
| TA0003 — Persistence | ✅ 19 | iam:CreateUser, iam:CreateAccessKey, iam:UpdateAssumeRolePolicy |
| TA0004 — Privilege Escalation | ✅ 17 | iam:PassRole, iam:AttachUserPolicy, iam:PutRolePolicy |
| TA0005 — Defense Evasion | ✅ 16 | iam:DeleteUser, cloudtrail:StopLogging, iam:DeleteAccessKey |
| TA0006 — Credential Access | ✅ 9 | secretsmanager:GetSecretValue, sts:GetFederationToken |
| TA0007 — Discovery | ✅ 13 | iam:ListUsers, iam:GetAccountAuthorizationDetails |
| TA0008 — Lateral Movement | ✅ 7 | sts:AssumeRole, iam:PassRole, lambda:UpdateFunctionCode |
| TA0009 — Collection | ✅ 1 | kms:Decrypt |
| TA0040 — Impact | ✅ 4 | iam:DeleteRole, iam:DeletePolicy, cloudtrail:DeleteTrail |
Total: 57 distinct verbs · 10/10 enterprise tactics covered
#📊 Posture Scoring Engine
Posture Score is a transparent, deterministic composite. Score starts at 100 and each detected risk subtracts a weighted delta:
| Risk Type | Weight per Finding |
|---|---|
| 🔴 Critical Escalation | −15 |
| 🟠 High Escalation | −10 |
| 🟡 Medium Escalation | −6 |
| 🟢 Low Escalation | −3 |
| 💀 Over-Privileged Principal | −8 |
| ⚠️ Separation-of-Duties Conflict | −5 |
Final score is floored at zero. Each contributing factor surfaces in the Posture Score Breakdown module, so teams can see exactly which findings drove the grade.
| Score Range | Grade | Status |
|---|---|---|
| 95 – 100 | A+ | 🟢 Hardened |
| 85 – 94 | A | 🟢 Strong |
| 70 – 84 | B | 🔵 Acceptable |
| 50 – 69 | C | 🟡 At Risk |
| 30 – 49 | D | 🟠 Compromised Posture |
| 0 – 29 | F | 🔴 Critical Posture |
#🖥️ Dashboard Modules
| # | Module | Purpose |
|---|---|---|
| 01 | Sentinel Header | Status pill, posture grade pill, animated posture-score ring |
| 02 | MITRE ATT&CK Heatmap | 10-tactic columnar grid with clickable technique cells |
| 03 | Privilege Escalation Chains | Graph-traversed user → role → admin paths with severity |
| 04 | Risk Telemetry Chart | Chart.js bar chart of escalation / over-priv / conflicts |
| 05 | Over-Privileged Principals | Red-glow risk cards with reason bullets and MITRE chips |
| 06 | Separation-of-Duties Conflicts | Amber cards with conflict-pair reveals |
| 07 | Posture Score Breakdown | Transparent per-finding score deductions |
| 08 | Intelligence Report Preview | PDF export source — branded, ready to share |
Plus secondary views: Trust Graph (vis-network), Dynamic Playbook (per-finding remediation), Intel Retrieval Lab (cloud export instructions).
#⚡ Tech Stack
| Layer | Technology |
|---|---|
| Backend | Python 3.9+ · Flask 3.0 · Werkzeug 3.0 · NetworkX 3.2 |
| Frontend | Tailwind CSS (CDN) · Custom CSS Component Layer · Vanilla ES5 JS |
| Visualization | Chart.js · vis-network · custom SVG widgets |
| Export | html2pdf.js · CSV (stdlib) · JSON (stdlib) |
| Fonts | Orbitron · JetBrains Mono · Inter (Google Fonts) |
| Deployment | Gunicorn · Docker · Render / Railway / Heroku compatible |
#🌐 API Endpoints
| Route | Method | Purpose |
|---|---|---|
/ |
GET | Main HUD |
/upload |
POST | Upload IAM JSON |
/init_demo |
POST | Load demo dataset |
/reset |
POST | Clear session + diff baseline |
/graph |
GET | Trust-relationship graph |
/playbook |
GET | Dynamic remediation playbooks |
/intel |
GET | Cloud export instructions |
/api/export/json |
GET | Full intelligence JSON download |
/api/export/csv |
GET | Flat CSV of all findings |
#⌨️ Keyboard Shortcuts
| Key | Action |
|---|---|
Ctrl/Cmd + K |
Open command palette |
↑ ↓ |
Navigate palette items |
Enter |
Open selected item |
Esc |
Close palette / drawer |
#📁 Project Structure
Cyber-Security-Aegis-IAM-Dashboard/ │ ├── 🐍 app.py ← Flask backend — ingestion · analysis · scoring · exports ├── 🗺️ mitre_map.json ← Permission → MITRE technique map (57 entries) ├── 📋 requirements.txt ← Python dependencies ├── 📖 README.md ← You are here │ ├── 📊 data/ │ ├── demo_aws_auth_details.json ← Demo dataset (Initialize Simulation) │ └── sample_aws_realworld.json ← Realistic AWS fixture (5 users · 4 roles) │ ├── 🎨 static/ │ ├── css/hud.css ← Cyberpunk component layer (920 lines) │ └── js/hud.js ← Particles · drawer · palette · toasts · charts (655 lines) │ ├── 🖼️ templates/ │ ├── base.html ← Tailwind CDN · fonts · particles · overlay containers │ ├── index.html ← Main HUD (posture · heatmap · stats · findings) │ ├── graph.html ← vis-network IAM relationship graph │ ├── playbook.html ← Per-finding remediation playbooks │ └── intel_lab.html ← AWS / Azure / GCP export instructions │ └── 📁 uploads/ ← Runtime: user-uploaded JSON (auto-cleaned)
#⚙️ Installation
#Prerequisites
Python 3.9+ pip A modern browser (Chrome 111+ · Firefox 113+ · Safari 16.2+ · Edge 111+)
#Quick Start
# 1. Clone git clone https://github.com/nishu2402/Cyber-Security-Aegis-IAM-Dashboard.git cd Cyber-Security-Aegis-IAM-Dashboard # 2. Virtual environment python -m venv venv # Windows venv\Scripts\activate # macOS / Linux source venv/bin/activate # 3. Install dependencies pip install -r requirements.txt # 4. Run python app.py
Open http://127.0.0.1:5000 in your browser.
📋 Full requirements.txt
flask>=3.0.0 werkzeug>=3.0.0 networkx>=3.2 gunicorn>=21.2.0
#🚀 Usage Guide
#1 — Pre-Built Simulations (Instant Demos)
The dashboard ships with 7 pre-built simulation scenarios. Click any card in the Simulation Library section to load it instantly.
| Scenario | Severity | What It Models |
|---|---|---|
| 🟢 Quick Demo | Low | Minimal AWS export — single escalation, ideal first look |
| 🟡 Real-World AWS | High | 5 users · 4 roles · federated SAML · NotAction · cross-account trust |
| 🔴 Compromised Account | Critical | Active attacker establishing persistence via access keys + backdoor role |
| 🟠 Insider Threat | High | Veteran employee accumulated dangerous read+write over years |
| 🔴 Lambda PrivEsc | Critical | Classic AWS escalation — PassRole + Lambda/EC2 service inheritance |
| 🟠 Federated Chaos | High | Wildcard cross-account trust + loose OIDC sub claims + SAML admin |
| 🟢 Hardened Baseline | None | Properly scoped least-privilege — should score A+ |
#2 — Upload a Real AWS Export
# Generate the export aws configure aws iam get-account-authorization-details --output json > iam_auth.json
Then click + Choose JSON (auto-uploads) in the dashboard. The HUD repaints automatically — no extra confirm step. Client-side guards reject non-.json files and files over 2 MB before upload starts.
A bundled real-world fixture lives at data/sample_aws_realworld.json for offline testing — five users, four roles, three groups, federated SAML trust, NotAction wildcard, cross-account assume-role.
#3 — Other Cloud Exports
| Cloud | Export Command |
|---|---|
| Azure | az role assignment list --all --output json > azure_iam.json |
| GCP | gcloud projects get-iam-policy PROJECT_ID --format=json > gcp_iam.json |
(See Intel Retrieval Lab in the dashboard for full reference.)
#4 — Generate an Intelligence Report
Click Export PDF for a branded dark-mode report. Or pull raw findings via:
curl http://127.0.0.1:5000/api/export/json > findings.json curl http://127.0.0.1:5000/api/export/csv > findings.csv
#☁️ Deployment
The app is a standard WSGI Flask application — runs anywhere Python runs.
#Render / Railway / Fly.io / Heroku
# Procfile
web: gunicorn app:app
Set environment variable AEGIS_SECRET_KEY to a long random string in production.
#Docker
FROM python:3.11-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt gunicorn COPY . . ENV PORT=5000 EXPOSE 5000 CMD ["gunicorn", "-b", "0.0.0.0:5000", "app:app"]
docker build -t aegis-iam . docker run -p 5000:5000 -e AEGIS_SECRET_KEY=$(openssl rand -hex 32) aegis-iam
#🔒 Security Notes
| Control | Implementation |
|---|---|
| 🛡️ Input validation | Strict JSON schema detection, parse-time validation, malformed input rejected with flash error |
| 📏 Upload size cap | 2 MB ceiling enforced via MAX_CONTENT_LENGTH + on-disk re-check |
| 👃 Content-type sniff | First non-whitespace byte must be { or [ — non-JSON rejected before parse |
| 💣 JSON bomb guard | Max nesting depth 64, max nodes 200,000 — recursive depth-walk before ingestion |
| 🚫 No code execution | Uploaded JSON is parsed only — never evald, never imported |
| 🔐 XSS protection | Jinja autoescape + tojson | safe payload encoding · live-tested with <script> injection |
| 🛡️ CSRF protection | HMAC token in session, validated on every POST/PUT/PATCH/DELETE via before_request, constant-time compare |
| 🚦 Rate limiting | Per-IP token bucket: 30 request burst, 0.5 req/sec sustained refill |
| 🔍 Path-traversal defense | secure_filename + realpath containment + sim-ID allowlist |
| 🛑 Secure headers | X-Frame-Options DENY · X-Content-Type-Options nosniff · X-XSS-Protection · Referrer-Policy · CSP · COOP · CORP · Permissions-Policy · HSTS (when HTTPS) |
| 🍪 Cookie hardening | HttpOnly + SameSite=Lax + Secure flag (configurable via AEGIS_FORCE_HTTPS) |
| 🔑 Session secret | Cryptographically random per-process fallback; production must set AEGIS_SECRET_KEY |
| 🚨 Error handling | 404/413/429/500 redirect with friendly flash; never leak stack traces to client |
| 🧹 Disk hygiene | Uploaded files auto-cleaned on session reset and replacement |
⚠️ Use only in authorized environments — for blue-team analysis of your own organization's IAM exports.
#🧪 Verified Test Coverage
| Test | Result |
|---|---|
| ✅ Demo dataset (simple AWS schema) | 1 escalation · 1 over-priv · 0 conflicts · 3 fired tactics |
| ✅ Realistic AWS dataset | 4 escalations · 5 over-priv · 1 conflict · 7/10 ATT&CK tactics fired · 34 unique technique cells |
| ✅ Empty model | Posture 100 / A+ · all 10 heatmap rows render cold |
| ✅ Posture floor | 1000 critical findings → score 0 / F |
| ✅ XSS injection | <script>alert(1)</script> principal name fully escaped in render |
| ✅ Malformed JSON upload | Rejected with flash error |
| ✅ Oversized file (3 MB) | HTTP 413 → handled gracefully |
| ✅ Empty / partial JSON | Schema-validated, rejected gracefully |
| ✅ Deny-only policy | Correctly NOT flagged as over-priv |
| ✅ JSON depth bomb (200-deep) | Rejected by depth guard |
| ✅ Non-JSON content sniff | Rejected at first-byte check |
✅ Path-traversal sim ID |
Rejected by allowlist |
| ✅ CSRF token validation | All POSTs blocked without valid token |
| ✅ Heatmap aggregates ALL principals | Surface-area complete (Bug #1 fix) |
| ✅ Auto-upload on file pick | Single-action UX (Bug #2 fix) |
| ✅ All routes return 200/302 | / · /upload · /init_demo · /reset · /graph · /playbook · /intel · /api/export/json · /api/export/csv |
| ✅ All security headers present | X-Frame-Options · CSP · HSTS · COOP · Permissions-Policy · Referrer-Policy · X-XSS-Protection |
| ✅ Cookie hardening | HttpOnly + SameSite=Lax + Secure (when AEGIS_FORCE_HTTPS=1) |
| ✅ Static lint | Python compile clean · JS node --check clean · all JSON parsable |
| ✅ Final E2E | 38/38 PASS · 0 FAIL |
| ✅ Adversarial security tests | 11/11 PASS · 0 FAIL |
#🛣️ Future Roadmap
| Priority | Improvement | Expected Impact |
|---|---|---|
| 🔴 HIGH | Native Azure RBAC Ingestion — parse az role assignment list directly without normalization shims |
Full Azure IAM analysis without pre-conversion |
| 🔴 HIGH | Native GCP IAM Ingestion — full gcloud projects get-iam-policy schema support |
Multi-cloud parity for GCP environments |
| 🟠 MED | Behavioral Baseline Mode — diff today's export against a saved snapshot | Detect privilege drift over time — essential for continuous compliance |
| 🟠 MED | CI/CD GitHub Action — auto-fail PRs that introduce a posture grade regression | Shift-left IAM security into the developer workflow |
| 🟠 MED | CloudTrail Integration — attach the last 30 days of events to each finding | Evidence-backed escalation chains — not just policy analysis |
| 🟡 LOW | OPA / Rego Policy Export — generate guardrail policies from detected over-priv findings | Auto-remediation guardrails as code |
| 🟡 LOW | pytest Test Suite — convert manual smoke harness into reproducible CI tests | Automated regression testing on every commit |
| 🟡 LOW | Helm Chart — first-class Kubernetes deployment | Enterprise-grade orchestrated deployment |
| 🟡 LOW | OIDC SSO Gating — protect the dashboard behind enterprise identity | Production-grade auth for shared SOC environments |
| 🟡 LOW | i18n — UI string extraction for non-English deployments | Global blue-team accessibility |
#⚠️ Disclaimer
Aegis-IAM Dashboard is a defensive blue-team analysis tool. It is intended exclusively for use on IAM exports from systems you own or are explicitly authorized to assess. The authors, maintainers, and contributors accept no liability for misuse.
The MITRE ATT&CK mappings, severity weights, and posture scoring are heuristic and educational — they are not a substitute for a full security audit, a CSPM platform, or qualified human review. Findings should be validated by a security engineer before remediation actions are taken in production.
All trademarks (AWS, MITRE ATT&CK, Azure, GCP, etc.) belong to their respective owners.
#📜 License
Distributed under the MIT License. See LICENSE for full text.
Owned and Developed by Nisarg Chasmawala (HEAVEN), Jatin Kumar, and Santhakumar Parivalla. © 2026 All Rights Reserved.
⭐ If this project helped you, give it a star — it genuinely helps.