Vulnerabilities > CVE-2006-1148 - Improper Restriction of Operations Within the Bounds of A Memory Buffer vulnerability in Peercast 0.1211/0.1212

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
peercast
CWE-119
nessus
exploit available
metasploit

Summary

Multiple stack-based buffer overflows in the procConnectArgs function in servmgr.cpp in PeerCast before 0.1217 allow remote attackers to execute arbitrary code via an HTTP GET request with a long (1) parameter name or (2) value in a URL, which triggers the overflow in the nextCGIarg function in servhs.cpp.

Vulnerable Configurations

Part Description Count
Application
Peercast
3

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Exploit-Db

  • descriptionPeerCast. CVE-2006-1148. Remote exploit for linux platform
    idEDB-ID:16855
    last seen2016-02-02
    modified2010-09-20
    published2010-09-20
    reportermetasploit
    sourcehttps://www.exploit-db.com/download/16855/
    titlePeerCast <= 0.1216 URL Handling Buffer Overflow linux
  • descriptionPeerCast. CVE-2006-1148. Remote exploit for windows platform
    idEDB-ID:16786
    last seen2016-02-02
    modified2010-09-20
    published2010-09-20
    reportermetasploit
    sourcehttps://www.exploit-db.com/download/16786/
    titlePeerCast <= 0.1216 URL Handling Buffer Overflow Win32
  • descriptionPeerCast. CVE-2006-1148. Remote exploit for linux platform
    idEDB-ID:10027
    last seen2016-02-01
    modified2006-03-08
    published2006-03-08
    reporterMC
    sourcehttps://www.exploit-db.com/download/10027/
    titlePeerCast <= 0.1216

Metasploit

Nessus

  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200603-17.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200603-17 (PeerCast: Buffer overflow) INFIGO discovered a problem in the URL handling code. Buffers that are allocated on the stack can be overflowed inside of nextCGIarg() function. Impact : By sending a specially crafted request to the HTTP server, a remote attacker can cause a stack overflow, resulting in the execution of arbitrary code. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id21124
    published2006-03-23
    reporterThis script is Copyright (C) 2006-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/21124
    titleGLSA-200603-17 : PeerCast: Buffer overflow
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Gentoo Linux Security Advisory GLSA 200603-17.
    #
    # The advisory text is Copyright (C) 2001-2015 Gentoo Foundation, Inc.
    # and licensed under the Creative Commons - Attribution / Share Alike 
    # license. See http://creativecommons.org/licenses/by-sa/3.0/
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(21124);
      script_version("1.15");
      script_cvs_date("Date: 2019/08/02 13:32:43");
    
      script_cve_id("CVE-2006-1148");
      script_xref(name:"GLSA", value:"200603-17");
    
      script_name(english:"GLSA-200603-17 : PeerCast: Buffer overflow");
      script_summary(english:"Checks for updated package(s) in /var/db/pkg");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Gentoo host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The remote host is affected by the vulnerability described in GLSA-200603-17
    (PeerCast: Buffer overflow)
    
        INFIGO discovered a problem in the URL handling code. Buffers that
        are allocated on the stack can be overflowed inside of nextCGIarg()
        function.
      
    Impact :
    
        By sending a specially crafted request to the HTTP server, a
        remote attacker can cause a stack overflow, resulting in the execution
        of arbitrary code.
      
    Workaround :
    
        There is no known workaround at this time."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/200603-17"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All PeerCast users should upgrade to the latest version:
        # emerge --sync
        # emerge --ask --oneshot --verbose '>=media-sound/peercast-0.1217'"
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"exploit_framework_core", value:"true");
      script_set_attribute(attribute:"metasploit_name", value:'PeerCast URL Handling Buffer Overflow');
      script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:peercast");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2006/03/21");
      script_set_attribute(attribute:"plugin_publication_date", value:"2006/03/23");
      script_set_attribute(attribute:"vuln_publication_date", value:"2006/03/09");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2006-2019 Tenable Network Security, Inc.");
      script_family(english:"Gentoo Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Gentoo/release", "Host/Gentoo/qpkg-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("qpkg.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Gentoo/release")) audit(AUDIT_OS_NOT, "Gentoo");
    if (!get_kb_item("Host/Gentoo/qpkg-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (qpkg_check(package:"media-sound/peercast", unaffected:make_list("ge 0.1217"), vulnerable:make_list("lt 0.1217"))) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:qpkg_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = qpkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "PeerCast");
    }
    
  • NASL familyPeer-To-Peer File Sharing
    NASL idPEERCAST_01217.NASL
    descriptionThe version of PeerCast installed on the remote host copies the supplied option string without limit into a finite-size buffer. An unauthenticated attacker can leverage this issue to crash the affected application and possibly to execute arbitrary code on the remote host subject to the privileges of the user running PeerCast.
    last seen2020-06-01
    modified2020-06-02
    plugin id21041
    published2006-03-10
    reporterThis script is Copyright (C) 2006-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/21041
    titlePeerCast procConnectArgs() Function URL Handling Remote Overflow
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    include("compat.inc");
    
    if (description) {
      script_id(21041);
      script_version("1.20");
    
      script_cve_id("CVE-2006-1148");
      script_bugtraq_id(17040);
    
      script_name(english:"PeerCast procConnectArgs() Function URL Handling Remote Overflow");
      script_summary(english:"Checks version of PeerCast web server");
     
     script_set_attribute(attribute:"synopsis", value:
    "The remote web server suffers from a buffer overflow vulnerability." );
     script_set_attribute(attribute:"description", value:
    "The version of PeerCast installed on the remote host copies the
    supplied option string without limit into a finite-size buffer.  An
    unauthenticated attacker can leverage this issue to crash the affected
    application and possibly to execute arbitrary code on the remote host
    subject to the privileges of the user running PeerCast." );
     script_set_attribute(attribute:"see_also", value:"https://www.securityfocus.com/archive/1/427160/30/0/threaded" );
     # http://web.archive.org/web/20070713004957/http://www.peercast.org/forum/viewtopic.php?t=3346
     script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?ed1ade41" );
     script_set_attribute(attribute:"solution", value:
    "Upgrade to PeerCast version 0.1217 or later." );
     script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
     script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
     script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
     script_set_attribute(attribute:"exploit_available", value:"true");
     script_set_attribute(attribute:"exploit_framework_core", value:"true");
     script_set_attribute(attribute:"metasploit_name", value:'PeerCast URL Handling Buffer Overflow');
     script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
    script_set_attribute(attribute:"plugin_publication_date", value: "2006/03/10");
     script_set_attribute(attribute:"vuln_publication_date", value: "2006/03/09");
     script_cvs_date("Date: 2018/11/15 20:50:24");
    script_set_attribute(attribute:"plugin_type", value:"remote");
    script_end_attributes();
    
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Peer-To-Peer File Sharing");
      script_copyright(english:"This script is Copyright (C) 2006-2018 Tenable Network Security, Inc.");
      script_dependencies("peercast_installed.nasl");
      script_require_keys("PeerCast/installed");
      script_require_ports("Services/www", 7144);
    
      exit(0);
    }
    
    
    if (!get_kb_item("PeerCast/installed")) exit(0);
    
    include("global_settings.inc");
    
    list = get_kb_list("PeerCast/*/version");
    if (isnull(list)) exit(0);
    
    foreach key (keys(list))
    {
      port = key - "PeerCast/" - "/version";
      ver = list[key];
    
      if (get_port_state(port))
      {
        # Check the version.
        vuln = FALSE;
    
        if (ver =~ "^[0-9]\.[0-9]+$")
        {
          iver = split(ver, sep:'.', keep:FALSE);
          for (i=0; i<max_index(iver); i++)
            iver[i] = int(iver[i]);
    
          if (iver[0] == 0 && iver[1] < 1218) vuln = TRUE;
        }
        else if (report_paranoia > 1) vuln = TRUE;
    
        if (vuln)
        {
         report = string(
            "According to its Server response header, the version of PeerCast on the\n",
            "remote host is :\n",
            "\n",
            "  ", ver, "\n"
          );
          security_hole(port:port, extra:report);
          break;
        }
      }
    }
    

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/82238/peercast_url.rb.txt
idPACKETSTORM:82238
last seen2016-12-05
published2009-10-27
reporterMC
sourcehttps://packetstormsecurity.com/files/82238/PeerCast-0.1216-Buffer-Overflow.html
titlePeerCast 0.1216 Buffer Overflow