信息安全实验——使用john软件破解Windows密码

这个实验使用虚拟机进行操作

1、在开启centos系统前修改虚拟机设置网卡为NAT模式:

在关机状态下选择“编辑虚拟机设置”,打开如下图所示页面:
在这里插入图片描述

2、打开centos,测试centos系统可以连接外网:

在这里插入图片描述

3.下载john-1.7.5.tar.gz、bkhive-1.1.1.tar.gz和samdump2-1.1.1.tar.gz。将这3个文件放在Linux桌面上。

https://wwe.lanzous.com/b015itlid 密码:fhpn

在这里插入图片描述
放入方法:建立与主机的共享文件夹,然后将上述三个文件放在那个共享文件夹中,在虚拟机中打开,将其拖到桌面上
centos共享文件夹创建方法:百度链接(不用安装VMare Tools)

4.下载pe.iso放入win2012虚拟机CD\DVD光驱重启虚拟机设置从CD光驱启动进入pe系统。

pe.iso下载地址

方法:关闭win2012,进入设置:

进入BIOS,设置为CD光驱启动:先用“→”选择“Boot”,然后选择CD-ROM Drive,用“+”号将其移动到第一位,然后按F10,选择Yes进入pe系统
在这里插入图片描述

5、然后将Windows2012系统C:\windows\system32\config\中的两个文件:SAM和system复制到Linux桌面上。

先复制在pe系统的C盘中的Users文件夹中:
在这里插入图片描述
然后pe系统的右下角有一个电脑图标,点击选择“关闭计算机并弹出光驱”,弹窗中点“否”

之后编辑虚拟机,将CD移除,然后打开server2012:
在这里插入图片描述
打开如图所示位置即可看见刚才的SAM和system两个文件夹:
在这里插入图片描述

然后将这两个文件放到共享文件夹中
server2012共享文件夹创建方法:https://blog.csdn.net/hyh17808770899/article/details/105719805

然后再通过linux虚拟机的共享文件夹将这两个文件放到Linux桌面上

6、打开centos Linux终端用命令:

su root切换到root用户
命令:yum –y install gcc网络安装gcc编译环境,安装完成后

在这里插入图片描述
在这里插入图片描述
用命令:which gcc(或者whereis gcc)检查gcc是否存在
用命令:gcc –v 查看gcc版本。
在这里插入图片描述

7、安装john软件破解Windows用户密码。

在终端窗口执行如下命令:

(1)解压缩bkhive-1.1.1.tar.gz

[root@localhost hyh]# cd Desktop
[root@localhost Desktop]# tar zxvf bkhive-1.1.1.tar.gz
[root@localhost Desktop]# cd bkhive-1.1.1

在这里插入图片描述
(2)编译bkhive

[root@localhost bkhive-1.1.1]# make

bkhive命令从system文件生成一个system.txt文件:

[root@localhost bkhive-1.1.1]# ./bkhive  ../system ../system.txt

在这里插入图片描述

(3)解压缩samdump2-1.1.1.tar.gz

[root@localhost Desktop]# tar zxvf samdump2-1.1.1.tar.gz
[root@localhost Desktop]# cd samdump2-1.1.1

在这里插入图片描述

(4)编译samdump2

[root@localhost samdump2-1.1.1]# make

在这里插入图片描述

5.提取账号信息

samdump2命令从system.txt文件和sam文件生成一个passwd_hashes.txt文件,passwd_hashes.txt文件的内容是最终要被破解的用户账号信息。

[root@localhost samdump2-1.1.1]# ./samdump2 ../sam ../system.txt > ../passwd_hashes.txt

如果编译samdump2时出错:
在这里插入图片描述
命令:yum –y install openssl-devel安装openssl组件。
在这里插入图片描述
passwd_hashes.txt文件的内容如图所示。
在这里插入图片描述

7、使用john破解Windows用户密码

[root@localhost samdump2-1.1.1]# cd ..
[root@localhost Desktop]# tar zxvf  john-1.7.5.tar.gz
[root@localhost Desktop]# cd  john-1.7.5/run
[root@localhost run]# ./john  --incremental:Alpha ../../passwd_hashes.txt

猜你喜欢

转载自blog.csdn.net/hyh17808770899/article/details/106693309