使用pwdump 导出本地windows SAM散列并破解

来源:shiyanbar.com,仅作为笔记,侵删

Windows hash由二部分组成,分别是LM HASH&NT HASH。Windows系统关于hash的组成如下:

用户名称:RID: LM-HASH值:NT-HASH值

LM HASH生成规则:
1.用户的密码被限制为最多14个字符。
2.用户的密码转换为大写。
3.系统中用户的密码编码使用了OEM内码页
4.密码不足14字节将会用0来补全。
5.固定长度的密码被分成两个7byte部分。每部分转换成比特流,再分组,每7bit为一组并且末尾加0,组成新的编码
6.以上步骤得到的8byte二组,分别作为DES key为“KGS!@#$%”进行加密。
7.将二组DES加密后的编码拼接,得到最终LM HASH值。


NT hash生成原理
IBM设计的LM Hash算法存在几个弱点,微软在保持向后兼容性的同时提出了自己的挑战响应机制,NTLMHash便应运而生。假设明文口令是”123456",首先转换成Unicode字符串,与LMHash算法不同,这次不需要添加0补足14字节

“123456"->310032003300340035003600


从ASClI串转换成Unicode串时,使用little-endian序,微软在设计整个SMB协议时就没考虑过big-endian序,ntoh0、hton0函数不宜用在SMB报文解码中。0×80之前的标准ASCII码转换成Unicode码,就是简单地从0x变成0×00。此类标准ASCIl串按little-endian序转换成Unicode串,就是简单地在原有每个字节之后添加0×00。对所获取的Unicode串进行标准MD4单向哈希,无论数据源有多少字节,MD4固定产生128-bit的哈希值,16字节310032003300340035003600-进行标准MD4单向哈希-
>32ED87BDB5FDC5E9 CBA88547376818D4,就得到了最后的NTLM Hash
 NTLM Hash:32ED87BDB5FDC5E9CBA88547376818D4

pwdump.exe --dump-hash-local

下载软件之后,使用以上命令可以获得当前用户名的SAM。

使用LC5.exe破解

之后可以将SAM保存到文本文件,使用LC5.EXE破解。

导入字典列表,LC5软件目录下有dic文件。

即可破解出密码

使用彩虹表破解

关于彩虹表

彩虹表使用方法

导出SAM到文本文件,使用opcrack 挂彩虹表破解。

输入单行hash

点击crack,开始破解

破解出密码

国外经典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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值