Automatically Unzipping Files with Safari Can Leave Macs Open to Malware

Automatically Unzipping Files with Safari Can Leave Macs Open to Malware Featured Image

Mac users had it easy for a long time. Since there weren’t that many people who owned Macs, nefarious individuals who wrote malware and other malicious software didn’t bother to write it for Macs. They got more bang for their buck hacking Windows.

However, more people have Macs now than before. This means there’s an increased chance of having your Mac hacked. And because of an exploit with Safari, hackers can do it very easily if you download files that need to be unzipped. This Safari exploit leaves Macs open to malware.

Safari Exploit

Security researcher Patrick Wardle demonstrated how Macs can be remotely infected with malicious software. It’s a matter of using Safari to visit a malicious website and downloading an infected file which will leave the door open to hackers installing malware on the Mac.

“Once the target visits our malicious website, we trigger the download of an archive (.zip) file that contains our malicious application,” explained Wardle. “If the Mac user is using Safari, the archive will be automatically unzipped, as Apple thinks it’s wise to automatically open ‘safe’ files.”

news-macs-open-malware-desktop

“This fact is paramount,” he continued, “as it means the malicious application (vs. just a compressed zip archive) will now be on the user’s filesystem, which will trigger the registration of any custom URL scheme handlers! Thanks Apple!”

That same malicious website can then run code that will cause macOS to launch the malicious application on the user’s Mac. A popup will ask the user if they want to “Allow” or “Cancel” this process.

But looks can be deceiving. It looks like an ordinary popup, but this is a popup that is being controlled by the hacker. Clicking “Allow” may be allowing the hacker to infect the user’s Mac with malware.

Shortcomings of macOS

Apple adds built-in defenses to macOS to protect against attacks like this. However, these defenses can’t help in the case of this attack done through .zip files on Safari. Apple would have to change the way Safari manages document and URL handlers. They could revoke the certificate for a malicious app, but it’s too late to even bother after it’s been installed.

news-macs-open-malware-keyboard

However, that doesn’t mean you are left with absolutely zero protection. You just have to change a setting in Preferences. Hackers are assuming you want to make things as easy as possible and will choose to always automatically download safe files.

If the option to “Open ‘safe’ files after downloading” is checked, uncheck it. This means Safari won’t automatically open files that it believes are safe, but that’s a much better option than ending up with malware on your Mac.

Furthermore

The hackers are also assuming you are using Safari. You can always opt to use a different browser. But that opens up another whole can of worms we’re not going to get into here. Browser wars can be tackled at another time. And there may be exploits with the other browsers as well. You may be just exchanging one problem for another.

For now just be aware that if you use Safari on your Mac, that you’re leaving your Mac open to malware if you choose to have Safari automatically open downloaded files.

Do you use Safari on your Mac? What do you think of this exploit? Will you just make this change in the settings, or will you opt to use a different browser? Let us know how you will take care of this problem and keep your Mac safe by adding a comment below.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Laura Tucker Avatar

Read next

When the SS Great Eastern laid the first working transatlantic telegraph cable in 1866, a message that had taken ten days by steamship suddenly crossed the ocean in minutes, and the financial markets of London and New York were forced, within a single trading week, to invent the modern concept of synchronised global price.
The Big Ear telescope was scanning at 1420.4056 megahertz on the night of 15 August 1977, the exact frequency at which hydrogen atoms vibrate across the universe, because Giuseppe Cocconi and Philip Morrison had argued years earlier that any species trying to be found would broadcast on that channel — and then, for 72 seconds, something did.
In 2016, archaeologists dated two rings of snapped stalagmites in France’s Bruniquel Cave to 176,500 years ago, evidence that Neanderthals had walked 336 metres into darkness with fire and built architecture deep underground long before modern humans reached Europe
Otto von Bismarck was 74 when Germany adopted the world’s first national old-age social insurance program in 1889, setting the pension age at 70 after years of fighting socialists with bans, laws, and a promise few workers would live long enough to use
When cosmonaut Valeri Polyakov stepped out of his Soyuz capsule in March 1995 after 437 consecutive days aboard Mir, doctors recorded him at several centimetres above his pre-flight height, and his spine had become so unaccustomed to gravity that the recovery team carried him to a chair rather than risk the compression of letting him walk.
When Bell Labs engineer Karl Jansky pointed a rotating antenna at the sky in 1932 looking for sources of transatlantic radio static, he kept picking up a faint hiss that peaked every 23 hours and 56 minutes, and he eventually realized he had become the first human to hear the center of the Milky Way.
When Harvard astronomer Cecilia Payne submitted her 1925 doctoral thesis arguing that the Sun was made almost entirely of hydrogen, the field’s senior figure Henry Norris Russell talked her into adding a line calling the result ‘almost certainly not real,’ and then published the same conclusion himself four years later to widespread acclaim.
When seismic waves from the Chicxulub impact reached what is now North Dakota roughly ten minutes after the asteroid struck, they appear to have triggered a ten-metre standing wave in an inland river that flung fish onto the bank and buried them under glass beads still falling from the sky.