User Guide: How to register passkeys in Microsoft Authenticator and physical passkeys

Reading Time: 4 minutes


In this blog post, I explore the steps to enable:

  • Passkeys in the Microsoft Authenticator app using an iPhone
  • Setting up a passkey via a physical Yubikey 5 (usb-c)

Note: This post is targeted at users who want to set up passkeys in the Microsoft Authenticator app or register a physical key. Your administrators must have enabled the capability to use passkeys before you can complete the steps below. To use passkeys via the Authenticator app, you need Android 14 or later, or iOS 17 or later (at the time of writing this post). Additionally, make sure that your Microsoft Authenticator app is updated to the latest version.

If you wish to learn more about how passkeys work, check out my post at: Part 1 – What is a FIDO2 key and How to Set One Up for Emergency Access in Entra ID | Cloud Build


Configure Passkeys in the Microsoft Authenticator App on an iPhone

  1. Access https://mysignins.microsoft.com and login

  2. Click security info from the left pane

  3. Click + Add sign-in method

4. Click the option, Passkey in Microsoft Authenticator


5. You may be prompted to go through MFA before you are able to add a new sign-in method. Please continue with this. When done, continue to step 6.

6. Read the pre-reqs and click next


7. Don’t click Next just yet. You will need to follow the instructions mentioned on your screen first.

  • Open the Microsoft Authenticator app on your phone. Tap on the account/email address you will be setting this passkey for. Keep the app open while you proceed with the setup.
  • Click Create a passkey.
    If this option does not appear, ensure that you have met the pre-reqs I mentioned at the beginning of this post.


8. You will be prompted to sign-in. Click the Sign-in button and login

9. If it is the first time you’re setting up a passkey via the Microsoft Authenticator app, you’ll be prompted to enable a couple of settings on your phone before you are allowed to continue.


10. We’re done with the configuration on the phone. Continue to the step 11 below.


11. Return to your laptop/desktop and click next to complete the process.

That’s it. If you’re interested in configuring a physical key, such as a YubiKey, the next section goes through the process.


Configure a passkey via a physical Yubikey 5 (usb-c)

  1. Access https://mysignins.microsoft.com and login

  2. Click security info from the left pane

  3. Click + Add sign-in method


3. Click the option Security key


4. You may be prompted to go through MFA before you are able to add a new sign-in method. Please continue with this. When done, continue to step 5.

5. Select the type of security key. I select USB device


6. Have your physical key ready, after clicking next, you’ll be prompted to plug it in.


7. Click next and then select Security key (If this option does not appear, click the option other ways to sign-in and then click Security key). Click next.


8. Read and click OK


9. Read and click ok


10. You will be prompted to insert you physical key


11. You will be prompted to create a new PIN


12. Your physical YubiKey will flash and you will be prompted to place you finger on it


13. Passkey saved, click ok


14. Finally, you will be prompted to give your Physical key a name so you can easily identify it.


15. Done


I hope you found this post useful. Catch you at the one

The Evilginx Threat: Protecting Your Credentials with Phishing Resistant MFA

Reading Time: 6 minutes


In this blog post, I demonstrate how to use an Adversary in The Middle (AiTM) phishing attack to capture a user’s session token utilising a tool called Evilginx. There are several methods to protect against such attacks and I will be concentrating on phishing resistant MFA.


IMPORTANT DISCLAIMER:
The user accounts involved are demo user’s. The information provided in this blog post is intended for educational and demonstration purposes only. Evilginx is a powerful tool that can be used to steal session tokens, which can lead to unauthorised access to user accounts. This tool should only be used for legitimate penetration testing on systems where you have explicit permission to do so. Unauthorised use of Evilginx or any similar tool is illegal and unethical, and can result in severe legal consequences. Always ensure you have proper authorisation before conducting any security testing.


What is Evilginx?
Evilginx is an advanced phishing framework that provides a way to bypass multi-factor authentication (MFA) protections by capturing session tokens. It operates as an Adversary-in-The-Middle (AiTM) proxy, intercepting communication between a victim and a legitimate service to steal authentication credentials and session tokens. Unlike traditional phishing attacks that trick user’s into divulging their passwords, Evilginx focuses on obtaining credentials and session tokens, enabling attackers to login without entering user credentials. This makes it a powerful tool for penetration testers and security researchers who need to assess the resilience of their systems against such sophisticated attacks, however, it can also be used by bad actors.

Here’s how it works in few steps:

  1. Attackers create fake login pages that look almost identical to legitimate ones, such as login pages for Microsoft, Google, Facebook and more.

  2. When user’s enter their credentials, Evilginx captures them and forwards them to the real site, making it seem like a normal login process.

  3. It can also intercept multi-factor authentication (MFA) codes, allowing attackers to gain unauthorised access.

This makes Evilginx particularly dangerous because of its capabilities to bypass security measures like MFA.

To protect yourself, always verify the URL of the login page, use phishing resistant MFA, and be cautious of unexpected login requests.

Let’s dig deeper and understand the process via the diagram below

How does Adversary-in-The-Middle (AiTM) take place using Evilginx

Click the image below to enlarge


Now, let’s see the process in action

Note: I’ve already installed and configured the Evilginx application.

Let’s explore how Evilginx can capture a user’s session token and gain access to data.

  1. I launch Evilginx on my server


2. I type:

lures create microsoft365
lures get-url 0

Click image to enlarge


3. I copy the fake url as shown in the image above. A malicious actor typically requires the user to click on this URL, often distributed through a phishing email.

For demonstration purposes, we’ll assume that the a real user has clicked the malicious link received through a phishing email.

I launch a browser and manually enter the URL of the fake login page.

Enlarge the image below.

Question: Can you spot anything suspicious in the image below?


In case you didn’t spot the suspicious detail, take a closer look at the website address, the letter ‘o’ in ‘micros’ has been replaced with a zero.

Bad actors often use cloned login pages that can appear convincing and legitimate. This highlights the importance of continuously educating ourselves and others about the risks of phishing attacks.

⚠️ WARNING: Please do not attempt to access the fake URL shown above on your own device.

4. Now, let’s assume the user proceeds to log in. For this demo, I’ll be using a test account:

  • Demo Account: [email protected]
  • This account is protected with multi-factor authentication (MFA) using the Microsoft Authenticator app. However, it’s important to note that I am not using phishing-resistant MFA.

I proceed to log in via the fake login page. Meanwhile, the Evilginx application is actively listening and capturing authentication logs in the background.


5. I click Next and am prompted to enter my password to authenticate with Microsoft Entra ID.


6. I enter my username and password, then click Sign in. I complete the MFA challenge via my Authenticator app when prompted. As mentioned earlier, this account does not currently use phishing-resistant MFA.

After logging in, I am briefly signed in before being automatically logged out. However, by this point, the Evilginx tool has already captured the necessary authentication information.


7. Let’s take a look at what Evilginx has captured.


8. At this point, I have successfully captured the user’s credentials, including the username and password, through the fake login page.


Evilginx has now captured the user’s session, including the MFA acceptance, a critical point in demonstrating how traditional MFA can be bypassed in such attacks. Let’s dig a little deeper.

9. I run the sessions command and can see that the username, password, and session token have all been successfully captured.


10. I type sessions 13 and press Enter to inspect the captured session in more detail.

11. The session token is now visible, this includes the full session data that Evilginx has intercepted, allowing an attacker to potentially hijack the authenticated session without needing the user’s credentials or MFA prompt again.


12. Next, I prepare to replay the stolen session token. I highlight and copy the token from the Evilginx output.

13. I’ve downloaded Firefox and installed a cookie editor extension to assist with injecting the session token.

14. I launch Firefox and navigate to https://office.com.


15. I click the Sign in button on office.com and am redirected to the official Microsoft login page.

16. I clear all existing cookies using the cookie editor extension.


17. Inside the cookie editor, I click the Import option and paste the stolen session cookie. I then click Import again.


18. The session cookie has now been loaded


19. I refresh the page, and I now have access.


20. I have access to the user’s apps.


21. I have access to the user’s data


22. I have access to the user’s mailbox



Phishing resistant MFA


Now, i’ll go through the same process again, but this time I’ve enabled phishing resistant MFA for the account [email protected]. I’ve used a passkey. If you’d like to learn more, check out this blog post: Part 1 – What is a FIDO2 key and How to Set One Up for Emergency Access in Entra ID | Cloud Build

  1. I return to the fake login page. I type my username and click Next, but instead of entering a password, I select the option: Use your face, fingerprint, PIN, or security key instead, as shown in the image below.


2. I’m prompted to use a security key, but this prompt is for the fake domain (login.micr0soft.com). My passkey is registered to the legitimate domain (login.microsoft.com), so authentication fails. As a result, Evilginx is unable to capture the session token.


No sessions saved by the Evilginx app

I hope this post was useful. Thanks for reading and see you at the next one.

Integrate Defender for Endpoint with Defender for Cloud Apps

Reading Time: 6 minutes


In this post I explore how to integrate Defender for Endpoint with Defender for Cloud Apps natively without having to go through much effort.

Why would you want to do this? Once traffic information is collected by Defender for Cloud Apps, you can analyse what Cloud Apps your users are accessing, including details such as website address, IP, user and device name.

Defender for Cloud Apps takes advantage of capabilities to block endpoint device access to Cloud Apps. Cloud Apps can include any application or website accessed over the Internet, for example, Office 365 and websites such as social media sites. For example, you may want to identify commonly used risky cloud storage and collaboration websites your users may be using and unsanction (block access). Defender for Cloud Apps helps you manage over 31,000 apps by assessing risk factors provided by Microsoft to ensure compliance. If a Cloud App does not meet security and compliance requirements, you can unsanction the app. This is basically shadow IT and mitigation, allowing you to block the use of unauthorised Cloud Apps in your organisation with a click of a button.

Pre-requisites

There are number of configuration options we must enable before the data we require from our user devices is visible within Defender for Cloud Apps.

  1. Access the Microsoft Defender XDR portal at security.microsoft.com

  2. From the left pane, click settings.


3. Click Endpoints


4. Click Advanced features


5. Scroll down to Microsoft Defender for Cloud Apps and enable this option.


6. From the left pane, click Settings again


7. Click Cloud Apps


8. Under Cloud Discovery, click Microsoft Defender for Endpoint


9. Enable enforce access. Once you discover and unsanction unauthorised Cloud Apps, users will not be able to access them and will receive a warning. You can also set up additional alerting options as required, such as redirecting the users to a custom web page of your choice when a website/cloud app is blocked.


10. Click Settings > Endpoints > Advanced features, and then select Custom network indicators. This allows you to leverage Microsoft Defender Antivirus network protection capabilities to block access to URLs using Defender for Cloud Apps.

11. Click Yes to confirm.

It can take up to 2 hours before information is passed from the endpoints to Defender for Cloud Apps

12. Access Defender for Cloud Apps (security.microsoft.com) and click Cloud Discovery from the left pane as shown in the image below.


13. Once the data is visible in Defender for Cloud Apps, a new report similar to the one below should be visible. The report shown in the image below is named Win10 Endpoint Users.


14. In the Win10 Endpoint Users report, some statistics start to become visible. Click Discovered apps.


15. We can see a list of Cloud Apps being accessed by users. There is not much going on as I only have one Windows 10 machine and one user that I used for this demo.

Each Cloud App/website is assessed against a catalog of built in Cloud Apps. The Microsoft Defender for Cloud Apps catalog page provides a list of over 31,000 discoverable Cloud Apps. Defender for Cloud Apps discovery analyses your traffic logs from your Windows 10 and 11 devices to give you ongoing visibility into Cloud use, shadow IT, and risks posed to your organisation. Defender for Cloud Apps rates each website/cloud app risk based on regulatory certification, industry standards, and best practices.


16. We can dig deeper and check the users and IP addresses tab.



17. All Cloud Apps accessed by my demo users are ok from a risk score point of view, but let’s assume that I wanted to prevent my users from, accessing Dropbox or other websites. I could unsanction, block access to the Cloud App.


Note: unsanctioning a Cloud App blocks access for the whole organisation. However, you can create custom App tags which can be based on include and exclude. You can then select to exclude or include certain devices. For example, block access to social media sites for all devices apart from marketing user devices.


18. Once I click unsanction, a list of drop box url’s are added to a blocked list known as Indicators. These can be viewed by clicking settings from the left menu > Endpoints and then scroll down to Indicators as shown in the image below.


19. You’ll find that as part of unsanctioning Dropbox, a number of urls are added automatically by Defender for Cloud Apps, such as dropbox.com, dropbox.jp, dropboxbusiness.com and more. You could also manually add website addresses you wish to block from user devices.

Note: it can take a few hours, sometimes up to 24 hours before the changes are synced to Defender for Endpoint.


20. We can also unsanction Cloud Apps from the catalog of over 30,000 built in apps. From the left pane click Cloud App catalog.


21. I filter to display all Cloud Apps with a risk score of zero. Change the filter as per your requirements using the risk score option shown in the image below.

A total of 321 apps (at the time of writing) with a risk score of 1 appear from the catalog.


22. Let’s click the first one in the list, torrentz.cl

Clicking the app, provides me with some useful information including app security and compliance details. This could be really useful as I may only want my users accessing apps which meet ISO 27001 and ISO 27018 compliance.


I could also check if my users are using this app and if yes, I could decide to unsanction (block) or even monitor access. If a Cloud App is tagged as monitored, a message will appear notifying the users that this cloud app/website is being monitoring.

23. After the indicators have synced to Defender for Endpoint (This could take a few hours, sometimes up to 24 hours), I launch Edge browser and access dropbox.com, I receive a blocked message. An alert is also logged in the Defender portal to inform administrators that a user attempted to access an unsanctioned (blocked) website/cloud app.

Message: This website is blocked by your organization. Contact your administrator for more information.


and that’s it. I hope you found the post useful.

See you at the next post