一、代码审计error_reporting(0); if (isset($_GET['code'])) { $code = $_GET['code']; if (strlen($code) > 40) { die("This is too Long."); } if (preg_match("/[A-Za-z0-9]+/", $code)) { die("NO."); } @eval($code); } else { highlight_file(__FILE__); }这次的代码很简单,不可以使用可见字符,需要使用不可见字符运算后进行RCE。二、原理PHP的神奇特性,允许变量的值作为变量名或函数名进行调用,且该变量的值允许运算。或绕过将可见字符转换为使用或运算之后才能得到的结果,这样可以使用不可见字符转换为可见字符串。import re import requests import urllib from sys import * impo
Equinox
一个乐于分享的网安人