当前位置:网站首页>CTFshow之web89~web96---php特性(1)
CTFshow之web89~web96---php特性(1)
2022-06-09 10:50:00 【金 帛】
目录
web89

按逻辑来说,被封死了,但这里preg_match有个漏洞,当检测的变量是数组的时候会报错并返回0。而intval函数当传入的变量也是数组的时候,会返回1,所以我们可以传个数组绕过,构造payload
?num[]=abc
web90

intval($num,0)意思是检测num的进制类型并返回其十进制的值,若num前缀为0,即判断num为八进制,若num前缀为0x,则判断num为十六进制
所以我们可以用进制转化来绕过第一个===号,
十进制4476
转化为八进制为010574
转化为十六进制为0x117c
当然还能用科学计数法的方法绕过===号 ,
先简单理解一下科学计数法
4476e3表示4476*10^3,也就是4476000,
而4476e3做为参数传入的时候可以当成字符串,在进行第一个(===)比较时会先转为4476000再比较,到intval函数时,因为没有特征前缀,所以当十进制处理,而intval函数不能处理科学计数法,4476e3会被识别为4476,
所以可以构造payload
?num=0x117c
或
?num=010574
或
?num=4476e1
web91

这里正则表达的意思
PHP正则表达式,看这一篇就够了 (biancheng.net)
所以正则/^php$/im匹配的是多行里面,以php开头,php结尾的字符串,也就是多行匹配php;
而/^php$/i只匹配第一行的php,到第二行就不匹配了
所以我们可以传第一行没有php,第二行以下有php的值,来拿到flag,而回车的ascii码是%0a,所以我们可以构造payload
?cmd=haha%0aphp
web92

emmm,这题跟web90差不多一样,web90的解题方法也能在这题使用,可以构造payload
?num=0x117c
或
?num=010574
或
?num=4476e1
web93

挺简单的,只过滤掉了英文字符,也就是说不能用十六进制跟科学计数法这些方法了,但是还能用八进制,payload
?num=010574
web94
明显把前缀为0的数给过滤掉了,利用intval函数只会将函数转化为整型的特性,可以构造个浮点数来绕过检测,输出flag,构造payload
?num=4476.00001
web95

把点过滤掉了,但是还能用正号来绕过,以八进制的形式,构造payload
?num=+010574
web96

只检测u的值是不是flag.php,我们可以上路径绕过,构造payload
?u=/var/www/html/flag.php 
边栏推荐
- 10 useful flutter widgets
- 对象的实例化和访问
- Is it safe for CICC fortune to open an account
- What are the preparations for building your own website
- GaussDB(DWS) 之数据迁移【这次高斯不是数学家】
- 福建土楼沟文化旅游开发有限公司6%股权转让,来自塔米狗分享
- How are string types organized in redis?
- flutter 弹窗flutter_easyloading
- Based on the actual development of Huawei's cloud King returnable martyr tracing system [Huawei cloud to jianzhiyuan]
- Protobuf介绍以及简单使用
猜你喜欢

三维数字沙盘展示具备哪些应用优势

MOS tube from entry to mastery

6% equity transfer of Fujian tulougou Cultural Tourism Development Co., Ltd., shared by tamigou

Camtasia 2022最新版新增功能

Perfdog releases new indicators, tailored to the game

TiDB Cloud 上线 Google Cloud Marketplace,以全新一栈式实时 HTAP 数据库赋能全球开发者

Tidb cloud launched Google cloud marketplace, empowering global developers with a new stack of real-time HTAP databases

Clunky hero v0.96 Chinese version

文档书写规范

第三章运输层
随机推荐
This article takes you to understand gaussdb (DWS) [Gauss is not a mathematician this time]
Leetcode 2048. 下一个更大的数值平衡数(有点意思,已解决)
flutter setState() called after dispose()
no provider available for the service错误解决方案
Record of a memory leak
Matlab related function knowledge points (III) -floor function + dot division operator + matrix index rules
企评家用杜邦分析法剖析:华东建筑集团股份有限公司企业财务状况
Comparison and evaluation of code on cloud - devcloud
基于华为云君可归烈士寻亲系统开发实战【华为云至简致远】
CVPR 2022 | PTTR: 基于Transformer的三维点云目标跟踪
More than observation | Alibaba cloud observable Technology Summit officially launched
MOS tube from entry to mastery
浅析子组件自定义属性问题
Leetcode 2048. Next larger numerical balance number (interesting, solved)
Clunky hero v0.96 Chinese version
RDMA Verbs API
[数据分析] RFM分析方法
CTF platform marsctf after graduation
Monomer mode
MySQL learning notes - Chapter 5 - data backup and recovery, MySQL logs



