A warning has been issued to all iPhone users after tech experts discovered a new cyberattack targeting Apple IDs.

Iran PressAmerica: "In this case it's an Apple ID. Your Apple ID is what really opens your phone and you can really think of it as like a master key," said Michael Nowatkowski, cyber institute director at Augusta University.

Here's how the scam works: cyber criminals will send you a text message, claiming to be from Apple. They will then ask you to click on a link to access an "important message" about iCloud.

You will click on a link and it will go to what appears to be a legitimate page but it's really just something that's been recreated," said Nowatkowski.

From there, the fake website will then ask users to hand over their Apple ID information.

That would give someone access to your contacts, your payment information," said Nowatkowski.

Ramnath Chellappa is a professor of information systems at Emory University. He said to better protect yourself, set up two-factor authentication that requires a password and verification code from an outside device.

If it's coming from some other device, then you have to provide a second level of verification before you're allowed to gain access to your own account," said Chellappa.