Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2016-10743: Predictable WPS PIN in hostapd for versions prior to 2016 #103

Open
kcdtv opened this issue Mar 2, 2020 · 0 comments
Open

Comments

@kcdtv
Copy link

kcdtv commented Mar 2, 2020

Hi there! 馃樅
A vulnerability has been published today and it could be used to create of a new pixiewps mode
It affects devices that use a hostapd version prior to 2016 where /dev/urandom isn't present

It has been discovered that hostapd before version 2.6 wasn't seeding
PRNGs at all.
This vulnerability has been fixed silently around 2016, but never
attributed a CVE
number, leading to many distributions and IoT devices still shipping
this version of
the software. This vulnerability has been given id CVE-2016-10743.
In some configurations, when WPS is enabled and a /dev/urandom device
isn't available,
this leads to WPS PINS being predictable, allowing remote network access
from an attacker.

You will find the entire full disclosure here: Hostapd fails at seeding PRNGS, leading to insufficient entropy
The author of the security report points out this function:

  /* Generate seven random digits for the PIN */

  if (random_get_bytes((unsigned char *) &val, sizeof(val)) < 0) {

   struct os_time now;

   os_get_time(&now);

   val = os_random() ^ now.sec ^ now.usec;

  }

  val %= 10000000;

I don't know C, correct me if i am wrong, but it seems that it is somehow similar to the realtek attack: Time value is used as a fallback system to generate entropy. in this case the value is used to generate "randomly" the 7th first digits.
This function is extracted from wps_common.c
As pointed out by the author, this vulnerability would be more likely to be found on ioT devices then Access Point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant