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 bad actor now requires a user to click on this fake url which could be via phishing email.

For the purpose of this demo, let’s assume that a user has clicked the link which was sent to them via a phishing email.

I launch a browser and type the fake login page url.

Enlarge the image below.

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


Incase you were not able to locate the suspicious disguise, check the website address. The letter o after micros has been replaced with a zero.

Bad actors will use such cloned login pages which sometimes look convincing and genuine. It’s important that we continue to educate and remind ourselves about phishing attacks.

WARNING: Please do not access the fake url above on your device

4. Ok, so now the user logs in. I am going to use a demo account.

  • My demo account is ceo@imranrashid.co.uk
  • The account is protected with MFA via the Microsoft Authenticator app. Not phishing resistant MFA at the moment.

I’m going to login to the fake page. The Evilginx application is listening in and recording logs.


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


6. I enter my username, password, click sign in and go through MFA when prompted. I do not currently have phishing resistant MFA enabled as yet.

I am logged in and then auto signed out, but the required information has been captured by the Evilginx tool.


7. Let’s see what I get with Evilginx


8. I have the user credentials including username and password


Evilginx has captured the user’s session which includes MFA acceptance. Let’s dig a little deeper.

9. I type sessions and can see the username, password and the token has been captured.


10. I type sessions 13 and press enter

11. Here is the captured session token.


12. Next, I am going to replay this stolen token. I highlight and copy the text.

13. I have downloaded Firefox and installed a cookie editor extension.

14. I launch Firefox and access office.com


15. I click the Sign in button and I am redirected to the Microsoft login page

16. I clear all the cookie information in the cookie editor extension.


17. Inside the Cookie editor extension, I click the option to import and paste the session cookie I copied earlier. I then click import again.


18. The session cookie has been loaded


19. I now refresh the page and I have access


20. I have access to the user apps


21. I have access to the user data


22. I have access to the user email



Phishing resistant MFA


Now, i’ll go through the same process again, but this time I have enabled phishing resistant MFA for the account ceo@imranrashid.co.uk. I have used a passkey. If you wish to learn more, please visit the following 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 am back at 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 am being prompted for a security key for the fake url as shown in the image below. My passkey is registered to the real domain of login.microsoft.com and not login.micr0soft.com, therefore the user is unable to authenticate and provide Evilginx with the session token it is trying to capture.


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