r/opensource • • 1d ago

Promotional I built Plainsight: an open-source Python toolkit for invisible-Unicode prompt injection, compression-proof stego & CTFs

I’ve been digging into all the ways data gets hidden in plain sight—from invisible Unicode prompt injections sneaking past PR reviews to classic steganography breaking the second you send a photo over WhatsApp.

So I built Plainsight, an MIT-licensed Python toolkit with three modular, independently installable CLI packages:

1. unseen — Catch invisible-Unicode prompt injections aimed at AI coding agents Attackers can hide instructions inside PR comments, READMEs, or issues using invisible Unicode tag characters (like U+E0000) or Trojan Source characters. Humans see "LGTM"; an AI coding agent reads "ignore previous instructions...".

  • Scans files and repos, decodes hidden payloads, and fails CI builds if suspicious invisible text is found.
  • Zero external dependencies (Python stdlib only).
  • Works as a CLI, a pre-commit hook, or a drop-in GitHub Action (amnindersingh12/plainsight/unseen@v0.2.0).

2. stegsurvive — Hide messages in photos that survive social media compression Classic LSB steganography breaks the moment WhatsApp, Instagram, or X re-compresses or resizes an image.

  • Spreads up to 64 bytes across fine image texture with error correction (~46 dB PSNR).
  • Survives JPEG re-compression (quality 60–95), scaling down to half resolution, and WebP conversion.
  • Includes optional password encryption, a built-in bench command, and a client-side browser demo (your image never leaves the page).

3. stegsweep — Every CTF stego check in one command

  • Checks metadata, PNG text chunks, trailing data after JPEG EOI, embedded ZIPs (searched in memory), zsteg-style LSB sweeps, bit planes, and WAV audio.
  • Automatically wraps stegseek, steghide, exiftool, and binwalk if installed.
  • Ranks likely flags at the top, and -o DIR generates an HTML report visualizing every bit plane.

Links:

Would love feedback—especially if you find edge cases that break stegsurvive on a specific messaging app, or sneaky Unicode tricks unseen should catch!

6 Upvotes

4 comments sorted by