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

_______________________________________________
Sent through the Full Disclosure mailing list
https://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: http://seclists.org/fulldisclosure/

Reply via email to