Files

98 lines
5.4 KiB
Markdown

# Ghaymah Cloud V2 — Platform Analysis & Red Team Assessment
> Complete exploration, infrastructure analysis, Red Team penetration testing, and V1 vs V2 comparative evaluation of Ghaymah Cloud V2
> Target: https://deploy.ghaymah.systems
> Repository: [GitPasha / Ziad_Abdelgwad / ghaymah-v2-analysis](https://app.gitpasha.com/Ziad_Abdelgwad/ghaymah-v2-analysis)
---
## Overview
This repository contains an exhaustive technical evaluation of the **Ghaymah Cloud V2** platform, covering:
- 🔍 **Infrastructure & API Discovery** — Complete endpoint mapping across SPA, Hasura GraphQL Engine, Hasura Auth, API Gateway, GenAI/LiteLLM, Logs, and Integrations services.
- 🎯 **Red Team Penetration Testing** — Three-phase offensive assessment targeting Hasura Console exposure, unauthenticated schema introspection, plaintext GenAI key leakage, auth service development mode, logging API cascading DoS, and client-side vulnerabilities.
- 🚀 **Deployment & Runtime Verification** — Container deployment verification (`v2-soc-gateway`, status: `Healthy` at `https://v2-soc-gateway-http-f2501454.hosted.cumin.dev`).
- 📊 **V1 vs V2 Comparison** — Side-by-side architectural and feature comparison between Ghaymah V1 and V2.
- 🤖 **GenAI/LiteLLM Exploitation** — Virtual key exfiltration, user ID discovery, and unauthorized model querying across 7 frontier AI models.
---
## Key Findings Matrix
| ID | Title | Severity | CVSS | Status |
|:---:|---|:---:|:---:|:---:|
| **GHY-SEC-01** | Hasura Admin Console Publicly Accessible (window.__env Leaked) | 🔴 CRITICAL | 9.1 | Confirmed Exploit |
| **GHY-SEC-02** | Unauthenticated GraphQL Introspection (148 Types Exposed) | 🔴 CRITICAL | 8.2 | Confirmed Exploit |
| **GHY-SEC-03** | Plaintext GenAI / LiteLLM Virtual Key Leakage & Model Abuse | 🟠 HIGH | 7.7 | Confirmed Exploit |
| **GHY-SEC-04** | Auth Microservice Running in Development Mode (`"version":"dev"`) | 🟠 HIGH | 7.5 | Confirmed |
| **GHY-SEC-05** | Cascading Denial of Service & K8s Pod Probe in Logging Service | 🟠 HIGH | 7.2 | Confirmed Exploit |
| **GHY-SEC-06** | Live Stripe Account ID & Customer Billing Portal Leakage | 🟡 MEDIUM | 5.3 | Confirmed |
| **GHY-SEC-07** | Permissive CSP with `'unsafe-inline'` Enabling Inline XSS | 🟡 MEDIUM | 6.1 | Confirmed |
| **GHY-SEC-08** | Business Logic Quota Flaw (Negative Resource Count `-14/5`) | 🟡 MEDIUM | 5.5 | Confirmed |
| **GHY-SEC-09** | Missing Security & Anti-Framing Headers on GraphQL Engine | 🔵 LOW | 4.3 | Confirmed |
---
## Repository Structure
```
ghaymah_v2_analysis/
├── README.md ← Platform overview & findings index
├── reports/
│ ├── REDTEAM_SECURITY_ASSESSMENT.md ← Full Red Team Penetration Testing Report
│ ├── GHAYMAH_V2_ANALYSIS_REPORT.md ← Complete platform architecture & features report
│ └── V1_VS_V2_COMPARISON.md ← Feature-by-feature V1 vs V2 comparison
├── scripts/
│ ├── redteam_phase1.js ← Phase 1 offensive testing (BOLA, introspection, auth)
│ ├── redteam_phase2.js ← Phase 2 deep-dive (mutations, GenAI, refresh tokens)
│ ├── redteam_phase3.js ← Phase 3 advanced exploits (Console, LiteLLM, CSP/XSS)
│ ├── test_apis_deep.js ← Gateway, billing, integrations, and logs testing
│ ├── extract_api_calls.js ← SPA bundle route & endpoint extractor
│ ├── analyze_bundle.js ← Vite JS bundle parser & secrets finder
│ ├── v2_full_exploration.js ← Platform exploration script
│ └── security_tests.ps1 ← Automated PowerShell security suite
└── logs/
├── bundle.js ← Local copy of SPA JavaScript bundle (2.3 MB)
├── v2_exploration.log ← Initial exploration log
├── v2_full_exploration_run.log ← Comprehensive exploration run log
└── security_tests.log ← PowerShell test output
```
---
## Detailed Reports
1. **[REDTEAM_SECURITY_ASSESSMENT.md](reports/REDTEAM_SECURITY_ASSESSMENT.md)**
- Detailed threat model, vulnerability write-ups, PoC payloads, CVSS scores, remediation timelines, and multi-stage attack chains.
2. **[GHAYMAH_V2_ANALYSIS_REPORT.md](reports/GHAYMAH_V2_ANALYSIS_REPORT.md)**
- Microservices architecture, full GraphQL schema (queries, mutations, subscriptions), 22 store templates, and frontend route map.
3. **[V1_VS_V2_COMPARISON.md](reports/V1_VS_V2_COMPARISON.md)**
- Architectural comparison between V1 (`hosted.ghaymah.systems`) and V2 (`hosted.cumin.dev`), feature matrix, networking evolution, and migration notes.
---
## Execution Guide
### Run Red Team Assessments
```bash
# Execute Phase 1 (Reconnaissance, BOLA, Schema Dump)
node scripts/redteam_phase1.js
# Execute Phase 2 (Mutation Signature Exploitation & Token Audits)
node scripts/redteam_phase2.js
# Execute Phase 3 (Console Analysis, LiteLLM Abuse, CSP & CVE Checks)
node scripts/redteam_phase3.js
# Test Auxiliary APIs (Billing, Logs BOLA, Integrations)
node scripts/test_apis_deep.js
```
---
## Target Context
- Primary Target: `https://deploy.ghaymah.systems/dashboard/apps`
- Authenticated Account: `ziad.abd.elgwad2003@gmail.com`
- Evaluation Date: October 2026