• XSS.stack #1 – первый литературный журнал от юзеров форума

Question about registry

runtim3

GANDALF THE GOLDEN
КИДАЛА
Регистрация
11.01.2022
Сообщения
226
Реакции
92
Гарант сделки
3
Пожалуйста, обратите внимание, что пользователь заблокирован
Hey all, there is a question about the registry that bothers me. If this is the wrong place to post this please inform me and i will post elsewhere.
Let us assume there is an software called 'X'.
When X is installed it creates keys in registry that are used as configuration data.
Now the question is this. Does the registry serve as a place where configuration data is stored and loaded from directly ? Example if the application wants to use dark-mode is this data stored in registry as 1/0 and the data is read from registry by the application and used, that is are modifications made to registry modified solely in registry and the application(X) reads the data and knows when to initiate dark mode/lightmode by reading from registry OR does a modification to registry reflect a modification to the configuration data file for application X, that is if dark mode is chosen, windows modifies the required file in the applications documents to enforce dark-mode.
OR is this dependent on how the program is written and could be written as either one of the two.
 
Yes, the Windows registry was designed to act as an improvement to configuration files which were much common at the time (and still are on Linux based Operating Systems). Therefore, the application "X" typically will read directly from the registry as application settings are stored there. However, developers are free to store data in any way they'd like - but it is standard practice to store configuration in there. It should be noted that data will typically be stored in HKEY_CURRENT_USER if data is local to the current user and HKEY_CURRENT_MACHINE if the data is shared globally between users. Although, once again, it depends on implementation by the developer. Regardless, HKEY_CURRENT_MACHINE requires administrative privileges.

Application read/write methodology based on "lightmode", or "darkmode", will be entirely dependent on how the developer chose to implement these settings. There is no standard answer to this. However, many Windows applications may store configuration data inside their own binary in .RSRC sections to reflect property changes. This is very common in .NET applications.

.NET resource section for configuration data: https://learn.microsoft.com/en-us/dotnet/core/extensions/create-resource-files
Registry key information: Windows, Sixth Edition, Internals Volume 1, Chapter 4, Page 277 - 281
The Old New Thing - "Why are INI files deprecated in favor of the registry?" November 26, 2007 - https://papers.vx-underground.org/p...files deprecated in favor of the registry.pdf
 
Пожалуйста, обратите внимание, что пользователь заблокирован
Yes, the Windows registry was designed to act as an improvement to configuration files which were much common at the time (and still are on Linux based Operating Systems). Therefore, the application "X" typically will read directly from the registry as application settings are stored there. However, developers are free to store data in any way they'd like - but it is standard practice to store configuration in there. It should be noted that data will typically be stored in HKEY_CURRENT_USER if data is local to the current user and HKEY_CURRENT_MACHINE if the data is shared globally between users. Although, once again, it depends on implementation by the developer. Regardless, HKEY_CURRENT_MACHINE requires administrative privileges.

Application read/write methodology based on "lightmode", or "darkmode", will be entirely dependent on how the developer chose to implement these settings. There is no standard answer to this. However, many Windows applications may store configuration data inside their own binary in .RSRC sections to reflect property changes. This is very common in .NET applications.

.NET resource section for configuration data: https://learn.microsoft.com/en-us/dotnet/core/extensions/create-resource-files
Registry key information: Windows, Sixth Edition, Internals Volume 1, Chapter 4, Page 277 - 281
The Old New Thing - "Why are INI files deprecated in favor of the registry?" November 26, 2007 - https://papers.vx-underground.org/papers/The Old New Thing/The Old New Thing - 2007 11/2007-11-26 - Why are INI files deprecated in favor of the registry.pdf
Thanks mr.smelly appreciate the response ;)
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх