Open
Bug 267123
Opened 20 years ago
Updated 2 years ago
[SA12979-2] File ext != Content-Type left intact when downloading
Categories
(Toolkit :: Downloads API, defect)
Tracking
()
NEW
People
(Reporter: BenB, Unassigned)
References
Details
(Keywords: fixed-aviary1.0.1, fixed1.7.6, sec-low, Whiteboard: [sg:low][fixed for "executable" types])
Attachments
(1 file)
1.98 KB,
application/java-archive
|
Details |
From tk@ Secuina:
The "Content-Type" header is used for associating a file to a file type in the
file download dialog, but the file extension is left intact when saving the file
to disk with "Save to Disk". This can be exploited to spoof file types in the
file download dialog.
Successful exploitation can lead to malware being saved to the download
directory which by default is the desktop.
NOTE: If the downloaded malware is a shortcut or some executable file, then the
icon can be spoofed in the download manager and on the desktop.
-- Example/PoC Windows Platform --
NOTE: Requires PHP support.
SA12979.zip/2a/poc.php
Choose "Save to Disk" and press "OK". A .bat file is written to the desktop.
SA12979.zip/2b/poc.php
Choose "Save to Disk" and press "OK". The attached shortcut (.lnk) file with a
spoofed icon is written to the desktop and is also available via the download
manager.
NOTE: The PoC requires that the content-type "movie/avi" is not set to
automaticly open.
Reporter | ||
Comment 1•20 years ago
|
||
Proof of Concept is in the ZIP file
<https://bugzilla.mozilla.org/attachment.cgi?id=164157&action=view>
Reporter | ||
Comment 2•20 years ago
|
||
Ops, forgot to check the security flag, sorry. Please keep the previous confidental.
Reporter | ||
Updated•20 years ago
|
Group: security
Updated•20 years ago
|
Flags: blocking-aviary1.0?
Reporter | ||
Comment 3•20 years ago
|
||
Andreas Sandblad (as@ Secunia) is the bug finder.
Comment 4•20 years ago
|
||
This was fixed with the patch at bug 267122. Noting the fixed-aviary status for
this bug.
Flags: blocking-aviary1.0?
Keywords: fixed-aviary1.0
Updated•20 years ago
|
Flags: blocking-aviary1.0?
Comment 6•20 years ago
|
||
I still see this behaviour on Firefox 1.0 if space+dot+space is added to the
Content-Disposition header (inside the filename argument). Windows will trim all
appending spaces and dots before saving a file.
Attaching new PoC (same instructions) for Firefox 1.0 (Windows).
Comment 7•20 years ago
|
||
Changes: Appended space+dot+space to work for Firefox 1.0.
Updated•20 years ago
|
Whiteboard: [sg:fix] need trunk?
Comment 8•20 years ago
|
||
Need the new variant (comment 7) fixed for 1.0.1, only partially fixed in 1.0
Flags: blocking-aviary1.1?
Whiteboard: [sg:fix] need trunk? → [sg:fix] need trunk? partially fixed-aviary1.0
Updated•20 years ago
|
Flags: blocking-aviary1.1? → blocking-aviary1.1+
Comment 9•20 years ago
|
||
For internal folk, the test case is available at http://pine/sa. Still looks
broken with Aviary 1.0.1 build Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7.6) Gecko/20050221 Firefox/1.0.1
I'm not sure bug 267122 is completely fixed and both test cases here still allow
me to save the .bat and .lnk files to my machine. Shouldn't they be saved as
".gif" and ".avi" files? If anyone else can confirm my observations, that will
be great. Thanks.
Looks like this missed the 1.0.1 train, but we need to take a look at all these
variants to see how to fix them (and test them). Removing fixed-aviary1.0.1
keyword.
Keywords: fixed-aviary1.0
Comment 10•20 years ago
|
||
This bug is fixed on the Aviary branch and trunk--for executable types. The
"partial fix" referenced in the whiteboard is because the extension re-writing
only happens for files detected as executables; non-executables can still show
as one type in the dialog and be opened with a completely different application.
That means everytime a new exploit is announced for a default helper app our
users are vulnerable to being fooled ("see the Paris Hilton video!!!") until
they upgrade that app. Why don't we just rewrite the extension for registered
MIME types all the time on windows?
Keywords: fixed-aviary1.0.1,
fixed1.7.6
Whiteboard: [sg:fix] need trunk? partially fixed-aviary1.0 → [sg:fix] partially fixed-aviary1.0
Updated•20 years ago
|
Whiteboard: [sg:fix] partially fixed-aviary1.0 → [sg:fix] partially fixed-aviary1.0 and trunk
Updated•20 years ago
|
Group: security
Flags: blocking-aviary1.5+
Whiteboard: [sg:fix] partially fixed-aviary1.0 and trunk → [sg:investigate] partially fixed
Updated•18 years ago
|
QA Contact: ali → download.manager
Updated•18 years ago
|
Assignee: bugs → nobody
Assignee | ||
Updated•17 years ago
|
Product: Firefox → Toolkit
Updated•15 years ago
|
Whiteboard: [sg:investigate] partially fixed → [sg:low][fixed for "executable" types]
Updated•14 years ago
|
Attachment #168128 -
Attachment mime type: application/octet-stream → application/java-archive
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•