Security

MFA

MFA or multi-factor authentication is a login method that requires two or more proofs of identity of different kinds, such as something you know, something you have and something you are.

In this post

MFA, or multi-factor authentication, is a system that requires combining two or more proofs of identity of different kinds to access an account. The acronym stands for Multi-Factor Authentication. For example, a password, which is something you know, and a code on your phone, which is something you have. That way, even if someone steals the password, it is not enough to get in. It is one of the most effective and cheapest security measures there is.

Think of the entrance to a building with two checkpoints. First a card, and then a code on a keypad. Someone who finds a lost card cannot get through without the code, and someone who spies on the code does not have the card. Each checkpoint can be beaten on its own, but beating both takes far more effort. In the digital world the idea is the same, except that the checks are of different kinds.

MFA means putting more than one lock on your account. A single stolen key will not open it.

What is MFA?

MFA distinguishes three kinds of proof of identity. Those that depend on memory, such as a password. Those that depend on an object, such as a phone or a security key. And those that depend on the body, such as a fingerprint or the face. Multi-factor authentication combines at least two different kinds. Two passwords do not count, because both are of the same kind and can be stolen in the same way. Some systems add context factors, such as location or time, and behavioural ones, such as typing rhythm, although these usually serve to assess risk rather than as an independent proof.

The term MFA is the umbrella that covers the others. Two-step verification is its most common case, with exactly two factors. Other approaches add more factors or adapt them to the risk of each login. For example, a service may ask only for the password from your usual computer, and demand additional proof if it detects a login from another country at an odd hour. This is known as adaptive authentication.

What makes MFA valuable is that it tackles the most widespread intrusion method. Most attacks on accounts start with stolen, leaked or guessed passwords. With a second factor, those attempts fail. In 2019, Microsoft published an analysis according to which enabling this system blocks more than 99 per cent of automated attacks on accounts. It is not infallible, but it removes the easiest path for criminals.

MFA, 2FA, single sign-on and passwordless MFA

Several authentication terms are often confused with MFA. 2FA, or two-factor authentication, is a particular case with exactly two proofs, while MFA allows two or more. Single sign-on, known as SSO, is something else. It lets you get into many applications with a single login, and it adds no security on its own, although combined with MFA it protects every application at once. Finally, passwordless MFA does away with the knowledge factor and combines the device with a fingerprint, the face or a local PIN, as passkeys do.

What studies say about its effectiveness

There is data on the effectiveness of MFA that helps put it in perspective. A study by Google, New York University and the University of California, San Diego, published in 2019, analysed how many attacks different recovery and verification methods stopped. A code sent by SMS blocked 100 per cent of automated bots, 96 per cent of bulk phishing attacks and 76 per cent of targeted attacks. On-device prompts rose to 99 and 90 per cent in the last two cases, and physical keys blocked every category.

What those figures reveal is that any second factor is far better than none, but not all of them protect equally well against a determined attacker. Microsoft’s 99 per cent figure comes from the vendor itself, and although the specific percentages should be taken with caution, the underlying message is shared by every serious source.

How MFA works

The MFA process has two moments, enrolment and login. During enrolment, the user links to their account the factors they will use, for example by scanning a QR code with a code generator app or registering a physical key, and the service stores the information needed to check them. On every later login, the service first asks for the primary factor, usually the password, and then for the second, and it only grants access if both are correct.

Behind these MFA codes there are well-documented open standards. Code generator apps follow the TOTP algorithm, published in 2011 as RFC 6238, which calculates each code from a shared secret and the time, which is why it changes every thirty seconds. Its predecessor HOTP, from 2005, used a counter instead of the time. Physical keys and passkeys use the FIDO2 and WebAuthn standards, in which the secret never leaves the device and the response is only valid for the genuine domain.

How the same TOTP code is calculated on the phone and on the server

MFA methods and their strength

Messages and codes

The best-known method is the code that arrives by text message or that an app generates on the phone. It is convenient and requires no extra devices. Text messages are the weakest link, because an attacker can trick the mobile operator into duplicating the SIM card and receive the codes. Generator apps are more secure, because the code is created on the device itself. Both methods share a weakness. The code is typed in, and so it can be handed over to an impostor. That is why, for the most valuable accounts, experts recommend methods that do not depend on the person typing anything.

Which second factor is more convenient and which is more secure

Approval prompts

Another approach is the phone notification that asks you to approve or reject a login. It is very convenient, but it carries a known risk. That risk is MFA fatigue, in which an attacker who already has the password sends dozens of prompts until the victim accepts one, a technique that has been used against large companies.

Services offering MFA have reacted to these attacks. Many now ask you to type on the phone a number that appears on the login screen, so that only the person sitting in front of it can approve. They also show the location of the login attempt. These improvements greatly reduce the risk, and they should be turned on whenever the service offers them, along with training staff to reject any prompt they did not trigger.

Biometrics

Fingerprints, facial recognition and, less often, the iris or the voice are the inherence factors. They are convenient because they cannot be forgotten or lost, but they have an important limitation. A stolen password can be changed, a fingerprint cannot. That is why modern systems do not send the fingerprint to the server, but check it on the device itself and use it to unlock a key stored there.

Physical keys and passkeys

Physical security keys are the most resistant method. They plug into the computer or are tapped against the phone, and they check that you are on the genuine site before responding.

A fake page has no way of obtaining their response. So-called passkeys follow the same logic, with a pair of cryptographic keys stored on the device and unlocked with a fingerprint or the face.

The main obstacle to this kind of MFA is a practical one. You have to buy the key, carry it with you and have a spare. For the most sensitive accounts, such as those of administrators or executives, the investment more than pays off. And with passkeys, now supported by the main operating systems, strong protection reaches everyone without extra devices, although adoption is still gradual.

How multi-step verification gets attacked

Criminals have developed methods to get around the second factor. MFA fatigue consists of flooding the user with prompts until they accept one. Fraudulent SIM swapping lets attackers receive the victim’s text messages. Intermediary servers trick the user with a fake page that relays their details and the code to the real site in real time, stealing the session once it has been authenticated. None of these attacks invalidates MFA. They show that the weaker methods can be beaten and that the stronger ones, such as physical keys and passkeys, hold up well because they are bound to the legitimate site. The practical conclusion is to always enable MFA, and to step up the level on the most important accounts.

Pros and cons of MFA

The main advantage is protection against password theft, which lies behind most intrusions. On top of that comes regulatory compliance. In the European Union, the PSD2 payment services directive has required strong customer authentication for online payments since 2019, the PCI DSS standard requires it to access systems holding card data and the NIS2 directive includes it among the cybersecurity measures for the companies it covers. Cyber insurers also ask about it before setting their terms.

The drawbacks of MFA are mostly practical ones for users. It adds a step to every login, it depends on a device that can be lost or run out of battery and it requires a well-designed recovery process. People without a smartphone or with access difficulties need alternatives, and physical keys come at a cost. None of those drawbacks outweighs the risk of not using MFA, but they should be taken into account when rolling it out.

Two-factor protection on a website and in a business

For a website, whether it is a content management system such as WordPress or Joomla, a shop on PrestaShop, Shopify or Magento or a custom build, the first step is to enable it on administrator and editor accounts. There are extensions and services that add it in minutes, many platforms include it out of the box and many hosting providers offer it built in. It is the most effective defence against brute force attacks and credential stuffing, which are the main cause of compromised websites. Once it is enabled, stolen passwords no longer open the dashboard.

But the website dashboard is not the only thing that needs MFA. The hosting provider account, the domain registrar account, the business email account and the payment tools are just as valuable. If the domain account falls, an attacker can redirect the whole website. If the email account falls, they can recover the passwords for everything else. All of them deserve the same care, starting with the ones that give access to the others.

And old legacy accounts must not be forgotten either. The Colonial case is that of an old account, unused, without a second factor and forgotten. Every organisation has access points like that, created for someone who left or for a project that ended. Reviewing and removing unused accounts, and requiring the second factor on those that remain active, prevents unpleasant surprises that are usually discovered too late.

Rolling out the second factor across a team and checking your protection

How to get the team to adopt it

The best MFA is the one that actually gets used. If it is inconvenient, employees will look for shortcuts or push for it to be removed. It helps to explain why it is required, with real examples, offer several methods to choose from, hand out physical keys to whoever needs them and set up a fast help route for anyone who loses their phone. A phased rollout, starting with administrators, makes it possible to detect problems while few people are affected.

It is also important to define account recovery carefully. A process that is too easy becomes the door attackers exploit, and one that is too complicated locks people out. Requiring serious verification, for example through a manager or with carefully stored recovery codes, balances security and convenience.

How to tell whether you are protected

Make a list of your ten most important accounts and check, for each one, whether the system is enabled and which method it uses. You will probably find that some depend only on the password. Start with those.

If the service offers several methods, choose the strongest one available. A physical key or a code generator app is preferable to a text message, and a passkey is even better where it exists.

Also prepare the recovery of your accounts that use MFA. Keep the backup codes in a safe place, away from your phone, and register a second method. A lost phone should not lock you out of your business website. And explain to your team that they must never share codes or approve prompts they did not trigger themselves. A call asking for a code is almost always a scam, however convincing it seems. If your website runs on WordPress, a WordPress security specialist knows how to put this protection into practice.

Finally, it is worth extending MFA to the people who work with you. If agencies, freelancers or suppliers have access to your systems, require them to use the second factor on their accounts. One weak link in the chain can be enough for an attacker to reach you. An organisation is only as secure as its most neglected connection, and Colonial Pipeline proved it at an enormous cost.

How multi-factor authentication evolved

The idea of combining a password with an object predates the internet. In 1986 the company Security Dynamics, later RSA, launched SecurID, a small key fob that displayed a different number every minute and that for decades was the second factor of banks and large companies. European banks later popularised grid cards and SMS codes to confirm transfers.

MFA reached the general public in 2011, when Google offered two-step verification to all its accounts, the same year the TOTP standard was published. In 2012 the FIDO Alliance was founded to replace codes with cryptographic keys, its FIDO2 standard became a W3C recommendation in 2019 and in 2022 Apple, Google and Microsoft committed to rolling out passkeys, which bring together MFA and the elimination of the password.

A pipeline paralysed by a password without a second factor

On 29 April 2021, attackers gained access to the network of Colonial Pipeline, the company that operates the largest refined fuel pipeline in the United States. They got in through a remote access account, a virtual private network connection that was no longer used but was still active. The account was protected only by a password. Nobody had enabled a second factor, and the username and password were enough to get in.

According to investigators, the password later turned up in a batch of leaked credentials on the dark web. An employee had probably also used it on another service that was attacked. The company’s chief executive, Joseph Blount, told the Senate on 8 June that it was not a simple password, but that it was not known how it had been obtained. He confirmed that the connection did not have multi-factor authentication.

The attackers, a ransomware group called DarkSide, encrypted the company’s business systems. Colonial decided to shut down the pipeline as a precaution for several days. There were fuel shortages and panic buying in several south-eastern states. The company paid a ransom of around 4.4 million dollars, part of which was later recovered by the authorities.

The case of that password without a second factor became a symbol. Critical infrastructure brought to a halt by a password without a second factor on a forgotten account. It led to executive orders, new requirements for infrastructure operators and a worldwide debate about the basics. Had the account had a second factor, the stolen password would have been useless. It is hard to imagine clearer proof of the value of such a simple measure.

Frequently asked questions

Frequently asked questions about MFA

What is MFA?

It is multi-factor authentication, a system that requires combining two or more proofs of identity of different kinds to access an account. For example, a password, which is something you know, and a code on your phone, which is something you have. That way, a stolen password is not enough to get in.

What does MFA stand for?

It stands for Multi-Factor Authentication. A factor is a type of proof. When only two are used, it is called two-step verification or 2FA. Multi-factor authentication is the general term that includes that case and others with more proofs.

Which factors exist in MFA?

Something you know, such as a password or a PIN. Something you have, such as a phone, a card or a physical key. And something you are, such as a fingerprint or your face. Security increases when factors of different kinds are combined, not two of the same kind.

What is the difference between MFA and 2FA?

Two-step verification requires exactly two proofs, usually the password and a second element. Multi-factor authentication is the general concept and can require two or more, from different categories. All 2FA is a form of MFA, but not all MFA is limited to two.

How much does MFA reduce the risk?

A great deal. In 2019 Microsoft published an analysis according to which enabling this system blocks the vast majority of automated attacks on accounts, more than ninety-nine per cent. It is not infallible, but it removes the most widespread attack method, which consists of using stolen or guessed passwords.

What is MFA fatigue?

It is a technique in which the attacker, with a stolen password, tries to log in many times so that the victim's phone receives dozens of approval prompts. If the victim gets tired and accepts one, the attacker is in. Some services now ask you to type a number to prevent this.

Which MFA method is the most secure?

Physical security keys are the most resistant, followed by code generator apps and push notifications with number matching. Text messages are the weakest, because of the risk of SIM swapping. It is advisable to use the strongest method available, especially on important accounts.

Where should I enable MFA?

On email, banking, web hosting, the domain, the website's admin dashboard, the business's social media and any work tool. If you can only start with a few, prioritise the ones that drag the others down if they fall, such as email and the domain.

I enable two-step verification on your website

I can set up 2FA on the login to your admin dashboard, adding an extra layer of protection against unauthorised access.

About the author

Javier Afán

WordPress developer specialised in security, WooCommerce, and hacked website recovery.

I work on WordPress from a technical angle focused on security, architecture, and the decisions that really affect a project's continuity.