zhihuiyuze

A red team / blue team toolkit for testing and detecting prompt injection attacks hidden inside PDF documents. 一个用于测试和检测 PDF 文档中隐藏的提示词注入攻击的红蓝对抗工具包。

19
2
100% credibility
Found Feb 17, 2026 at 15 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

A security toolkit that lets users simulate hidden instruction attacks in PDFs and detect them to test AI document processing safety.

How It Works

1
🔍 Discover the toolkit

You learn about sneaky hidden messages in PDFs that can trick AI systems processing resumes or documents.

2
💻 Get ready to test

You set up the simple toolkit on your computer so you can start checking PDFs right away.

3
📄 Pick your PDF

You choose a regular PDF file, like a job resume, that you want to test for hidden tricks.

4
Choose your side
🔴
Attack mode

Pretend to be the bad guy and slip a secret instruction into the PDF without changing how it looks.

🔵
Defend mode

Act as the protector and carefully inspect the PDF for any sneaky hidden instructions.

5
Run the check

With one easy command, you create a tricked-out PDF or get a full safety report showing risks and evidence.

6
📊 See the results

You get a clear report with colors and scores telling you exactly what's hidden and how dangerous it is.

Stay safe

Now you understand PDF risks and can protect your AI tools from sneaky attacks or test them securely.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 15 to 19 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is PDF-Prompt-Injection-Toolkit?

This Python CLI toolkit tackles PDF prompt injection attacks, where hidden text in documents tricks LLMs during processing in ATS or summarizers. Red team mode injects stealth payloads via commands like `python pdf_injector.py resume.pdf -t all`, keeping visuals intact. Blue team mode scans files with `python pdf_injection_detector.py suspicious.pdf`, delivering risk scores, severity-tagged findings, and JSON reports.

Why is it gaining traction?

Amid surging red team tools on GitHub for AI red teaming and attacks, it bundles six injection techniques and multi-module detection into dead-simple CLIs with color-coded output. No setup hassle beyond pip-installing pikepdf and pdfplumber—users get instant test payloads and audits for blue team validation. Timely for red team pentesting as LLM doc pipelines explode.

Who should use this?

Red team operators crafting attacks for AI workflow pentests, blue team devs securing recruitment systems from malicious PDFs, and AI safety auditors testing pipelines. Suited for red team jobs, field manual drills, or red teaming exercises targeting hidden injections.

Verdict

Worth forking for authorized red team blue team work—CLI shines, docs cover English/Chinese use cases—but 1.0% credibility and 15 stars mean it's raw; expect tweaks as it matures.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.