利用 linux 清空 Windows 登陆密码

发布于 2023-02-02 21:45:45 字数 3774 浏览 163 评论 0

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

关于作者

半暖夏伤

暂无简介

文章
评论
27 人气
更多

推荐作者

櫻之舞

文章 0 评论 0

弥枳

文章 0 评论 0

m2429

文章 0 评论 0

野却迷人

文章 0 评论 0

我怀念的。

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文