gpt4 book ai didi

Linux 旧密码文件 - 逆向

转载 作者:可可西里 更新时间:2023-11-01 11:47:29 27 4
gpt4 key购买 nike

我目前正在尝试“破解”一个 Linux 嵌入式设备。此设备有一个不应使用的 telnet 守护程序。不管怎样,我已经从制造商网站上获取了二进制固件并成功地提取了根文件系统。顺便说一下,我现在有了/etc/passwd 文件。

密码文件看起来像这样:

root:{10 char long}:0:0:root:/bin:/bin/sh

我的问题是:它可能是什么类型的散列? crypt() 哈希方法将返回 13 个字符的字符串。

如果我知道哈希方法,我可以暴力破解或替换它......

非常感谢

最佳答案

通常密码散列包含盐和使​​用的散列算法。如果 salt 不是以 $ 开头,则使用 DES 来加密密码。

引自crypt(3) manpage :

If salt is a character string starting with the characters "$id$" followed by a string terminated by "$":

  $id$salt$encrypted

then instead of using the DES machine, id identifies the encryption method used and this then determines how the rest of the password string is interpreted. The following values of id are supported:

  ID  | Method
---------------------------------------------------------
1 | MD5
2a | Blowfish (not in mainline glibc; added in some
| Linux distributions)
5 | SHA-256 (since glibc 2.7)
6 | SHA-512 (since glibc 2.7)

你应该能够通过插入例如设置密码'test' (md5 和空盐):

$1$$098f6bcd4621d373cade4e832627b4f6

关于Linux 旧密码文件 - 逆向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8836468/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com