Vulnerabilities > CVE-2009-1394 - Buffer Errors vulnerability in Motorola Timbuktu PRO 8.6.5

047910
CVSS 9.3 - CRITICAL
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
microsoft
motorola
CWE-119
critical
nessus
exploit available
metasploit

Summary

Stack-based buffer overflow in Motorola Timbuktu Pro 8.6.5 on Windows allows remote attackers to execute arbitrary code by sending a long malformed string over the PlughNTCommand named pipe.

Vulnerable Configurations

Part Description Count
OS
Microsoft
1
Application
Motorola
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Exploit-Db

descriptionTimbuktu. CVE-2009-1394. Remote exploit for windows platform
idEDB-ID:16370
last seen2016-02-01
modified2010-04-30
published2010-04-30
reportermetasploit
sourcehttps://www.exploit-db.com/download/16370/
titleTimbuktu <= 8.6.6 PlughNTCommand Named Pipe Buffer Overflow

Metasploit

descriptionThis module exploits a stack based buffer overflow in Timbuktu Pro version <= 8.6.6 in a pretty novel way. This exploit requires two connections. The first connection is used to leak stack data using the buffer overflow to overwrite the nNumberOfBytesToWrite argument. By supplying a large value for this argument it is possible to cause Timbuktu to reply to the initial request with leaked stack data. Using this data allows for reliable exploitation of the buffer overflow vulnerability. Props to Infamous41d for helping in finding this exploitation path. The second connection utilizes the data from the data leak to accurately exploit the stack based buffer overflow vulnerability. TODO: hdm suggested using meterpreter's migration capability and restarting the process for multishot exploitation.
idMSF:EXPLOIT/WINDOWS/SMB/TIMBUKTU_PLUGHNTCOMMAND_BOF
last seen2020-03-18
modified2017-07-24
published2009-12-10
references
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/windows/smb/timbuktu_plughntcommand_bof.rb
titleTimbuktu PlughNTCommand Named Pipe Buffer Overflow

Nessus

NASL familyWindows
NASL idTIMBUKTU_867.NASL
descriptionThe remote Windows host contains a version of Motorola Inc.
last seen2020-06-01
modified2020-06-02
plugin id39563
published2009-06-28
reporterThis script is Copyright (C) 2009-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/39563
titleTimbuktu Pro < 8.6.7 PlughNTCommand Named Pipe Remote Stack Buffer Overflow
code
#
# (C) Tenable Network Security, Inc.
#


include("compat.inc");


if (description)
{
  script_id(39563);
  script_version("1.17");
  script_cvs_date("Date: 2018/11/15 20:50:29");

  script_cve_id("CVE-2009-1394");
  script_bugtraq_id(35496);

  script_name(english:"Timbuktu Pro < 8.6.7 PlughNTCommand Named Pipe Remote Stack Buffer Overflow");
  script_summary(english:"Checks version of tb2pro.exe");

  script_set_attribute(attribute:"synopsis", value:
"The remote Windows host contains a program that is prone to a remote
buffer overflow attack.");
  script_set_attribute(attribute:"description", value:
"The remote Windows host contains a version of Motorola Inc.'s Timbuktu
Pro that is earlier than 8.6.7. Timbuktu Pro allows remote access to a
computer's desktop, and versions before 8.6.7 reportedly contain a
stack-based buffer overflow that can be triggered when the
'PlughNTCommand' named pipe receives an overly large character string.
An unauthenticated, remote attacker can leverage this issue to crash
the affected application or to execute arbitrary code with SYSTEM
privileges.");
  # http://www.verisigninc.com/en_US/cyber-security/security-intelligence/vulnerability-reports/articles/index.xhtml?id=809
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?34edc10d");
  script_set_attribute(attribute:"see_also", value:"https://www.securityfocus.com/archive/1/504554/30/0/threaded");
  # ftp://ftp-xo.netopia.com/evaluation/docs/timbuktu/win/867/relnotes/TB2Win867Evalrn.pdf
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?41cf5a58");
  script_set_attribute(attribute:"solution", value:"Upgrade to Timbuktu Pro for Windows version 8.6.7 or later.");
  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:'Timbuktu PlughNTCommand Named Pipe Buffer Overflow');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_cwe_id(119);

  script_set_attribute(attribute:"plugin_publication_date", value:"2009/06/28");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Windows");

  script_copyright(english:"This script is Copyright (C) 2009-2018 Tenable Network Security, Inc.");

  script_dependencies("smb_hotfixes.nasl");
  script_require_keys("SMB/Registry/Enumerated");
  script_require_ports(139, 445);

  exit(0);
}


include("global_settings.inc");
include("smb_func.inc");
include("audit.inc");


# Connect to the appropriate share.
if (!get_kb_item("SMB/Registry/Enumerated")) exit(0);
name    =  kb_smb_name();
port    =  kb_smb_transport();
login   =  kb_smb_login();
pass    =  kb_smb_password();
domain  =  kb_smb_domain();



if(! smb_session_init()) audit(AUDIT_FN_FAIL, 'smb_session_init');
rc = NetUseAdd(login:login, password:pass, domain:domain, share:"IPC$");
if (rc != 1)
{
  NetUseDel();
  exit(1, "Can't connect to IPC$ share.");
}


# Connect to remote registry.
hklm = RegConnectRegistry(hkey:HKEY_LOCAL_MACHINE);
if (isnull(hklm))
{
  NetUseDel();
  exit(1, "Can't connect to remote registry.");
}


# Check whether it's installed.
path = NULL;

key = "SOFTWARE\Netopia\Timbuktu Pro";
key_h = RegOpenKey(handle:hklm, key:key, mode:MAXIMUM_ALLOWED);
if (!isnull(key_h))
{
  value = RegQueryValue(handle:key_h, item:"InstallPath");
  if (!isnull(value))
  {
    path = value[1];
    path = ereg_replace(pattern:"^(.+)\\$", replace:"\1", string:path);
  }

  RegCloseKey(handle:key_h);
}
RegCloseKey(handle:hklm);
if (isnull(path))
{
  NetUseDel();
  exit(0, "Timbuktu Pro is not installed.");
}


# Check the version of the main exe.
share = ereg_replace(pattern:"^([A-Za-z]):.*", replace:"\1$", string:path);
exe =  ereg_replace(pattern:"^[A-Za-z]:(.*)", replace:"\1\tb2pro.exe", string:path);
NetUseDel(close:FALSE);
rc = NetUseAdd(login:login, password:pass, domain:domain, share:share);
if (rc != 1)
{
  NetUseDel();
  exit(1, "Can't connect to "+share+" share.");
}

fh = CreateFile(
  file:exe,
  desired_access:GENERIC_READ,
  file_attributes:FILE_ATTRIBUTE_NORMAL,
  share_mode:FILE_SHARE_READ,
  create_disposition:OPEN_EXISTING
);
ver = NULL;
if (!isnull(fh))
{
  ver = GetFileVersion(handle:fh);
  CloseFile(handle:fh);
}
NetUseDel();


# Check the version number.
if (!isnull(ver))
{
  version = string(ver[0], ".", ver[1], ".", ver[2]);

  fix = split("8.6.7.1379", sep:'.', keep:FALSE);
  for (i=0; i<max_index(fix); i++)
    fix[i] = int(fix[i]);

  for (i=0; i<max_index(ver); i++)
    if ((ver[i] < fix[i]))
    {
      if (report_verbosity > 0)
      {
        report = string(
          "\n",
          "  Version : ", version, "\n",
          "  Path    : ", path, "\n"
        );
        security_hole(port:port, extra:report);
      }
      else security_hole(port);
      exit(0);
    }
    else if (ver[i] > fix[i])
      break;

  exit(0, "Timbuktu Pro version "+version+" is installed and not vulnerable.");
}
else exit(1, "Couldn't get file version of '"+exe+"'.");

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/84578/timbuktu_plughntcommand_bof.rb.txt
idPACKETSTORM:84578
last seen2016-12-05
published2009-12-31
reporterbannedit
sourcehttps://packetstormsecurity.com/files/84578/Timbuktu-8.6.6-PlughNTCommand-Named-Pipe-Buffer-Overflow.html
titleTimbuktu <= 8.6.6 PlughNTCommand Named Pipe Buffer Overflow

Saint

bid35496
descriptionMotorola Timbuktu PlughNTCommand named pipe string buffer overflow
idmisc_timbuktu_ver
osvdb55436
titletimbuktu_plughntcommand
typeremote

Seebug

bulletinFamilyexploit
descriptionBugraq ID: 35496 CVE ID:CVE-2009-1394 Motorola Timbuktu Pro是一款远程控制软件,允许远程访问计算机桌面。 Motorola Timbuktu Pro没有正确处理用户通过命名管道提交超长数据,远程攻击者可以利用漏洞以应用程序权限执行任意指令。 通过PlughNTCommand命名管道提交超长字符串,可触发栈溢出,导致以应用程序权限执行任意代码。 Motorola Timbuktu Pro for Windows 8.6.5 Motorola Timbuktu Pro for Windows 8.6.3 .1367 Motorola Timbuktu 8.6.5 厂商解决方案 升级到Motorola Timbuktu Pro for Windows 8.6.7版本: http://netopia.com/software/products/tb2/
idSSV:11727
last seen2017-11-19
modified2009-06-30
published2009-06-30
reporterRoot
titleMotorola Timbuktu Pro 'PlughNTCommand'命名管道远程栈缓冲区溢出漏洞