Skip to content

UzL-ITS/Prompt-Pirate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

🏴‍☠️ Prompt Pirates Need a Map: Stealing Seeds helps Stealing Prompts

Paper Open In Colab

Official repository for the research paper "Prompt Pirates Need a Map: Stealing Seeds helps Stealing Prompts (https://arxiv.org/abs/2509.09488)"

🎯 Overview

This repository contains the research and tools for understanding and demonstrating prompt-stealing attacks against diffusion models. Our work reveals critical vulnerabilities in popular AI image generation frameworks and introduces novel methods for both attack and defense.

🔍 Key Findings

  • Seed Recovery: Seeds from Stable Diffusion generated images can be uniquely identified from the final images
  • Critical Vulnerability: We identified CWE-339 vulnerabilities in major frameworks (AUTOMATIC1111, ComfyUI, Diffusers, etc.), that allow seed recovery
  • Prompt Stealing: Using recovered seeds, we developed PromptPirate, a genetic algorithm-based method to steal prompts with high accuracy
  • 8-11% Improvement: PromptPirate outperforms state-of-the-art prompt stealing methods by 8-11% in LPIPS similarity

🛠️ What's Inside

🎣 SeedSnitch - Seed Recovery Tool

A powerful brute-force attack that exploits the limited seed space (2^32) in PyTorch-based diffusion implementations.

Try it now: Open In Colab

🏴‍☠️ PromptPirate - Advanced Prompt Stealing

A genetic algorithm-based optimization method that leverages recovered seeds to steal prompts with unprecedented accuracy.

📁 Repository Structure

├── 📄 paper.tex              # Complete research paper source
├── 📁 SeedSnitch/            # Seed recovery demonstration
│   └── SeedSnitch.ipynb     # Interactive Jupyter notebook
└── 📁 PromptPirate/         # Advanced prompt stealing tool
    └── (Coming Soon!)       # Full implementation

🔬 Getting Started

  1. Read the Paper: arXiv:2509.09488
  2. Try SeedSnitch: Open In Colab
  3. Explore the Code: Browse the SeedSnitch/ folder for the demonstration
  4. Wait for PromptPirate: Full implementation coming soon!

🏛️ Citation

@article{machtle2024prompt,
  title={Prompt Pirates Need a Map: Stealing Seeds helps Stealing Prompts},
  author={M{\"a}chtle, Felix and Shetty, Ashwath and Sander, Jonas and Loose, Nils and Pirk, S{\"o}ren and Eisenbarth, Thomas},
  journal={arXiv preprint arXiv:2509.09488},
  year={2024}
}

About

Official repository for the research paper "Prompt Pirates Need a Map: Stealing Seeds helps Stealing Prompts", https://arxiv.org/abs/2509.09488

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors