T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/research_tools.py:116- Finding
Cross-Agent Session Enumeration and Direct Provider Credential Access
- Content
View full analysis
= 2 else "unknown" ``` ```python plugins_base = Path.home() / ".openclaw" / "agents" / agent_id / "agent" / "plugins" catalog_path = None for subdir in plugins_base.iterdir(): if not subdir.is_dir(): continue candidate = subdir / "catalog.json" if candidate.exists(): try: with open(candidate) as f: catalog = json.load(f) providers = catalog.get("providers", {}) if provider in providers or "minimax-cn" in providers: catalog_path = candidate break except Exception: continue with open(catalog_path) as f: catalog = json.load(f) providers = catalog.get("providers", {}) cfg = providers.get(provider) or providers.get("minimax-cn", {}) return { "base_url": cfg["baseUrl"], "api_key": cfg["apiKey"], "api_type": cfg.get("api", "anthropic-messages"), } ``` ```python req = urllib.request.Request( f"{base_url}/v1/messages", data=data, headers={ "Content-Type": "application/json", "x-api-key": api_key, "anthropic-version": "2023-06-01", }, method="POST" ) with urllib.request.urlopen(req, timeout=120) as resp: result = json.loads(resp.read()) ``` ```python re ...[truncated 2820 chars]- Remediation
View remediation
