第一步: 创建john用户

Linux 用户创建用户

  useradd-m john

设置密码

  passwd -f john

第二步: 下载及安装john破解工具

下载最新的 john 程序(官方地址): http://www.openwall.com/john/
安装

  # tar -zxvfjohn-1.7.4.2.tar.gz

  # cd john-1.7.4.2 # cd src 
  Note the make target for your systemand type:

  #make clean SYSTEM

whereSYSTEM is the appropriate make target. Alternatively, if your system is notlisted, use:

 #make clean generic

Ifeverything goes well, this will create the executables for John and its related utilities under"../run/". You can change directory to there and start John, likethis:

 #cd ../run ./john --test

第三部: 破解Linux用户

ROOT用户登录Linux系统,执行以下命令:

[ root@localhost run]# ./john / etc /shadow

Loaded 9 password hashes with 9 differentsalts (FreeBSD MD5 [32/32 X2])

mavenuser        (mavenuser)

sfl123                (sfl1)

sfl123                (sfl)

sfl123                (sfl3)

sfl123                 (sfl2)

apache123        (apache)

john123              (john)

memcache123      (memcache)

结论:用户sfl1,密码sfl1234

           用户sfl,密码为sfl123

以上采用John the Ripper暴力破解用户密码,所以对系统管理人员来说明,一定要保管后Linux系统的用户名和密码。

 

 

Logo

更多推荐