╚═════╝   ╚═╝   ╚═╝         ╚═════╝    ╚═╝   ╚═════╝ ╚═╝  ╚═╝╚══════╝╚══════╝

PHP CTF Bypass Training Ground

preg_replace 替换绕过 · file_get_contents / include 文件包含 · PHP 弱类型 专项训练

🏁 通关进度:0 / 8 剩余 8 关
1 2 3 4 5 6 7 8

Module 4: data:// 伪协议 + Base64 绕过

📋 POST: file, page 难度: ⭐⭐⭐ 分类: include
考点:data:// 伪协议 + Base64 编码绕过明文检测 + file_get_contents
核心逻辑:
preg_match('/http/', $file) → 拦截 http 协议
strpos($file, 'ctf') !== false → 拦截 URL 中的明文 'ctf'
file_get_contents($file) 读取内容须等于 'ctf'
提示:data://text/plain;base64, + Base64 编码可以绕过明文检测。ctf 的 Base64 是 Y3Rm