ghost_sec writes
AI Red Team · Methodology

Red-teaming an enterprise Claude deployment

The methodology behind an adversary-simulated assessment of an enterprise AI stack: the full set of attack vectors exercised across the identity plane, the LLM proxy, the cloud backend and the coding agent, with a one-line overview of what each finding achieved.

@ghost_sec Methodology & findings overview Educational write-up

00Executive summary

Enterprise AI is rarely a single product. "We deployed Claude for our developers" is, underneath, a stack: an identity provider minting tokens, a reverse proxy brokering API calls, a cloud backend hosting the models, and a command-line agent on every laptop that can read files, run shell commands and call tools. Each layer has its own trust boundary, and each boundary is a place an attacker can stand.

This article is not a finding-by-finding report. It sets out the methodology used to red-team one such deployment end to end: the attacker goals, the trust-boundary model, and the full catalogue of attack vectors exercised against an agentic AI platform. The individual results appear only as a findings overview, one line each. The engagement covered the enterprise SSO integration, the LLM proxy's API surface, the cloud AI backend, and the agent (Claude Code CLI) on a developer workstation.

Across those vectors the assessment produced thirteen findings: two Critical, four High, five Medium, two Low.

2
Critical
4
High
5
Medium
2
Low

The AI platform inherited excessive trust at every layer, and exported almost no visibility.

On scope and sanitisation. This article is derived solely from an internal assessment report. All client-identifying material (names, email addresses, domains, hostnames, IP addresses, tenant and subscription identifiers, resource names and live credentials) has been removed or replaced with neutral placeholders. No live systems were touched in producing this write-up, and every technical detail originates from the source report. Specific internal endpoints and exploit payloads are deliberately withheld; the focus is the method, not a runbook.

01Methodology followed

The engagement was run as adversary emulation, not a checklist audit. The guiding question at every step was "what would an attacker do next with what they just obtained?" The phases below map a general AI-red-team methodology onto this stack, and each lists the attack vectors exercised. A conventional application and cloud security method underpins the whole thing; the AI-specific vectors sit on top of it, not instead of it.

The starting assumption was the weakest realistic foothold: a single valid employee identity (phishing, a compromised contractor, a malicious insider) and, separately, a piece of untrusted content the agent might ingest (a cloned repo, a shared skill, an MCP server). Everything chains forward from there.

P0Scoping & adversary-goal definition

Vectors framed · attacker objectives, abuse cases, in-scope trust boundaries

Define concrete adversary goals rather than generic "try to break it": exfiltrate another identity's data, obtain a durable credential, achieve code execution on an endpoint, reach models the user is not entitled to, or operate without being logged. Agree scope, sensitive-data handling, and which boundaries are live. Every later vector traces back to one of these goals.

P1Threat modelling & trust-boundary mapping

Vectors mapped · data-flow analysis, trust-boundary enumeration, confused-deputy paths

P2Identity & access testing

Vectors · authn bypass, authz gaps, token theft, SSO bypass, RBAC abuse, privilege escalation

P3Cloud & infrastructure assessment

Vectors · RBAC over-provisioning, key-listing actions, metadata enumeration, secret sprawl

P4Gateway, application & API security

Vectors · unauthenticated management surfaces, API-spec disclosure, input-validation gaps, rate-limit and model-allowlist bypass

P5Model & prompt-layer attacks

Vectors · direct & indirect prompt injection, RAG/memory poisoning, tool-result injection, system-prompt extraction, jailbreak, context forgery

P6Tool, connector & MCP integration abuse

Vectors · tool-description poisoning, MCP rug-pull, excessive agency, confused deputy, integration supply chain

P7Agent endpoint & permission-boundary testing

Vectors · policy-enforcement gaps, settings-hierarchy override, hook abuse, TOCTOU, permission bypass, persistence

P8Sensitive-data exposure & secrets at rest

Vectors · credential sprawl, plaintext transcripts, local artefact retention, data-governance inversion

P9Living-off-the-land & reconnaissance abuse

Vectors · agent-driven recon, LOLBin generation, skill compression, detection evasion by legitimacy

P10Detection, telemetry & logging review

Vectors · telemetry gaps, no SIEM/OTel export, retention shortfall, IR blind spots

P11Reproducibility, regression & retest

Vectors validated · reliability vs one-off behaviour, regression suite, fix verification


02Findings overview

One line per finding: what the vector achieved, not how. Detailed proof-of-concept material stays in the private report.

#What was achievedSeverity
1Extracted live backend API keys using a standard cloud role, and replayed one to bypass enterprise SSO entirely on the test gatewayCritical
2Obtained a valid gateway token as an ordinary tenant user, with no role or group authorisation checkHigh
3Confirmed a token-theft path from implicit grant and a loopback redirect, alongside long-lived unmanaged client secretsHigh
4Enumerated the full cloud tenant and backend blueprint, including undisclosed high-capacity model deployments reachable through the proxyMedium
5Forged the model's stored "memory" by injecting unvalidated tool results into the session contextMedium
6Reached admin, API-specification and health surfaces, plus an SSO-bypassing fallback login, without authenticationLow
7Demonstrated an MCP rug-pull: a trusted tool silently served a poisoned description between sessions, with no change detectionHigh
8Overwrote the agent's permission model (skip-permissions, wildcard allow, auto-approve and TOCTOU hooks) because no managed policy enforced it, and read credential files with no promptCritical
9Recovered secrets from full-fidelity local transcripts and confirmed no central export or SIEM visibilityHigh
10Turned plain-English instructions into working AD, cloud and network reconnaissance through signed binaries, within the user's privilegesMedium

The ten rows are the parent findings. The count of thirteen includes sub-findings folded into findings 3 and 8 (the implicit-grant sub-finding, and the four bypass techniques under the agent-policy root cause).

Affected components

ComponentRole in the stackHeadline exposure
Enterprise identity / SSOIssues tokens and gates accessNo gate between "authenticated" and "authorised"; implicit-grant and redirect weaknesses enabling token theft
LLM proxy / gatewayBrokers model access, holds the backend credentialManagement surfaces without authentication; caller-supplied tool results trusted; no model allowlist
Cloud AI backendHosts the models, governed by cloud RBACA standard role can list keys; broad read access; static keys that bypass SSO on one environment
Agent endpointReads files, runs commands, calls toolsNo enforced policy; trusted integrations can turn malicious; recon through signed binaries
Telemetry & monitoringCross-cutting detection and IR evidenceNo central logging or SIEM; full transcripts and secrets persist only on the endpoint

03Headline priorities

The methodology points at a small number of leveraged fixes that close or blunt most of the surface above.

Note. This write-up is for educational purposes only. The techniques described illustrate offensive security methodology and are intended to help defenders understand and improve their detection capabilities.