Skip to content

Add ReconStrategy for hypothesis-driven LLM security testing#2198

Closed
blackhawkyama wants to merge 3 commits into
microsoft:mainfrom
blackhawkyama:main
Closed

Add ReconStrategy for hypothesis-driven LLM security testing#2198
blackhawkyama wants to merge 3 commits into
microsoft:mainfrom
blackhawkyama:main

Conversation

@blackhawkyama

Copy link
Copy Markdown

Summary

Add ReconStrategy — a native PyRIT attack strategy implementing six-phase hypothesis-driven red-teaming methodology based on proven bug bounty research practices.

Maps structured LLM security testing into PyRIT's native AttackStrategy interface, enabling repeatable vulnerability assessment with clear scope boundaries and systematic hypothesis validation.

Methodology

This strategy implements the six-phase bug bounty research methodology:

  1. Phase 1 (Scope Lock): Define model, API, testing boundaries via define_scope()
  2. Phase 2 (Recon): Load model capabilities and known vulnerabilities via load_recon_data()
  3. Phase 3 (Setup): Configure PyRIT orchestrator and hypothesis library via configure_orchestrator()
  4. Phase 4 (Manual Testing): Hypothesis-driven testing loop via run_testing_loop()
  5. Phase 5 (Documentation): Structured logging and finding export via export_findings()
  6. Phase 6 (Cross-Training): Map findings to CWE, CVSS, OWASP LLM Top 10

Key Features

  • Scope Enforcement: Respects in-scope/out-of-scope boundaries and safe harbor constraints
  • Hypothesis-Driven: Every test grounded in specific, testable hypothesis rather than random fuzzing
  • Structured Output: Findings exported in JSON and Markdown formats ready for bug bounty platforms
  • Logging Discipline: Every attempt recorded; findings never reconstructed from memory
  • PyRIT Integration: Native PromptTarget support for Azure OpenAI, Claude, Llama, and other models

Testing

  • Unit tests for all phases (Phases 1-6)
  • Hypothesis validation and export format tests
  • Scope enforcement and finding structure verification
  • Covers initialization, configuration, testing loops, and output formats

Related

Checklist

  • Strategy class follows PyRIT pattern
  • Six phases clearly implemented with completion tracking
  • Tests cover all phases and core functionality
  • Findings export supports JSON and Markdown formats
  • Scope enforcement prevents out-of-scope testing
  • Documentation with usage examples and phase mapping
  • No breaking changes to existing PyRIT functionality

@rlundeen2

Copy link
Copy Markdown
Contributor

This doesn't fit PyRIT framework. Potentially a simialr thing could be a scenario but it would require a lot of thought

@rlundeen2 rlundeen2 closed this Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants