利用 linux 清空 Windows 登陆密码
Windows 的用户和密码存放在 SAM 文件中,通过 chntpw
可以实现清空登陆密码的目的。
步骤如下(该步骤在 Windows XP,Windows 7 和Windows 10 下都能通过测试):
1、用 Linux Live CD 或 Live USB 登陆 PC,我这里用了 ArchLinux 的安装镜像来演示。
按下回车进入命令行
2、安装 chntpw
# 启动dhcpcd获取IP地址 dhcpcd # 安装chntpw pacman -Syy pacman -S chntpw --noconfirm
3、挂载 windows 所在分区
# 查看windows分区 sfdisk -l # 挂载windows所在分区 mount /dev/sda1 /mnt
4、开始破解
进入 SAM 文件所在目录,SAM 文件在 WINDOWS/system32/config/
目录下
cd /mnt/WINDOWS/system32/config
使用 chntpw -l SAM
可以查看用户记录
要清空登陆密码,则可以运行命令
chntpw -i SAM
会出现一个菜单:
我们选择 1- Edit user data and passwords
然后输入要清空密码用户前面的RID,比如我这里想清空 Administrator
的密码,则输入 01f4
然后你可以看到一个菜单,通过这个菜单你可以对用户做许多操作
这里我们选择 1 - Cleara (blank) user password
Administrator
的密码就被清空了,我们按 q
健退出 chntpw
程序 最后按下 y
保存对文件的修改:
最后重启系统后,再进入 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论