If you are ever asked to sign into your Apple ID account on your iPhone be aware of this simple scam which can wreak havoc.

The newly identified con-trick means that compromised apps can show a password login box on your iPhone that looks exactly like the real thing which comes from Apple.

It will convince people that it is real and they will enter their password with – which gives the scammer access to their Apple ID.

Once someone has obtained that, there's the potential to wreak havoc. The Apple ID secures everything on your phone – your photos, your messages, your browsing history and more – and unless you're using two-factor authentication it can be all anyone needs to get in.

There are a lot of rumours flying around about the new iPhone model
Iphone users should be on their guard

The scam works by creating a pop-up within a compromised app which looks exactly like the password pop-up screen. There's no obvious way of telling the difference from a real one, since Apple pops up that password regularly throughout the operating system, even if you're not doing something that would require it.

Thankfully, there is an easy way to check whether one of the pop-ups is legitimate. But only if you know how.

If one of the pop-ups randomly appears, you should press the home button. If the password prompt is coming from a scamming app, it'll disappear, since it's contained within that app; if it's legitimate, it won't go away because it's coming from the operating system itself.

If in doubt, don't enter the password. While the iPhone regularly requests it, it's not usually for anything immediate – if it is, you'll be taken to the relevant app or asked to enter the password again at a later date.

And an important way of securing your phone is to turn on two-factor authentication, which vastly reduces the value of stealing your password in the first place. It means that someone must actually have access to one of your devices to log in, so someone with your password wouldn't actually be able to get in anyway.

It's turned on by going into the Settings on your phone and clicking through to the password and security preferences. It can also be done from the iCloud settings on a Mac.