Results 1 to 9 of 9

Thread: Windows XP REG_BINARY registry key scripted editing?

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

    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,105

    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,105

    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,105

    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,105

    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,105

    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...

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 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, 05:53:11 PM
  2. Windows XP may get another reprieve
    By MIR in forum The Lounge
    Replies: 2
    Last Post: 03-25-2008, 05: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, 12:48:37 PM
  4. MS Windows Q.
    By SharkMe in forum The Lounge
    Replies: 4
    Last Post: 07-23-2004, 03:06:08 AM
Collapse this box.

Visitors found this page by searching for:

edit reg_binary

autoit reg_binary

binary autoit registry

modify reg_binary

export reg_binaryAutoIt hex to regeditautoit binary regadd registry reg_binary keyautoit HKEY_LOCAL_MACHINESOFTWAREMicrosoftOle#autoit read REG_BINARY valuehow to edit reg_binary registry keyregedit reg binary add reg bianry hex value to registry vbxp date code registryregistry reg_binary search replaceimport registry key with vbsedit REG_BINARY hexautoit reg 0fexport reg_binary vbscriptReg replace REG_BINARYedit reg_binary vbscriptvbscript to read registry reg_binary valuevbs set registry binary keyhow to make a date a reg binary value for windowsorca registry hex typemodify a REG_BINARY key windows xpmodify reg_binary valueautoit edit registry binaryorca reg_binaryorca registry hexreg_binary voor windows xpedit reg_binary change vbscriptreg REG_BINARYedit registry reg_binaryread hexadecimal registry values using autoitreg_binary vbscriptchange reg_binary valuereg export reg_binaryexport reg_binary to vbscriptautoit hex REG_BINARYcommand line tool reg binary readwindows 7 vbscript regwrite edit binary registry keyreg_binary windows xp reg_binary windows xp originalreg_binary import from filevbs reg_binary compareorca add reg_binary valueAutoIT HEX in reg_binaryautoit change hex in registryautoit regedit hexautoit hexregistry orca reg_binaryautoit regbinaryorca binary registryvbscript regwrite regbinaryhow to update reg_binary modify registry reg_binary in vbsautoit binary regidtrykeykey reg_binary do windows xp

Posting Permissions

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