当前位置:网站首页>BugkuCTF-web21(详细解题思路及步骤)
BugkuCTF-web21(详细解题思路及步骤)
2022-07-02 06:34:00 【hangshao0.0】
审题
题目并没有什么信息,只是鼓励你不要放弃,never give up。

F12获取信息
没有额外信息,刷新了几下,也没有出现新东西。

Burp suite抓包

提示了 1p.html ,于是把GET参数改为 1p.html ,得到一串JS代码


解码
于是,在线解码

解码后仍然存在注释内容,尝试用base64解码

解码之后,发现了新信息,出现了一些函数和判断语句,同时还有许多百分号

可以看出,还需要URL解码



分析PHP代码
得到PHP代码如下,总会有些函数是你不了解的,直接查一下就知道了
";if(!$_GET['id']) { header('Location: hello.php?id=1'); exit(); } $id=$_GET['id']; $a=$_GET['a']; $b=$_GET['b']; if(stripos($a,'.')) { echo 'no no no no no no no'; return ; } $data = @file_get_contents($a,'r'); if($data=="bugku is a nice plateform!" and $id==0 and strlen($b)>5 and eregi("111".substr($b,0,1),"1114") and substr($b,0,1)!=4) { $flag = "flag{
***********}" } else { print "never never never give up !!!";
}
?>

构造payload
参数为: /hello.php?id=0e&a=php://input&b=.123542
变量a,文件上传
变量b,首字母是一个点,不等于4,”111“和一个点拼接,可以与”1114“正则匹配


本来没打算写,后来又觉得这个题出得还是很好的,所以就写了一下,有帮助的话,欢迎点赞评论收藏。
边栏推荐
- 每天睡觉前30分钟阅读_day4_Files
- Chrome浏览器标签管理插件–OneTab
- 概念到方法,绝了《统计学习方法》——第三章、k近邻法
- Chrome video download Plug-in – video downloader for Chrome
- Complete solution of servlet: inheritance relationship, life cycle, container, request forwarding and redirection, etc
- 盘点典型错误之TypeError: X() got multiple values for argument ‘Y‘
- zk配置中心---Config Toolkit配置与使用
- 深入剖析JVM是如何执行Hello World的
- 微服务实战|微服务网关Zuul入门与实战
- Safety production early warning system software - Download safety production app software
猜你喜欢
![[go practical basis] how to bind and use URL parameters in gin](/img/63/84717b0da3a55d7fda9d57c8da2463.png)
[go practical basis] how to bind and use URL parameters in gin

微服务实战|Eureka注册中心及集群搭建

web安全与防御

Dix ans d'expérience dans le développement de programmeurs vous disent quelles compétences de base vous manquez encore?

Matplotlib剑客行——没有工具用代码也能画图的造型师

Chrome browser tag management plug-in – onetab

Chrome user script manager tempermonkey monkey

微服务实战|原生态实现服务的发现与调用

别找了,Chrome浏览器必装插件都在这了

Data type case of machine learning -- using data to distinguish men and women based on Naive Bayesian method
随机推荐
数构(C语言)——第四章、矩阵的压缩存储(下)
Mathematics in machine learning -- point estimation (I): basic knowledge
Matplotlib swordsman line - layout guide and multi map implementation (Updated)
Don't look for it. All the necessary plug-ins for Chrome browser are here
Knife4j 2. Solution to the problem of file control without selection when uploading x version files
DTM distributed transaction manager PHP collaboration client V0.1 beta release!!!
Machine learning practice: is Mermaid a love movie or an action movie? KNN announces the answer
Mysql 多列IN操作
VIM operation command Encyclopedia
Say goodbye to 996. What are the necessary plug-ins in idea?
自定义Redis连接池
Redis sorted set data type API and application scenario analysis
Cloudreve自建云盘实践,我说了没人能限制得了我的容量和速度
C语言之二进制与十进制
Chrome浏览器插件-Fatkun安装和介绍
互联网API接口幂等设计
自定義Redis連接池
Chrome browser tag management plug-in – onetab
Knowledge points are very detailed (code is annotated) number structure (C language) -- Chapter 3, stack and queue
京东面试官问:LEFT JOIN关联表中用ON还是WHERE跟条件有什么区别