当前位置:网站首页>Advanced area of attack and defense world web masters unserialize3
Advanced area of attack and defense world web masters unserialize3
2022-07-29 00:17:00 【Ant200】
Tools
firefox
phpstudy
1. Code

2.. Open website observation , notice wakeup() Think of deserialization , To serialize, you must bypass wakeup(), Attach a previously made link , The problem of analyzing code only needs to be serialized , Bring in the parameters to solve .
First step , structure payload Get the serialized value , Code :
<?php
class xctf{
public $flag = '111';
public function __wakeup(){
exit('bad requests');
}
}
$d=new xctf();
echo serialize($d);// Display the value after serialization
?>How to get the serialized value ? Start by opening phpstudy, Then create a new one under the directory of your website php The file of , Fill in code , Visit the website to get


Get the serialized value :O:4:"xctf":1:{s:4:"flag";s:3:"111";}#echo serialize($d

The second step , After getting the serialized value , You can try it directly .

Find back bad requests, You will find that it is implemented wakeup(), Add wakeup() Related knowledge : Since the serialized value will be deserialized automatically, it is necessary to bypass __wakeup(),wakeup() Function has a vulnerability , When the number of member variables is greater than the number of actual member variables of this class , Will skip wakeup() Implementation . What do you mean ?
The original :O:4:"xctf":1:{s:4:"flag";s:3:"111";}#echo serialize($d
After circling :O:4:"xctf":2:{s:4:"flag";s:3:"111";}#echo serialize($d
take 1 Change to ratio 1 Big , for example 2, That's what it means
Last , Into the , Succeed in getting flag:the answer is : cyberpeace{c7838ad5f8807926cbeb9a3dea0a811f}

Related links :
CSDN
https://mp.csdn.net/mp_blog/creation/editor/124302587
边栏推荐
- Idea2021.2 installation and configuration (continuous update)
- Dual for loop optimization
- Leetcode62. 不同路径
- Es6操作教程
- Laptop external display
- 【C】 Reverse string (two recursive ideas)
- How can Plato obtain premium income through elephant swap in a bear market?
- Control fillet stroke materialshapedrawable
- Classification and determination method of Worthington stemxyme
- Field injection is not recommended solution
猜你喜欢

Leetcode61. 旋转链表

Real time data warehouse: Netease strictly selects the practice of real-time data warehouse based on Flink

centos7安装mysql8

Do like and in indexes in MySQL go

Sword finger offer 55 - I. depth of binary tree

IDEA2021.2安装与配置(持续更新)

【微服务】Nacos集群搭建以及加载文件配置

Virtual lab basic experiment tutorial -8. Fourier transform (1)

动态规划问题(七)

MySQL installation and configuration tutorial (super detailed, nanny level)
随机推荐
Powercli batch add esxi to vCenter
Classification and determination method of Worthington stemxyme
MySQL安装配置教程(超级详细、保姆级)
Real time data warehouse: Netease strictly selects the practice of real-time data warehouse based on Flink
动态规划问题(一)
NPM replace the latest Taobao image
动态规划问题(三)
[CNN] Why is the convolution kernel size of CNN usually odd
EN 1873 assembly accessories for roofing - plastic single roof lamps - CE certification
Detailed explanation of 9 common reasons for MySQL index failure
1-6 state与绑定事件
CV semantic segmentation model sketch (2)
How can Plato obtain premium income through elephant swap in a bear market?
Okaleido ecological core equity Oka, all in fusion mining mode
How NAT configures address translation
CV instance segmentation model sketch (1)
Worthington - chemical properties and related studies of Worthington trypsin
Event extraction and documentation (2008-2017)
With the help of rpa+lcap, the enterprise treasurer management can be upgraded digitally
Do you know any formal part-time platforms?