您当前的位置:首页 > 计算机 > 系统应用 > Linux

利用 linux 清空 Windows 登陆密码

时间:12-14来源:作者:点击数:

Windows 的用户和密码存放在 SAM 文件中,通过 chntpw 可以实现清空登陆密码的目的。

步骤如下(该步骤在 Windows XP,Windows 7 和Windows 10 下都能通过测试):

1、用 Linux Live CD 或 Live USB 登陆 PC,我这里用了 ArchLinux 的安装镜像来演示。

linux_reset_windows_password01.png

按下回车进入命令行

linux_reset_windows_password02.png

2、安装 chntpw

# 启动dhcpcd获取IP地址
dhcpcd

# 安装chntpw
pacman -Syy
pacman -S chntpw --noconfirm
linux_reset_windows_password03.png

3、挂载 windows 所在分区

# 查看windows分区
sfdisk -l
# 挂载windows所在分区
mount /dev/sda1 /mnt
linux_reset_windows_password04.png

4、开始破解

进入 SAM 文件所在目录,SAM 文件在 WINDOWS/system32/config/ 目录下

cd /mnt/WINDOWS/system32/config

使用 chntpw -l SAM 可以查看用户记录

linux_reset_windows_password05.png

要清空登陆密码,则可以运行命令

chntpw -i SAM

会出现一个菜单:

linux_reset_windows_password06.png

我们选择 1- Edit user data and passwords

linux_reset_windows_password07.png

然后输入要清空密码用户前面的RID,比如我这里想清空 Administrator 的密码,则输入 01f4 然后你可以看到一个菜单,通过这个菜单你可以对用户做许多操作

linux_reset_windows_password08.png

这里我们选择 1 - Cleara (blank) user password

linux_reset_windows_password09.png

Administrator 的密码就被清空了,我们按 q 健退出 chntpw 程序 最后按下 y 保存对文件的修改:

linux_reset_windows_password10.png

最后重启系统后,再进入 windows 就会发现密码已经被清空了。

5、获取 chntpw 的帮助信息 通过执行 chntpw -h 就能查看它的其他选项说明:

chntpw -h

结果为:

chntpw: change password of a user in a Windows SAM file,
or invoke registry editor. Should handle both 32 and 64 bit windows and
all version from NT3.x to Win8.1
chntpw [OPTIONS] <samfile> [systemfile] [securityfile] [otherreghive] [...]
 -h          This message
 -u <user>   Username or RID (0x3e9 for example) to interactively edit
 -l          list all users in SAM file and exit
 -i          Interactive Menu system
 -e          Registry editor. Now with full write support!
 -d          Enter buffer debugger instead (hex editor), 
 -v          Be a little more verbose (for debuging)
 -L          For scripts, write names of changed files to /tmp/changed
 -N          No allocation mode. Only same length overwrites possible (very safe mode)
 -E          No expand mode, do not expand hive file (safe mode)

Usernames can be given as name or RID (in hex with 0x first)

See readme file on how to get to the registry files, and what they are.
Source/binary freely distributable under GPL v2 license. See README for details.
NOTE: This program is somewhat hackish! You are on your own!
方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门
本栏推荐