CWE-426:不受信任的搜索路径
View customized information:
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. 不受信任的搜索路径的一些最常见的变体是:
该表显示了与该弱点相关的弱点和高级类别。这些关系定义为childof,parentof,ementof,并深入了解可能存在于较高和较低抽象水平的类似项目。此外,定义了诸如Peerof和Canalsobe之类的关系,以显示用户可能想要探索的类似弱点。
与观点“研究概念”相关(CWE-1000)
与“软件开发”视图相关(CWE-699)
与“简化已发表漏洞的简化映射”(CWE-1003)相关的视图相关(CWE-1003)
与“建筑概念”(CWE-1008)有关
引言的不同模式提供了有关如何以及何时引入这种弱点的信息。该阶段识别可能发生介绍的生命周期中的一个点,而音符提供了与给定阶段中引言有关的典型情况。
该清单显示了可能出现的弱点的可能区域。这些可能适用于特定的命名语言,操作系统,体系结构,范式,技术或一类此类平台。该平台与给定弱点出现在该实例的频率一起列出。
语言 Class: Not Language-Specific(Undetermined Prevalence) 操作系统 班级:不是特定于操作系统的(Undetermined Prevalence)
该表指定与弱点相关的不同个人后果。该范围确定了违反的应用程序安全区域,而影响描述了如果对手成功利用这一弱点,就会产生负面的技术影响。其可能性提供了有关预期相对于列表中其他后果的特定后果的可能性的信息。例如,可能会利用弱点来实现一定的影响,但很可能会利用它来实现不同的影响。
示例1 该程序旨在执行命令列出限制目录的内容,然后执行其他操作的命令。假设它具有setuid特权运行,以绕过操作系统的权限检查。
(bad code)
示例语言:C
#define dir“/限制/目录”
char cmd [500]; Sprintf(CMD,“ LS -L%480S”,DIR); /*将特权提高到访问DIR所需的特权。*/ Raiseprivileges(...); system(cmd); Dropprivileges(...); ... This code may look harmless at first, since both the directory and the command are set to fixed values that the attacker can't control. The attacker can only see the contents for DIR, which is the intended program behavior. Finally, the programmer is also careful to limit the code that executes with raised privileges. 但是,由于该程序不会修改路径环境变量,因此以下攻击将起作用:
(攻击代码)
示例2 该代码打印所有属于当前用户的运行过程。
(bad code)
示例语言:php
//assume getCurrentUser() returns a username that is guaranteed to be alphanumeric (avoidingCWE-78) $ username = getCurrentuser(); $ command ='PS Aux |格雷普'。$ username; 系统($命令); 如果由未经授权的Web用户调用,它将提供有关基础系统的潜在敏感信息的网页,例如命令行参数(CWE-497)。This program is also potentially vulnerable to a PATH based attack (CWE-426),作为攻击者可能能够创建PS或GREP命令的恶意版本。尽管该程序没有明确提高运行系统命令的特权,但默认情况下,PHP解释器可能比用户更高的特权运行。 示例3 The following code is from a web application that allows users access to an interface through which they can update their password on the system. In this environment, user passwords can be managed using the Network Information System (NIS), which is commonly used on UNIX systems. When performing NIS updates, part of the process for updating passwords is to run a make command in the /var/yp directory. Performing NIS updates requires extra privileges.
(bad code)
示例语言:爪哇
...
system.runtime.getRuntime()。exec(“ make”); ... 这里的问题在于,该程序在执行call to Runtime.exec()之前没有指定制造和清洁其环境的绝对路径。如果攻击者可以修改$路径变量,以指向称为Make的恶意二进制,并导致该程序在其环境中执行,则将加载恶意二进制,而不是预期的。由于应用程序的性质,它具有执行系统操作所需的特权,这意味着攻击者的制造现在将使用这些特权运行,可能使攻击者完全控制系统。
This MemberOf Relationships table shows additional CWE Categories and Views that reference this weakness as a member. This information is often useful in understanding where a weakness fits within the context of external information sources.
提供更多信息 - 请选择其他过滤器。
|
使用共同弱点枚举(CWE)和本网站的相关参考使用条款。CWEis sponsored by the美国国土安全部(DHS)Cybersecurity and Infrastructure Security Agency(CISA),由Homeland Security Systems Engineering and Development Institute(HSSEDI)由manbetx客户端首页(MITER)。版权所有©2006–2023,Miter Comanbetx客户端首页rporation。CWE,CWSS,CWRAF和CWE徽标是Miter Corporation的商标。manbetx客户端首页 |