攻防世界——高手进阶区

baby_web

题目描述:想想初始页面是哪个。
抓包+初始页面。
在这里插入图片描述

raining-WWW-Robots

在这里插入图片描述
在这里插入图片描述在这里插入图片描述

Web_php_unserialize

<?php 
class Demo { 
    private $file = 'index.php';
    public function __construct($file) { 
        $this->file = $file; 
    }
    function __destruct() { 
        echo @highlight_file($this->file, true); 
    }
    function __wakeup() { 
        if ($this->file != 'index.php') { 
            //the secret is in the fl4g.php
            $this->file = 'index.php'; 
        } 
    } 
}
if (isset($_GET['var'])) { 
    $var = base64_decode($_GET['var']); 
    if (preg_match('/[oc]:\d+:/i', $var)) { 
        die('stop hacking!'); 
    } else {
        @unserialize($var); 
    } 
} else { 
    highlight_file("index.php"); 
} 
?>

php代码审计

upload1

简单上传,只能上传图片,把1.php加个后缀,换成1.php.png,burpsuite拦截改成1.php上传,发现没拦截上传成功。
在这里插入图片描述
菜刀或者蚁剑连接一句话木马。
在这里插入图片描述

easytornado

题目描述:Tornado 框架
在这里插入图片描述
发现有提示
在这里插入图片描述
看见并没有啥头绪,然后了解这个框架。
在这里插入图片描述
发现是python搭建,考虑模板注入。
在这里插入图片描述
发现访问错误,于是尝试模板注入。
在这里插入图片描述
模板注入
在这里插入图片描述
在这里插入图片描述
想读取文件,显示ORZ
在这里插入图片描述
查资料构造payload

/error?msg={{handler.settings}}

在这里插入图片描述
加上提示
/hints.txt
md5(cookie_secret+md5(filename))
在这里插入图片描述
加上这一串可得到flag
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_34844644/article/details/107933582