Lucene search

K
securityvulnsSecurityvulnsSECURITYVULNS:DOC:2892
HistoryMay 06, 2002 - 12:00 a.m.

dH team & SECURITY.NNOV: A variant of "Word Mail Merge" vulnerability

2002-05-0600:00:00
vulners.com
11

Русская версия этой advisory приведена ниже.

Original version of this advisory:
http://www.security.nnov.ru/advisories/mailmerge.asp

Title: A variant of "Word Mail Merge"
vulnerability
Authors: ERRor, 3APA3A
Date: May, 03 2002
Affected: Office 97, 2000, XP
Vendor: Microsoft
Risk: Average to high
Remote: for Office 2000 SR1a and prior
Exploitable: Yes
Vendor notified: February, 12 2002

Intro:

All details on this issue may be found in [1]. Original advisory [2]
about Word Mail Merge vulnerability was posted by Georgi Guninski.
Microsoft released an advisory and fix [3] included into SR1a for
Microsoft Office.

Problem:

ERRor <[email protected]> discovered the way Microsoft fixed the problem
is weak and it's still possible to exploit this problem. 3APA3A
<[email protected]> found a remote exploitation scenario.

Description:

Microsoft decided to disallow dotted UNC paths (like \\111.111.111.111\)
for merge documents as a fix. It's still possible to use any absolute or
relative paths to make word document to open macro silently in Office
97, 2000 and XP. This vulnerability can be remotely exploited if
attacker can put both Word and Access documents into the same location
or to put Access document into known location (for example to put both
files into same Internet Explorer cache folder). Access file may have
any extention (.wav, .html, .txt) it doesn't matter. Microsoft Office
2000 SR1a + SP2 and Microsoft Office XP + SP1 do not allow Access to
open files from Temporary Internet Files folder, it makes it impossible
to exploit this vulnerability via Outlook Express.

Exploitation:

It's possible to exploit this vulnerability locally or via social
Engineering (for example to craft an archive of 3 files: readme.doc,
setup.dat and setup.exe where setup.exe is trojan and setup.dat is MDB
file launching setup.exe, if user opens readme.doc setup.exe will be
started automatically) Simple extract [4] and open expl.doc - calc.exe
will be started.

Because Outlooks Express and Internet Explorer open .doc files without
warning it's possible to exploit this vulnerability remotely [5] without
user's intervation. Exploit works as follow:

  1. Both DOC and MDB files are attached with .doc extension
  2. They are referenced via IFRAME tag. It makes both files to be saved
    into same cache folder and launched in MS Word.
  3. expl.doc opens exploit.doc and exploit.doc starts calc.exe
    For some unknown reason Internet Explorer 6.0 strips 2 last characters
    from filename in cache, so there is different .eml for Internet Explorer
    6.0.

References:

  1. Microsoft Word Mail Merge vulnerability
    http://www.security.nnov.ru/search/news.asp?binid=415
  2. Georgi Guninski, MS Word and MS Access vulnerability - executing
    arbitrary programs, may be exploited by IE/Outlook
    http://www.security.nnov.ru/search/document.asp?docid=518
  3. Microsoft Security Bulletin (MS00-071)
    Patch Available for "Word Mail Merge" Vulnerability
    http://www.microsoft.com/technet/security/bulletin/fq00-071.asp
  4. Mail merge vulnerability local POC
    http://www.security.nnov.ru/files/mailmerge/2files.zip
  5. Mail merge vulnerability Outlook Express POC
    http://www.security.nnov.ru/files/mailmerge/2mails.zip

Оригинальная версия данной статьи:
http://www.security.nnov.ru/advisories/mailmerge.asp

Тема: Разновидность уязвимости
"Word Mail Merge"
Авторы: ERRor, 3APA3A
Дата: 03 мая 2002
Затронуты: Office 97, 2000, XP
Производитель: Microsoft
Опасность: От средней до высокой
Удаленная: для Office 2000 SR1a и более
ранних
Воспроизводима: Да
Производитель уведомлен: 12 февраля 2002

Введение:

Все начальные сведения о данной уязвимости могут быть найдены
на [1].
Впервые о данной уязвимости сообщил Georgi Guninski [2]. Microsoft
выпустил hotfix, разрешающий данную проблему, который был включен в
состав SR1a для Microsoft Office.

Проблема:

ERRor <[email protected]> обнаружил, что проблема не была решена
полностью и остаются возможности ее использования. 3APA3A
<[email protected]> нашел сценарий удаленного использования данной
уязвимости через Outlook Express.

Описание:

В качестве решения проблемы Microsoft решил запретить UNC-имена,
содержащие IP-адреса (типа \\111.111.111.111\) в качестве путей к
документам слияния. Но все еще возможно использовать другие пути
(включая абсолютный и относительные) чтобы открывать макросы без
предупреждений в документах Office 97, 2000 и XP. Эту уязвимость можно
использовать удаленно, если атакующий имеет возможность поместить
документы Word и Access в один каталог или поместить документ Access в
известный каталог и открыть документ Word. Документ Access может иметь
любое расширение - .wav, .html, .txt и т.д. - это не влияет на работу.
Microsoft Office 2000 SR1a + SP2 и Microsoft Office XP SP1 не позволяют
документам слияния открывать файлы слияния из каталогов Temporary
Internet Files, это не позволяет использовать уязвимость для даннызх
версий через Outlook Express или Outlook.

Использование:

Данную уязвимость можно использовать локально или путем социальной
инженерии (например поместив файлы readme.doc, setup.exe и setup.dat в
общую папку, где setup.dat будет файлом Access а setup.exe троянской
программой, при открытии readme.doc setup.exe может быть запущен без
предупреждения). Для тестирования можно запустить файл expl.doc из [4].

Поскольку Outlook Express открывает .doc-файлы без предупреждения и
автоматически, игнорируя установки зоны безопасности, возможно
исопльзовать эту уязвимость удаленно без вмешательства пользователя [5].
Работает следующим образом:

  1. Оба файла (.doc и .mdb) прикреплены к письму с расширением .doc
  2. Файлы открываются с помощью тега IFRAME что приводит к сохранению
    файлов в одном кэше и запуску MS Word.
  3. Файл expl.doc через Exploit.doc открывает calc.exe
    Поскольку по необъяснимым причинам Internet Explorer 6.0 удаляет два
    последних символа из имени файла для этой версии Internet Explorer
    приводится отдельный вариант эксплоита.

Ссылки:

  1. Еще одна уязвимость в MS Office - выполнение кода через Mail Merge
    http://www.security.nnov.ru/search/news.asp?binid=415&amp;l=RU
  2. Georgi Guninski, MS Word and MS Access vulnerability - executing
    arbitrary programs, may be exploited by IE/Outlook
    http://www.security.nnov.ru/search/document.asp?docid=518
  3. Microsoft Security Bulletin (MS00-071)
    Patch Available for "Word Mail Merge" Vulnerability
    http://www.microsoft.com/technet/security/bulletin/fq00-071.asp
  4. Mail merge vulnerability local POC
    http://www.security.nnov.ru/files/mailmerge/2files.zip
  5. Mail merge vulnerability Outlook Express POC
    http://www.security.nnov.ru/files/mailmerge/2mails.zip