From cloud to on-premises access, having two-factor authentication (2FA) can help keep attackers at bay. The goal is to get the attackers to go somewhere else and leave you alone. But what if an attacker wants to target you? Is your 2FA implementation good enough to protect you in that situation?If you have rolled out 2FA already, you probably made some of the same decisions I did when implementing it. It had to \u201cjust work\u201d and work well, not be too intrusive, and not allow too many false authentications. Then I had to balance the needs of protecting inside the office with that of enabling remote access.Identify users with smartphonesWhen I first set up the requirements for 2FA, I had to discover who did and did not have smartphones. Often, 2FA requires a fob as the additional factor. In the early days, a physical fob or device was often the only way to implement 2FA. You would generate additional manual keys that could be entered in case the fob didn\u2019t work and locked you out of access. Then along came smartphones and applications where you could download an app on your phone that would either push an approval, a number, or some other action that the user needed to enter or execute on the system to gain access.Some complain that 2FA\u2019s reliance on a text message to a phone is not secure with attackers able to clone or swap SIMs to impersonate the phone number of a device. Banking access, for example, typically offers only SMS messages as the second authentication factor. When deciding between merely a password to protect your banking application and text message to your phone, I\u2019d argue that a text message is more secure. An attacker would still have to go through the process of SIM cloning or swapping. In business, however, even NIST doesn\u2019t recommend text messages alone for securing 2FA.Remove 2FA \u201cfail-open\u201d processesNext, re-review how you set up 2FA. To avoid pushback from management, you probably set up 2FA in a way that should the technology fail, there were ways around the issue to provide access. Like every other IT administrator, I set up two factor to work even if the service was down. Should the cloud service that 2FA relies on to authenticate not work for any reason, this \u201cfail open\u201d process allows the system to continue and not block access. While that sounds great on paper, it was a boon for attackers. As a recent cybersecurity alert points out, attackers used this along with other techniques to take over a network after wiggling into a workstation.Two-factor authentication is more mature and doesn\u2019t need these emergency fall-back procedures. Your stakeholders now know these applications well enough to realize that they rarely fail. Review your security implementation to ensure that you won\u2019t be subject to this attack sequence. For example, the defaults on my organization\u2019s 2FA software (Duo) was set to fail open should it not be able to access the authentication service. Other 2FA vendors use the same defaults upon initial deployment.To change the fail mode after installation, use the Registry Editor (regedit.exe) with administrator privileges to create or update the following registry value in HKEY_LOCAL_MACHINESOFTWAREDuo SecurityDuoCredProv:Registry Value\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Type\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 DescriptionFailOpen\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 DWORD\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Set to 1 to allow "fail open" or 0 to restrict to "fail closed".Default: Fail open.Duo settings managed by Windows Group Policy override any changes made via regedit. Update the "Duo Service: Fail Open if Unable to Contact Duo" setting in the Group Policy Object (GPO) instead.You can easily script a registry change throughout your network if Group Policy is not available.Do you have the right type of 2FA?Next, evaluate whether the type of 2FA you use is appropriate for your environment. Should it require a push approval or more active data entering from the end user? This is always a balance between needs of security and with the needs of the business. This balance changes over time, so make it a point to reanalyze what is the best balance for your firm.Microsoft is making 2FA based on number matching available for consumers but hasn\u2019t released the technology for business\/Azure implementations. \u201cNumber matching is a key security upgrade to traditional second-factor notifications in the Microsoft Authenticator app that will be enabled by default for all tenants a few months after general availability (GA).\u201dTo enable number matching in the Azure AD portal, complete these steps:Select \u201cSecurity\u201d.Select \u201cAuthentication methods\u201d.Select \u201cMicrosoft Authenticator\u201d.Select the target users.Click on the three dots on the right.Select \u201cConfigure\u201d.Select the authentication mode.For \u201cRequire number matching (Preview)\u201d, click on \u201cEnable\u201d.Select \u201cDone\u201d.You may wish to set up a group to test this implementation. Once you enable this setting, your users will have to launch the Microsoft Authenticator and match the numbers in the screen prompt and enter them in the authentication application on the phone.Bottom line, even if you have enabled 2FA, re-evaluate how you set it up. Make sure attacker can\u2019t use your default settings against you.