Core
 
Timbuktu Pro Remote Path Traversal and Log Injection


Core Security Technologies - CoreLabs Advisory
http://www.coresecurity.com/corelabs/

Advisory Information

Title: Timbuktu Pro Remote Path Traversal and Log Injection
Advisory ID: CORE-2008-0204
Advisory URL: http://www.coresecurity.com/?action=item&id=2166
Date published: 2008-03-11
Date of last update: 2008-03-11
Vendors contacted: Motorola
Release mode: Forced release

Vulnerability Information

Class: Remote Path Traversal
Remotely Exploitable: Yes
Locally Exploitable: No
Bugtraq ID: 28081
CVE Name: CVE-2008-1117 CVE-2008-1118

Vulnerability Description

Timbuktu Pro [1] is a desktop-to-desktop remote control software for the Windows and Macintosh operating systems. The following vulnerabilities have been identified in Timbuktu Pro:

1) File transfer directory traversal (CVE-2008-1117): The '\' and '/' are not properly sanitized when checking the destination filename. The problem resides in the Notes feature implemented by tb2ftp.dll loaded by the tb2pro.exe. This is the main issue.

2) Log input manipulation (CVE-2008-1118): Several fields of the packet containing peer information (computer name, user name and IP address) are taken from the packet sent to the target and used to display this information on the screen of the target.

The vulnerabilities discovered allow a remote attacker to upload a file to an arbitrary location on the victim's machine and forge peer information on the log lines of the victim's application. For example, an attacker could write an executable in a startup directory of the victim's machine and wait for the user to restart his/her machine. Another example is to write a fake system DLL in an existing program directory, inducing Windows to load this module instead of the real DLL from C:\WINDOWS\system32\

Vulnerable packages

  • Timbuktu Pro 8.6.5 for Windows.
  • Timbuktu Pro 8.7 for Mac OS X may also be vulnerable.

Non-vulnerable packages

Vendor Information, Solutions and Workarounds

Contact the vendor for fix information.

Credits

This vulnerability was discovered and researched by Sebastián Muñiz from CORE IMPACT's Exploit Writing Team (EWT), Core Security Technologies.

Technical Description / Proof of Concept Code

The most important bug is the directory traversal (1) bug for the Flash Notes feature of the Timbuktu Pro client.

Timbuktu Pro is able to send Flash Notes (like an instant message) and attach files to those notes. Both the message (which will be written to a text file once received by the target) and the files attached to the note are transferred to a temporal folder on the target installation folder (default path is C:\Program Files\Timbuktu Pro\). The file transfer begins and it is unnoticed by the target user. Once the transfer is complete, the target user is shown a dialogue on the screen that displays the message with the names of the files attached.

The user reads the message and he/she can decide whether or not to keep the uploaded files. If the user closes the message dialogue, the files are deleted from the temp folder; otherwise they are kept. The bug allows the attacker to upload a file to ANY location relative to the Timbuktu Pro installation folder with an attacker-selected filename for the target.

Another very important thing is that when the files are stored outside the temporal folder, they are not deleted even if the user refuses to save the file.

Additionally, the attacker can avoid displaying the dialogue that notifies the user about the message and the attached files making the attack invisible for the target.

The other bug is a logging file content manipulation vulnerability allowing the attacker to use the data inside protocol's packet to disrupt the log file with control characters like '\n' and others. This bug is not very important alone, but could be combined with the traversal bug to cover tracks about the file upload inserting false log lines or control characters.

In the following code the the program obtains the filename from the packet searching from right to left for the filename without the path following the last '\'. Then if a '\' character is found then it doesn't search for the character '/', making it possible to traverse the directories, sending a filename like \../../../evil.exe. In this example, the resulting filename extracted is ../../../evil.exe.

A dangerous possibility is writing an executable in a startup directory of the victim's machine and wait for the user to restart his/her machine. Another one is writing a fake system DLL in an existing program directory, inducing Windows to load this module instead of the real DLL from C:\WINDOWS\system32\

Disassembled vulnerable code follows, read the comments if you want to fully understand the bug:

Proof of concept code follows. This PoC allows a remote attacker to upload a file to an arbitrary location on the victim's machine and forge peer information on the log lines of the victim's application.

Report Timeline

  • 2008-02-07: Vendor is notified that a vulnerability was discovered and that an advisory draft is available.
  • 2008-02-07: Vendor acknowledges and requests the draft.
  • 2008-02-07: Core sends the draft, including PoC code.
  • 2008-02-08: Vendor acknowledges the draft.
  • 2008-02-19: Core requests update info on the vulnerability and text for the advisory section called "Vendor Information, Solutions and Workarounds".
  • 2008-02-20: Vendor acknowledges saying the vulnerability was reproduced and the estimated date March 4th should be met.
  • 2008-03-03: Core requests update info on the vulnerability and text for the advisory section called "Vendor Information, Solutions and Workarounds".
  • 2008-03-10: Core requests update info on the vulnerability and confirmation of findings regarding the same bug reported in August 2007.
  • 2008-03-10: Luigi Auriemma independently publishes an advisory describing the path traversal vulnerability [2].
  • 2008-03-11: Forced release of advisory CORE-2008-0204 since this vulnerability is already public.

References

[1] http://www.netopia.com/software/products/tb2/

[2] http://archives.neohapsis.com/archives/fulldisclosure/2008-03/0176.html

About CoreLabs

CoreLabs, the research center of Core Security Technologies, is charged with anticipating the future needs and requirements for information security technologies. We conduct our research in several important areas of computer security including system vulnerabilities, cyber attack planning and simulation, source code auditing, and cryptography. Our results include problem formalization, identification of vulnerabilities, novel solutions and prototypes for new technologies. CoreLabs regularly publishes security advisories, technical papers, project information and shared software tools for public use at: http://www.coresecurity.com/corelabs/.

About Core Security Technologies

Core Security Technologies develops strategic solutions that help security-conscious organizations worldwide develop and maintain a proactive process for securing their networks. The company's flagship product, CORE IMPACT, is the most comprehensive product for performing enterprise security assurance testing. CORE IMPACT evaluates network, endpoint and end-user vulnerabilities and identifies what resources are exposed. It enables organizations to determine if current security investments are detecting and preventing attacks. Core Security Technologies augments its leading technology solution with world-class security consulting services, including penetration testing and software security auditing. Based in Boston, MA and Buenos Aires, Argentina, Core Security Technologies can be reached at 617-399-6980 or on the Web at http://www.coresecurity.com.

Disclaimer

The contents of this advisory are copyright (c) 2008 Core Security Technologies and (c) 2008 CoreLabs, and may be distributed freely provided that no fee is charged for this distribution and proper credit is given.

PGP/GPG Keys

This advisory has been signed with the GPG key of Core Security Technologies advisories team, which is available for download at http://www.coresecurity.com/files/attachments/core_security_advisories.asc.

Related Content
Solutions | Products and Services | CoreLabs | News and Events | Partners | Company
Core Security Technologies © 2010 All rights reserved       Disclaimer     Privacy Statement