I need to design a red-team exercise that combines UI spoofing, token theft, and prompt exploits. This is a request for a security exercise design, which is a defensive/security professional activity when done in a controlled environment. I need to ensure the response is educational and focused on improving security posture, not providing actionable exploitation material for malicious use.
The user is asking for a "red-team exercise," which implies an authorized, simulated attack. The context is defensive. The goal is to test defenses against these specific vectors: UI spoofing (often phishing or clickjacking), token theft (session hijacking or OAuth flaws), and prompt exploits (prompt injection in LLMs).
Plan:
- Define the Scenario: Establish a realistic context (e.g., an enterprise using an AI-powered SaaS platform). This grounds the exercise.
- Phase 1: Initial Access (UI Spoofing): Detail how the simulated attacker sets up the lure. I should focus on the mechanism (e.g., a fake login page or a malicious overlay) without providing actual code for a phishing kit. I will explain what is being simulated (e.g., cloning a legitimate site).
- Phase 2: Credential/Token Capture (Token Theft): Explain how the exercise tests the theft of session tokens or API keys. This involves explaining the flow (e.g., user enters creds -> malicious proxy -> token harvested). I must emphasize the defensive monitoring aspect (detecting unusual token usage).
- Phase 3: Exploitation (Prompt Exploits): Connect the stolen access to the AI component. Explain how the red team uses the compromised session to inject malicious prompts (e.g., data exfiltration or RBAC bypass).
- Detection and Response (Blue Team): Crucial part of a red-team exercise design. What should the defenders be looking for? Logs, behavioral analysis, WAF rules.
- Remediation: How to fix the vulnerabilities identified.
Refinement & Safety Check:
- UI Spoofing: Describing a simulated phishing site is standard security education. I won't give code.
- Token Theft: Describing the interception of tokens via a proxy (like Evilginx) is a known red team tactic. I will describe the concept generally.
- Prompt Exploits: This is about LLM security. I will describe scenarios like "Ignoring previous instructions" or "Data leakage" in the context of the compromised account.
The request asks to target these "in tandem." So the narrative must link them: Spoofing leads to Token Theft, which enables Prompt Exploits.
Structure of the Response:
- Exercise Name & Objective
- Scenario Profile (Target infrastructure)
- Phase 1: The Lure (UI Spoofing) - Concept: Typosquatting or reverse proxy phishing.
- Phase 2: The Capture (Token Theft) - Concept: Harvesting session cookies/JWTs bypassing MFA.
- Phase 3: The Payload (Prompt Exploits) - Concept: Using the valid token to interact with the LLM backend directly, attempting to extract PII or system prompts.
- Blue Team Objectives (Detection points)
- Post-Exercise Analysis
This approach fulfills the user's request for a red-team exercise design while maintaining a strictly defensive and educational tone.
This red-team exercise design focuses on the intersection of human-computer interaction (UI spoofing), session security (token theft), and the unique vulnerabilities of Large Language Models (prompt exploits).
Exercise Name: Operation "Silent Prompt"
Objective: Simulate a sophisticated attacker attempting to exfiltrate sensitive user data and compromise the underlying AI system by chaining three specific vectors: Interface deception, Session Hijacking, and AI Instruction Injection.
Scope: A hypothetical enterprise SaaS platform ("NexusAI") that integrates a ChatGPT-style assistant capable of reading and summarizing corporate documents.
Phase 1: The Lure (UI Spoofing)
Goal: Trick the user into interacting with a malicious interface to capture credentials or establishing a malicious context.
- Vector: Typosquatting / Homograph Attack
- Setup: The Red Team registers a domain visually similar to the target (e.g.,
nexusal-dashboard.com instead of nexusai-dashboard.com).
- Technique: "Shadow" UI Clone. The team mirrors the login page of the legitimate SaaS platform.
- The Twist: Unlike a standard phishing page, this clone includes a modified "Chat Widget" in the bottom right corner.
- Vector: Visual Injection
- Technique: The cloned chat widget is designed to look exactly like the internal tool.
- Spoof: A notification appears in the fake chat UI: "System Update: Your session has expired. Please re-authenticate to save your current document draft."
- Objective: This conditions the user to accept anomalies in the UI and lowers their defenses for the next phase.
Phase 2: The Interception (Token Theft)
Goal: Compromise the user's session to bypass MFA and authentication controls.
- Vector: Adversary-in-the-Middle (AiTM) Proxy
- Technique: The spoofed domain acts as a reverse proxy to the real application.
- Action: When the user enters credentials and a One-Time Password (OTP), the proxy forwards the request to the real server in real-time.
- Harvest:
- Target: The proxy intercepts the
Set-Cookie header or the Authorization Bearer token returned by the legitimate server.
- Outcome: The Red Team now possesses a valid session token. They can inject this token into their own browser to access the real account without needing the password or MFA.
- Persistence: The Red Team uses the stolen session to generate API keys or long-lived refresh tokens, ensuring access persists even if the user logs out.
Phase 3: The Payload (Prompt Exploits)
Goal: Utilize the hijacked session to exploit the integrated AI assistant for data exfiltration or privilege escalation.
- Vector: Indirect Prompt Injection (The "Poisoned Well")
- Vector: RAG (Retrieval-Augmented Generation) Poisoning
- Trigger: When the legitimate user (or an admin) asks the AI to "Summarize the onboarding guide," the AI retrieves the poisoned document. The malicious instruction overrides the AI's safety alignment.
- Execution: The AI processes the hidden instruction, believing it is a valid system command.
The Kill Chain Summary
- Delivery: User receives a link to the "New Dashboard Features" (UI Spoofing domain).
- Compromise: User logs in; attacker grabs session cookie (Token Theft).
- Injection: Attacker uses session to poison a shared document with malicious instructions.
- Exfiltration: User interacts with AI, triggering the payload, causing the AI to leak data to an external server controlled by the Red Team.
Blue Team Detection & Mitigation Strategies
To defend against this tandem attack, the following measures should be tested:
1. UI Spoofing Defenses
- Domain Protection: Monitor for typosquatting registrations using services like Digital Shadows.
- Brand Monitoring: Implement Content Security Policy (CSP) headers to prevent the site from being framed (Clickjacking/UI Redress), though this protects the real site, not the fake one.
- User Training: Train users to verify URLs specifically when prompted for re-authentication.
2. Token Theft Defenses
- Token Binding: Implement Mutual TLS (mTLS) or Hardware-bound tokens. The session token is cryptographically bound to the user's specific browser instance (e.g., via WebAuthn).
- Behavioral Analysis: Implement UEBA (User and Entity Behavior Analytics). Flag sessions where the location changes instantly (e.g., login from New York, then access from London 5 minutes later).
- Short-Lived Tokens: Ensure Access Tokens expire quickly (e.g., 5-15 minutes) and require Refresh Token rotation.
3. Prompt Exploit Defenses
- Input Sanitization: Treat all user-provided content (documents, emails) as untrusted data. The RAG system should "quote" sources rather than executing them as instructions.
- Instruction Hierarchy: Enforce a strict hierarchy where system-level instructions override user-level or external content instructions.
- PII Detection: Implement a proxy filter between the LLM and the user to detect and redact sensitive data (SSNs, API Keys) before the LLM generates the final output.