当前位置:网站首页>2022年强网杯rcefile wp
2022年强网杯rcefile wp
2022-08-03 20:18:00 【whathay】
第一种方法:
访问www.zip得到源码

查看upload.php可以看出检验后缀用的是黑名单以及验证了mime类型

常见的大小写绕过,空格绕过,php4这种都可以绕过成功上传,但都不解析
所以上传一个phar文件,并把Content-Type改成image/png

上传后访问查看到flag路径

重新传一个cat flag

访问

第二种方法:
看了别的师傅的wp发现还有另一种姿势,所以复现一下
查看源码中config.inc.php,发现对cookie做了反序列化,并存在spl_autoload_register()函数

这是php中文网上对spl_autoload_register函数的描述

cookie的userfile就是上传文件加密过的文件名来构造序列化


上传一个inc文件

构造序列化并进行URL编码
O:32:"文件名":0{}

带着构造的cookie进行访问可以看到代码被执行了

知道了flag的位置所以我们重新上传一个catflag的inc文件

其他步骤同上可得

边栏推荐
- ESP8266-Arduino编程实例-BH1750FVI环境光传感器驱动
- 调用EasyCVR接口时视频流请求出现404,并报错SSL Error,是什么原因?
- leetcode 16. 数值的整数次方(快速幂+递归/迭代)
- Li Mu hands-on learning deep learning V2-BERT fine-tuning and code implementation
- (十六)51单片机——红外遥控
- LeetCode 622. 设计循环队列
- leetcode 448. Find All Numbers Disappeared in an Array 找到所有数组中消失的数字(简单)
- pytorch框架实现老照片修复功能详细演示(GPU版)
- 力扣206-反转链表——链表
- ES6-箭头函数
猜你喜欢

盲埋孔PCB叠孔设计的利与弊

边缘盒子+时序数据库,美的数字化平台 iBuilding 背后的技术选型

一种能有效缓解环境噪声对音频质量干扰的方案

【HiFlow】经常忘记签到怎么办?使用腾讯云场景连接器每天提醒你。

亚马逊云科技 Build On 2022 - AIot 第二季物联网专场实验心得

In-depth understanding of JVM-memory structure

tRNA修饰2-甲基胞嘧啶(m2C)|tRNA修饰m2G (N2-methylguanosine)

调用EasyCVR接口时视频流请求出现404,并报错SSL Error,是什么原因?

Anaconda 虚拟环境迁移

【飞控开发高级教程4】疯壳·开源编队无人机-360 度翻滚
随机推荐
深入理解JVM-内存结构
Advantages and Disadvantages of Blind and Buried Via PCB Stacked Via Design
百利药业IPO过会:扣非后年亏1.5亿 奥博资本是股东
嵌入式分享合集27
leetcode 268. Missing Numbers (XOR!!)
matplotlib画polygon, circle
若依集成easyexcel实现excel表格增强
Power button 206 - reverse list - the list
JWT详解
ES6 - Arrow Functions
leetcode 448. Find All Numbers Disappeared in an Array 找到所有数组中消失的数字(简单)
Lecture topics and guest blockbuster, TDengine developers conference to promote data technology "broken"
149. The largest number on a straight line, and check the set
从腾讯阿里等大厂出来创业搞 Web3、元宇宙的人在搞什么
Node version switching tool NVM and npm source manager nrm
YARN功能介绍、交互流程及调度策略
tensorflow-gpu2.4.1安装配置详细步骤
leetcode 1837. The sum of the digits in the K-base representation
RNA核糖核酸修饰荧光染料|HiLyte Fluor 488/555/594/647/680/750标记RNA核糖核酸
leetcode 326. Powers of 3