This might allow attackers to execute their own programs, access unauthorized data files, or modify configuration in unexpected ways. If the product uses a search path to locate critical resources such as programs, then an attacker could modify that search path to point to a malicious program, which the targeted product would then execute. The problem extends to any type of critical resource that the product trusts.
Some of the most common variants of untrusted search path are:
Scope | Impact | Likelihood |
---|---|---|
Integrity Confidentiality Availability Access Control | Gain Privileges or Assume Identity, Execute Unauthorized Code or Commands Note: There is the potential for arbitrary code execution with privileges of the vulnerable program. | |
Availability | DoS: Crash, Exit, or Restart Note: The program could be redirected to the wrong files, potentially triggering a crash or hang when the targeted file is too large or does not have the expected format. | |
Confidentiality | Read Files or Directories Note: The program could send the output of unauthorized files to the attacker. |
References | Description |
---|---|
CVE-1999-1120 | Application relies on its PATH environment variable to find and execute program. |
CVE-2008-1810 | Database application relies on its PATH environment variable to find and execute program. |
CVE-2007-2027 | Chain: untrusted search path enabling resultant format string by loading malicious internationalization messages. |
CVE-2008-3485 | Untrusted search path using malicious .EXE in Windows environment. |
CVE-2008-2613 | setuid program allows compromise using path that finds and loads a malicious library. |
CVE-2008-1319 | Server allows client to specify the search path, which can be modified to point to a program that the client has uploaded. |
Use monitoring tools that examine the software's process as it interacts with the operating system and the network. This technique is useful in cases when source code is unavailable, if the software was not developed by you, or if you want to verify that the build phase did not introduce any new weaknesses. Examples include debuggers that directly attach to the running process; system-call tracing utilities such as truss (Solaris) and strace (Linux); system activity monitors such as FileMon, RegMon, Process Monitor, and other Sysinternals utilities (Windows); and sniffers and protocol analyzers that monitor network traffic.
Attach the monitor to the process and look for library functions and system calls that suggest when a search path is being used. One pattern is when the program performs multiple accesses of the same file but in different directories, with repeated failures until the proper filename is found. Library calls such as getenv() or their equivalent can be checked to see if any path-related variables are being accessed.
CAPEC-ID | Attack Pattern Name |
---|---|
CAPEC-38 | Leveraging/Manipulating Configuration File Search Paths This pattern of attack sees an adversary load a malicious resource into a program's standard path so that when a known command is executed then the system instead executes the malicious component. The adversary can either modify the search path a program uses, like a PATH variable or classpath, or they can manipulate resources on the path to point to their malicious components. J2EE applications and other component based applications that are built from multiple binaries can have very long list of dependencies to execute. If one of these libraries and/or references is controllable by the attacker then application controls can be circumvented by the attacker. |
Name | Organization | Date | Date release | Version |
---|---|---|---|---|
PLOVER | Draft 3 |
Name | Organization | Date | Comment |
---|---|---|---|
Eric Dalci | Cigital | updated Time_of_Introduction | |
CWE Content Team | MITRE | updated Common_Consequences, Relationships, Taxonomy_Mappings | |
CWE Content Team | MITRE | updated Relationships, Taxonomy_Mappings | |
CWE Content Team | MITRE | updated Applicable_Platforms, Common_Consequences, Demonstrative_Examples, Description, Observed_Examples, Potential_Mitigations, Relationships, Time_of_Introduction | |
CWE Content Team | MITRE | updated Demonstrative_Examples, Potential_Mitigations | |
CWE Content Team | MITRE | updated References | |
CWE Content Team | MITRE | updated References, Relationships | |
CWE Content Team | MITRE | updated Applicable_Platforms | |
CWE Content Team | MITRE | updated Detection_Factors, Potential_Mitigations | |
CWE Content Team | MITRE | updated Description, Relationships | |
CWE Content Team | MITRE | updated Demonstrative_Examples | |
CWE Content Team | MITRE | updated Common_Consequences | |
CWE Content Team | MITRE | updated Relationships, Taxonomy_Mappings | |
CWE Content Team | MITRE | updated Demonstrative_Examples, References | |
CWE Content Team | MITRE | updated Demonstrative_Examples, Detection_Factors, Potential_Mitigations | |
CWE Content Team | MITRE | updated Relationships | |
CWE Content Team | MITRE | updated Demonstrative_Examples, Modes_of_Introduction, References, Relationships, Taxonomy_Mappings | |
CWE Content Team | MITRE | updated Demonstrative_Examples, References, Relationships, Type | |
CWE Content Team | MITRE | updated Related_Attack_Patterns | |
CWE Content Team | MITRE | updated Related_Attack_Patterns, Relationships | |
CWE Content Team | MITRE | updated Relationships | |
CWE Content Team | MITRE | updated References, Relationships | |
CWE Content Team | MITRE | updated Demonstrative_Examples | |
CWE Content Team | MITRE | updated Relationships | |
CWE Content Team | MITRE | updated Research_Gaps | |
CWE Content Team | MITRE | updated Description | |
CWE Content Team | MITRE | updated Detection_Factors, Relationships, Time_of_Introduction | |
CWE Content Team | MITRE | updated Mapping_Notes | |
CWE Content Team | MITRE | updated Demonstrative_Examples |