Vulnerabilities > CVE-2007-5664 - Link Following vulnerability in IBM DB2 Universal Database 8/9.1/9.5

047910
CVSS 6.9 - MEDIUM
Attack vector
LOCAL
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE

Summary

db2dasrrm in the DB2 Administration Server (DAS) in IBM DB2 Universal Database 9.5 before Fix Pack 1, 9.1 before Fix Pack 4a, and 8 before FixPak 16 allows local users to overwrite arbitrary files via a symlink attack on files used for initialization.

Vulnerable Configurations

Part Description Count
Application
Ibm
3

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Symlink Attack
    An attacker positions a symbolic link in such a manner that the targeted user or application accesses the link's endpoint, assuming that it is accessing a file with the link's name. The endpoint file may be either output or input. If the file is output, the result is that the endpoint is modified, instead of a file at the intended location. Modifications to the endpoint file may include appending, overwriting, corrupting, changing permissions, or other modifications. In some variants of this attack the attacker may be able to control the change to a file while in other cases they cannot. The former is especially damaging since the attacker may be able to grant themselves increased privileges or insert false information, but the latter can also be damaging as it can expose sensitive information or corrupt or destroy vital system or application files. Alternatively, the endpoint file may serve as input to the targeted application. This can be used to feed malformed input into the target or to cause the target to process different information, possibly allowing the attacker to control the actions of the target or to cause the target to expose information to the attacker. Moreover, the actions taken on the endpoint file are undertaken with the permissions of the targeted user or application, which may exceed the permissions that the attacker would normally have.
  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Manipulating Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 27870 CVE(CAN) ID: CVE-2007-5758,CVE-2007-5664 IBM DB2是一个大型的商业关系数据库系统,面向电子商务、商业资讯、内容管理、客户关系管理等应用,可运行于AIX、HP-UX、Linux、Solaris、Windows等系统。 DB2数据库所捆绑的db2dasrrm程序没有充分地验证用户所提供的DASPROF环境变量内容的长度,如果攻击者将该变量设置为特制的字符串的话,就可以在将该字符串拷贝到栈上静态大小缓冲区时触发溢出,导致覆盖栈上所存储的执行控制结构并执行任意指令。如果要利用这个漏洞,攻击者必须能够执行有漏洞的set-uid root db2dasrrm程序。 db2dasrrm程序没有安全的访问文件。当用户启动DAS时,以root权限启动了db2dasrrm进程,在初始化过程中以root用户权限创建了dasRecoveryIndex、dasRecoveryIndex.tmp、dasRecoveryIndex.lock和dasRecoveryIndex.cor文件。如果删除了这些文件并重新创建作为符号链接,攻击者便可能以root用户权限创建任意文件。如果要利用这个漏洞,攻击者必须能够访问允许启动和停止DB2管理服务器的帐号,如dasusr1帐号或可访问db2adm1组的帐号。 IBM DB2 Universal Database 9.1 FixPak 4 IBM DB2 Universal Database 9.1 Fixpak 3 临时解决方法: * 对DB2例程目录使用更严格的权限设置以防止非例程用户访问set-uid root二进制程序。 * 删除DB2所捆绑所有程序的set-uid位。 厂商补丁: IBM --- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: <a href=http://www-1.ibm.com/support/docview.wss?uid=swg21256235 target=_blank>http://www-1.ibm.com/support/docview.wss?uid=swg21256235</a> <a href=http://www-1.ibm.com/support/docview.wss?uid=swg21255572 target=_blank>http://www-1.ibm.com/support/docview.wss?uid=swg21255572</a> <a href=http://www-1.ibm.com/support/docview.wss?uid=swg21287889 target=_blank>http://www-1.ibm.com/support/docview.wss?uid=swg21287889</a>
idSSV:3176
last seen2017-11-19
modified2008-04-17
published2008-04-17
reporterRoot
titleIBM DB2数据库db2dasrrm缓冲区溢出和文件创建漏洞