English 中文(简体)
• 如何用多倍的口号来形容?
原标题:How to brute force a password that has been hashed multiple times?

我昨天询问了有关安全洗衣的问题,我想到的是,如何实际打破用习惯洗衣算法产生的密码。 我的当前(非常不可靠的)密码使用密码上的沙1,然后用3位数的盐子对口 has的 it。

$hash = sha1($pass1);

//creates a 3 character sequence
function createSalt()
{
    $string = md5(uniqid(rand(), true));
    return substr($string, 0, 3);
}

$salt = createSalt();

$hash = sha1($salt . $hash);

现在,我作为该服务器的管理人,完全能够查阅源码和密码表,加上行政工具,可以简单地重新撰写用户密码,以达到我所希望的用途,但为了更好地理解安全,我很想知道,如何以黑客的意志来这样做。 我有一个叫做卡林和安普的节目;一个叫,器,用的是特定的洗 has算法,但我怎么做一些事情,如用每条平时的口号,打上这种口号,把它推到已知的盐类,并把它再打碎? 这似乎很简单,但我从未用像C++和我假定必要的语言来安排。

EDIT:

我应具体说明如下:

这是一次无情的进攻。

我拥有全程海螺及其各自的盐类的数据库。

盐类是用户,但我只想攻击一个用户口号。

具体地说,我问,如何使用一系列仓储算法(如我上面所显示的算法)来改写密码:

pseudocode:

$hash = sha1(  password  );
$salt =  3Sf ;
$hash = sha1( $salt.$hash);

我假定,无论使用何种方法这样做,也可用于对带有已知算法的密码进行篡改,例如:

$hash = sha1(  password  );
$salt =  3Sf ;
for($i; $i<1000; $i++){
    $hash = sha1( $salt.$hash);
}

因此,我没有具体要求CODE做第一件事,我问,我可以采取什么方法,针对像我上文所列2项那样的定制洗衣算法,实施一个简练的武力方案。

注:我根本不说我会遇到这种情况,但我想知道如何这样做。

最佳回答

据我所知,没有广泛可用的震荡工具支持这一功能。

However, as you said, it would be extremely simple to write a program to crack the hashes given enough time.

如果你的攻击者已经知道你计算盐 has的方法,我们就能够安全地假定他要么可以接触你的行文(这必然会储存盐),要么丢弃,要么可以接触到贵方和客户之间的便衣通信。

To then crack the hashes, he would simply replicate your sha1($salt . $hash) function and start feeding common passwords to it. This would save time compared to purely brute forcing all possible combinations. He d take the $salt from you DB and compare the result of the hashed-salted-hashed password to the salted hash stored in the same DB. If the resulting hashes match, the password has been "cracked".

In general, using individual salts for each user is a good idea as it increases the time to crack an entire DB table of passwords exponentially. Instead of running a wordlist against a single hashing function with a single salt, he ll have to run the entire wordlist against every single hashed PW in your database.

That said, if the attacker is far enough into your system to actually acquire the hashes / salts it would be much easier for him to alter your code to send him plain text copies of credentials of users logging in in the first place.

问题回答

问题过于简单。 有许多事情需要考虑,太多的人要打一个职位,但这里只有少数。 (1) 黑客是否有密码储存? 如果是的话,由于没有其他教唆者阻止攻击行动,那么强力袭击就会更加成功。 2) cker客是否能够渗透到你的系统,并暴露出你的盐类/shing系统? 这将使部队攻击更容易发生,特别是当1起发生时。 3) 如果1和2是假的,是否建立了缓解系统,以防止/制止一场 force强的武力攻击,例如,在一行中出现一些错误的口号之后,设置一个账户。

从总体上看,营养化,特别是营养化,在维持良好/有保障的系统上,比贫化力量更可能取得成功,尽管贫穷的力量也是实现监督事务司的一大途径。 对这一问题有整体的纪律,而禁忌更需要考虑。





相关问题
Encrypting SALTEDHASHED weblogic password in java

How to encrypt SALTEDHASHED password (used by Weblogic) in java? I need to be able to hash passwords in exactly the same way as WebLogic s authenticator does. Preferably without using WebLogic s ...

Should I support Unicode in passwords?

I would like to allow my users to use Unicode for their passwords. However I see a lot of sites don t support that (e.g. Gmail, Hotmail). So I m wondering if there s some technical or usability ...

Why does my method return a null password?

I have two classes: a Generator class and a SystemManagement class. The Generator class, I can generate a password. The SystemManagement class imports Generator (from another package) and includes ...

How to mask password in c?

In C, I want to display every single character that the user type as * (Ex, Please type in your password: *****) I m searching around but can t be able to find a solution for this. I m working on ...

MySQL password function

Is it considered good or bad practice to use MySQL s password function to hash passwords used by an application? I can see pros and cons. I m curious if there is a general consensus on whether it is ...

How should I store a user s LDAP password in a cookie?

So I have this black box authentication method, handed down to me from the accounts people, which basically amounts to ldap_bind($connection, $username, $password). But of course, I want my users to ...

Simple JAVA: Password Verifier problem

I have a simple problem that says: A password for xyz corporation is supposed to be 6 characters long and made up of a combination of letters and digits. Write a program fragment to read in a string ...

Password protect a simple web site

I ve got an HTML-only website (with a bit of inconsequential javascript). The static pages are generated from a photo-blogging program that I created. There are hundreds of pages and thousands of ...

热门标签