Por que uma tentativa incorreta de senha demoraria mais para ser processada do que uma correta?

17

O lugar mais importante que eu notei é o SSH-ing no trabalho, mas sinto que também observei esse comportamento em outros lugares.

Quando tento fazer logon em servidores Linux a partir da área de trabalho do Windows, percebi que, se eu digitar minha senha incorretamente, demora cerca de 5 segundos para obter o "Acesso Negado" novamente. Então, quando digito minha senha corretamente, o login (junto com as mensagens de boas-vindas, etc.) é virtualmente instantâneo.

Existe alguma razão lógica para isso, ou seria uma configuração estranha específica para as máquinas aqui no trabalho?

    
por Cam Jackson 28.10.2011 / 03:01

3 respostas

21

Provavelmente existe um tempo limite artificial para dificultar o êxito de um ataque de força bruta.

Você verá isso em muitos prompts de login que envolvem autenticação segura ...

    
por 28.10.2011 / 03:12
10

Isso é um atraso intencional para evitar ataques de força bruta. Um atraso maior também evita que o invasor consiga adivinhar a diferença entre o nome de usuário errado e a senha incorreta (o hash e a verificação da senha são mais demorados do que a verificação do nome de usuário).

    
por 28.10.2011 / 03:16
1

Tecnicamente, esse atraso deliberado é para evitar ataques como o "ataque de linearização" (há outros ataques e motivos também) .

To illustrate the attack, consider a program (without this deliberate delay), which checks an entered serial to see whether it matches the correct serial, which in this case happens to be "xyba". For efficiency, the programmer decided to check one character at a time and to exit as soon as an incorrect character is found, before beginning the lengths are also checked.

The correct serial length will take longer to process than an incorrect serial length. Even better (for attacker), a serial number that has the first character correct will take longer than any that has an incorrect first character. The successive steps in waiting time is because each time there's one more loop, comparison to go through on correct input.

  • So, attacker can select a four-character string and that the string beginning with x takes the most time. (by guess work)
  • Attacker can then fix character as x and vary the second character, in which case they will find that y takes the longest.
  • Attacker can then fix the first two characters as xy and vary the third character, in which case they will find that b takes the longest.
  • Attacker can then fix the first three character as xyb and vary the fourth character,in which case they will find that a takes the longest.

Hence, the attackers can recover the serial one character at a time.

Linearization.java.

Linearization.docx, exemplo de saída

The serial number is four characters long ans each character has 128 possible values. Then there are 1284 = 228 = 268,435,456 possible serials. If attacker must randomly guess complete serial numbers, she would guess the serial number in about 227 = 134,217,728 tries, which is an enormous amount of work. On the other hand, by using the linearization attack above, an average of only 128/2 = 64 guesses are required for each letter, for a total expected work of about 4 * 64 = 28 = 256 guesses, which is a trivial amount of work.

Muito do escrito marcial é adaptado de isto (tirado de" Segurança da Informação: Princípios e Prática "de Mark Stamp). Além disso, os cálculos acima não levam em conta a quantidade de adivinhação necessária para descobrir o comprimento serial correto.

    
por 21.05.2015 / 09:20