Apple computers have a security flaw that means they can be hacked when they wake up from sleep mode

Tim Cook looking worried or sadReuters/Stephen LamApple CEO Tim Cook.

Mac security researcher Pedro Vilaca has discovered a flaw in Apple computers that leaves them vulnerable to a remote hack.

Vilaca discovered when a Mac goes to sleep and wakes back up again, the programme that gets the computer system started can be tampered with.

Normally this code is mostly read-only, but as the Mac wakes up there is a hole in its security, and the code can be changed remotely.

Macs released before mid-2014 are vulnerable to this attack.

At this point an attacker can install a rootkit, which is a kind of malware that is difficult to detect or remove, and that can even survive hard drive reformatting and reinstallation of the operating system, Ars Technica reported.

Hackers don’t need physical access to the computer to do this.

Vilaca tested the attack on a MacBook Pro Retina, a MacBook Pro 8.2 and a MacBook Air. Later machines, however, were not vulnerable, and the researcher suspects that this means the bug has been fixed in newer models — either purposely by Apple, or by accident.

The only real defence is for Mac users to change their default settings so that the computer doesn’t enter sleep mode when not in use, Vilaca said. He added that this attack is unlikely to happen on a mass scale, and is more likely to be used to target individual users.

NOW WATCH: Kids settle the debate and tell us which is better: an Apple or Samsung phone

Business Insider Emails & Alerts

Site highlights each day to your inbox.

Follow Business Insider Australia on Facebook, Twitter, LinkedIn, and Instagram.