+ Reply to Thread
Results 1 to 9 of 9

Thread: Windows XP REG_BINARY registry key scripted editing?

  1. #1
    Join Date
    Jul 1999
    Posts
    7,089

    Default Windows XP REG_BINARY registry key scripted editing?

    I'm toying with increasing simplification of an almost automated solution I've put together at work (way above and beyond, absolutely not called for, and not really required, but I think it would be cool to accomplish), involving a secure wireless software client application. I've pre-configured the MSI (installer package) to automatically store correct license and key values, settings, etc, using Orca (Microsoft's awesome MSI editor), scripted starting and setting to Automatic the Wireless Zero Configuration service in batch, and automated adding of the SSIDs and keys using an obscure command-line app for just such tasks made by Aruba, but one of my last endeavors has me temporarily stumped.

    After the installer has completed, there is a setting whose default is not that which we desire. Therefore, you must open the application, click over to another tab, hit a button, check a box, and hit another button to save that modified setting. Not too bad, but I'm trying to develop a completely automated (unattended) install, so I can blast it out silently to a number of systems after hours.

    Now, my first thought was, "That setting must either be stored in a file, or the registry", so I set out comparing the system's files and registry before and after, and isolated the two registry keys that controlled this setting. They were both REG_BINARY keys, containing about a thousand bytes of data each (in raw hex, as such: 00,0F,6A,34,33,). So, I simply exported a copy of each key (after the setting had been changed) to a .reg file, unchecked the box, saved the setting change, and ran (re-imported, by double-clicking) the .reg files. This accomplished the task (it checked the box for me and the setting was changed), but then I tried it on another system, and it checked the box, but the system failed authentication. Upon closer examination, it turned out that this REG_BINARY key's value controlled not only that setting, but about twenty other settings, and also contained a system-specific authentication key that was generated during installation.

    Hence the conundrum. I will need to modify SOME bytes of the REG_BINARY value, and not others. I performed a comparison between these keys before and after, using WinMerge, and isolated the differences (hence, the pieces I'll need to change, which shouldn't affect the auth key or other settings), but there doesn't seem to be a simple solution for editing a REG_BINARY value. I thought perhaps I could export both keys, and perform a command-line search+replace, then import both modified keys, but every app I tried that claimed to do that failed (most because they didn't support binary files, some for reasons unknown, and they don't have adequate documentation). I looked into VBScripting the solution, but VBScript's REGWRITE command can only write two bytes of data to a REG_BINARY, per Microsoft (wtf?).

    I suppose I could write a program to parse the binary data in the reg exports, but I'd imagine that to be a real bitch, and it's not like I'm adept at reading and patching binary files in any language.

    Does anyone have any idea as to a good method of doing what I'm getting at? I won't be disappointed if no one does, but it would be interesting to hear a solution, nonetheless. If nothing else, it's interesting that there isn't a simple way to automate this, and if there currently isn't, and I or anyone else develops a solution, it should be shared, so others can benefit. I've seen quite a few other people asking about the same thing on various forums, with no decent responses.
    I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

  2. #2
    Join Date
    Jul 1999
    Posts
    7,089

    Default

    I've found a command-line app (Hexalter) that will allow me to automate hex-editing of binaries in the format app.exe [file] offset value (actually, I can edit multiple values at once). This will allow me, albeit somewhat tediously, to batch script a byte-patching of the exported registry keys, before re-importing them, which should solve the problem.
    I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

  3. #3
    Join Date
    Feb 2007
    Location
    Working on making a Miniature supercomputer by 1980's standards
    Posts
    1,884

    Default

    This sounds dangerous! :S

    [20:49] Akfek: Say Ah
    [20:49] MIR: Ah shit, it's the feds!
    [20:50] How'd he know that?
    Cant stand the 32 bit and above gaming.
    Gamers for the return of 2d sprite filled games!

  4. #4
    Join Date
    Jul 1999
    Posts
    7,089

    Default

    Nah. The worst it will do is make a broken registry key, which I can easily find and delete if required.
    I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

  5. #5
    Join Date
    Jul 1999
    Posts
    7,089

    Default

    So, it turned out that the entire REG_BINARY key was encrypted, thus defeating any chance I had of automated, CLI hex-editing. However, after speaking with the software developers of this particular system, I now have a much easier solution, involving replication of the options set via software profile manipulation (which causes the app to generate the appropriate key and import it into the registry).

    So, problem solved
    I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

  6. #6

    Default

    A solution I've taken at times when automating the installation and configuration of [very badly written installers and/or] software, was AutoIt 3. AI3 allows scripting GUI interactions, which is useful when the CLI just won't cut it. (Try configuring Microsoft Office 2003 options that are not available in the Custom Installation Wizard without it. I double dog dare you...)

    Needless (?) to say, AI3 can be quite a lifesaver.

  7. #7
    Join Date
    Jul 1999
    Posts
    7,089

    Default

    But it's not just a matter of emulating keyboard actions, is it? I mean, does it have the ability to determine the correct window to interact with?
    I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

  8. #8

    Default

    Yes!

  9. #9
    Join Date
    Jul 1999
    Posts
    7,089

    Default

    Nice. I shall have to take a look at that. Then, I shall have to see if it's DoD approved, and if not, if I can get it DoD approved for specific purposes...
    I may be lazy, but I can...zzzZZZzzzZZZzzzZZZ...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. (psx) chrono cross doppelganger gs code needs editing?
    By itoikenza in forum Last Generation & Retro Hacking
    Replies: 2
    Last Post: 03-13-2011, 06:53:11 PM
  2. Windows XP may get another reprieve
    By MIR in forum The Lounge
    Replies: 2
    Last Post: 03-25-2008, 06:48:01 PM
  3. Editing Deus Ex(A pc game)
    By Chaotic Forces in forum Computer Game Hacking, Mobile Device Game Hacking, & ROM Hacking
    Replies: 0
    Last Post: 09-08-2006, 01:48:37 PM
  4. MS Windows Q.
    By SharkMe in forum The Lounge
    Replies: 4
    Last Post: 07-23-2004, 04:06:08 AM
Collapse this box.

Visitors found this page by searching for:

edit reg_binary

binary autoit registry

autoit reg_binaryorca registry hexmodify a REG_BINARY key windows xpmodify reg_binary valueautoit edit registry binaryexport reg_binaryautoit reg 0fedit REG_BINARY hexorca registry hex typehow to make a date a reg binary value for windowsvbs set registry binary keyhow to edit reg_binary registry keyadd registry reg_binary keyexport reg_binary vbscriptorca reg_binaryAutoIt hex to regeditReg replace REG_BINARYedit reg_binary vbscriptvbscript to read registry reg_binary valueautoit binary regautoit HKEY_LOCAL_MACHINESOFTWAREMicrosoftOle#vbscript regwrite regbinaryorca binary registryautoit regbinaryregistry orca reg_binaryautoit hexautoit regedit hexautoit change hex in registryAutoIT HEX in reg_binaryorca add reg_binary valueedit reg_binary change vbscriptreg_binary voor windows xpimport registry key with vbsregistry reg_binary search replacexp date code registryadd reg bianry hex value to registry vbregedit reg binary autoit read REG_BINARY valuehow to update reg_binary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts