Vulnerabilities > CVE-2004-0686

047910
CVSS 5.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
PARTIAL
Availability impact
NONE
network
low complexity
samba
trustix
nessus

Summary

Buffer overflow in Samba 2.2.x to 2.2.9, and 3.0.0 to 3.0.4, when the "mangling method = hash" option is enabled in smb.conf, has unknown impact and attack vectors.

Nessus

  • NASL familySlackware Local Security Checks
    NASL idSLACKWARE_SSA_2004-207-01.NASL
    descriptionNew samba packages are available for Slackware 8.1, 9.0, 9.1, 10.0 and -current to fix security issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id18774
    published2005-07-13
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/18774
    titleSlackware 10.0 / 8.1 / 9.0 / 9.1 / current : new samba packages (SSA:2004-207-01)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Slackware Security Advisory 2004-207-01. The text 
    # itself is copyright (C) Slackware Linux, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(18774);
      script_version("1.15");
      script_cvs_date("Date: 2019/10/25 13:36:20");
    
      script_cve_id("CVE-2004-0600", "CVE-2004-0686");
      script_xref(name:"SSA", value:"2004-207-01");
    
      script_name(english:"Slackware 10.0 / 8.1 / 9.0 / 9.1 / current : new samba packages (SSA:2004-207-01)");
      script_summary(english:"Checks for updated package in /var/log/packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Slackware host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "New samba packages are available for Slackware 8.1, 9.0, 9.1, 10.0
    and -current to fix security issues."
      );
      # http://www.slackware.com/security/viewer.php?l=slackware-security&y=2004&m=slackware-security.407946
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?8156733a"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected samba package.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:slackware:slackware_linux:samba");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:slackware:slackware_linux");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:slackware:slackware_linux:10.0");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:slackware:slackware_linux:8.1");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:slackware:slackware_linux:9.0");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:slackware:slackware_linux:9.1");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2004/07/25");
      script_set_attribute(attribute:"plugin_publication_date", value:"2005/07/13");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2005-2019 Tenable Network Security, Inc.");
      script_family(english:"Slackware Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Slackware/release", "Host/Slackware/packages");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("slackware.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Slackware/release")) audit(AUDIT_OS_NOT, "Slackware");
    if (!get_kb_item("Host/Slackware/packages")) 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$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Slackware", cpu);
    
    
    flag = 0;
    if (slackware_check(osver:"8.1", pkgname:"samba", pkgver:"2.2.10", pkgarch:"i386", pkgnum:"1")) flag++;
    
    if (slackware_check(osver:"9.0", pkgname:"samba", pkgver:"2.2.10", pkgarch:"i386", pkgnum:"1")) flag++;
    
    if (slackware_check(osver:"9.1", pkgname:"samba", pkgver:"2.2.10", pkgarch:"i486", pkgnum:"1")) flag++;
    
    if (slackware_check(osver:"10.0", pkgname:"samba", pkgver:"3.0.5", pkgarch:"i486", pkgnum:"1")) flag++;
    
    if (slackware_check(osver:"current", pkgname:"samba", pkgver:"3.0.5", pkgarch:"i486", pkgnum:"1")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:slackware_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2004-404.NASL
    descriptionUpdated samba packages that fix a buffer overflow issue are now available. Samba provides file and printer sharing services to SMB/CIFS clients. The Samba team discovered a buffer overflow in the code used to support the
    last seen2020-06-01
    modified2020-06-02
    plugin id13846
    published2004-07-26
    reporterThis script is Copyright (C) 2004-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/13846
    titleRHEL 2.1 : samba (RHSA-2004:404)
    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-2004:404. The text 
    # itself is copyright (C) Red Hat, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(13846);
      script_version ("1.29");
      script_cvs_date("Date: 2019/10/25 13:36:10");
    
      script_cve_id("CVE-2004-0686");
      script_xref(name:"RHSA", value:"2004:404");
    
      script_name(english:"RHEL 2.1 : samba (RHSA-2004:404)");
      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 samba packages that fix a buffer overflow issue are now
    available.
    
    Samba provides file and printer sharing services to SMB/CIFS clients.
    
    The Samba team discovered a buffer overflow in the code used to
    support the 'mangling method = hash' smb.conf option. The Common
    Vulnerabilities and Exposures project (cve.mitre.org) has assigned the
    name CVE-2004-0686 to this issue.
    
    All users of Samba should upgrade to these updated packages, which
    contain an upgrade to Samba-2.2.10, which is not vulnerable to this
    issue."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2004-0686"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/errata/RHSA-2004:404"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:N");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:samba");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:samba-client");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:samba-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:samba-swat");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:2.1");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2004/07/27");
      script_set_attribute(attribute:"patch_publication_date", value:"2004/07/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2004/07/26");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2004-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:"^2\.1([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 2.1", "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);
    if (cpu !~ "^i[3-6]86$") audit(AUDIT_ARCH_NOT, "i386", cpu);
    
    yum_updateinfo = get_kb_item("Host/RedHat/yum-updateinfo");
    if (!empty_or_null(yum_updateinfo)) 
    {
      rhsa = "RHSA-2004:404";
      yum_report = redhat_generate_yum_updateinfo_report(rhsa:rhsa);
      if (!empty_or_null(yum_report))
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_WARNING,
          extra      : yum_report 
        );
        exit(0);
      }
      else
      {
        audit_message = "affected by Red Hat security advisory " + rhsa;
        audit(AUDIT_OS_NOT, audit_message);
      }
    }
    else
    {
      flag = 0;
      if (rpm_check(release:"RHEL2.1", cpu:"i386", reference:"samba-2.2.10-1.21as.1")) flag++;
      if (rpm_check(release:"RHEL2.1", cpu:"i386", reference:"samba-client-2.2.10-1.21as.1")) flag++;
      if (rpm_check(release:"RHEL2.1", cpu:"i386", reference:"samba-common-2.2.10-1.21as.1")) flag++;
      if (rpm_check(release:"RHEL2.1", cpu:"i386", reference:"samba-swat-2.2.10-1.21as.1")) flag++;
    
      if (flag)
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_WARNING,
          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, "samba / samba-client / samba-common / samba-swat");
      }
    }
    
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_SAMBA_304_4.NASL
    descriptionThe following package needs to be updated: ja-samba
    last seen2016-09-26
    modified2004-07-22
    plugin id13656
    published2004-07-22
    reporterTenable
    sourcehttps://www.tenable.com/plugins/index.php?view=single&id=13656
    titleFreeBSD : Multiple Potential Buffer Overruns in Samba (173)
    code
    #%NASL_MIN_LEVEL 999999
    
    # @DEPRECATED@
    #
    # This script has been deprecated by freebsd_pkg_2de14f7adad911d8b59a00061bc2ad93.nasl.
    #
    # Disabled on 2011/10/02.
    #
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # This script contains information extracted from VuXML :
    #
    # Copyright 2003-2006 Jacques Vidrine and contributors
    #
    # Redistribution and use in source (VuXML) and 'compiled' forms (SGML,
    # HTML, PDF, PostScript, RTF and so forth) with or without modification,
    # are permitted provided that the following conditions are met:
    # 1. Redistributions of source code (VuXML) must retain the above
    #   copyright notice, this list of conditions and the following
    #   disclaimer as the first lines of this file unmodified.
    # 2. Redistributions in compiled form (transformed to other DTDs,
    #   published online in any format, converted to PDF, PostScript,
    #   RTF and other formats) must reproduce the above copyright
    #   notice, this list of conditions and the following disclaimer
    #   in the documentation and/or other materials provided with the
    #   distribution.
    #
    # THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
    # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
    # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
    # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
    # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION,
    # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    #
    #
    
    include('compat.inc');
    
    if ( description )
    {
     script_id(13656);
     script_version("1.19");
     script_cve_id("CVE-2004-0686");
     script_cve_id("CVE-2004-0600");
    
     script_name(english:"FreeBSD : Multiple Potential Buffer Overruns in Samba (173)");
    
    script_set_attribute(attribute:'synopsis', value: 'The remote host is missing a security update');
    script_set_attribute(attribute:'description', value:'The following package needs to be updated: ja-samba');
    script_set_attribute(attribute: 'cvss_vector', value: 'CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C');
    script_set_attribute(attribute:'solution', value: 'Update the package on the remote host');
    script_set_attribute(attribute: 'see_also', value: 'http://secunia.com/advisories/12130
    http://www.mozilla.org/security/announce/2008/mfsa2008-60.html
    http://www.mozilla.org/security/announce/2008/mfsa2008-61.html
    http://www.mozilla.org/security/announce/2008/mfsa2008-62.html
    http://www.mozilla.org/security/announce/2008/mfsa2008-63.html
    http://www.mozilla.org/security/announce/2008/mfsa2008-64.html
    http://www.samba.org/samba/whatsnew/samba-2.2.10.html
    http://www.samba.org/samba/whatsnew/samba-3.0.5.html');
    script_set_attribute(attribute:'see_also', value: 'http://www.FreeBSD.org/ports/portaudit/2de14f7a-dad9-11d8-b59a-00061bc2ad93.html');
    
     script_set_attribute(attribute:"plugin_publication_date", value: "2004/07/22");
     script_end_attributes();
     script_summary(english:"Check for ja-samba");
     script_category(ACT_GATHER_INFO);
     script_copyright(english:"This script is Copyright (C) 2009-2018 Tenable Network Security, Inc.");
     family["english"] = "FreeBSD Local Security Checks";
     script_family(english:family["english"]);
     script_dependencies("ssh_get_info.nasl");
     script_require_keys("Host/FreeBSD/pkg_info");
     exit(0);
    }
    
    # Deprecated.
    exit(0, "This plugin has been deprecated. Refer to plugin #37185 (freebsd_pkg_2de14f7adad911d8b59a00061bc2ad93.nasl) instead.");
    
    global_var cvss_score;
    cvss_score=10;
    include('freebsd_package.inc');
    
    
    pkg_test(pkg:"samba>3.*<3.0.5");
    
    pkg_test(pkg:"samba>3.*,1<3.0.5,1");
    
    pkg_test(pkg:"samba<2.2.10");
    
    pkg_test(pkg:"ja-samba<2.2.10.j1.0");
    
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_2DE14F7ADAD911D8B59A00061BC2AD93.NASL
    descriptionEvgeny Demidov discovered that the Samba server has a buffer overflow in the Samba Web Administration Tool (SWAT) on decoding Base64 data during HTTP Basic Authentication. Versions 3.0.2 through 3.0.4 are affected. Another buffer overflow bug has been found in the code used to support the
    last seen2020-06-01
    modified2020-06-02
    plugin id37185
    published2009-04-23
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/37185
    titleFreeBSD : Multiple Potential Buffer Overruns in Samba (2de14f7a-dad9-11d8-b59a-00061bc2ad93)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from the FreeBSD VuXML database :
    #
    # Copyright 2003-2018 Jacques Vidrine and contributors
    #
    # Redistribution and use in source (VuXML) and 'compiled' forms (SGML,
    # HTML, PDF, PostScript, RTF and so forth) with or without modification,
    # are permitted provided that the following conditions are met:
    # 1. Redistributions of source code (VuXML) must retain the above
    #    copyright notice, this list of conditions and the following
    #    disclaimer as the first lines of this file unmodified.
    # 2. Redistributions in compiled form (transformed to other DTDs,
    #    published online in any format, converted to PDF, PostScript,
    #    RTF and other formats) must reproduce the above copyright
    #    notice, this list of conditions and the following disclaimer
    #    in the documentation and/or other materials provided with the
    #    distribution.
    # 
    # THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
    # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
    # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
    # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
    # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION,
    # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(37185);
      script_version("1.16");
      script_cvs_date("Date: 2019/08/02 13:32:36");
    
      script_cve_id("CVE-2004-0600", "CVE-2004-0686");
      script_xref(name:"Secunia", value:"12130");
    
      script_name(english:"FreeBSD : Multiple Potential Buffer Overruns in Samba (2de14f7a-dad9-11d8-b59a-00061bc2ad93)");
      script_summary(english:"Checks for updated packages in pkg_info output");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote FreeBSD host is missing one or more security-related
    updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Evgeny Demidov discovered that the Samba server has a buffer overflow
    in the Samba Web Administration Tool (SWAT) on decoding Base64 data
    during HTTP Basic Authentication. Versions 3.0.2 through 3.0.4 are
    affected.
    
    Another buffer overflow bug has been found in the code used to support
    the 'mangling method = hash' smb.conf option. The default setting for
    this parameter is 'mangling method = hash2' and therefore not
    vulnerable. Versions between 2.2.0 through 2.2.9 and 3.0.0 through
    3.0.4 are affected."
      );
      # http://www.securityfocus.com/archive/1/369698
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.securityfocus.com/archive/1/369698"
      );
      # http://www.securityfocus.com/archive/1/369706
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.securityfocus.com/archive/1/369706"
      );
      # http://www.samba.org/samba/whatsnew/samba-3.0.5.html
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.samba.org/samba/history/samba-3.0.5.html"
      );
      # http://www.samba.org/samba/whatsnew/samba-2.2.10.html
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.samba.org/samba/history/samba-2.2.10.html"
      );
      # https://vuxml.freebsd.org/freebsd/2de14f7a-dad9-11d8-b59a-00061bc2ad93.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?78bde05c"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:ja-samba");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:samba");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2004/07/14");
      script_set_attribute(attribute:"patch_publication_date", value:"2004/07/21");
      script_set_attribute(attribute:"plugin_publication_date", value:"2009/04/23");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"FreeBSD Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/FreeBSD/release", "Host/FreeBSD/pkg_info");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("freebsd_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/FreeBSD/release")) audit(AUDIT_OS_NOT, "FreeBSD");
    if (!get_kb_item("Host/FreeBSD/pkg_info")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (pkg_test(save_report:TRUE, pkg:"samba>3.*<3.0.5")) flag++;
    if (pkg_test(save_report:TRUE, pkg:"samba>3.*,1<3.0.5,1")) flag++;
    if (pkg_test(save_report:TRUE, pkg:"samba<2.2.10")) flag++;
    if (pkg_test(save_report:TRUE, pkg:"ja-samba<2.2.10.j1.0")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:pkg_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2004-259.NASL
    descriptionUpdated samba packages that fix buffer overflows, as well as other various bugs, are now available. Samba provides file and printer sharing services to SMB/CIFS clients. Evgeny Demidov discovered a flaw in the internal routine used by the Samba Web Administration Tool (SWAT) in Samba versions 3.0.2 through 3.0.4. When decoding base-64 data during HTTP basic authentication, an invalid base-64 character could cause a buffer overflow. If the SWAT administration service is enabled, this flaw could allow an attacker to execute arbitrary code. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CVE-2004-0600 to this issue. Additionally, the Samba team discovered a buffer overflow in the code used to support the
    last seen2020-06-01
    modified2020-06-02
    plugin id13658
    published2004-07-22
    reporterThis script is Copyright (C) 2004-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/13658
    titleRHEL 3 : samba (RHSA-2004:259)
    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-2004:259. The text 
    # itself is copyright (C) Red Hat, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(13658);
      script_version ("1.27");
      script_cvs_date("Date: 2019/10/25 13:36:10");
    
      script_cve_id("CVE-2004-0600", "CVE-2004-0686");
      script_xref(name:"RHSA", value:"2004:259");
    
      script_name(english:"RHEL 3 : samba (RHSA-2004:259)");
      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 samba packages that fix buffer overflows, as well as other
    various bugs, are now available.
    
    Samba provides file and printer sharing services to SMB/CIFS clients.
    
    Evgeny Demidov discovered a flaw in the internal routine used by the
    Samba Web Administration Tool (SWAT) in Samba versions 3.0.2 through
    3.0.4. When decoding base-64 data during HTTP basic authentication, an
    invalid base-64 character could cause a buffer overflow. If the SWAT
    administration service is enabled, this flaw could allow an attacker
    to execute arbitrary code. The Common Vulnerabilities and Exposures
    project (cve.mitre.org) has assigned the name CVE-2004-0600 to this
    issue.
    
    Additionally, the Samba team discovered a buffer overflow in the code
    used to support the 'mangling method = hash' smb.conf option. Please
    be aware that the default setting for this parameter is 'mangling
    method = hash2' and therefore not vulnerable. The Common
    Vulnerabilities and Exposures project (cve.mitre.org) has assigned the
    name CVE-2004-0686 to this issue.
    
    This release includes the updated upstream version 3.0.4 together with
    backported security patches to correct these issues as well as a
    number of post-3.0.4 bug fixes from the Samba subversion repository.
    
    The most important bug fix allows Samba users to change their
    passwords if Microsoft patch KB 828741 (a critical update) had been
    applied.
    
    All users of Samba should upgrade to these updated packages, which
    resolve these issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2004-0600"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2004-0686"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/errata/RHSA-2004:259"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:samba");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:samba-client");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:samba-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:samba-swat");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:3");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2004/07/27");
      script_set_attribute(attribute:"patch_publication_date", value:"2004/07/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2004/07/22");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2004-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:"^3([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 3.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-2004:259";
      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
    {
      flag = 0;
      if (rpm_check(release:"RHEL3", reference:"samba-3.0.4-6.3E")) flag++;
      if (rpm_check(release:"RHEL3", reference:"samba-client-3.0.4-6.3E")) flag++;
      if (rpm_check(release:"RHEL3", reference:"samba-common-3.0.4-6.3E")) flag++;
      if (rpm_check(release:"RHEL3", reference:"samba-swat-3.0.4-6.3E")) 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, "samba / samba-client / samba-common / samba-swat");
      }
    }
    
  • NASL familyGain a shell remotely
    NASL idSAMBA_MANGLING_OVERFLOW.NASL
    descriptionThe remote Samba server, according to its version number, is vulnerable to a buffer overflow if the option
    last seen2020-06-01
    modified2020-06-02
    plugin id13657
    published2004-07-22
    reporterThis script is Copyright (C) 2004-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/13657
    titleSamba Mangling Method Hash Overflow
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    include("compat.inc");
    
    if(description)
    {
     script_id(13657);
     script_version ("1.16");
    
     script_cve_id("CVE-2004-0686");
     script_bugtraq_id(10781);
    
     script_name(english:"Samba Mangling Method Hash Overflow");
     
     script_set_attribute(attribute:"synopsis", value:
    "It might be possible to run arbitrary code on the remote server." );
     script_set_attribute(attribute:"description", value:
    "The remote Samba server, according to its version number, is vulnerable 
    to a buffer overflow if the option 'mangling method' is set to 'hash' 
    in smb.conf (which is not the case by default).
    
    An attacker may exploit this flaw to execute arbitrary commands on the 
    remote host." );
     script_set_attribute(attribute:"see_also", value:"http://www.samba.org/samba/history/samba-2.2.10.html" );
     script_set_attribute(attribute:"see_also", value:"http://www.samba.org/samba/history/samba-3.0.5.html" );
     script_set_attribute(attribute:"solution", value:
    "Upgrade to Samba 2.2.10 or 3.0.5" );
     script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:N");
     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: "2004/07/22");
     script_set_attribute(attribute:"vuln_publication_date", value: "2004/07/22");
     script_cvs_date("Date: 2018/07/24 17:29:25");
    script_set_attribute(attribute:"plugin_type", value:"remote");
    script_set_attribute(attribute:"cpe", value:"cpe:/a:samba:samba");
    script_end_attributes();
    
     script_summary(english:"checks samba version");
     script_category(ACT_GATHER_INFO);
     script_copyright(english:"This script is Copyright (C) 2004-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
     script_family(english:"Gain a shell remotely");
     script_dependencie("smb_nativelanman.nasl");
     script_require_keys("SMB/NativeLanManager");
     exit(0);
    }
    
    #
    # The script code starts here
    #
    
    if ( get_kb_item("CVE-2004-0686") ) exit(0);
    
    lanman = get_kb_item("SMB/NativeLanManager");
    if("Samba" >< lanman)
    {
     if(ereg(pattern:"Samba 2\.2\.[0-9]$", string:lanman))
      security_warning(139);
     else if(ereg(pattern:"Samba 3\.0\.[0-4]$", string:lanman))
      security_warning(139);
    }
    
  • NASL familyMandriva Local Security Checks
    NASL idMANDRAKE_MDKSA-2004-071.NASL
    descriptionA vulnerability was discovered in SWAT, the Samba Web Administration Tool. The routine used to decode the base64 data during HTTP basic authentication is subject to a buffer overrun caused by an invalid base64 character. This same code is also used to internally decode the sambaMungedDial attribute value when using the ldapsam passdb backend, and to decode input given to the ntlm_auth tool. This vulnerability only exists in Samba versions 3.0.2 or later; the 3.0.5 release fixes the vulnerability. Systems using SWAT, the ldapsam passdb backend, and tose running winbindd and allowing third- party applications to issue authentication requests via ntlm_auth tool should upgrade immediately. (CVE-2004-0600) A buffer overrun has been located in the code used to support the
    last seen2020-06-01
    modified2020-06-02
    plugin id14170
    published2004-07-31
    reporterThis script is Copyright (C) 2004-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/14170
    titleMandrake Linux Security Advisory : samba (MDKSA-2004:071)
    code
    #%NASL_MIN_LEVEL 80502
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Mandrake Linux Security Advisory MDKSA-2004:071. 
    # The text itself is copyright (C) Mandriva S.A.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(14170);
      script_version ("1.18");
      script_cvs_date("Date: 2019/08/02 13:32:47");
    
      script_cve_id("CVE-2004-0600", "CVE-2004-0686");
      script_xref(name:"MDKSA", value:"2004:071");
    
      script_name(english:"Mandrake Linux Security Advisory : samba (MDKSA-2004:071)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Mandrake Linux host is missing one or more security
    updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "A vulnerability was discovered in SWAT, the Samba Web Administration
    Tool. The routine used to decode the base64 data during HTTP basic
    authentication is subject to a buffer overrun caused by an invalid
    base64 character. This same code is also used to internally decode the
    sambaMungedDial attribute value when using the ldapsam passdb backend,
    and to decode input given to the ntlm_auth tool.
    
    This vulnerability only exists in Samba versions 3.0.2 or later; the
    3.0.5 release fixes the vulnerability. Systems using SWAT, the ldapsam
    passdb backend, and tose running winbindd and allowing third- party
    applications to issue authentication requests via ntlm_auth tool
    should upgrade immediately. (CVE-2004-0600)
    
    A buffer overrun has been located in the code used to support the
    'mangling method = hash' smb.conf option. Please be aware that the
    default setting for this parameter is 'mangling method = hash2' and
    therefore not vulnerable. This bug is present in Samba 3.0.0 and
    later, as well as Samba 2.2.X (CVE-2004-0686)
    
    This update also fixes a bug where attempting to print in some cases
    would cause smbd to exit with a signal 11."
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:libsmbclient0");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:libsmbclient0-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:libsmbclient0-static-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:nss_wins");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:samba-client");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:samba-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:samba-debug");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:samba-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:samba-passdb-mysql");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:samba-passdb-xml");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:samba-server");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:samba-swat");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:samba-winbind");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:mandrakesoft:mandrake_linux:10.0");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:mandrakesoft:mandrake_linux:9.1");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:mandrakesoft:mandrake_linux:9.2");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2004/07/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2004/07/31");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2004-2019 Tenable Network Security, Inc.");
      script_family(english:"Mandriva Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/Mandrake/release", "Host/Mandrake/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/Mandrake/release")) audit(AUDIT_OS_NOT, "Mandriva / Mandake Linux");
    if (!get_kb_item("Host/Mandrake/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if (cpu !~ "^(amd64|i[3-6]86|x86_64)$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Mandriva / Mandrake Linux", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"MDK10.0", cpu:"i386", reference:"libsmbclient0-3.0.2a-3.2.100mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.0", cpu:"i386", reference:"libsmbclient0-devel-3.0.2a-3.2.100mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.0", cpu:"i386", reference:"libsmbclient0-static-devel-3.0.2a-3.2.100mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.0", reference:"nss_wins-3.0.2a-3.2.100mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.0", reference:"samba-client-3.0.2a-3.2.100mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.0", reference:"samba-common-3.0.2a-3.2.100mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.0", reference:"samba-doc-3.0.2a-3.2.100mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.0", reference:"samba-passdb-mysql-3.0.2a-3.2.100mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.0", reference:"samba-passdb-xml-3.0.2a-3.2.100mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.0", reference:"samba-server-3.0.2a-3.2.100mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.0", reference:"samba-swat-3.0.2a-3.2.100mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK10.0", reference:"samba-winbind-3.0.2a-3.2.100mdk", yank:"mdk")) flag++;
    
    if (rpm_check(release:"MDK9.1", cpu:"i386", reference:"nss_wins-2.2.7a-9.4.91mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.1", cpu:"i386", reference:"samba-client-2.2.7a-9.4.91mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.1", cpu:"i386", reference:"samba-common-2.2.7a-9.4.91mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.1", cpu:"i386", reference:"samba-doc-2.2.7a-9.4.91mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.1", cpu:"i386", reference:"samba-server-2.2.7a-9.4.91mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.1", cpu:"i386", reference:"samba-swat-2.2.7a-9.4.91mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.1", cpu:"i386", reference:"samba-winbind-2.2.7a-9.4.91mdk", yank:"mdk")) flag++;
    
    if (rpm_check(release:"MDK9.2", cpu:"i386", reference:"libsmbclient0-2.2.8a-13.2.92mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.2", cpu:"i386", reference:"libsmbclient0-devel-2.2.8a-13.2.92mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.2", cpu:"i386", reference:"libsmbclient0-static-devel-2.2.8a-13.2.92mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.2", reference:"nss_wins-2.2.8a-13.2.92mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.2", reference:"samba-client-2.2.8a-13.2.92mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.2", reference:"samba-common-2.2.8a-13.2.92mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.2", reference:"samba-debug-2.2.8a-13.2.92mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.2", reference:"samba-doc-2.2.8a-13.2.92mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.2", reference:"samba-server-2.2.8a-13.2.92mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.2", reference:"samba-swat-2.2.8a-13.2.92mdk", yank:"mdk")) flag++;
    if (rpm_check(release:"MDK9.2", reference:"samba-winbind-2.2.8a-13.2.92mdk", yank:"mdk")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familySuSE Local Security Checks
    NASL idSUSE_SA_2004_022.NASL
    descriptionThe remote host is missing the patch for the advisory SUSE-SA:2004:022 (samba). The Samba Web Administration Tool (SWAT) was found vulnerable to a buffer overflow in its base64 code. This buffer overflow can possibly be exploited remotely before any authentication took place to execute arbitrary code. The same piece of vulnerable code was also used in ldapsam passdb and in the ntlm_auth tool. This vulnerability only exists on Samba 3.0.2 to 3.0.4. Another buffer overflow was found in Samba 3.0.0 and later, as well as in Samba 2.2.x. This overflow exists in the hash code of the mangling method (smb.conf: mangling method = hash), the default uses hash2 which is not vulnerable. There is no temporary workaround known. The first proof-of-concept exploits were seen on public mailing lists. After the installation was successfully completed please restart the samba daemon. /usr/sbin/rcsmb restart SWAT is called by inetd/xinetd. Therefore it is sufficient to kill all running instances of SWAT only. Please download the update package for your distribution and verify its integrity by the methods listed in section 3) of this announcement. Then, install the package using the command
    last seen2020-06-01
    modified2020-06-02
    plugin id13838
    published2004-07-25
    reporterThis script is Copyright (C) 2004-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/13838
    titleSUSE-SA:2004:022: samba
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # This plugin text was extracted from SuSE Security Advisory SUSE-SA:2004:022
    #
    
    
    if ( ! defined_func("bn_random") ) exit(0);
    
    include("compat.inc");
    
    if(description)
    {
     script_id(13838);
     script_bugtraq_id(10780);
     script_version ("1.15");
     script_cve_id("CVE-2004-0600", "CVE-2004-0686");
     
     name["english"] = "SUSE-SA:2004:022: samba";
     
     script_name(english:name["english"]);
     
     script_set_attribute(attribute:"synopsis", value:
    "The remote host is missing a vendor-supplied security patch" );
     script_set_attribute(attribute:"description", value:
    "The remote host is missing the patch for the advisory SUSE-SA:2004:022 (samba).
    
    
    The Samba Web Administration Tool (SWAT) was found vulnerable to
    a buffer overflow in its base64 code. This buffer overflow can possibly
    be exploited remotely before any authentication took place to execute
    arbitrary code.
    The same piece of vulnerable code was also used in ldapsam passdb and
    in the ntlm_auth tool.
    This vulnerability only exists on Samba 3.0.2 to 3.0.4.
    
    Another buffer overflow was found in Samba 3.0.0 and later, as well as
    in Samba 2.2.x. This overflow exists in the hash code of the mangling
    method (smb.conf: mangling method = hash), the default uses hash2 which
    is not vulnerable.
    
    There is no temporary workaround known. The first proof-of-concept
    exploits were seen on public mailing lists.
    
    After the installation was successfully completed please restart the
    samba daemon.
    /usr/sbin/rcsmb restart
    
    SWAT is called by inetd/xinetd. Therefore it is sufficient to kill all
    running instances of SWAT only.
    
    Please download the update package for your distribution and verify its
    integrity by the methods listed in section 3) of this announcement.
    Then, install the package using the command 'rpm -Fhv file.rpm' to apply
    the update." );
     script_set_attribute(attribute:"solution", value:
    "http://www.suse.de/security/2004_22_samba.html" );
     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: "2004/07/25");
     script_cvs_date("Date: 2019/10/25 13:36:27");
     script_end_attributes();
    
     
     summary["english"] = "Check for the version of the samba package";
     script_summary(english:summary["english"]);
     
     script_category(ACT_GATHER_INFO);
     
     script_copyright(english:"This script is Copyright (C) 2004-2019 Tenable Network Security, Inc.");
     family["english"] = "SuSE Local Security Checks";
     script_family(english:family["english"]);
     
     script_dependencies("ssh_get_info.nasl");
     script_require_keys("Host/SuSE/rpm-list");
     exit(0);
    }
    
    include("rpm.inc");
    if ( rpm_check( reference:"samba-2.2.8a-218", release:"SUSE8.1") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-client-2.2.8a-218", release:"SUSE8.1") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-vscan-0.3.2a-271", release:"SUSE8.1") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-2.2.8a-220", release:"SUSE8.2") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-client-2.2.8a-220", release:"SUSE8.2") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-vscan-0.3.2a-273", release:"SUSE8.2") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-doc-2.2.8a-220", release:"SUSE8.2") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"libsmbclient-2.2.8a-220", release:"SUSE8.2") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"libsmbclient-devel-2.2.8a-220", release:"SUSE8.2") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-2.2.8a-220", release:"SUSE9.0") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-client-2.2.8a-220", release:"SUSE9.0") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"libsmbclient-2.2.8a-220", release:"SUSE9.0") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"libsmbclient-devel-2.2.8a-220", release:"SUSE9.0") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-3.0.4-1.27", release:"SUSE9.1") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-client-3.0.4-1.27", release:"SUSE9.1") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-pdb-3.0.4-1.27", release:"SUSE9.1") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-python-3.0.4-1.27", release:"SUSE9.1") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-vscan-0.3.4-83.30", release:"SUSE9.1") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-winbind-3.0.4-1.27", release:"SUSE9.1") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"samba-doc-3.0.4-1.12", release:"SUSE9.1") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"libsmbclient-3.0.4-1.27", release:"SUSE9.1") )
    {
     security_hole(0);
     exit(0);
    }
    if ( rpm_check( reference:"libsmbclient-devel-3.0.4-1.27", release:"SUSE9.1") )
    {
     security_hole(0);
     exit(0);
    }
    if (rpm_exists(rpm:"samba-", release:"SUSE8.1")
     || rpm_exists(rpm:"samba-", release:"SUSE8.2")
     || rpm_exists(rpm:"samba-", release:"SUSE9.0")
     || rpm_exists(rpm:"samba-", release:"SUSE9.1") )
    {
     set_kb_item(name:"CVE-2004-0600", value:TRUE);
     set_kb_item(name:"CVE-2004-0686", value:TRUE);
    }
    
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200407-21.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200407-21 (Samba: Multiple buffer overflows) Evgeny Demidov found a buffer overflow in SWAT, located in the base64 data decoder used to handle HTTP basic authentication (CAN-2004-0600). The same flaw is present in the code used to handle the sambaMungedDial attribute value, when using the ldapsam passdb backend. Another buffer overflow was found in the code used to support the
    last seen2020-06-01
    modified2020-06-02
    plugin id14554
    published2004-08-30
    reporterThis script is Copyright (C) 2004-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/14554
    titleGLSA-200407-21 : Samba: Multiple buffer overflows
    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 200407-21.
    #
    # The advisory text is Copyright (C) 2001-2018 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(14554);
      script_version("1.17");
      script_cvs_date("Date: 2019/08/02 13:32:41");
    
      script_cve_id("CVE-2004-0600", "CVE-2004-0686");
      script_xref(name:"GLSA", value:"200407-21");
    
      script_name(english:"GLSA-200407-21 : Samba: Multiple buffer overflows");
      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-200407-21
    (Samba: Multiple buffer overflows)
    
        Evgeny Demidov found a buffer overflow in SWAT, located in the base64 data
        decoder used to handle HTTP basic authentication (CAN-2004-0600). The same
        flaw is present in the code used to handle the sambaMungedDial attribute
        value, when using the ldapsam passdb backend. Another buffer overflow was
        found in the code used to support the 'mangling method = hash' smb.conf
        option (CAN-2004-0686). Note that the default Samba value for this option
        is 'mangling method = hash2' which is not vulnerable.
      
    Impact :
    
        The SWAT authentication overflow could be exploited to execute arbitrary
        code with the rights of the Samba daemon process. The overflow in the
        sambaMungedDial handling code is not thought to be exploitable. The buffer
        overflow in 'mangling method = hash' code could also be used to execute
        arbitrary code on vulnerable configurations.
      
    Workaround :
    
        Users disabling SWAT, not using ldapsam passdb backends and not using the
        'mangling method = hash' option are not vulnerable."
      );
      # http://www.samba.org/samba/whatsnew/samba-3.0.5.html
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.samba.org/samba/history/samba-3.0.5.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/200407-21"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All Samba users should upgrade to the latest version:
        # emerge sync
        # emerge -pv '>=net-fs/samba-3.0.5'
        # emerge '>=net-fs/samba-3.0.5'"
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:samba");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2004/07/29");
      script_set_attribute(attribute:"plugin_publication_date", value:"2004/08/30");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2004-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      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:"net-fs/samba", unaffected:make_list("ge 3.0.5"), vulnerable:make_list("le 3.0.4-r1"))) 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, "Samba");
    }
    

Oval

accepted2013-04-29T04:05:52.639-04:00
classvulnerability
contributors
  • nameAharon Chernin
    organizationSCAP.com, LLC
  • nameDragos Prisaca
    organizationG2, Inc.
definition_extensions
  • commentThe operating system installed on the system is Red Hat Enterprise Linux 3
    ovaloval:org.mitre.oval:def:11782
  • commentCentOS Linux 3.x
    ovaloval:org.mitre.oval:def:16651
descriptionBuffer overflow in Samba 2.2.x to 2.2.9, and 3.0.0 to 3.0.4, when the "mangling method = hash" option is enabled in smb.conf, has unknown impact and attack vectors.
familyunix
idoval:org.mitre.oval:def:10461
statusaccepted
submitted2010-07-09T03:56:16-04:00
titleBuffer overflow in Samba 2.2.x to 2.2.9, and 3.0.0 to 3.0.4, when the "mangling method = hash" option is enabled in smb.conf, has unknown impact and attack vectors.
version26

Redhat

advisories
rhsa
idRHSA-2004:259
rpms
  • samba-0:3.0.4-6.3E
  • samba-client-0:3.0.4-6.3E
  • samba-common-0:3.0.4-6.3E
  • samba-swat-0:3.0.4-6.3E