Twenty Year Anniversary

Strong Password Generator Biased Randomness

Strong Password Generator Biased Randomness
Posted Apr 13, 2018
Authored by Sean Buckley

Chrome's "Strong Password Generator" extension suffers from a weakness with password generation.

tags | advisory
MD5 | 5e29388124a726e14711a14f4531c0ab

Strong Password Generator Biased Randomness

Change Mirror Download
Hi list!

I am posting my findings here in hopes some may find it interesting, and to
provide yet another example of why not to trust browser extensions blindly.
This is the top chrome web store search result for "password generator".
It has 35,000 users. This was hardly a difficult bug to find, taking
just a few minutes, but I was unable to find it online anywhere else.

https://chrome.google.com/webstore/detail/strong-password-generator/emehklffcaphknhhfhadkjhpfapcbpco

This password generator contains a logic flaw, which results in some
characters appearing more frequently than others in generated passwords.

On 2018-03-27, I reported this issue using the "support" section of
the extension's page on the chrome web store.
On 2018-04-10, I checked back again to discover that the support section for
this extension has been switched off. This extension was last updated over 5
years ago. I have concluded that the developer isn't interested in it anymore.

In fairness, despite this flaw, this password generator is
still probably better than no password generator at all.

------------------------------------------------------------------------------

This line of code is taken from the extension.
The array "keys" stores the characters that generated passwords can contain.
This is how a random character from the keys array is selected:
{
var keyPos = Math.round(Math.random() * (keys.length - 1));
}

Consider generating passwords with the custom character set "ABC".
Math.random()*(keys.length-1) produces a number between 0.0 to 2.0
It shouldn't take long to conclude that a random value between
0.0 and 2.0, when rounded, will produce 1 twice as often as either 0 or 2

Here are some passwords I generated using the character set "ABC":
BBBBBBCACCBCBCCABBCBBBCCCAABBAAABABCCBBCBACBACACBBABBBBBCBBBBCBA
BACBBABBCBBAAABCBABBBCBABCCCBCCBCBAABBBCBCACABABABBBCBBBCCBBABBC
BBBBBABCAAAAABBACCBAAABBACBCBCBBABBBBACBBCBAACBBBCAAACBBACAABAAB
ACBABABABCCBBBBBABBBBBACBCACCABBCBCBCCBCABBACACCBCBBBBCABBBABABC

A appears 64 times, B appears 127 times, and C appears 65 times


Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

November 2018

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    10 Files
  • 2
    Nov 2nd
    15 Files
  • 3
    Nov 3rd
    2 Files
  • 4
    Nov 4th
    2 Files
  • 5
    Nov 5th
    32 Files
  • 6
    Nov 6th
    27 Files
  • 7
    Nov 7th
    8 Files
  • 8
    Nov 8th
    9 Files
  • 9
    Nov 9th
    17 Files
  • 10
    Nov 10th
    2 Files
  • 11
    Nov 11th
    2 Files
  • 12
    Nov 12th
    33 Files
  • 13
    Nov 13th
    29 Files
  • 14
    Nov 14th
    23 Files
  • 15
    Nov 15th
    45 Files
  • 16
    Nov 16th
    11 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2018 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close