Adversaries may attempt to gather information about the system language of a victim in order to infer the geographical location of that host. This information may be used to shape follow-on behaviors, including whether the adversary infects the target and/or attempts specific actions. This decision may be employed by malware developers and operators to reduce their risk of attracting the attention of specific law enforcement agencies or prosecution/scrutiny from other entities.[1]
There are various sources of data an adversary could use to infer system language, such as system defaults and keyboard layouts. Specific checks will vary based on the target and/or adversary, but may involve behaviors such as Query Registry and calls to Native API functions.[2]
For example, on a Windows system adversaries may attempt to infer the language of a system by querying the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\Language or parsing the outputs of Windows API functions GetUserDefaultUILanguage, GetSystemDefaultUILanguage, GetKeyboardLayoutList and GetUserDefaultLangID.[3][4][5]
On a macOS or Linux system, adversaries may query locale to retrieve the value of the $LANG environment variable.
| ID | Name | Description |
|---|---|---|
| S0640 | Avaddon |
Avaddon checks for specific keyboard layouts and OS languages to avoid targeting Commonwealth of Independent States (CIS) entities.[6] |
| S0534 | Bazar |
Bazar can perform a check to ensure that the operating system's keyboard and language settings are not set to Russian.[7] |
| G1043 | BlackByte |
BlackByte identified system language settings to determine follow-on execution.[8] |
| S1180 | BlackByte Ransomware |
BlackByte Ransomware identifies the language on the victim system.[9] |
| S0611 | Clop |
Clop has checked the keyboard language using the GetKeyboardLayout() function to avoid installation on Russian-language or other Commonwealth of Independent States-language machines; it will also check the |
| S0625 | Cuba |
Cuba can check if Russian language is installed on the infected machine by using the function |
| S1153 | Cuckoo Stealer |
Cuckoo Stealer can check the systems |
| S0616 | DEATHRANSOM |
Some versions of DEATHRANSOM have performed language ID and keyboard layout checks; if either of these matched Russian, Kazakh, Belarusian, Ukrainian or Tatar DEATHRANSOM would exit.[13] |
| S0547 | DropBook |
DropBook has checked for the presence of Arabic language in the infected machine's settings.[14] |
| S0696 | Flagpro |
Flagpro can check whether the target system is using Japanese, Taiwanese, or English through detection of specific Windows Security and Internet Explorer dialog.[15] |
| S1138 | Gootloader |
Gootloader can determine if a victim's computer is running an operating system with specific language preferences.[16] |
| S0632 | GrimAgent |
GrimAgent has used |
| S0483 | IcedID |
IcedID used the following command to check the country/language of the active console: |
| G0004 | Ke3chang |
Ke3chang has used implants to collect the system language ID of a compromised machine.[19] |
| S1199 | LockBit 2.0 |
LockBit 2.0 can check if a targeted machine is using a set of Eastern European languages and exit without infection if so.[20][21] |
| S1202 | LockBit 3.0 |
LockBit 3.0 will not affect machines with language settings matching a defined exlusion list of mainly Eastern European languages.[22][23] |
| G1026 | Malteiro |
Malteiro will terminate Mispadu's infection process if the language of the victim machine is not Spanish or Portuguese.[24] |
| S0652 | MarkiRAT |
MarkiRAT can use the |
| S0449 | Maze |
Maze has checked the language of the machine with function |
| S0083 | Misdat |
Misdat has attempted to detect if a compromised host had a Japanese keyboard via the Windows API call |
| S1122 | Mispadu |
Mispadu checks and will terminate execution if the compromised system’s language ID is not Spanish or Portuguese.[28][24] |
| S0691 | Neoichor |
Neoichor can identify the system language on a compromised host.[19] |
| C0022 | Operation Dream Job |
During Operation Dream Job, Lazarus Group deployed malware designed not to run on computers set to Korean, Japanese, or Chinese in Windows language preferences.[29] |
| S1228 | PUBLOAD |
PUBLOAD has checked supported languages on the compromised system.[30] |
| S1240 | RedLine Stealer |
RedLine Stealer can retrieve system default language and time zone.[31] |
| S0496 | REvil |
REvil can check the system language using |
| S0446 | Ryuk |
Ryuk has been observed to query the registry key |
| S0085 | S-Type |
S-Type has attempted to determine if a compromised system was using a Japanese keyboard via the |
| S0546 | SharpStage |
SharpStage has been used to target Arabic-speaking users and used code that checks if the compromised machine has the Arabic language installed.[14] |
| S0543 | Spark |
Spark has checked the results of the |
| S1200 | StealBit |
StealBit can determine system location based on the default language setting and will not execute on systems located in former Soviet countries.[34] |
| G1053 | Storm-0501 |
Storm-0501 has identified system language codes on a compromised host to determine if the victim falls under a non-supported language code that is prohibited for targeting, including victims associated with Russia and other Commonwealth of Independent States (CIS) that may draw attention of law enforcement in countries where the ransomware operator or affiliates may reside/operate from.[35][36] |
| S1183 | StrelaStealer |
StrelaStealer variants check system language settings via keyboard layout or similar mechanisms.[37][38] |
| S0242 | SynAck |
SynAck lists all the keyboard layouts installed on the victim’s system using |
| S0658 | XCSSET |
XCSSET uses AppleScript to check the host's language and location with the command |
| S0330 | Zeus Panda |
Zeus Panda queries the system's keyboard mapping to determine the language used on the system. It will terminate execution if it detects LANG_RUSSIAN, LANG_BELARUSIAN, LANG_KAZAK, or LANG_UKRAINIAN.[40] |
This type of attack technique cannot be easily mitigated with preventive controls since it is based on the abuse of system features.
| ID | Name | Analytic ID | Analytic Description |
|---|---|---|---|
| DET0565 | Detection Strategy for System Language Discovery | AN1561 |
Registry access to system language keys (e.g., HKLM\SYSTEM\CurrentControlSet\Control\Nls\Language) or suspicious processes invoking locale-related APIs (e.g., GetUserDefaultUILanguage, GetSystemDefaultUILanguage, GetKeyboardLayoutList). Defender visibility focuses on anomalous or non-standard processes issuing these queries, especially when run by unknown binaries or scripts. |
| AN1562 |
Processes executing commands to query system locale and language settings, such as 'locale', 'echo $LANG', or parsing environment variables. Suspicious activity is indicated by these commands being run by unusual users, automation scripts, or non-administrative processes. |
||
| AN1563 |
Execution of commands to query system locale and language settings, such as 'defaults read -g AppleLocale' or 'systemsetup -gettimezone'. Unusual parent processes or execution contexts of these commands may indicate adversarial discovery. |