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

Want To Donate?


Bitcoin: 18PFeCVLwpmaBuQqd5xAYZ8bZdvbyEWMmU

File Archive:

May 2018

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    15 Files
  • 2
    May 2nd
    17 Files
  • 3
    May 3rd
    30 Files
  • 4
    May 4th
    29 Files
  • 5
    May 5th
    2 Files
  • 6
    May 6th
    3 Files
  • 7
    May 7th
    13 Files
  • 8
    May 8th
    27 Files
  • 9
    May 9th
    17 Files
  • 10
    May 10th
    15 Files
  • 11
    May 11th
    8 Files
  • 12
    May 12th
    2 Files
  • 13
    May 13th
    8 Files
  • 14
    May 14th
    7 Files
  • 15
    May 15th
    43 Files
  • 16
    May 16th
    19 Files
  • 17
    May 17th
    16 Files
  • 18
    May 18th
    15 Files
  • 19
    May 19th
    3 Files
  • 20
    May 20th
    7 Files
  • 21
    May 21st
    15 Files
  • 22
    May 22nd
    40 Files
  • 23
    May 23rd
    64 Files
  • 24
    May 24th
    55 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    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