[极客大挑战 2019]BuyFlag1
html信息查找发现pay.php
html注释找到提示代码
~~~post money and password~~~
if (isset($_POST[‘password’])) {
$password =
P
O
S
T
[
′
p
a
s
s
w
o
r
d
′
]
;
i
f
(
i
s
n
u
m
e
r
i
c
(
_POST['password']; if (is_numeric(
POST[′password′];if(isnumeric(password)) {
echo “password can’t be number”;
}elseif ($password == 404) {
echo “Password Right!”;
}
}
着手思路:
1,对is_numeric绕过
2,构造 利用==弱类型比较
实战:
题目要求 user money password
user获取:发现user默认为0改1测试
money:100000000
password根据代码提示:
首先使用==弱类型比较测试404aa
显示nember长度太长
转绕过is_numeric
方法一:
利用数组十六进制
password[]=194 十六进制后为数字pass
方法二:
%00 前后截断绕过 %00404 404%00
%20空格数值后绕过 404%20
方法三:
适用于比较类似于==弱类型比较
绕过长度限制
1,科学计数法
1e9
2,数组绕过
money[]=1