Execution Flow
1) Explore
[System Locale Information Discovery] The adversary examines system information from various sources such as registry and native API functions and correlates the gathered information to infer the geographical location of the target system
Technique
- Registry Query: Query the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex\Language\Language_Dialect on Windows to obtain system language, Computer\HKEY_CURRENT_USER\Keyboard Layout\Preload to obtain the hexadecimal language IDs of the current user's preloaded keyboard layouts, and Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation to obtain the system timezone configuration
- Native API Requests: Parse the outputs of Windows API functions GetTimeZoneInformation, GetUserDefaultUILanguage, GetSystemDefaultUILanguage, GetKeyboardLayoutList and GetUserDefaultLangID to obtain information about languages, keyboard layouts, and timezones installed on the system or on macOS or Linux systems, query locale to obtain the $LANG environment variable and view keyboard layout information or use timeanddatectl status to show the system clock settings.
- Read Configuration Files: For macOS and Linux-based systems, view the /etc/vconsole.conf file to get information about the keyboard mapping and console font.
Prerequisites
The adversary must have some level of access to the system and have a basic understanding of the operating system in order to query the appropriate sources for relevant information.
Skills Required
The adversary must know how to query various system sources of information respective of the system's operating system to obtain the relevant information.
Resources Required
The adversary requires access to the target's operating system tools to query relevant system information. On windows, registry queries can be conducted with powershell, wmi, or regedit. On Linux or macOS, queries can be performed with through a shell.
Mitigations
To reduce the amount of information gathered, one could disable various geolocation features of the operating system not required for system operation.
Related Weaknesses
CWE-ID |
Weakness Name |
|
Exposure of Sensitive System Information to an Unauthorized Control Sphere The product does not properly prevent sensitive system-level information from being accessed by unauthorized actors who do not have the same level of access to the underlying system as the product does. |
References
REF-727
Language-Specific Registry Entries
https://learn.microsoft.com/en-us/previous-versions/windows/desktop/indexsrv/language-specific-registry-entries REF-728
winnls.h header
https://learn.microsoft.com/en-us/windows/win32/api/winnls/ REF-729
local (1p) - Linux Man Pages
https://www.systutorials.com/docs/linux/man/1p-locale/ REF-730
vconsole.conf
https://www.freedesktop.org/software/systemd/man/vconsole.conf.html REF-731
timedatectl
https://www.freedesktop.org/software/systemd/man/timedatectl.html
Submission
Name |
Organization |
Date |
Date release |
CAPEC Content Team |
The MITRE Corporation |
2022-09-29 +00:00 |
|