command line fix for Safari security issue?

Anyone know of a way to disable the "Open safe files after downloading" option in Safari from the command line?

Posted on Feb 21, 2006 2:10 PM

Reply
13 replies

Feb 21, 2006 2:48 PM in response to Trent Geerdes

Hi Trent and fr-jeff, Welcome to Apple's Users Help Users Forums.

No JPG or other "safe" download should be asking for Admin Permission cuz it's an application. Do Not Grant Permission.

Anyone know of a way to disable the "Open safe files after downloading" option in Safari from the command line?


Safari > Preferences > General > Turn Off "Open safe files after downloading"

seems to be SOP by the Gurus at BroadBandReports > All Things Mac

My Best, JP

Feb 22, 2006 6:39 AM in response to Ryan M.

Well I'm disappointed in the responses here. I manage many macs and I need a command line solution. Renaming the Terminal isn't a good solution in my opinion. The defaults command won't seem to write to the preference file as is so I guess I have no other option than to script plutil to convert the prefs file, edit it, and then convert it back. What a PITA Apple!

Feb 22, 2006 9:13 AM in response to Trent Geerdes

setting safari not to open them is only part of the solution.

If terminal app is still in place then an email or website with the .zip file can be unzipped & the tempting looking jpg or mov will still be able to use terminal.

For example - a website might show a jpeg or movie & invite the user to click here for the high res version; user gets a zipped download appear, with the right sounding name - unzips the file, sees the jpeg or movie named xxx-high res & opens it. Whammo

same deal with email really

Feb 23, 2006 9:50 AM in response to Ryan M.

In addition to JP's advice, move Terminal out of the
/Utilities/ folder.

This will prevent automatic execution. You'll still
have to use the Finder's Get Info window to verify
the integrity of the file BEFORE opening it.


Do not forget X11.

If you have X11 installed at the standard location /Applications/Utilities, you might want to rename or move this also. I set up an example exploit which opens the Stickies application via X11 when you think you are double clicking onto a .pdf file

http://www.surtec.com/~rj/Finder-X11-Exploit.html

Feb 23, 2006 11:17 AM in response to Shango1980

I played with it some more and the defaults command will work on my personal pref file if I give the command as the my user account. If I do it as root I get nothing (when specifying the complete path to the pref file minus the .plist extension). When I use Apple Remote Desktop to send this command to Macs on the network I obviously want to send it only once and for that to work on multiuser systems I have to do it as root. When I deployed my shell script using plutil I did it all as root and it worked on the client machines. Am I still missing something?

Feb 23, 2006 1:20 PM in response to Ryan M.

I performed the "move Terminal out of Utilities and into Applications" operation last night, and as warned elsewhere it had unintended consequences. Moving Terminal did prevent the exploit from executing, BUT, when I tried to open Appleworks, I was prompted to open a recently created password protected sparse image. After providing the password, the disk image mounted and Appleworks shut down. Moving the Terminal application back into Utilities (and logging out-logging in) fixed the problem.

So, beware when moving the Terminal application around.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

command line fix for Safari security issue?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.