正如我们之前在单裂纹模式中所述 [列表.R]ules:Single] 使用配置文件的方法。在此模式下login:password are 使用默认密码列表破解。单一模式比单词列表模式快得多。
null
Linux示例
我们将用单模式破解linux密码。首先,我们需要通过取消阴影创建一个文件 /etc/密码 和 /etc/阴影 就像下面一样
$ unshadow /etc/passwd /etc/shadow > unshadowed
在此操作之后,我们将得到一个名为unshadowed的文件,如下所示
root:$6$sRjaayov$u8sCzbiIxzunjyvPgRJurl24RMLfWgCKhuzGU/V0ZOWmH/JeeNMnaPOASdFN898/AEhmdTzNE7I6xDqDxeWbf.:0:0:root:/root:/bin/bashismail:$6$osz4Q6Ka$txKB/fjtuZhnFThDJEVKrJ8.E1LbojZYcWPuE6GGLxob.AWDoL3UXZtZ0FH98HR86ebZhGO.bZpl/qrJ2nzOP/:1000:1001::/home/ismail:/bin/sh
现在约翰只要把文件交给约翰就可以很容易地帮助我们了。
$ john unshadowed Warning: detected hash type "sha512crypt", but the string is also recognized as "crypt" Use the "--format=crypt" option to force loading these as that type instead Using default input encoding: UTF-8 Loaded 2 password hashes with 2 different salts (sha512crypt, crypt(3) $6$ [SHA512 128/128 SSE2 2x]) Press 'q' or Ctrl-C to abort, almost any other key for status 123456 (ismail)
显示所有已破解密码
如果我们再次运行john,将不会列出用户ismail的密码。约翰提供了如下信息
$ john unshadowed Warning: detected hash type "sha512crypt", but the string is also recognized as "crypt" Use the "--format=crypt" option to force loading these as that type instead Using default input encoding: UTF-8 Loaded 2 password hashes with 2 different salts (sha512crypt, crypt(3) $6$ [SHA512 128/128 SSE2 2x]) Remaining 1 password hash
因为john已经破解了ismail的密码,所以它将从其他密码散列恢复。如果我们想看到破解密码。我们可以用 –显示
$ john --show unshadowed ismail:123456:1000:1001::/home/ismail:/bin/sh 1 password hash cracked, 1 left
跳过禁用的帐户/Shell
作为一个linux系统,有很多没有shell的服务帐户,这意味着没有访问权限。我们可以从约翰报告中筛选出来 –炮弹 选项。
$ john --show --shells="/bin/false" unshadowed
- –炮弹 此处提供禁用的shell路径 /bin/错误 已为帐户禁用shell
$ john --show --shells="-false" unshadowed
- -假 意味着一个文件以FalseLike结尾 /bin/错误 这是一条捷径
$ john --show --shells="-false,nouser" unshadowed
- -错,努瑟 用于多个用户shell
相关文章: 如何强制用户在首次登录时更改密码?
检查帐户是否被破解
我们可以检查一下帐户是否准备好了。
$ john --show --users=0 unshadowed
- –用户 意味着我们需要一个用户密码
- 0 是根目录所在的用户id
$ john --show --users=root unshadowed
- 根 我们已向用户提供其帐户名
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END