关于KnowsMore
KnowsMore是一款针对Microsoft活动目录安全的多功能工具,该工具使用纯Python开发,旨在帮助广大研究人员轻松执行针对Microsoft活动目录的渗透测试任务。
功能介绍
1、支持从.ntds输出文本文件(由CrackMapExec或secretsdump.py生成)导入NTLM哈希;
2、支持从NTDS.dit和SYSTEM导入NTLM哈希;
3、支持从hashcat输出文件导入破解的NTLM哈希;
4、支持导入BloodHound ZIP或JSON文件;
5、BloodHound导入工具(在不需要BloodHound UI的情况下将JSON导入至Neo4J);
6、分析密码质量(包括长度、大小写字母、数字、特殊字符等);
7、分析密码相似度;
8、支持搜索用户、密码和哈希;
9、支持直接将所有已破解的凭证导出到BloodHound Neo4J数据库;
10、其他功能;
工具安装
由于该工具基于Python 3开发,因此我们首先需要在本地设备上安装并配置好Python 3.8+环境。
源码安装
接下来,广大研究人员可以直接使用下列命令将该项目源码克隆至本地:
https://github.com/helviojunior/knowsmore.git
然后切换到项目目录中,使用pip工具和项目提供的requirements.txt文件安装该工具所需的其他依赖组件:
cd knowsmore
pip install -r requirements.txt
依赖组件安装完成之后,执行工具安装脚本即可完成TrafficWatch的安装:
$ python3 setup.py install
pip安装
pip3 install --upgrade knowsmore
工具执行流
1、创建数据库文件;
2、导入BloodHound文件(域名->GPO->OU->组->计算机->用户);
3、导入NTDS文件;
4、导入已破解的哈希;
创建数据库文件
knowsmore --create-db
导入BloodHund文件
# Bloodhound ZIP文件
knowsmore --bloodhound --import-data ~/Desktop/client.zip
# Bloodhound JSON文件
knowsmore --bloodhound --import-data ~/Desktop/20220912105336_users.json
将数据同步至Neo4J BloodHound数据库
# Bloodhound ZIP文件
knowsmore --bloodhound --sync 10.10.10.10:7687 -d neo4j -u neo4j -p 12345678
导入NTDS文件
选项1:
knowsmore --secrets-dump -target LOCAL -ntds ~/Desktop/ntds.dit -system ~/Desktop/SYSTEM
选项2:
secretsdump.py -ntds ntds.dit -system system.reg -hashes lmhash:ntlmhash LOCAL -outputfile ~/Desktop/client_name
生成一个自定义字典
knowsmore --word-list -o \"~/Desktop/Wordlist/my_custom_wordlist.txt\" --batch --name company_name
导入已破解的哈希
提取所有哈希至一个文本文件:
# 提取NTLM哈希至文件
nowsmore --ntlm-hash --export-hashes \"~/Desktop/ntlm_hash.txt\"
# 或从NTDS文件提取NTLM哈希
cat ~/Desktop/client_name.ntds cut -d ':' -f4 > ntlm_hashes.txt
使用hashcat破解哈希:
# 字典攻击
hashcat -m 1000 -a 0 -O -o \"~/Desktop/cracked.txt\" --remove \"~/Desktop/ntlm_hash.txt\" \"~/Desktop/Wordlist/*\"
# 掩码攻击
hashcat -m 1000 -a 3 -O --increment --increment-min 4 -o \"~/Desktop/cracked.txt\" --remove \"~/Desktop/ntlm_hash.txt\" ?a?a?a?a?a?a?a?a
删除敏感数据
knowsmore --wipe
将发现的密码存储到Knowsmore数据库
knowsmore --user-pass --username administrator --password Sec4US@2023
knowsmore --user-pass --username administrator --password Sec4US@2023 --company sec4us
将所有凭证存储到Neo4j Bloodhound数据库
knowsmore --bloodhound --mark-owned 10.10.10.10 -d neo4j -u neo4j -p 123456
工具使用
下列命令将生成跟目标密码相关的多种统计数据:
knowsmore --stats
输出结果如下:
KnowsMore v0.1.4 by Helvio Junior
Active Directory, BloodHound, NTDS hashes and Password Cracks correlation tool
https://github.com/helviojunior/knowsmore
[+] Startup parameters
command line: knowsmore --stats
module: stats
database file: knowsmore.db
[+] start time 2023-01-11 03:59:20
[?] General Statistics
top description qty
[?] General Top 10 passwords
[?] Top 10 weak passwords by company name similarity
许可证协议
本项目的开发与发布遵循GPL-3.0开源许可证协议。
项目地址
KnowsMore:【GitHub传送门】
特别声明:以上内容(如有图片或视频亦包括在内)为自媒体平台“网易号”用户上传并发布,本平台仅提供信息存储服务。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.