Search code examples
testingregistry

Confused about WinHttpSettings


I'm currently working on some testing requiring me to look at the WinHttpSettings value in the Windows registry under 'Hkey_local_machine/software/microsoft/currentversion/internetsettings/connections'

Could someone explain (or point me to an explanation) of what the values in this field actually mean?

For example, one machine I have has '24 00 00 00 00 00 00 01 ...<lots more 00>'

Another has '18 00 00 00 00 00 00 01 ...'

I'm unable to find an explanation of the difference between the 24 and the 18.

Understanding the differences here would help me immensely.

Any help greatly appreciated.

edit

I did find this, https://stackoverflow.com/questions/4283027/whats-the-format-of-the-defaultconnectionsettings-value-in-the-windows-registry

However I'm still confused as to the first value (in my case 18 or 24)

Solution

  • If you've peeked into the Windows registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections, you might have stumbled upon the enigmatic WinHttpSettings value. It's a binary blob that holds the keys (or rather, bytes) to your system's WinHTTP proxy settings.

    What's Inside? It's Complicated... The exact format of this value is not officially documented by Microsoft, which can make deciphering it feel like you're cracking a secret code. But fear not, fellow internet adventurer! Here's what we generally know:

    Length: The first few bytes usually tell you the total length of the value. This is why you might see variations like 24 00 00 00 or 18 00 00 00 at the beginning.

    Flags: A mix of cryptic flags follows, indicating things like whether a proxy is enabled, if it's manual or automatic, etc. Unfortunately, the meaning of these flags is often shrouded in mystery.

    Proxy Server(s): The rest of the value typically contains the proxy server address(es) and port(s) in plain text (ASCII). You might be able to spot some familiar characters here!

    Why the Difference? (24 vs. 18) If you're seeing different lengths (like 24 vs. 18), it simply means there's a variation in the amount of data stored in the value.

    This could be due to:

    Proxy Address Length: A longer server address or multiple proxy servers listed.

    Flag Settings: Different combinations of configuration flags being used.

    Extra Stuff: There might be additional, undocumented settings hidden in there.

    How Can I Decipher It? It's tricky to directly translate those hex bytes without the secret decoder ring (aka, official documentation). But here are some resources that might offer clues:

    This thread delves into some reverse engineering of the value: to change WinHttpSettings registry value

    This blog post offers additional insights into WinHttpSettings: https://dandini.wordpress.com/2021/09/22/group-policy-preferences-and-reg_binary-woes/

    This one explores Windows proxy settings and the registry in general: https://igorpuhalo.wordpress.com/2022/07/15/windows-proxy-settings-ultimate-guide-part-ii-configuring-proxy-settings/

    If you really need to decode the value yourself, try examining the raw bytes for recognizable characters, experimenting with known proxy settings, or searching for community-developed tools that might be able to help.