Vulnerabilities > CVE-2008-3844 - Improper Input Validation vulnerability in Openbsd Openssh

047910
CVSS 9.3 - CRITICAL
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
redhat
openbsd
CWE-20
critical
nessus

Summary

Certain Red Hat Enterprise Linux (RHEL) 4 and 5 packages for OpenSSH, as signed in August 2008 using a legitimate Red Hat GPG key, contain an externally introduced modification (Trojan Horse) that allows the package authors to have an unknown impact. NOTE: since the malicious packages were not distributed from any official Red Hat sources, the scope of this issue is restricted to users who may have obtained these packages through unofficial distribution points. As of 20080827, no unofficial distributions of this software are known. This alert is primarily for those who may obtain Red Hat binary packages via channels other than those of official Red Hat subscribers. Packages obtained by Red Hat Enterprise Linux subscribers via Red Hat Network are not at risk. Redhat has provided a shell script which lists the affected packages and can verify that none of them are installed on a system at the following location: https://www.redhat.com/security/data/openssh-blacklist-1.0.sh

Common Weakness Enumeration (CWE)

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.
  • Server Side Include (SSI) Injection
    An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
  • Cross Zone Scripting
    An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
  • Cross Site Scripting through Log Files
    An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.

Nessus

  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2008-0855.NASL
    descriptionUpdated openssh packages are now available for Red Hat Enterprise Linux 4, Red Hat Enterprise Linux 5, and Red Hat Enterprise Linux 4.5 Extended Update Support. This update has been rated as having critical security impact by the Red Hat Security Response Team. OpenSSH is OpenBSD
    last seen2020-06-01
    modified2020-06-02
    plugin id43708
    published2010-01-06
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/43708
    titleCentOS 4 / 5 : openssh (CESA-2008:0855)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2008:0855 and 
    # CentOS Errata and Security Advisory 2008:0855 respectively.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(43708);
      script_version("1.18");
      script_cvs_date("Date: 2019/10/25 13:36:04");
    
      script_cve_id("CVE-2007-4752", "CVE-2008-3844");
      script_bugtraq_id(25628, 30794);
      script_xref(name:"RHSA", value:"2008:0855");
    
      script_name(english:"CentOS 4 / 5 : openssh (CESA-2008:0855)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote CentOS host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated openssh packages are now available for Red Hat Enterprise
    Linux 4, Red Hat Enterprise Linux 5, and Red Hat Enterprise Linux 4.5
    Extended Update Support.
    
    This update has been rated as having critical security impact by the
    Red Hat Security Response Team.
    
    OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
    
    Last week Red Hat detected an intrusion on certain of its computer
    systems and took immediate action. While the investigation into the
    intrusion is on-going, our initial focus was to review and test the
    distribution channel we use with our customers, Red Hat Network (RHN)
    and its associated security measures. Based on these efforts, we
    remain highly confident that our systems and processes prevented the
    intrusion from compromising RHN or the content distributed via RHN and
    accordingly believe that customers who keep their systems updated
    using Red Hat Network are not at risk. We are issuing this alert
    primarily for those who may obtain Red Hat binary packages via
    channels other than those of official Red Hat subscribers.
    
    In connection with the incident, the intruder was able to sign a small
    number of OpenSSH packages relating only to Red Hat Enterprise Linux 4
    (i386 and x86_64 architectures only) and Red Hat Enterprise Linux 5
    (x86_64 architecture only). As a precautionary measure, we are
    releasing an updated version of these packages, and have published a
    list of the tampered packages and how to detect them at
    http://www.redhat.com/security/data/openssh-blacklist.html
    
    To reiterate, our processes and efforts to date indicate that packages
    obtained by Red Hat Enterprise Linux subscribers via Red Hat Network
    are not at risk.
    
    These packages also fix a low severity flaw in the way ssh handles X11
    cookies when creating X11 forwarding connections. When ssh was unable
    to create untrusted cookie, ssh used a trusted cookie instead,
    possibly allowing the administrative user of a untrusted remote
    server, or untrusted application run on the remote server, to gain
    unintended access to a users local X server. (CVE-2007-4752)"
      );
      # https://lists.centos.org/pipermail/centos-announce/2008-August/015193.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?12fb949b"
      );
      # https://lists.centos.org/pipermail/centos-announce/2008-August/015194.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?7935c468"
      );
      # https://lists.centos.org/pipermail/centos-announce/2008-August/015200.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?6eaac443"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected openssh packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
      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(20);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:openssh");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:openssh-askpass");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:openssh-askpass-gnome");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:openssh-clients");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:openssh-server");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:centos:centos:4");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:centos:centos:5");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2007/09/11");
      script_set_attribute(attribute:"patch_publication_date", value:"2008/08/23");
      script_set_attribute(attribute:"plugin_publication_date", value:"2010/01/06");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"CentOS Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/CentOS/release", "Host/CentOS/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/CentOS/release");
    if (isnull(release) || "CentOS" >!< release) audit(AUDIT_OS_NOT, "CentOS");
    os_ver = pregmatch(pattern: "CentOS(?: Linux)? release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "CentOS");
    os_ver = os_ver[1];
    if (! preg(pattern:"^(4|5)([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "CentOS 4.x / 5.x", "CentOS " + os_ver);
    
    if (!get_kb_item("Host/CentOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && "ia64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "CentOS", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"CentOS-4", cpu:"ia64", reference:"openssh-3.9p1-11.c4")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"ia64", reference:"openssh-askpass-3.9p1-11.c4")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"ia64", reference:"openssh-askpass-gnome-3.9p1-11.c4")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"ia64", reference:"openssh-clients-3.9p1-11.c4")) flag++;
    if (rpm_check(release:"CentOS-4", cpu:"ia64", reference:"openssh-server-3.9p1-11.c4")) flag++;
    
    if (rpm_check(release:"CentOS-5", reference:"openssh-4.3p2-26.el5_2.1")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"openssh-askpass-4.3p2-26.el5_2.1")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"openssh-clients-4.3p2-26.el5_2.1")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"openssh-server-4.3p2-26.el5_2.1")) flag++;
    
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_HOLE,
        extra      : rpm_report_get()
      );
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "openssh / openssh-askpass / openssh-askpass-gnome / openssh-clients / etc");
    }
    
  • NASL familyRed Hat Local Security Checks
    NASL idRHEL_COMPROMISED_SSH_PACKAGE.NASL
    descriptionThe remote host contains a compromised version of an OpenSSH-related package installed. Even though this package has been signed with the Red Hat public key, this package is considered malicious, and the remote host should be reinstalled.
    last seen2020-03-18
    modified2008-08-22
    plugin id34030
    published2008-08-22
    reporterThis script is Copyright (C) 2008-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/34030
    titleRemote host has a compromised Red Hat OpenSSH package intalled
    code
    #TRUSTED 8e0fa48f678fed3c6b286c05b1182229a95d093cdfd757ab42706803ed588e0953920f9d0d273a3b61dd100579af0b97ba75dd5b675d518a315d994fe69046b75f2bbf19f99f570cb99226b7ddf0e3a3a43b92e020f8f0661fe48c772648c9a405638873d6a3072648be502a42c0579dc2133a91130d36818a128e1a18a167a3d12caafb2e70ef916ee51351db10aa05448c0ac720de574952400f5720d8040704ea175468cf0f5b2ff56782c62d111dc2b67ba483eb6496f242daedbdfe8911389a7219e803f15baeaf660300eca157c85d2ed16a771339c1c79b7e151b0ed9584fa340e38b7a581a6d1bb2dee5dd8b827762b914ff2cff8c2d9667b794cd37f8085dda9bff4dadeecbe245332e3f7f39d9726d2a4ebd24067cda901330e1d6540da522326a9078d5060d63dfb3f53e3804eeb06569edd9d6380dffdbd0188836d48a3658e7d5297df5038fc77929d05792459b1d47976227f641e4c08e709723c3bcee10117d373d053a5311916426a7c12de1d44e2674ffe36fb9836981cb1fb0c50f124073fd59e90751a1aa22bb41193afeaf680547848cb22f1b2069467b8ce4b9dc1059873e4da5edb18ae652fcd3f8566ca454aca83c4baf9024b62a34e97bf201aa179ea8a24a3223b172b0553ac4c0c9e9c892be719765faa8618c438e74cb99d51db483a25af7705f2880eca4065b069a9ee02531a8752487e445
    #
    # (C) Tenable Network Security, Inc.
    #
    
    if ( NASL_LEVEL < 3000 ) exit(0);
    
    include("compat.inc");
    
    if(description)
    {
     script_id(34030);
     script_version("1.14");
     script_set_attribute(attribute:"plugin_modification_date", value: "2018/07/27");
    
     script_cve_id("CVE-2008-3844");
     script_bugtraq_id(30794);
     script_xref(name:"IAVT", value:"2008-T-0046");
    
     name["english"] = "Remote host has a compromised Red Hat OpenSSH package intalled";
     script_name(english:name["english"]);
     
     script_set_attribute(attribute:"synopsis", value:
    "The remote host has a compromised version of an OpenSSH-related
    package installed." );
     script_set_attribute(attribute:"description", value:
    "The remote host contains a compromised version of an OpenSSH-related
    package installed. 
    
    Even though this package has been signed with the Red Hat public key,
    this package is considered malicious, and the remote host should be
    reinstalled." );
     script_set_attribute(attribute:"see_also", value:"http://www.redhat.com/security/data/openssh-blacklist.html" );
     script_set_attribute(attribute:"solution", value:
    "Reintall the remote host." );
     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: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_set_attribute(attribute:"plugin_publication_date", value: "2008/08/22");
     script_set_attribute(attribute:"plugin_type", value:"remote");
     script_set_attribute(attribute:"agent", value:"unix");
     script_set_attribute(attribute:"stig_severity", value:"II");
     script_end_attributes();
     
     script_summary(english:"Checks for the remote SSH packages");
     
     script_category(ACT_GATHER_INFO);
     
     script_copyright(english:"This script is Copyright (C) 2008-2018 Tenable Network Security, Inc.");
     script_family(english:"Red Hat Local Security Checks");
    
     script_dependencie("ssh_detect.nasl", "ssh_get_info.nasl");
     script_require_ports("Services/ssh", 22);
     exit(0);
    }
    
    include("misc_func.inc");
    include("ssh_func.inc");
    include("telnet_func.inc");
    include("hostlevel_funcs.inc");
    
    
    
    if(sshlib::get_support_level() >= sshlib::SSH_LIB_SUPPORTS_COMMANDS)
      enable_ssh_wrappers();
    else disable_ssh_wrappers();
    
    list = make_list(
    "Host/VMware/rpm-list",
    "Host/RedHat/rpm-list",
    "Host/CentOS/rpm-list",
    "Host/Mandrake/rpm-list",
    "Host/SuSE/rpm-list");
    
    flag = 0;
    
    foreach item ( list ) 
    {
     if ( get_kb_item(item) ) flag ++;
    } 
    
    if ( ! flag ) exit(0);
    
    
    
    if ( islocalhost() )
    {
     info_t = INFO_LOCAL;
    }
    else
    {
     sock_g = ssh_open_connection();
     if ( !sock_g ) exit(0);
     info_t = INFO_SSH;
    }
    
    md5 = make_list(
    "00b6c24146eb6222ec58342841ee31b1",
    "021d1401b2882d864037da406e7b3bd1",
    "035253874639a1ebf3291189f027a561",
    "08daefebf2a511852c88ed788717a148",
    "177b1013dc0692c16e69c5c779b74fcf",
    "24c67508c480e25b2d8b02c75818efad",
    "27ed27c7eac779f43e7d69378a20034f",
    "2a2f907c8d6961cc8bfbc146970c37e2",
    "2b0a85e1211ba739904654a7c64a4c90",
    "2df270976cbbbbb05dbdf95473914241",
    "2ff426e48190519b1710ed23a379bbee",
    "322cddd04ee5b7b8833615d3fbbcf553",
    "35b050b131dab0853f11111b5afca8b3",
    "38f67a6ce63853ad337614dbd760b0db",
    "3b9e24c54dddfd1f54e33c6cdc90f45c",
    "3fa1a1b446feb337fd7f4a7938a6385f",
    "41741fe3c73d919c3758bf78efc437c9",
    "432b94026da05d6b11604a00856a17b2",
    "54bd06ebf5125debe0932b2f1f5f1c39",
    "57f7e73ee28ba0cbbaad1a0a63388e4c",
    "59ad9703362991d8eff9d138351b37ac",
    "71ef43e0d9bfdfada39b4cb778b69959",
    "760040ec4db1d16e878016489703ec6d",
    "89892d38e3ccf667e7de545ea04fa05b",
    "8a65c4e7b8cd7e11b9f05264ed4c377b",
    "8bf3baa4ffec125206c3ff308027a0c4",
    "982cd133ba95f2db580c67b3ff27cfde",
    "990d27b6140d960ad1efd1edd5ec6898",
    "9bef2d9c4c581996129bd9d4b82faafa",
    "9c90432084937eac6da3d5266d284207",
    "a1dea643f8b0bda52e3b6cad3f7c5eb6",
    "b54197ff333a2c21d0ca3a5713300071",
    "b92ccd4cbd68b3d3cefccee3ed9b612c",
    "bb1905f7994937825cb9693ec175d4d5",
    "bc6b8b246be3f3f0a25dd8333ad3456b",
    "c0aff0b45ee7103de53348fcbedaf72e",
    "c7d520faab2673b66a13e58e0346021d",
    "ce97e8c02c146c8b1075aad1550b1554",
    "d19ae2199662e90ec897c8f753816ee0",
    "de61e6e1afd2ca32679ff78a2c3a0767",
    "dfbc24a871599af214cd7ef72e3ef867",
    "f68d010c6e54f3f8a973583339588262",
    "fc814c0e28b674da8afcfbdeecd1e18e"
    );
    
    res = info_send_cmd(cmd:'rpm -q --qf "%{NAME}/%{SIGMD5}\\n" openssh openssh-askpass openssh-askpass-gnome openssh-clients openssh-debuginfo openssh-server');
    if (info_t == INFO_SSH) ssh_close_connection();
    
    if ( ! res ) exit(0);
    report = NULL;
    foreach md (md5) 
    {
     if ( md >< res )
     {
       line = chomp(egrep(pattern:md, string:res));
       split = split(line, sep:'/',keep:0);
       report += 'Package name : ' + split[0]  + '\nPackage MD5 : ' + split[1] + '\n\n';
     }
    }
    
    if ( report )
    {
     security_hole(port:0, extra:'\nThe following packages are vulnerables :\n' + report);
    }
    
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2008-0855.NASL
    descriptionUpdated openssh packages are now available for Red Hat Enterprise Linux 4, Red Hat Enterprise Linux 5, and Red Hat Enterprise Linux 4.5 Extended Update Support. This update has been rated as having critical security impact by the Red Hat Security Response Team. OpenSSH is OpenBSD
    last seen2020-06-01
    modified2020-06-02
    plugin id34034
    published2008-08-24
    reporterThis script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/34034
    titleRHEL 4 / 5 : openssh (RHSA-2008:0855)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2008:0855. The text 
    # itself is copyright (C) Red Hat, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(34034);
      script_version ("1.38");
      script_cvs_date("Date: 2019/10/25 13:36:13");
    
      script_cve_id("CVE-2007-4752", "CVE-2008-3844");
      script_bugtraq_id(25628, 30794);
      script_xref(name:"RHSA", value:"2008:0855");
      script_xref(name:"IAVT", value:"2008-T-0046");
    
      script_name(english:"RHEL 4 / 5 : openssh (RHSA-2008:0855)");
      script_summary(english:"Checks the rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Red Hat host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated openssh packages are now available for Red Hat Enterprise
    Linux 4, Red Hat Enterprise Linux 5, and Red Hat Enterprise Linux 4.5
    Extended Update Support.
    
    This update has been rated as having critical security impact by the
    Red Hat Security Response Team.
    
    OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
    
    Last week Red Hat detected an intrusion on certain of its computer
    systems and took immediate action. While the investigation into the
    intrusion is on-going, our initial focus was to review and test the
    distribution channel we use with our customers, Red Hat Network (RHN)
    and its associated security measures. Based on these efforts, we
    remain highly confident that our systems and processes prevented the
    intrusion from compromising RHN or the content distributed via RHN and
    accordingly believe that customers who keep their systems updated
    using Red Hat Network are not at risk. We are issuing this alert
    primarily for those who may obtain Red Hat binary packages via
    channels other than those of official Red Hat subscribers.
    
    In connection with the incident, the intruder was able to sign a small
    number of OpenSSH packages relating only to Red Hat Enterprise Linux 4
    (i386 and x86_64 architectures only) and Red Hat Enterprise Linux 5
    (x86_64 architecture only). As a precautionary measure, we are
    releasing an updated version of these packages, and have published a
    list of the tampered packages and how to detect them at
    http://www.redhat.com/security/data/openssh-blacklist.html
    
    To reiterate, our processes and efforts to date indicate that packages
    obtained by Red Hat Enterprise Linux subscribers via Red Hat Network
    are not at risk.
    
    These packages also fix a low severity flaw in the way ssh handles X11
    cookies when creating X11 forwarding connections. When ssh was unable
    to create untrusted cookie, ssh used a trusted cookie instead,
    possibly allowing the administrative user of a untrusted remote
    server, or untrusted application run on the remote server, to gain
    unintended access to a users local X server. (CVE-2007-4752)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2007-4752"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2008-3844"
      );
      # http://www.redhat.com/security/data/openssh-blacklist.html
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.redhat.com/security/data/openssh-blacklist.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/errata/RHSA-2008:0855"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
      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(20);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:openssh");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:openssh-askpass");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:openssh-askpass-gnome");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:openssh-clients");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:openssh-server");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:4");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:4.5");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:4.7");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:5");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:5.2");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2007/09/11");
      script_set_attribute(attribute:"patch_publication_date", value:"2008/08/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2008/08/24");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_set_attribute(attribute:"stig_severity", value:"II");
      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:"Red Hat Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list", "Host/cpu");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || "Red Hat" >!< release) audit(AUDIT_OS_NOT, "Red Hat");
    os_ver = pregmatch(pattern: "Red Hat Enterprise Linux.*release ([0-9]+(\.[0-9]+)?)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Red Hat");
    os_ver = os_ver[1];
    if (! preg(pattern:"^(4|5)([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 4.x / 5.x", "Red Hat " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$" && "s390" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Red Hat", cpu);
    
    yum_updateinfo = get_kb_item("Host/RedHat/yum-updateinfo");
    if (!empty_or_null(yum_updateinfo)) 
    {
      rhsa = "RHSA-2008:0855";
      yum_report = redhat_generate_yum_updateinfo_report(rhsa:rhsa);
      if (!empty_or_null(yum_report))
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_HOLE,
          extra      : yum_report 
        );
        exit(0);
      }
      else
      {
        audit_message = "affected by Red Hat security advisory " + rhsa;
        audit(AUDIT_OS_NOT, audit_message);
      }
    }
    else
    {  sp = get_kb_item("Host/RedHat/minor_release");
      if (isnull(sp)) audit(AUDIT_UNKNOWN_APP_VER, "Red Hat");
    
      flag = 0;
    if (sp == "5") {   if (rpm_check(release:"RHEL4", sp:"5", reference:"openssh-3.9p1-10.RHEL4.20")) flag++; }
      else { if (rpm_check(release:"RHEL4", reference:"openssh-3.9p1-11.el4_7")) flag++; }
    
    if (sp == "5") {   if (rpm_check(release:"RHEL4", sp:"5", reference:"openssh-askpass-3.9p1-10.RHEL4.20")) flag++; }
      else { if (rpm_check(release:"RHEL4", reference:"openssh-askpass-3.9p1-11.el4_7")) flag++; }
    
    if (sp == "5") {   if (rpm_check(release:"RHEL4", sp:"5", reference:"openssh-askpass-gnome-3.9p1-10.RHEL4.20")) flag++; }
      else { if (rpm_check(release:"RHEL4", reference:"openssh-askpass-gnome-3.9p1-11.el4_7")) flag++; }
    
    if (sp == "5") {   if (rpm_check(release:"RHEL4", sp:"5", reference:"openssh-clients-3.9p1-10.RHEL4.20")) flag++; }
      else { if (rpm_check(release:"RHEL4", reference:"openssh-clients-3.9p1-11.el4_7")) flag++; }
    
    if (sp == "5") {   if (rpm_check(release:"RHEL4", sp:"5", reference:"openssh-server-3.9p1-10.RHEL4.20")) flag++; }
      else { if (rpm_check(release:"RHEL4", reference:"openssh-server-3.9p1-11.el4_7")) flag++; }
    
    
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"openssh-4.3p2-26.el5_2.1")) flag++;
    
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"openssh-4.3p2-26.el5_2.1")) flag++;
    
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"openssh-4.3p2-26.el5_2.1")) flag++;
    
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"openssh-askpass-4.3p2-26.el5_2.1")) flag++;
    
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"openssh-askpass-4.3p2-26.el5_2.1")) flag++;
    
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"openssh-askpass-4.3p2-26.el5_2.1")) flag++;
    
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"openssh-clients-4.3p2-26.el5_2.1")) flag++;
    
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"openssh-clients-4.3p2-26.el5_2.1")) flag++;
    
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"openssh-clients-4.3p2-26.el5_2.1")) flag++;
    
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"openssh-server-4.3p2-26.el5_2.1")) flag++;
    
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"openssh-server-4.3p2-26.el5_2.1")) flag++;
    
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"openssh-server-4.3p2-26.el5_2.1")) flag++;
    
    
      if (flag)
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_HOLE,
          extra      : rpm_report_get() + redhat_report_package_caveat()
        );
        exit(0);
      }
      else
      {
        tested = pkg_tests_get();
        if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
        else audit(AUDIT_PACKAGE_NOT_INSTALLED, "openssh / openssh-askpass / openssh-askpass-gnome / openssh-clients / etc");
      }
    }
    
  • NASL familyOracle Linux Local Security Checks
    NASL idORACLELINUX_ELSA-2008-0855.NASL
    descriptionFrom Red Hat Security Advisory 2008:0855 : Updated openssh packages are now available for Red Hat Enterprise Linux 4, Red Hat Enterprise Linux 5, and Red Hat Enterprise Linux 4.5 Extended Update Support. This update has been rated as having critical security impact by the Red Hat Security Response Team. OpenSSH is OpenBSD
    last seen2020-06-01
    modified2020-06-02
    plugin id67742
    published2013-07-12
    reporterThis script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/67742
    titleOracle Linux 4 / 5 : openssh (ELSA-2008-0855)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Red Hat Security Advisory RHSA-2008:0855 and 
    # Oracle Linux Security Advisory ELSA-2008-0855 respectively.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(67742);
      script_version("1.11");
      script_cvs_date("Date: 2019/10/25 13:36:07");
    
      script_cve_id("CVE-2007-4752", "CVE-2008-3844");
      script_bugtraq_id(25628, 30794);
      script_xref(name:"RHSA", value:"2008:0855");
    
      script_name(english:"Oracle Linux 4 / 5 : openssh (ELSA-2008-0855)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Oracle Linux host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "From Red Hat Security Advisory 2008:0855 :
    
    Updated openssh packages are now available for Red Hat Enterprise
    Linux 4, Red Hat Enterprise Linux 5, and Red Hat Enterprise Linux 4.5
    Extended Update Support.
    
    This update has been rated as having critical security impact by the
    Red Hat Security Response Team.
    
    OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
    
    Last week Red Hat detected an intrusion on certain of its computer
    systems and took immediate action. While the investigation into the
    intrusion is on-going, our initial focus was to review and test the
    distribution channel we use with our customers, Red Hat Network (RHN)
    and its associated security measures. Based on these efforts, we
    remain highly confident that our systems and processes prevented the
    intrusion from compromising RHN or the content distributed via RHN and
    accordingly believe that customers who keep their systems updated
    using Red Hat Network are not at risk. We are issuing this alert
    primarily for those who may obtain Red Hat binary packages via
    channels other than those of official Red Hat subscribers.
    
    In connection with the incident, the intruder was able to sign a small
    number of OpenSSH packages relating only to Red Hat Enterprise Linux 4
    (i386 and x86_64 architectures only) and Red Hat Enterprise Linux 5
    (x86_64 architecture only). As a precautionary measure, we are
    releasing an updated version of these packages, and have published a
    list of the tampered packages and how to detect them at
    http://www.redhat.com/security/data/openssh-blacklist.html
    
    To reiterate, our processes and efforts to date indicate that packages
    obtained by Red Hat Enterprise Linux subscribers via Red Hat Network
    are not at risk.
    
    These packages also fix a low severity flaw in the way ssh handles X11
    cookies when creating X11 forwarding connections. When ssh was unable
    to create untrusted cookie, ssh used a trusted cookie instead,
    possibly allowing the administrative user of a untrusted remote
    server, or untrusted application run on the remote server, to gain
    unintended access to a users local X server. (CVE-2007-4752)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://oss.oracle.com/pipermail/el-errata/2008-August/000718.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://oss.oracle.com/pipermail/el-errata/2008-August/000719.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected openssh packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
      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(20);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:openssh");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:openssh-askpass");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:openssh-askpass-gnome");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:openssh-clients");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:openssh-server");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:oracle:linux:4");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:oracle:linux:5");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2007/09/11");
      script_set_attribute(attribute:"patch_publication_date", value:"2008/08/27");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/07/12");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Oracle Linux Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/OracleLinux", "Host/RedHat/release", "Host/RedHat/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/OracleLinux")) audit(AUDIT_OS_NOT, "Oracle Linux");
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || !pregmatch(pattern: "Oracle (?:Linux Server|Enterprise Linux)", string:release)) audit(AUDIT_OS_NOT, "Oracle Linux");
    os_ver = pregmatch(pattern: "Oracle (?:Linux Server|Enterprise Linux) .*release ([0-9]+(\.[0-9]+)?)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Oracle Linux");
    os_ver = os_ver[1];
    if (! preg(pattern:"^(4|5)([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Oracle Linux 4 / 5", "Oracle Linux " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && "ia64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Oracle Linux", cpu);
    
    flag = 0;
    if (rpm_check(release:"EL4", reference:"openssh-3.9p1-11.el4_7")) flag++;
    if (rpm_check(release:"EL4", reference:"openssh-askpass-3.9p1-11.el4_7")) flag++;
    if (rpm_check(release:"EL4", reference:"openssh-askpass-gnome-3.9p1-11.el4_7")) flag++;
    if (rpm_check(release:"EL4", reference:"openssh-clients-3.9p1-11.el4_7")) flag++;
    if (rpm_check(release:"EL4", reference:"openssh-server-3.9p1-11.el4_7")) flag++;
    
    if (rpm_check(release:"EL5", reference:"openssh-4.3p2-26.el5_2.1")) flag++;
    if (rpm_check(release:"EL5", reference:"openssh-askpass-4.3p2-26.el5_2.1")) flag++;
    if (rpm_check(release:"EL5", reference:"openssh-clients-4.3p2-26.el5_2.1")) flag++;
    if (rpm_check(release:"EL5", reference:"openssh-server-4.3p2-26.el5_2.1")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "openssh / openssh-askpass / openssh-askpass-gnome / openssh-clients / etc");
    }
    

Redhat

advisories
bugzilla
id280361
titleCVE-2007-4752 openssh falls back to the trusted x11 cookie if generation of an untrusted cookie fails
oval
OR
  • commentRed Hat Enterprise Linux must be installed
    ovaloval:com.redhat.rhba:tst:20070304026
  • AND
    • commentRed Hat Enterprise Linux 4 is installed
      ovaloval:com.redhat.rhba:tst:20070304025
    • OR
      • AND
        • commentopenssh is earlier than 0:3.9p1-11.el4_7
          ovaloval:com.redhat.rhsa:tst:20080855001
        • commentopenssh is signed with Red Hat master key
          ovaloval:com.redhat.rhsa:tst:20060044010
      • AND
        • commentopenssh-clients is earlier than 0:3.9p1-11.el4_7
          ovaloval:com.redhat.rhsa:tst:20080855003
        • commentopenssh-clients is signed with Red Hat master key
          ovaloval:com.redhat.rhsa:tst:20060044002
      • AND
        • commentopenssh-askpass-gnome is earlier than 0:3.9p1-11.el4_7
          ovaloval:com.redhat.rhsa:tst:20080855005
        • commentopenssh-askpass-gnome is signed with Red Hat master key
          ovaloval:com.redhat.rhsa:tst:20060044004
      • AND
        • commentopenssh-server is earlier than 0:3.9p1-11.el4_7
          ovaloval:com.redhat.rhsa:tst:20080855007
        • commentopenssh-server is signed with Red Hat master key
          ovaloval:com.redhat.rhsa:tst:20060044006
      • AND
        • commentopenssh-askpass is earlier than 0:3.9p1-11.el4_7
          ovaloval:com.redhat.rhsa:tst:20080855009
        • commentopenssh-askpass is signed with Red Hat master key
          ovaloval:com.redhat.rhsa:tst:20060044008
  • AND
    • commentRed Hat Enterprise Linux 5 is installed
      ovaloval:com.redhat.rhba:tst:20070331005
    • OR
      • AND
        • commentopenssh-askpass is earlier than 0:4.3p2-26.el5_2.1
          ovaloval:com.redhat.rhsa:tst:20080855012
        • commentopenssh-askpass is signed with Red Hat redhatrelease key
          ovaloval:com.redhat.rhsa:tst:20070540002
      • AND
        • commentopenssh is earlier than 0:4.3p2-26.el5_2.1
          ovaloval:com.redhat.rhsa:tst:20080855014
        • commentopenssh is signed with Red Hat redhatrelease key
          ovaloval:com.redhat.rhsa:tst:20070540008
      • AND
        • commentopenssh-clients is earlier than 0:4.3p2-26.el5_2.1
          ovaloval:com.redhat.rhsa:tst:20080855016
        • commentopenssh-clients is signed with Red Hat redhatrelease key
          ovaloval:com.redhat.rhsa:tst:20070540004
      • AND
        • commentopenssh-server is earlier than 0:4.3p2-26.el5_2.1
          ovaloval:com.redhat.rhsa:tst:20080855018
        • commentopenssh-server is signed with Red Hat redhatrelease key
          ovaloval:com.redhat.rhsa:tst:20070540006
rhsa
idRHSA-2008:0855
released2008-08-22
severityCritical
titleRHSA-2008:0855: openssh security update (Critical)
rpms
  • openssh-0:3.9p1-10.RHEL4.20
  • openssh-0:3.9p1-11.el4_7
  • openssh-0:4.3p2-26.el5_2.1
  • openssh-askpass-0:3.9p1-10.RHEL4.20
  • openssh-askpass-0:3.9p1-11.el4_7
  • openssh-askpass-0:4.3p2-26.el5_2.1
  • openssh-askpass-gnome-0:3.9p1-10.RHEL4.20
  • openssh-askpass-gnome-0:3.9p1-11.el4_7
  • openssh-clients-0:3.9p1-10.RHEL4.20
  • openssh-clients-0:3.9p1-11.el4_7
  • openssh-clients-0:4.3p2-26.el5_2.1
  • openssh-debuginfo-0:3.9p1-10.RHEL4.20
  • openssh-debuginfo-0:3.9p1-11.el4_7
  • openssh-debuginfo-0:4.3p2-26.el5_2.1
  • openssh-server-0:3.9p1-10.RHEL4.20
  • openssh-server-0:3.9p1-11.el4_7
  • openssh-server-0:4.3p2-26.el5_2.1