Vulnerabilities > CVE-2009-0158 - Improper Restriction of Operations Within the Bounds of A Memory Buffer vulnerability in Apple mac OS X and mac OS X Server

047910
CVSS 6.8 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
apple
CWE-119
nessus

Summary

Stack-based buffer overflow in telnet in Apple Mac OS X 10.4.11 and 10.5 before 10.5.7 allows remote attackers to execute arbitrary code or cause a denial of service (application crash) via a long hostname for a telnet server.

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.

Nessus

  • NASL familyMacOS X Local Security Checks
    NASL idMACOSX_10_5_7.NASL
    descriptionThe remote host is running a version of Mac OS X 10.5.x that is prior to 10.5.7. Mac OS X 10.5.7 contains security fixes for the following products : - Apache - ATS - BIND - CFNetwork - CoreGraphics - Cscope - CUPS - Disk Images - enscript - Flash Player plug-in - Help Viewer - iChat - International Components for Unicode - IPSec - Kerberos - Kernel - Launch Services - libxml - Net-SNMP - Network Time - Networking - OpenSSL - PHP - QuickDraw Manager - ruby - Safari - Spotlight - system_cmds - telnet - Terminal - WebKit - X11
    last seen2020-06-01
    modified2020-06-02
    plugin id38744
    published2009-05-13
    reporterThis script is Copyright (C) 2009-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/38744
    titleMac OS X 10.5.x < 10.5.7 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    if (!defined_func("bn_random")) exit(0);
    if (NASL_LEVEL < 3004) exit(0);
    
    include("compat.inc");
    
    if (description)
    {
      script_id(38744);
      script_version("1.32");
      script_cvs_date("Date: 2018/07/14  1:59:35");
    
      script_cve_id("CVE-2004-1184", "CVE-2004-1185", "CVE-2004-1186", "CVE-2008-0456", "CVE-2008-1382",
                    "CVE-2008-1517", "CVE-2008-2371", "CVE-2008-2383", "CVE-2008-2665", "CVE-2008-2666",
                    "CVE-2008-2829", "CVE-2008-2939", "CVE-2008-3443", "CVE-2008-3529", "CVE-2008-3530",
                    "CVE-2008-3651", "CVE-2008-3652", "CVE-2008-3655", "CVE-2008-3656", "CVE-2008-3657",
                    "CVE-2008-3658", "CVE-2008-3659", "CVE-2008-3660", "CVE-2008-3790", "CVE-2008-3863",
                    "CVE-2008-4309", "CVE-2008-5077", "CVE-2008-5557", "CVE-2009-0010", "CVE-2009-0021",
                    "CVE-2009-0025", "CVE-2009-0040", "CVE-2009-0114", "CVE-2009-0144", "CVE-2009-0145",
                    "CVE-2009-0146", "CVE-2009-0147", "CVE-2009-0148", "CVE-2009-0149", "CVE-2009-0150",
                    "CVE-2009-0152", "CVE-2009-0153", "CVE-2009-0154", "CVE-2009-0155", "CVE-2009-0156",
                    "CVE-2009-0157", "CVE-2009-0158", "CVE-2009-0159", "CVE-2009-0160", "CVE-2009-0161",
                    "CVE-2009-0162", "CVE-2009-0164", "CVE-2009-0165", "CVE-2009-0519", "CVE-2009-0520",
                    "CVE-2009-0844", "CVE-2009-0845", "CVE-2009-0846", "CVE-2009-0847", "CVE-2009-0942",
                    "CVE-2009-0943", "CVE-2009-0944", "CVE-2009-0945", "CVE-2009-0946", "CVE-2009-1717");
      script_bugtraq_id(27409, 29796, 30087, 30649, 30657, 31612, 32948, 33769, 33890, 34257, 34408,
                        34409, 34481, 34550, 34568, 34665, 34805, 34924, 34932, 34937, 34938, 34939,
                        34941, 34942, 34947, 34948, 34950, 34951, 34952, 34958, 34959, 34962, 34965,
                        34972, 34973, 34974, 35182);
    
      script_name(english:"Mac OS X 10.5.x < 10.5.7 Multiple Vulnerabilities");
      script_summary(english:"Check the version of Mac OS X");
    
      script_set_attribute( attribute:"synopsis", value:
    "The remote host is missing a Mac OS X update that fixes various
    security issues."  );
      script_set_attribute( attribute:"description",  value:
    "The remote host is running a version of Mac OS X 10.5.x that is prior
    to 10.5.7. 
    
    Mac OS X 10.5.7 contains security fixes for the following products :
    
      - Apache
      - ATS
      - BIND
      - CFNetwork
      - CoreGraphics
      - Cscope
      - CUPS
      - Disk Images
      - enscript
      - Flash Player plug-in
      - Help Viewer
      - iChat
      - International Components for Unicode
      - IPSec
      - Kerberos
      - Kernel
      - Launch Services
      - libxml
      - Net-SNMP
      - Network Time
      - Networking
      - OpenSSL
      - PHP
      - QuickDraw Manager
      - ruby
      - Safari
      - Spotlight
      - system_cmds
      - telnet
      - Terminal
      - WebKit
      - X11"  );
      script_set_attribute(
        attribute:"see_also", 
        value:"http://support.apple.com/kb/HT3549"
      );
      script_set_attribute(
        attribute:"see_also", 
        value:"http://lists.apple.com/archives/security-announce/2009/May/msg00002.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Upgrade to Mac OS X 10.5.7 or later."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_cwe_id(16, 20, 22, 79, 94, 119, 189, 200, 264, 287, 399);
      script_set_attribute(attribute:"plugin_publication_date", value: "2009/05/13");
      script_set_attribute(attribute:"vuln_publication_date", value: "2005/01/21");
      script_set_attribute(attribute:"patch_publication_date", value: "2009/05/12");
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:apple:mac_os_x");
      script_end_attributes();
     
      script_category(ACT_GATHER_INFO);
      script_family(english:"MacOS X Local Security Checks");
     
      script_copyright(english:"This script is Copyright (C) 2009-2018 Tenable Network Security, Inc.");
     
      script_dependencies("ssh_get_info.nasl", "os_fingerprint.nasl");
    
     exit(0);
    }
    
    
    os = get_kb_item("Host/MacOSX/Version");
    if (!os) os = get_kb_item("Host/OS");
    if (!os) exit(0);
    
    if (ereg(pattern:"Mac OS X 10\.5\.[0-6]([^0-9]|$)", string:os)) 
      security_hole(0);
    
  • NASL familyMacOS X Local Security Checks
    NASL idMACOSX_SECUPD2009-002.NASL
    descriptionThe remote host is running a version of Mac OS X 10.4 that does not have Security Update 2009-002 applied. This security update contains fixes for the following products : - Apache - ATS - BIND - CoreGraphics - Cscope - CUPS - Disk Images - enscript - Flash Player plug-in - Help Viewer - IPSec - Kerberos - Launch Services - libxml - Net-SNMP - Network Time - OpenSSL - QuickDraw Manager - Spotlight - system_cmds - telnet - Terminal - X11
    last seen2020-06-01
    modified2020-06-02
    plugin id38743
    published2009-05-13
    reporterThis script is Copyright (C) 2009-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/38743
    titleMac OS X Multiple Vulnerabilities (Security Update 2009-002)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    if (!defined_func("bn_random")) exit(0);
    if (NASL_LEVEL < 3004) exit(0);
    
    include("compat.inc");
    
    if (description)
    {
      script_id(38743);
      script_version("1.24");
    
      script_cve_id("CVE-2004-1184", "CVE-2004-1185", "CVE-2004-1186", "CVE-2006-0747", "CVE-2007-2754",
                    "CVE-2008-2939", "CVE-2008-3529", "CVE-2008-3651", "CVE-2008-3652", "CVE-2008-3790",
                    "CVE-2008-3863", "CVE-2008-4309", "CVE-2008-5077", "CVE-2009-0010", "CVE-2009-0021",
                    "CVE-2009-0025", "CVE-2009-0114", "CVE-2009-0145", "CVE-2009-0146", "CVE-2009-0147",
                    "CVE-2009-0148", "CVE-2009-0149", "CVE-2009-0154", "CVE-2009-0156", "CVE-2009-0158",
                    "CVE-2009-0159", "CVE-2009-0160", "CVE-2009-0164", "CVE-2009-0165", "CVE-2009-0519",
                    "CVE-2009-0520", "CVE-2009-0846", "CVE-2009-0847", "CVE-2009-0942", "CVE-2009-0943",
                    "CVE-2009-0944", "CVE-2009-0946");
      script_bugtraq_id(30087, 30657, 33890, 34408, 34409, 34481, 34550, 34568, 34665, 34805,
                        34932, 34937, 34938, 34939, 34941, 34942, 34947, 34948, 34950, 34952, 34962);
    
      script_name(english:"Mac OS X Multiple Vulnerabilities (Security Update 2009-002)");
      script_summary(english:"Check for the presence of Security Update 2009-002");
    
      script_set_attribute(  attribute:"synopsis",  value:
    "The remote host is missing a Mac OS X update that fixes various
    security issues."  );
      script_set_attribute(  attribute:"description",   value:
    "The remote host is running a version of Mac OS X 10.4 that does not
    have Security Update 2009-002 applied.
    
    This security update contains fixes for the following products :
    
      - Apache
      - ATS
      - BIND
      - CoreGraphics
      - Cscope
      - CUPS
      - Disk Images
      - enscript
      - Flash Player plug-in
      - Help Viewer
      - IPSec
      - Kerberos
      - Launch Services
      - libxml
      - Net-SNMP
      - Network Time
      - OpenSSL
      - QuickDraw Manager
      - Spotlight
      - system_cmds
      - telnet
      - Terminal
      - X11"  );
      script_set_attribute(
        attribute:"see_also", 
        value:"http://support.apple.com/kb/HT3549"
      );
      script_set_attribute(
        attribute:"see_also", 
        value:"http://lists.apple.com/archives/security-announce/2009/May/msg00002.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Install Security Update 2009-002 or later."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_cwe_id(20, 79, 94, 119, 189, 200, 287, 399);
     script_set_attribute(attribute:"plugin_publication_date", value: "2009/05/13");
     script_set_attribute(attribute:"vuln_publication_date", value: "2005/01/21");
     script_set_attribute(attribute:"patch_publication_date", value: "2009/05/12");
     script_cvs_date("Date: 2018/07/14  1:59:35");
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:apple:mac_os_x");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"MacOS X Local Security Checks");
      script_copyright(english:"This script is Copyright (C) 2009-2018 Tenable Network Security, Inc.");
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/MacOSX/packages", "Host/uname");
      exit(0);
    }
    
    #
    
    uname = get_kb_item("Host/uname");
    if (!uname) exit(0);
    
    if (egrep(pattern:"Darwin.* (8\.[0-9]\.|8\.1[01]\.)", string:uname))
    {
      packages = get_kb_item("Host/MacOSX/packages");
      if (!packages) exit(0);
    
      if (!egrep(pattern:"^SecUpd(Srvr)?(2009-00[2-5]|20[1-9][0-9]-)", string:packages))
        security_hole(0);
    }