Vulnerabilities > CVE-2008-2232 - Permissions, Privileges, and Access Controls vulnerability in Afuse 0.2

047910
CVSS 4.6 - MEDIUM
Attack vector
LOCAL
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
local
low complexity
afuse
CWE-264
nessus

Summary

The expand_template function in afuse.c in afuse 0.2 allows local users to gain privileges via shell metacharacters in a pathname.

Vulnerable Configurations

Part Description Count
Application
Afuse
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • 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.
  • Blue Boxing
    This type of attack against older telephone switches and trunks has been around for decades. A tone is sent by an adversary to impersonate a supervisor signal which has the effect of rerouting or usurping command of the line. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded Telco infrastructure and so are vulnerable to Blue boxing. Blue boxing is a result of failure on the part of the system to enforce strong authorization for administrative functions. While the infrastructure is different than standard current applications like web applications, there are historical lessons to be learned to upgrade the access control for administrative functions.
  • Restful Privilege Elevation
    Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
  • Target Programs with Elevated Privileges
    This attack targets programs running with elevated privileges. The attacker would try to leverage a bug in the running program and get arbitrary code to execute with elevated privileges. For instance an attacker would look for programs that write to the system directories or registry keys (such as HKLM, which stores a number of critical Windows environment variables). These programs are typically running with elevated privileges and have usually not been designed with security in mind. Such programs are excellent exploit targets because they yield lots of power when they break. The malicious user try to execute its code at the same level as a privileged system call.

Nessus

  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-1611.NASL
    descriptionAnders Kaseorg discovered that afuse, an automounting file system in user-space, did not properly escape meta characters in paths. This allowed a local attacker with read access to the filesystem to execute commands as the owner of the filesystem.
    last seen2020-06-01
    modified2020-06-02
    plugin id33527
    published2008-07-17
    reporterThis script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/33527
    titleDebian DSA-1611-1 : afuse - privilege escalation
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Debian Security Advisory DSA-1611. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(33527);
      script_version("1.14");
      script_cvs_date("Date: 2019/08/02 13:32:21");
    
      script_cve_id("CVE-2008-2232");
      script_bugtraq_id(30245);
      script_xref(name:"DSA", value:"1611");
    
      script_name(english:"Debian DSA-1611-1 : afuse - privilege escalation");
      script_summary(english:"Checks dpkg output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Anders Kaseorg discovered that afuse, an automounting file system in
    user-space, did not properly escape meta characters in paths. This
    allowed a local attacker with read access to the filesystem to execute
    commands as the owner of the filesystem."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=490921"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.debian.org/security/2008/dsa-1611"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the afuse (0.1.1-1+etch1) package.
    
    For the stable distribution (etch), this problem has been fixed in
    version 0.1.1-1+etch1."
      );
      script_set_cvss_base_vector("CVSS2#AV:L/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
      script_cwe_id(264);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:afuse");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:4.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2008/07/16");
      script_set_attribute(attribute:"plugin_publication_date", value:"2008/07/17");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"4.0", prefix:"afuse", reference:"0.1.1-1+etch1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2009-8792.NASL
    descriptionFixes CVE-2008-2232: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-2232 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id40676
    published2009-08-24
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/40676
    titleFedora 10 : afuse-0.2-4.fc10 (2009-8792)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2009-8816.NASL
    descriptionFixes CVE-2008-2232: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-2232 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id40684
    published2009-08-24
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/40684
    titleFedora 11 : afuse-0.2-4.fc11 (2009-8816)

Seebug

  • bulletinFamilyexploit
    descriptionBUGTRAQ ID: 30245 CVE(CAN) ID: CVE-2008-2232 Afuse是使用FUSE在用户域实现的自动加载文件系统。 Afuse没有正确地过滤文件名便将其用在了system()调用中。如果能够读访问afuse文件系统的攻击者使用了类似于以下的路径的话: /path/&quot;;arbitrary command;&quot; /path/`arbitrary command` 则从注册为Afuse加载的目录请求上述特制文件就会导致以提升的权限执行任意命令。 Jacob Bower Afuse 0.2 Debian ------ Debian已经为此发布了一个安全公告(DSA-1611-1)以及相应补丁: DSA-1611-1:New afuse packages fix privilege escalation 链接:<a href=http://www.debian.org/security/2008/dsa-1611 target=_blank>http://www.debian.org/security/2008/dsa-1611</a> 补丁下载: Source archives: <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1.diff.gz target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1.diff.gz</a> Size/MD5 checksum: 3699 645246f8f338b76b6d6785fff9997c5a <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1.dsc target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1.dsc</a> Size/MD5 checksum: 657 fe408099626f3bad3bc68d2717df2a9b <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1.orig.tar.gz target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1.orig.tar.gz</a> Size/MD5 checksum: 98171 95cce7d6ed8e984d0ff2d650e6beb167 alpha architecture (DEC Alpha) <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_alpha.deb target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_alpha.deb</a> Size/MD5 checksum: 15476 465baebb172ecda5ed1e7bdd174fddac amd64 architecture (AMD x86_64 (AMD64)) <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_amd64.deb target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_amd64.deb</a> Size/MD5 checksum: 14224 5e5dca72cb191bf0d435f770c62e07f5 arm architecture (ARM) <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_arm.deb target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_arm.deb</a> Size/MD5 checksum: 12448 f39bc75bceec2e8979a514bda07164d6 hppa architecture (HP PA RISC) <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_hppa.deb target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_hppa.deb</a> Size/MD5 checksum: 14602 603022ee85f781d0c8c155936d432484 i386 architecture (Intel ia32) <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_i386.deb target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_i386.deb</a> Size/MD5 checksum: 13086 b422ac9cb737dd1fb7827eb6ea222bba ia64 architecture (Intel ia64) <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_ia64.deb target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_ia64.deb</a> Size/MD5 checksum: 17730 9fc41e69a8df1ddee15831b971ededb1 mips architecture (MIPS (Big Endian)) <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_mips.deb target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_mips.deb</a> Size/MD5 checksum: 14232 69ebaa63e04dd9a16ad8ff5a772dc576 mipsel architecture (MIPS (Little Endian)) <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_mipsel.deb target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_mipsel.deb</a> Size/MD5 checksum: 14282 9dabd8530851c9588c4927f53cf923d2 powerpc architecture (PowerPC) <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_powerpc.deb target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_powerpc.deb</a> Size/MD5 checksum: 13582 c6c86e8600353b4ff4ed66c9608fd7d0 s390 architecture (IBM S/390) <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_s390.deb target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_s390.deb</a> Size/MD5 checksum: 14154 b36cc8bab5a28d13430a18697bb4b85c sparc architecture (Sun SPARC/UltraSPARC) <a href=http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_sparc.deb target=_blank>http://security.debian.org/pool/updates/main/a/afuse/afuse_0.1.1-1+etch1_sparc.deb</a> Size/MD5 checksum: 12562 ff0fd7531cc011d032f74c78ae17ca0e 补丁安装方法: 1. 手工安装补丁包: 首先,使用下面的命令来下载补丁软件: # wget url (url是补丁下载链接地址) 然后,使用下面的命令来安装补丁: # dpkg -i file.deb (file是相应的补丁名) 2. 使用apt-get自动安装补丁包: 首先,使用下面的命令更新内部数据库: # apt-get update 然后,使用下面的命令安装更新软件包: # apt-get upgrade
    idSSV:3686
    last seen2017-11-19
    modified2008-07-21
    published2008-07-21
    reporterRoot
    titleAfuse afuse.c文件Shell命令注入漏洞
  • bulletinFamilyexploit
    descriptionBUGTRAQ ID: 30245 CVE ID:CVE-2008-2232 CNCVE ID:CNCVE-20082232 Afuse是一款类似autofs工具的文件系统自动挂接程序。 Afuse不正确处理命令行参数,本地攻击者可以利用漏洞以高特权执行任意命令。 afuse接收如下形式的命令行: afuse /path -o mount_template=&quot;mount-script %m %r&quot; \ unmount_template=&quot;unmount-script %m %r&quot; %m是挂入点而%r是下个要访问的组件路径名,而程序对元字符缺少过滤,传递恶意的字符串可导致system()以高特权执行任意命令。 Afuse 0.2-2 升级到Afuse 0.2-3: <a href=http://afuse.sourceforge.net/ target=_blank>http://afuse.sourceforge.net/</a>
    idSSV:3670
    last seen2017-11-19
    modified2008-07-17
    published2008-07-17
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-3670
    titleAfuse 'afuse.c' SHELL命令注入漏洞