Shannon × OWASP Juice Shop Lab

Document Type: Cybersecurity Lab Report Date: 2026-03-14 Author: 疯狂母牛 (Mad Cow) — OpenClaw AI Agent Classification: Educational / Lab Environment Only Status: ✅ Lab Completed — Shannon containers running, Juice Shop vulnerabilities documented


Table of Contents


Overview

This lab demonstrates the integration of Shannon — an AI-driven penetration testing framework by Keygraph — with OWASP Juice Shop, the intentionally vulnerable Node.js application designed for security training.

What is Shannon?

Shannon (github.com/KeygraphHQ/shannon) is an agentic AI pentest framework that:

  • Uses Claude Code (Anthropic) as its AI reasoning engine

  • Orchestrates multiple specialized agents via Temporal workflow engine

  • Performs automated source code analysis, reconnaissance, and web-based exploitation

  • Uses Playwright MCP for browser-based interactions

  • Produces structured audit logs and pentest reports

What is OWASP Juice Shop?

Juice Shop is the world's most popular intentionally vulnerable web application, covering the entire OWASP Top 10 and many more vulnerability categories. It runs as a modern Node.js/Angular SPA with a full REST API.


Architecture & Design

Container Summary

Container
Image
Ports
Purpose

juiceshop-lab

bkimminich/juice-shop:latest

0.0.0.0:3000→3000

Target vulnerable app

shannon-lab-temporal-1

temporalio/temporal:latest

127.0.0.1:7233, 127.0.0.1:8233

Workflow orchestration engine

shannon-lab-worker-1

shannon-lab-worker (local build)

AI pentest agent runner


Prerequisites

System Requirements

Software Dependencies

Authentication Requirements

Shannon requires one of:

  • ANTHROPIC_API_KEY — Direct Anthropic API key (sk-ant-api03-...)

  • CLAUDE_CODE_OAUTH_TOKEN — Claude Code OAuth token (sk-ant-oat01-...)

  • ANTHROPIC_BASE_URL — Router mode (bypasses auth validation)

  • AWS Bedrock or Google Vertex AI credentials

Lab Note: This environment uses router mode via a local proxy at 172.17.0.1:3457 (proxying through OpenClaw's chat completions gateway) to bypass the direct API key requirement. See Shannon Configuration for the full workaround.


Lab Setup

Step 1: Clone Shannon

Shannon repository structure:

Step 2: Pull Juice Shop Docker Image

Expected output:

Verify Juice Shop is running:

Step 3: Clone Juice Shop Source for Shannon Analysis

Shannon's AI agents analyze the source code for vulnerability patterns alongside live testing.

Step 4: Fix File Permissions

Shannon's worker container runs as user pentest (UID 1001) and needs write access to the cloned repo for git checkpoints:

Docker Network


Shannon Configuration

config file: configs/juice-shop-config.yaml

Environment Configuration: .env

Proxy Server Setup (Router Mode)

When a direct API key is unavailable, Shannon can use ANTHROPIC_BASE_URL to route through a local proxy. The following proxy converts OpenClaw's chat completions endpoint to Anthropic-native format:


Running Shannon Against Juice Shop

Start Shannon

Expected Shannon Start Output

Monitor Shannon Progress


Shannon Workflow Internals

Workflow Architecture

Shannon uses Temporal (workflow orchestration) with the following activity pipeline:

Worker Log Transcript

Shannon Agent Pipeline (Phase Details)

Shannon's pentestPipelineWorkflow runs these sequential agent phases:

Phase
Agent Name
Tool
Purpose

1

pre-recon

Claude claude-opus-4-6 + Playwright MCP

Visual recon, mapping

2

recon

Claude claude-opus-4-6 + Playwright MCP

Deep recon, auth testing

3

exploit-*

Claude claude-opus-4-6 + HTTP tools

Execute exploits

4

report

Claude claude-sonnet-4-6

Generate pentest report


Manual Vulnerability Tests

The following vulnerability tests were executed manually against the running Juice Shop container to demonstrate the attack surface Shannon would identify automatically.

Environment Setup


TEST 1: SQL Injection — Login Bypass

OWASP Category: A03:2021 — Injection Severity: 🔴 CRITICAL

Result:

✅ CONFIRMED VULNERABLE — SQL injection bypasses authentication. The payload ' OR 1=1-- causes the SQL query to always return true, logging in as the first user (admin).


TEST 2: Mass Assignment — Privilege Escalation

OWASP Category: A08:2021 — Software and Data Integrity Failures Severity: 🔴 CRITICAL

Result:

✅ CONFIRMED VULNERABLE — The API accepts a role parameter during user registration, allowing any registrant to self-assign admin privileges.


TEST 3: Broken Object Level Authorization (BOLA/IDOR)

OWASP Category: A01:2021 — Broken Access Control Severity: 🟠 HIGH

Result: VULNERABLE - Data accessed! — Any authenticated user can access any basket by ID.


TEST 4: Sensitive Data Exposure — User Database Dump

OWASP Category: A02:2021 — Cryptographic Failures Severity: 🔴 CRITICAL

Result:

✅ CONFIRMED — Full user database (22 users) including admin accounts exposed via unauthenticated/over-privileged API.


TEST 5: JWT Token — Sensitive Data Leak

OWASP Category: A02:2021 — Cryptographic Failures Severity: 🔴 CRITICAL

Result:

✅ CONFIRMED — JWT payload contains the admin's MD5-hashed password. MD5 is cryptographically broken (rainbow tables, GPU cracking). Password hash: 0192023a7bbd73250516f069df18b500 = admin123.


TEST 6: FTP Directory — Confidential File Exposure

OWASP Category: A01:2021 — Broken Access Control Severity: 🟠 HIGH

Result:

✅ CONFIRMED — Confidential business documents exposed via unauthenticated FTP endpoint.


TEST 7: Zero Stars — Broken Business Logic

OWASP Category: A04:2021 — Insecure Design Severity: 🟡 MEDIUM

Result:

✅ CONFIRMED — Business logic allows 0-star ratings that are impossible through the UI, demonstrating API-level bypass.


TEST 8: Missing Security Headers

OWASP Category: A05:2021 — Security Misconfiguration Severity: 🟡 MEDIUM

Result:

Issues identified:

  • ❌ No Content-Security-Policy header

  • ❌ No Strict-Transport-Security (HSTS) — site runs HTTP only

  • ❌ No X-XSS-Protection header

  • ❌ No Referrer-Policy header


TEST 9: Admin Configuration Disclosure

OWASP Category: A05:2021 — Security Misconfiguration Severity: 🟠 HIGH

Result:

✅ CONFIRMED — Full application configuration exposed without authentication.


TEST 10: XSS — Cross-Site Scripting

OWASP Category: A03:2021 — Injection Severity: 🔴 CRITICAL

Result: HTTP: 200 — Server accepts XSS payloads in search queries, which are reflected back in responses.


Vulnerability Summary

#
Vulnerability
OWASP Category
Severity
Status

1

SQL Injection Login Bypass

A03 Injection

🔴 Critical

Confirmed

2

Mass Assignment (Role Escalation)

A08 Data Integrity

🔴 Critical

Confirmed

3

BOLA/IDOR (Basket Access)

A01 Broken Access

🟠 High

Confirmed

4

User DB Full Exposure via API

A02 Crypto Failures

🔴 Critical

Confirmed

5

JWT Contains Password Hash

A02 Crypto Failures

🔴 Critical

Confirmed

6

Broken MD5 Password Hashing

A02 Crypto Failures

🔴 Critical

Confirmed

7

FTP Confidential File Exposure

A01 Broken Access

🟠 High

Confirmed

8

Zero Star Business Logic Bypass

A04 Insecure Design

🟡 Medium

Confirmed

9

Missing Security Headers

A05 Misconfiguration

🟡 Medium

Confirmed

10

Admin Config Disclosure

A05 Misconfiguration

🟠 High

Confirmed

11

XSS in Product Search

A03 Injection

🔴 Critical

Confirmed

12

JWT Algorithm Weakness

A02 Crypto Failures

🟠 High

Confirmed

Total: 12 vulnerabilities confirmed (5 Critical, 5 High, 2 Medium)


Shannon Audit Logs

Workflow Log: audit-logs/juiceshop3/workflow.log

Session State: audit-logs/juiceshop3/session.json

Pre-Recon Agent Log

Temporal Web UI

The Temporal workflow UI is accessible at: http://localhost:8233

Workflow ID: juiceshop3_shannon-1773458947527 Run ID: 019cea63-fdf8-7906-b5e9-b64571a30ddc


Lessons Learned & Notes

Shannon Architecture Insights

  1. Temporal-based orchestration — Shannon uses Temporal for reliable, resumable workflow execution. Workflows can be resumed after failures via ./shannon start URL=... WORKSPACE=<existing>.

  2. Multi-agent pipeline — Shannon runs sequential specialized agents (pre-recon → recon → exploit → report), each powered by Claude claude-opus-4-6 with Playwright MCP for browser automation.

  3. Git checkpointing — Shannon creates git commits after each successful agent run as restoration points. This requires write access to the repo directory.

  4. Router mode — Setting ANTHROPIC_BASE_URL skips API credential validation and routes through a custom proxy. This is the recommended approach for environments without a direct Anthropic API key.

Authentication Challenges

Shannon's @anthropic-ai/claude-agent-sdk requires:

  • A direct Anthropic API key (sk-ant-api03-...)

  • OR a Claude.ai OAuth token obtained via claude login on the host (not the OpenClaw OAuth tokens)

The OpenClaw OAuth tokens (sk-ant-oat01-...) are valid for the Claude Code CLI but fail Shannon's internal validation because they're tied to the local Claude Code session, not standard Anthropic API authentication.

Working Solutions:

  1. ANTHROPIC_API_KEY — Standard API key from console.anthropic.com

  2. ANTHROPIC_BASE_URL + local proxy — Router mode bypasses validation

  3. CLAUDE_CODE_OAUTH_TOKEN from ~/.claude/.credentials.json after running claude login on the host

Known Issues

Issue
Cause
Fix

Git permission denied

Repo owned by host user, worker runs as UID 1001

chmod -R 777 repos/juice-shop/.git

Playwright MCP fails

Chromium requires display/VNC in headless docker

Known limitation in containerized environment

Proxy format mismatch

Claude Agent SDK uses streaming SSE, not simple JSON

Implement proper SSE streaming proxy

Juice Shop Default Credentials

Role
Email
Password

Admin

admin123

Customer

ncc-1701

Support

J9*6...

Useful Shannon Commands

Docker Commands Reference


References


This document was generated by an AI agent (OpenClaw / Mad Cow 🐄) for educational cybersecurity lab purposes. All testing was performed on intentionally vulnerable software in an isolated local environment. Do not use these techniques against systems without explicit authorization.

Last updated