How microsoft/pyrit-ship works
Project type and purpose
• This is a dual-component integration prototype (“full-stack” in a broad sense):
a. A Python Flask-based microservice (“PyRIT Ship”) exposing parts of the PyRIT toolkit as HTTP APIs (prompt generation, scoring).
b. A Java extension for PortSwigger’s Burp Suite that calls those HTTP APIs from the Intruder module.
• Purpose: Let red-teamers plug into PyRIT’s AI-driven payload generation/scoring from within Burp Suite (and potentially other tooling).
File structure
• Top-level folders:
• pyritship/ — Python Flask app and helper scripts (app.py, request_tester.py)
• burp_extension/pyritship/ — Java Gradle project implementing the Burp Suite extension
• docs/ — Markdown docs (setup, workflows, demos)
• Key configuration and build files:
• build.gradle & settings.gradle define the Java plugin’s build lifecycle
• .env likely holds Python environment/API keys
• Patterns:
• Separation of concerns: Python side = API service; Java side = Burp UI integration.
README for additional insights
• Confirms Python Flask server exposing “prompt generator” and “scoring” endpoints.
• Confirms Java extension registers HTTP handlers and payload generators/processors inside Burp Intruder.
• Mentions future Docker container, Entra ID auth, alternate endpoints—external service integration is a concern.
1. Burp Suite Intruder UI (user interface)
2. Java Extension (PyRITShipHttpHandler, PayloadGenerator/Provider/Processor)
3. HTTP Client within the extension
4. PyRITShip Flask API Server
5. PyRIT core library (invoked by app.py)
6. External AI Service (Azure OpenAI API)
7. (Optional future) Docker Host / Container
• User → Intruder UI → invokes Java Extension
• Java Extension → HTTP Client → PyRITShip Flask API
• Flask API → PyRIT core → calls Azure OpenAI → gets response → returns to Extension
• Extension → Intruder → actual attack requests
c. Architectural patterns & principles:
• Microservice style: Python API is decoupled from UX (Burp)
• Plugin architecture: Java implements providers/processors per Burp extension API
• External service integration: API key, auth handled by Flask service
d. Key technologies & frameworks:
• Python: Flask, PyRIT toolkit
• Java: JUnit/Gradle, Burp Suite Extender API
• External: Azure OpenAI REST endpoints
• (Future) Docker for containerization