locked
How decoding the WEP/WPA Key when retrieving WiFI Informations with the Wi-Fi Configuration Service provider RRS feed

  • Question

  • Hello,

     

    I write an application in c# in order to get all the wifi settings on a provxml file, in order to be able to reload this provxml file after a flash or a memory format.

     

    Here is my code :

    XmlDocument configDoc = new XmlDocument();
       configDoc.LoadXml("<wap-provisioningdoc><characteristic-query type=\"Wi-Fi\" recursive=\"true\"/></wap-provisioningdoc>");
       XmlDocument output = ConfigurationManager.ProcessConfiguration(configDoc, true);
       output.Save("\\output.provxml");
    

    This code retrieved all the wifi settings and create an output.provxml file :

    <wap-provisioningdoc>
     <characteristic type="Wi-Fi" recursive="true">
     <characteristic type="access-point">
      <characteristic type="ai-vitry" broadcast="0" preferred="-1" connecting="0" connected="0">
      <parm name="DestId" options="Internet{436EF144-B4FB-4863-A041-8F905A62C572}Bureau{A1182988-0D73-439E-87AD-2A5B369F808B}" value="{436EF144-B4FB-4863-A041-8F905A62C572}" />
      <parm name="AdHoc" value="0" />
      <parm name="Hidden" value="0" />
      <parm name="Authentication" options="Ouvert0Partagé1WPA3WPA-PSK4WPA26WPA2-PSK7" value="0" />
      <parm name="Encryption" options="Désactivé1WEP0TKIP4AES6" value="0" />
      <parm name="KeyProvided" value="0" />
      <parm name="NetworkKey" value="****************" />
      <parm name="KeyIndex" value="1" />
      <parm name="Use8021x" value="0" />
      <parm name="EAPType" options="Carte à puce ou certificat13PEAP25" value="25" />
      </characteristic>
      <characteristic type="H2reseaux" broadcast="0" preferred="-1" connecting="0" connected="0">
      <parm name="DestId" options="Internet{436EF144-B4FB-4863-A041-8F905A62C572}Bureau{A1182988-0D73-439E-87AD-2A5B369F808B}" value="{436EF144-B4FB-4863-A041-8F905A62C572}" />
      <parm name="AdHoc" value="0" />
      <parm name="Hidden" value="0" />
      <parm name="Authentication" options="Ouvert0Partagé1WPA3WPA-PSK4WPA26WPA2-PSK7" value="0" />
      <parm name="Encryption" options="Désactivé1WEP0TKIP4AES6" value="0" />
      <parm name="KeyProvided" value="0" />
      <parm name="NetworkKey" value="****************" />
      <parm name="KeyIndex" value="1" />
      <parm name="Use8021x" value="0" />
      <parm name="EAPType" options="Carte à puce ou certificat13PEAP25" value="25" />
      </characteristic>
     </characteristic>
     <characteristic type="ad-hoc" />
     <parm name="Filter" value="1" />
     <parm name="NotificationState" value="0" />
     <parm name="WifiTimeout" value="0" />
     </characteristic>
    </wap-provisioningdoc>
    

    My problem is that the "NetworkKey" are encoding. How decoding this in order to be able to reload this file with the provisioning ?

     

    Thanks a lot,

     

    Regards,

     

    Nixeus

    Tuesday, December 7, 2010 8:19 AM

All replies

  • Anyone have a little help for this :( ?

     

    Thanks a lot,

     

    regards,

     

    Nixeus

    Wednesday, December 8, 2010 12:50 PM
  •  

    Hi Nixeus,

     

    Welcome to the  MSDN forum, I'm Jesse and I will do my best to resolve your problem as soon as possible.

     

    I think decoding it maybe impossible, if your program it can be decoded and other people also can do it, so encoding will be useless.

     

    I think we should require custom put password again when machine backup.

     

    Best regards,

    Jesse


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, December 9, 2010 10:05 AM
  • Hi Jesse,

     

    Thanks a lot for your answer.

    I'm sad that there is no solution :(

    Is there a way to have a right answer from the Microsoft support ?

     

    Thanks a lot,

    Regards,

     

    Nixeus

     

    Thursday, December 9, 2010 10:47 AM
  • I haven't actually tried this method or use a provxml file before, but assuming you're using the Microsoft Zero Config supplicant, you can try decrypting it by doing the reverse of the encryption process described in the code posted here: http://social.msdn.microsoft.com/Forums/en-US/netfxcompact/thread/a6e784fc-21c0-4771-8082-3f00c2960f34/ That code XOR's the key against an array of chFakeKey[] material.

    Unless, of course, the provxml file actually does contain "***********" for the key.

    It may not work, but it's quick & easy and may be worth a shot.

    -PaulH

    Thursday, December 9, 2010 2:37 PM
  • Thanks for your answer,

     

    I don't think that i can make with it :-(

    Thursday, December 9, 2010 3:40 PM
  • Hello my friends,

     

    I have continue to investigate about retrieving or restoring wifi configuration with WEP or WPA Keys.

     

    Did you think thaht there is possibility to save wep and wpa keys with setting this reg key :

     

     [HKEY_LOCAL_MACHINE\Init\BootVars] "MasterKeysInRegistry"=dword:1

     

    I have find an old link here :

     

    http://www.pocketpcjunkies.com/Uwe/Forum.aspx/wince-vc/1025/Configure-WiFi-by-a-soft

     

    Is there any way to contact directy Microsoft in order to having information ? It's very important for me.

     

     

     

    Thanks a lot for your help,

     

     

     

    regards,

     

     

     

    Nixeus

    Monday, January 17, 2011 6:56 PM
  • You can contact microsoft for assistance at http://msdn.microsoft.com/en-us/aa570318

    There are two links at the bottom:

     

    -PaulH

    Wednesday, January 19, 2011 4:32 PM