Vulnerabilities > CVE-2010-0728 - Permissions, Privileges, and Access Controls vulnerability in Samba 3.3.11/3.4.6/3.5.0
Attack vector
UNKNOWN Attack complexity
UNKNOWN Privileges required
UNKNOWN Confidentiality impact
UNKNOWN Integrity impact
UNKNOWN Availability impact
UNKNOWN Summary
smbd in Samba 3.3.11, 3.4.6, and 3.5.0, when libcap support is enabled, runs with the CAP_DAC_OVERRIDE capability, which allows remote authenticated users to bypass intended file permissions via standard filesystem operations with any client.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 3 |
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Accessing, Modifying or Executing Executable Files An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
- Leverage Executable Code in Non-Executable Files An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
- Blue Boxing This type of attack against older telephone switches and trunks has been around for decades. A tone is sent by an adversary to impersonate a supervisor signal which has the effect of rerouting or usurping command of the line. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded Telco infrastructure and so are vulnerable to Blue boxing. Blue boxing is a result of failure on the part of the system to enforce strong authorization for administrative functions. While the infrastructure is different than standard current applications like web applications, there are historical lessons to be learned to upgrade the access control for administrative functions.
- Restful Privilege Elevation Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
- Target Programs with Elevated Privileges This attack targets programs running with elevated privileges. The attacker would try to leverage a bug in the running program and get arbitrary code to execute with elevated privileges. For instance an attacker would look for programs that write to the system directories or registry keys (such as HKLM, which stores a number of critical Windows environment variables). These programs are typically running with elevated privileges and have usually not been designed with security in mind. Such programs are excellent exploit targets because they yield lots of power when they break. The malicious user try to execute its code at the same level as a privileged system call.
Nessus
NASL family Fedora Local Security Checks NASL id FEDORA_2010-4087.NASL description CVE-2010-0728 * http://www.samba.org/samba/security/CVE-2010-0728 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-01 modified 2020-06-02 plugin id 47337 published 2010-07-01 reporter This script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/47337 title Fedora 13 : samba-3.5.1-58.fc13 (2010-4087) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Fedora Security Advisory 2010-4087. # include("compat.inc"); if (description) { script_id(47337); script_version("1.14"); script_cvs_date("Date: 2019/08/02 13:32:32"); script_bugtraq_id(38606); script_xref(name:"FEDORA", value:"2010-4087"); script_name(english:"Fedora 13 : samba-3.5.1-58.fc13 (2010-4087)"); script_summary(english:"Checks rpm output for the updated package."); script_set_attribute( attribute:"synopsis", value:"The remote Fedora host is missing a security update." ); script_set_attribute( attribute:"description", value: "CVE-2010-0728 * http://www.samba.org/samba/security/CVE-2010-0728 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues." ); # http://www.samba.org/samba/security/CVE-2010-0728 script_set_attribute( attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2010-0728" ); # https://lists.fedoraproject.org/pipermail/package-announce/2010-March/036902.html script_set_attribute( attribute:"see_also", value:"http://www.nessus.org/u?2685e5e9" ); script_set_attribute(attribute:"solution", value:"Update the affected samba package."); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E: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_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:samba"); script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:13"); script_set_attribute(attribute:"patch_publication_date", value:"2010/03/10"); script_set_attribute(attribute:"plugin_publication_date", value:"2010/07/01"); 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:"Fedora Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "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); release = get_kb_item("Host/RedHat/release"); if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora"); os_ver = eregmatch(pattern: "Fedora.*release ([0-9]+)", string:release); if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora"); os_ver = os_ver[1]; if (! ereg(pattern:"^13([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 13.x", "Fedora " + 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$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu); flag = 0; if (rpm_check(release:"FC13", reference:"samba-3.5.1-58.fc13")) 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, "samba"); }
NASL family Misc. NASL id SAMBA_FILE_PERMISSIONS_SECURITY_BYPASS_VERSION.NASL description The remote Samba server is potentially affected by a security bypass vulnerability because of a flaw that causes all smbd processes, when libcap support is enabled, to inherit last seen 2020-06-02 modified 2010-03-12 plugin id 45046 published 2010-03-12 reporter This script is Copyright (C) 2010-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/45046 title Samba 'CAP_DAC_OVERRIDE' File Permission Security Bypass (version check) code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(45046); script_version("1.15"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/01"); script_cve_id("CVE-2010-0728"); script_bugtraq_id(38606); script_name(english:"Samba 'CAP_DAC_OVERRIDE' File Permission Security Bypass (version check)"); script_summary(english:"Checks the version of Samba."); script_set_attribute(attribute:"synopsis", value:"The remote file server is vulnerable to a security bypass attack."); script_set_attribute(attribute:"description", value: "The remote Samba server is potentially affected by a security bypass vulnerability because of a flaw that causes all smbd processes, when libcap support is enabled, to inherit 'CAP_DAC_OVERRIDE' capabilities, which in turn causes all file system access to be allowed even when permissions should have been denied. A remote, authenticated attacker may be able to exploit this flaw to gain access to sensitive information on Samba shares that are accessible to their user id."); script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2010-0728.html"); script_set_attribute(attribute:"see_also", value:"https://bugzilla.samba.org/show_bug.cgi?id=7222"); script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/security/"); script_set_attribute(attribute:"solution", value:"Upgrade to Samba 3.3.12, 3.4.7, 3.5.1, or later."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:S/C:C/I:C/A:C"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"); script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C"); script_set_attribute(attribute:"cvss_score_source", value:"CVE-2010-0728"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"exploit_available", value:"false"); script_cwe_id(264); script_set_attribute(attribute:"vuln_publication_date", value:"2010/03/09"); script_set_attribute(attribute:"patch_publication_date", value:"2010/03/09"); script_set_attribute(attribute:"plugin_publication_date", value:"2010/03/12"); script_set_attribute(attribute:"potential_vulnerability", value:"true"); script_set_attribute(attribute:"plugin_type", value:"remote"); script_set_attribute(attribute:"cpe", value:"cpe:/a:samba:samba"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_family(english:"Misc."); script_copyright(english:"This script is Copyright (C) 2010-2020 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("smb_nativelanman.nasl"); script_require_keys("SMB/samba", "SMB/NativeLanManager", "Settings/ParanoidReport"); exit(0); } include("audit.inc"); include("global_settings.inc"); if (report_paranoia < 2) audit(AUDIT_PARANOID); lanman = get_kb_item("SMB/NativeLanManager"); if (isnull(lanman)) exit(1, "The 'SMB/NativeLanManager' KB item is missing."); if ("samba " >!< tolower(lanman)) exit(0, "The host is not using Samba."); # nb: the vulnerability was introduced in 3.5.0 / 3.4.6 / 3.3.11 - only # those versions are affected. if ( ereg(pattern:"Samba 3\.(3\.11|4\.6|)($|[^[0-9])", string:lanman, icase:TRUE) || ereg(pattern:"Samba 3\.5([^\.0-9]|\.0|$)", string:lanman, icase:TRUE) ) { if (report_verbosity > 0) { report = '\n' + 'The remote Samba server appears to be :\n' + '\n' + ' ' + lanman + '\n'; security_hole(port:get_kb_item("SMB/transport"),extra:report); } else security_hole(port:get_kb_item("SMB/transport")); exit(0); } exit(0, "The host is not affected because " + lanman + " is installed.");
NASL family Fedora Local Security Checks NASL id FEDORA_2010-4050.NASL description CVE-2010-0728 * http://www.samba.org/samba/security/CVE-2010-0728 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-01 modified 2020-06-02 plugin id 47334 published 2010-07-01 reporter This script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/47334 title Fedora 11 : samba-3.4.7-0.50.fc11 (2010-4050) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Fedora Security Advisory 2010-4050. # include("compat.inc"); if (description) { script_id(47334); script_version("1.15"); script_cvs_date("Date: 2019/08/02 13:32:32"); script_cve_id("CVE-2010-0787"); script_bugtraq_id(38606); script_xref(name:"FEDORA", value:"2010-4050"); script_name(english:"Fedora 11 : samba-3.4.7-0.50.fc11 (2010-4050)"); script_summary(english:"Checks rpm output for the updated package."); script_set_attribute( attribute:"synopsis", value:"The remote Fedora host is missing a security update." ); script_set_attribute( attribute:"description", value: "CVE-2010-0728 * http://www.samba.org/samba/security/CVE-2010-0728 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues." ); # http://www.samba.org/samba/security/CVE-2010-0728 script_set_attribute( attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2010-0728" ); # https://lists.fedoraproject.org/pipermail/package-announce/2010-March/036861.html script_set_attribute( attribute:"see_also", value:"http://www.nessus.org/u?5989a0ce" ); script_set_attribute(attribute:"solution", value:"Update the affected samba package."); script_set_cvss_base_vector("CVSS2#AV:L/AC:M/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"exploit_available", value:"false"); script_cwe_id(59); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:samba"); script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:11"); script_set_attribute(attribute:"patch_publication_date", value:"2010/03/10"); script_set_attribute(attribute:"plugin_publication_date", value:"2010/07/01"); 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:"Fedora Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "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); release = get_kb_item("Host/RedHat/release"); if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora"); os_ver = eregmatch(pattern: "Fedora.*release ([0-9]+)", string:release); if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora"); os_ver = os_ver[1]; if (! ereg(pattern:"^11([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 11.x", "Fedora " + 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$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu); flag = 0; if (rpm_check(release:"FC11", reference:"samba-3.4.7-0.50.fc11")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get()); else security_warning(0); exit(0); } else { tested = pkg_tests_get(); if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested); else audit(AUDIT_PACKAGE_NOT_INSTALLED, "samba"); }
NASL family Gentoo Local Security Checks NASL id GENTOO_GLSA-201206-22.NASL description The remote host is affected by the vulnerability described in GLSA-201206-22 (Samba: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in Samba. Please review the CVE identifiers referenced below for details. Impact : A remote attacker could possibly execute arbitrary code with root privileges, cause a Denial of Service condition, take ownership of shared files, or bypass file permissions. Furthermore, a local attacker may be able to cause a Denial of Service condition or obtain sensitive information in a Samba credentials file. Workaround : There is no known workaround at this time. last seen 2020-06-01 modified 2020-06-02 plugin id 59675 published 2012-06-25 reporter This script is Copyright (C) 2012-2018 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/59675 title GLSA-201206-22 : Samba: Multiple vulnerabilities code # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Gentoo Linux Security Advisory GLSA 201206-22. # # The advisory text is Copyright (C) 2001-2016 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(59675); script_version("1.12"); script_cvs_date("Date: 2018/07/11 17:09:26"); script_cve_id("CVE-2009-2906", "CVE-2009-2948", "CVE-2010-0728", "CVE-2010-1635", "CVE-2010-1642", "CVE-2010-2063", "CVE-2010-3069", "CVE-2011-0719", "CVE-2011-1678", "CVE-2011-2724", "CVE-2012-0870", "CVE-2012-1182", "CVE-2012-2111"); script_bugtraq_id(36572, 36573, 38326, 38606, 40097, 40884, 43212, 46597, 49939, 52103, 52973, 53307); script_xref(name:"GLSA", value:"201206-22"); script_name(english:"GLSA-201206-22 : Samba: Multiple vulnerabilities"); 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-201206-22 (Samba: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in Samba. Please review the CVE identifiers referenced below for details. Impact : A remote attacker could possibly execute arbitrary code with root privileges, cause a Denial of Service condition, take ownership of shared files, or bypass file permissions. Furthermore, a local attacker may be able to cause a Denial of Service condition or obtain sensitive information in a Samba credentials file. Workaround : There is no known workaround at this time." ); script_set_attribute( attribute:"see_also", value:"https://security.gentoo.org/glsa/201206-22" ); script_set_attribute( attribute:"solution", value: "All Samba users should upgrade to the latest version: # emerge --sync # emerge --ask --oneshot --verbose '>=net-fs/samba-3.5.15'" ); 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:F/RL:OF/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available"); script_set_attribute(attribute:"exploit_available", value:"true"); script_set_attribute(attribute:"exploit_framework_core", value:"true"); script_set_attribute(attribute:"metasploit_name", value:'Samba SetInformationPolicy AuditEventsInfo Heap Overflow'); script_set_attribute(attribute:"exploit_framework_metasploit", value:"true"); script_set_attribute(attribute:"exploit_framework_canvas", value:"true"); script_set_attribute(attribute:"canvas_package", value:'CANVAS'); script_cwe_id(264); 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:"2012/06/24"); script_set_attribute(attribute:"plugin_publication_date", value:"2012/06/25"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2012-2018 Tenable Network Security, Inc."); script_family(english:"Gentoo Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/Gentoo/release", "Host/Gentoo/qpkg-list"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("qpkg.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); if (!get_kb_item("Host/Gentoo/release")) audit(AUDIT_OS_NOT, "Gentoo"); if (!get_kb_item("Host/Gentoo/qpkg-list")) audit(AUDIT_PACKAGE_LIST_MISSING); flag = 0; if (qpkg_check(package:"net-fs/samba", unaffected:make_list("ge 3.5.15"), vulnerable:make_list("lt 3.5.15"))) 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"); }
NASL family Misc. NASL id SAMBA_FILE_PERMISSIONS_SECURITY_BYPASS.NASL description The remote Samba server has a flaw that causes all smbd processes, when libcap support is enabled, to inherit last seen 2020-06-01 modified 2020-06-02 plugin id 45047 published 2010-03-12 reporter This script is Copyright (C) 2010-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/45047 title Samba 'CAP_DAC_OVERRIDE' File Permission Security Bypass code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(45047); script_version("1.21"); script_cvs_date("Date: 2018/11/15 20:50:24"); script_cve_id("CVE-2010-0728"); script_bugtraq_id(38606); script_name(english:"Samba 'CAP_DAC_OVERRIDE' File Permission Security Bypass"); script_summary(english:"Attempts to read secure files from an inaccessible Samba share."); script_set_attribute(attribute:"synopsis", value:"The remote file server is vulnerable to a security bypass attack."); script_set_attribute(attribute:"description", value: "The remote Samba server has a flaw that causes all smbd processes, when libcap support is enabled, to inherit 'CAP_DAC_OVERRIDE' capabilities, which in turn causes all file system access to be allowed even when permissions should have been denied. A remote, authenticated attacker can exploit this flaw to gain access to sensitive information on Samba shares that are accessible to their user id."); script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2010-0728.html"); script_set_attribute(attribute:"see_also", value:"https://bugzilla.samba.org/show_bug.cgi?id=7222"); script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/security/"); script_set_attribute(attribute:"solution", value:"Upgrade to Samba 3.3.12, 3.4.7, 3.5.1, or later."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:S/C:C/I:C/A:C"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"); script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C"); script_set_attribute(attribute:"cvss_score_source", value:"CVE-2010-0728"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"exploit_available", value:"false"); script_cwe_id(264); script_set_attribute(attribute:"vuln_publication_date", value:"2010/03/09"); script_set_attribute(attribute:"patch_publication_date", value:"2010/03/09"); script_set_attribute(attribute:"plugin_publication_date", value:"2010/03/12"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"cpe:/a:samba:samba"); script_set_attribute(attribute:"exploited_by_nessus", value:"true"); script_end_attributes(); script_category(ACT_ATTACK); script_family(english:"Misc."); script_copyright(english:"This script is Copyright (C) 2010-2018 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("smb_accessible_shares.nasl"); script_require_keys("SMB/samba"); script_require_ports(139, 445); exit(0); } include("global_settings.inc"); include("misc_func.inc"); include("smb_func.inc"); include("byte_func.inc"); include("data_protection.inc"); lanman = get_kb_item_or_exit("SMB/NativeLanManager"); if ("Samba " >!< lanman) exit(0, "The SMB service is not running Samba."); FIND_FIRST2 = 0x0001; FIND_FILE_BOTH_DIRECTORY_INFO = 0x0401; #taken from samba_symlink_dir_traversal.nasl function smb_get_error_code(data) { local_var header, flags2, code; #Some checks in the header first header = get_smb_header (smbblob:data); if (!header) return NULL; flags2 = get_header_flags2(header:header); if (flags2 && SMB_FLAGS2_32BIT_STATUS) { code = get_header_nt_error_code(header:header); } else { code = get_header_dos_error_code(header:header); } return code; } function trans2_get_data_size(data) { return get_word(blob:data, pos:SMB_HDR_SIZE+3); } function get_file_names(data, size) { local_var offset, pos, buffer; local_var filensize, files, dat, file; local_var i; files = make_list(); pos = 0; buffer = 2; while((pos < size) && (max_index(files) < 5)) { file = ''; offset = get_dword(blob:data, pos:pos); filensize = get_dword(blob:data, pos:pos+60); if ((pos == 0) || ((pos+offset) == size)) dat = substr(data, (offset+pos)-filensize, (offset+pos)-1); else dat = substr(data, (offset+pos)-filensize-2, (offset+pos)-3); for (i=0; i<filensize-1; i+=2) { file = file + string(dat[i]); } files[max_index(files)] = file; pos = pos+offset; } return files; } #Build the Trans2 request for a directory listing function list_files() { local_var header, findfirst2_param, params, code; local_var smb_params, smb_data, nb_pkt, ret; local_var dat, datsize; header = smb_header(Command:SMB_COM_TRANSACTION2, Status:nt_status(Status:STATUS_SUCCESS)); findfirst2_param = raw_word(w:0x0016) + # Search Attributes raw_word(w:1366) + #Search count raw_word(w:0x006) + # Flags raw_word(w:260) + #Level of interest raw_dword(d:0) + #Storage Type unicode(string:"\*"); #Search Pattern params = raw_word(w:strlen(findfirst2_param)) + #param len raw_word(w:0) + # data len raw_word(w:10) + # max param count raw_word(w:0xffff) + # max data count raw_byte(b:0) + # max setup count raw_byte(b:0) + # reserved raw_word(w:0) + # flags raw_dword(d:0) + # timeout (return immediately) raw_word(w:0) + # reserved raw_word(w:strlen(findfirst2_param)) + # param len raw_word(w:68) + # parameter offset raw_word(w:0) + # data len raw_word(w:68+strlen(findfirst2_param)) + # data offset raw_byte(b:1) + # setup count raw_byte(b:0) + # reserved raw_word(w:FIND_FIRST2); # subcommand smb_params = smb_parameters(data:params); smb_data = smb_data(data:mkbyte(0)+mkword(0)+findfirst2_param); nb_pkt = netbios_packet(header:header, parameters:smb_params, data:smb_data); ret = smb_sendrecv(data:nb_pkt); if (!ret) return NULL; code = smb_get_error_code(data:ret); if (code == int(STATUS_NETWORK_ACCESS_DENIED)) return make_list(code); else if (smb_check_success(data:ret) == FALSE) return NULL; datsize = trans2_get_data_size(data:ret); dat = get_smb_data (smbblob:ret); dat = substr(dat, 13, strlen(dat)-1); dat = get_file_names(data:dat, size:datsize); return dat; } #Determine the inaccessible shares axx_shares = get_kb_item("SMB/accessible_shares/1"); inaxx_shares = make_list(); counter = 0; list = get_kb_list("SMB/shares"); if (!isnull(list)) { list = make_list(list); foreach item (list) { litem = tolower(item); if ((item >!< axx_shares) && (litem != "ipc$") && (litem != "print$")) { inaxx_shares[counter] = item; counter++; } } } #Get SMB KB information name = kb_smb_name(); port = kb_smb_transport(); if (!get_port_state(port)) exit(0, "Port "+port+" is not open."); login = kb_smb_login(); pass = kb_smb_password(); domain = kb_smb_domain(); soc = open_sock_tcp(port); if (!soc) exit(1, "Failed to open a socket on port "+port+". \n"); vulnshares=0;; output = NULL; info = NULL; connect_share=FALSE; session_init(socket:soc, hostname:name, report_access:FALSE); # Attempt to get a directory listing of inaccessible shares. rc = NetUseAdd(login:login, password:pass, domain:domain); if (rc != 1) { NetUseDel(); exit(1, "Can't connect to the Samba server on port "+port+"."); } foreach share (inaxx_shares) { rc = NetUseAdd(share:share); #Attempt to do a directory listing of the share if (rc == 1) { connect_share=TRUE; res = list_files(); if (!empty_or_null(res) && res[0] != int(STATUS_NETWORK_ACCESS_DENIED)) { vulnshares++; if (report_verbosity > 1) { info = info + 'Share : ' + '\n' + share + '\n'; if (isnull(res)) { info += '\n' + 'It was possible to request a directory listing, but there was an \n'+ 'error retrieving the contents.\n'+ '\n'; } else { for (i=0; i<max_index(res); i++) output = output + res[i] + '\n'; info += '\n' + 'The following file were found on share '+share+' (top 5 files) :\n' + '\n' + crap(data:"-", length:30) + " snip " + crap(data:"-", length:30) + '\n' + data_protection::sanitize_user_full_redaction(output:output) + crap(data:"-", length:30) + " snip " + crap(data:"-", length:30) + '\n\n'; } } else { info = info + share; } } NetUseDel(close:FALSE); if (!thorough_tests) break; } } NetUseDel(); if (!connect_share) exit(0, "Nessus failed to connect to any inaccessible shares."); if (vulnshares > 0) { if (report_verbosity > 0) { if (vulnshares > 1) s='s'; else s=''; report = '\n' + 'Nessus was able to enumerate files on the following share'+s+' with an\n'+ 'unprivileged user.\n' + '\n'+ 'User : ' + data_protection::sanitize_user_enum(users:login) + '\n'; report = data_protection::sanitize_user_paths(report_text:report + info); security_hole(port:port, extra:report); } else security_hole(port:port); exit(0); } exit(0, "The Samba server on port "+port+" is not affected.");
NASL family Fedora Local Security Checks NASL id FEDORA_2010-3999.NASL description CVE-2010-0728 * http://www.samba.org/samba/security/CVE-2010-0728 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-01 modified 2020-06-02 plugin id 47333 published 2010-07-01 reporter This script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/47333 title Fedora 12 : samba-3.4.7-58.fc12 (2010-3999) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Fedora Security Advisory 2010-3999. # include("compat.inc"); if (description) { script_id(47333); script_version("1.14"); script_cvs_date("Date: 2019/08/02 13:32:32"); script_cve_id("CVE-2010-0787"); script_bugtraq_id(38606); script_xref(name:"FEDORA", value:"2010-3999"); script_name(english:"Fedora 12 : samba-3.4.7-58.fc12 (2010-3999)"); script_summary(english:"Checks rpm output for the updated package."); script_set_attribute( attribute:"synopsis", value:"The remote Fedora host is missing a security update." ); script_set_attribute( attribute:"description", value: "CVE-2010-0728 * http://www.samba.org/samba/security/CVE-2010-0728 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues." ); # http://www.samba.org/samba/security/CVE-2010-0728 script_set_attribute( attribute:"see_also", value:"https://www.samba.org/samba/security/CVE-2010-0728" ); # https://lists.fedoraproject.org/pipermail/package-announce/2010-March/036963.html script_set_attribute( attribute:"see_also", value:"http://www.nessus.org/u?796071a8" ); script_set_attribute(attribute:"solution", value:"Update the affected samba package."); script_set_cvss_base_vector("CVSS2#AV:L/AC:M/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"exploit_available", value:"false"); script_cwe_id(59); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:samba"); script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:12"); script_set_attribute(attribute:"patch_publication_date", value:"2010/03/10"); script_set_attribute(attribute:"plugin_publication_date", value:"2010/07/01"); 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:"Fedora Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "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); release = get_kb_item("Host/RedHat/release"); if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora"); os_ver = eregmatch(pattern: "Fedora.*release ([0-9]+)", string:release); if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora"); os_ver = os_ver[1]; if (! ereg(pattern:"^12([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 12.x", "Fedora " + 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$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu); flag = 0; if (rpm_check(release:"FC12", reference:"samba-3.4.7-58.fc12")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get()); else security_warning(0); exit(0); } else { tested = pkg_tests_get(); if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested); else audit(AUDIT_PACKAGE_NOT_INSTALLED, "samba"); }
NASL family Fedora Local Security Checks NASL id FEDORA_2010-14678.NASL description - Thu Sep 9 2010 Guenther Deschner <gdeschner at redhat.com> - 3.4.9-60 - Security Release, fixes CVE-2010-3069 - resolves: #630869 - Wed May 12 2010 Guenther Deschner <gdeschner at redhat.com> - 3.4.8-59 - Update to 3.4.8 - Make sure nmb and smb initscripts return LSB compliant return codes - resolves: #521095 - Mon Mar 8 2010 Simo Sorce <ssorce at redhat.com> - 3.4.7-58 - Security update to 3.4.7 - Fixes CVE-2010-0728 - Wed Feb 24 2010 Guenther Deschner <gdeschner at redhat.com> - 3.4.6-57 - Update to 3.4.6 - Wed Feb 17 2010 Guenther Deschner <gdeschner at redhat.com> - 3.4.5-56 - Fix crash in cifs.upcall - resolves: #565446 - Tue Jan 26 2010 Guenther Deschner <gdeschner at redhat.com> - 3.4.5-55 - Security Release, fixes CVE-2009-3297 - resolves: #532940 - Tue Jan 26 2010 Guenther Deschner <gdeschner at redhat.com> - 3.4.5-54 - Fix crash in pdbedit - resolves: #541267 - Tue Jan 19 2010 Guenther Deschner <gdeschner at redhat.com> - 3.4.5-53 - Update to 3.4.5 - Thu Jan 14 2010 Guenther Deschner <gdeschner at redhat.com> - 3.4.4-52 - Fix crash bug in libsmbclient (SMBC_parse_path) - resolves: #552658 - Thu Jan 7 2010 Guenther Deschner <gdeschner at redhat.com> - 3.4.4-51 - Update to 3.4.4 - Tue Dec 1 2009 Guenther Deschner <gdeschner at redhat.com> - 3.4.3-50 - Fix uninitialized rpc client pipe, causing winbind to crash - resolves: #541328 - Wed Nov 25 2009 Guenther Deschner <gdeschner at redhat.com> - 3.4.3-49 - Various updates to inline documentation in default smb.conf file - resolves: #483703 - Thu Oct 29 2009 Guenther Deschner <gdeschner at redhat.com> - 3.4.3-48 - Update to 3.4.3 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-01 modified 2020-06-02 plugin id 49248 published 2010-09-16 reporter This script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/49248 title Fedora 12 : samba-3.4.9-60.fc12 (2010-14678)
Seebug
bulletinFamily | exploit |
description | BUGTRAQ ID: 38606 CVE ID: CVE-2010-0728 Samba是一套实现SMB(Server Messages Block)协议、跨平台进行文件共享和打印共享服务的程序。 如果启用了libcap支持,则所有的smbd进程都继承了CAP_DAC_OVERRIDE功能标记,这允许通过认证的远程用户通过标准的文件系统操作绕过预期的文件权限限制读写访问文件。 Samba Samba 3.5.0 Samba Samba 3.4.6 Samba Samba 3.3.11 厂商补丁: Samba ----- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: http://www.samba.org/samba/history/samba-3.5.1.html http://www.samba.org/samba/history/samba-3.4.7.html http://www.samba.org/samba/history/samba-3.3.12.html |
id | SSV:19271 |
last seen | 2017-11-19 |
modified | 2010-03-14 |
published | 2010-03-14 |
reporter | Root |
title | Samba CAP_DAC_OVERRIDE文件权限绕过安全限制漏洞 |
Statements
contributor | Vincent Danen |
lastmodified | 2010-03-12 |
organization | Red Hat |
statement | Not vulnerable. This issue did not affect the versions of the samba package, as shipped with Red Hat Enterprise Linux 3, 4, or 5. This issue did not affect the version of the samba3x package, as shipped with Red Hat Enterprise Linux 5. |
References
- http://lists.samba.org/archive/samba-announce/2010/000211.html
- http://lists.samba.org/archive/samba-announce/2010/000211.html
- http://www.samba.org/samba/history/samba-3.3.12.html
- http://www.samba.org/samba/history/samba-3.3.12.html
- http://www.samba.org/samba/history/samba-3.4.7.html
- http://www.samba.org/samba/history/samba-3.4.7.html
- http://www.samba.org/samba/history/samba-3.5.1.html
- http://www.samba.org/samba/history/samba-3.5.1.html
- http://www.samba.org/samba/security/CVE-2010-0728
- http://www.samba.org/samba/security/CVE-2010-0728
- https://bugzilla.samba.org/show_bug.cgi?id=7222
- https://bugzilla.samba.org/show_bug.cgi?id=7222