<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>O365 - RiskInsight</title>
	<atom:link href="https://www.riskinsight-wavestone.com/en/tag/o365-2/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.riskinsight-wavestone.com/en/tag/o365-2/</link>
	<description>The cybersecurity &#38; digital trust blog by Wavestone&#039;s consultants</description>
	<lastBuildDate>Wed, 29 Mar 2023 16:23:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/Blogs-2024_RI-39x39.png</url>
	<title>O365 - RiskInsight</title>
	<link>https://www.riskinsight-wavestone.com/en/tag/o365-2/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Illicit consent grant attacks targeting Azure and Office 365: still a threat?</title>
		<link>https://www.riskinsight-wavestone.com/en/2023/03/illicit-consent-grant-attacks-targeting-azure-and-office-365-still-a-threat/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2023/03/illicit-consent-grant-attacks-targeting-azure-and-office-365-still-a-threat/#respond</comments>
		
		<dc:creator><![CDATA[Raymond Chan]]></dc:creator>
		<pubDate>Thu, 30 Mar 2023 09:00:00 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[O365]]></category>
		<category><![CDATA[phishing]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=20161</guid>

					<description><![CDATA[<p>A quick overview of phishing techniques on Azure and Office 365 Phishing attacks are well known. The objective of this type of attack is to perform actions from a victim&#8217;s account or to retrieve information about the targeted person or...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/03/illicit-consent-grant-attacks-targeting-azure-and-office-365-still-a-threat/">Illicit consent grant attacks targeting Azure and Office 365: still a threat?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 style="text-align: justify;">A quick overview of phishing techniques on Azure and Office 365</h1>
<p style="text-align: justify;">Phishing <strong>attacks</strong> are well known. The objective of this type of attack is to perform <strong>actions</strong> from a victim&#8217;s account or to <strong>retrieve information</strong> about the targeted person or company.</p>
<p style="text-align: justify;">Despite their notoriety, they remain very effective for attackers. Indeed, among the <a href="https://www.wavestone.com/en/insight/cert-w-2022-cybersecurite-trends-analysis/">attacks investigated by Wavestone CERT</a>, about 51% of them start with the use of valid accounts, which includes <strong>phishing attacks</strong>.</p>
<p style="text-align: justify;"><strong>We are all vulnerable to phishing attacks!</strong> An attacker with enough resources and information about their target can generate <strong>a trap sophisticated enough</strong> to trick them. Similarly, the Office365 and Azure product suites have features that can be exploited in <strong>less conventional attacks, the impacts of which users may not be aware.</strong></p>
<p style="text-align: justify;"><strong>Employee awareness</strong>, while necessary to address the most common threats, is not enough to address some of the more targeted or less traditional types of attacks. <strong>Tougher access requirements</strong> to cloud-hosted resources, <strong>good hygiene in managing access rights</strong>, and <strong>detection of unusual and suspicious access</strong> are all critical to a company&#8217;s defence strategy.</p>
<p style="text-align: justify;">Attackers have a <strong>wide range of tools and possibilities</strong> to access <strong>documents stored</strong><em> on </em>a company&#8217;s <strong>SharePoint</strong>, attempt to <strong>retrieve sensitive emails</strong><em>, </em>or retrieve employee information. The traditional phishing attack as well as the device code authentication attack will be briefly explained below before looking at the illicit consent grant attacks in more detail.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">The traditional phishing attack: a known threat preventable using multi-factor authentication</h2>
<p style="text-align: justify;">Traditional phishing attacks are usually based on sending a <strong>link directing the targeted victims to a site the attacker controls</strong>. Using an authentication login page similar to those used by employees of the targeted company, the attacker <strong>retrieves the credentials and passwords of the tricked users</strong>.</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter wp-image-20131 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2.png" alt="" width="3408" height="2216" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2.png 3408w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2-294x191.png 294w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2-60x39.png 60w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2-768x499.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2-1536x999.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2-2048x1332.png 2048w" sizes="(max-width: 3408px) 100vw, 3408px" /></p>
<p style="text-align: center;"><em>The traditional phishing attack is simple to implement in the absence of multi-factor authentication</em></p>
<p style="text-align: justify;">The <strong>ease of implementing</strong> such an attack on <strong>a large scale</strong> makes it a tool of choice for untargeted attacks. One method to protect against this type of attack is <strong>to enforce the use of a second authentication factor</strong>.</p>
<p style="text-align: justify;">It should be noted however that although more complex to implement, <strong>the interception of the second authentication factor is technically feasible</strong> and will be the subject of an upcoming dedicated article.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">The attack via &#8220;device code&#8221; authentication: a little-known authentication method hijacked by attackers</h2>
<p style="text-align: justify;">This attack <strong>relies on the device authorization grant functionality</strong><a href="#_ftn1" name="_ftnref1">[1]</a>. This authentication method allows <strong>the authentication of a user on a device without a web browser</strong>. A code displayed on this device must then be entered on a computer or smartphone via the dedicated Microsoft site. This <strong>device will then have part of the access rights to Office 365 resources corresponding to the user who entered the code</strong>.</p>
<p style="text-align: justify;">This <strong>functionality is not well known to users</strong> and can be exploited by an attacker for malicious purposes:</p>
<ul style="text-align: justify;">
<li>The attacker first generates a device code, using the same process used by devices without a web browser.</li>
<li>Then, the attacker&#8217;s objective will be to get the victim to fill in his device code on the <span style="color: #048b9a;">https://microsoft.com/devicelogin</span> For example, the attacker could pretend that to access a sensitive document, it is necessary to connect to this link using the code he generated.</li>
<li><strong>If the target accesses the link, fills in the code and authenticates, this will allow the attacker to impersonate the </strong></li>
</ul>
<p style="text-align: justify;"><img decoding="async" class="aligncenter wp-image-20135 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2.png" alt="" width="3575" height="2490" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2.png 3575w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2-274x191.png 274w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2-56x39.png 56w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2-768x535.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2-1536x1070.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2-2048x1426.png 2048w" sizes="(max-width: 3575px) 100vw, 3575px" /></p>
<p style="text-align: center;"><em>Example of a device code phishing attack</em></p>
<p> </p>
<p style="text-align: justify;">This attack is <strong>more difficult for an attacker to carry out</strong> because of the <strong>short lifespan of the device codes:</strong> they are only valid for <strong>15 minutes</strong> and must therefore be generated shortly before the user enters them. This attack is therefore more easily carried out within the framework of <strong>&#8220;phoning&#8221; attacks or phishing via Teams</strong>. For example, the attacker could call the victim, pretending to be part of the company&#8217;s IT support team, and ask the user to authenticate on the link indicated and fill in the code of his choice.</p>
<p style="text-align: justify;">To protect against this type of attack, <strong>conditional access policies</strong> on Azure can be used <em>to </em><strong>prohibit suspicious connections from devices not under the control of the company</strong>.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Illicit consent grant attack</h2>
<p style="text-align: justify;">In addition to these two methods, the illicit consent grant attack also allows an attacker to illegitimately gain access to an Azure environment. This attack was even initially easier for an attacker to implement than attacks via device code authentication. Faced with the resurgence of this threat, <strong>actions were taken in 2020 by Microsoft to limit the conditions for carrying out the attack</strong>. While hardened Azure configurations can completely block this threat, the configurations implemented by some companies expose them to this type of attack. What are the <em>prerequisites for </em>the realization of such an attack, what are the possible <strong>consequences</strong> and <strong>how to protect yourself</strong>?</p>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">What is the illicit consent grant attack?</h1>
<p style="text-align: justify;">To <strong>understand the principle of</strong> this attack, let&#8217;s put ourselves <strong>in the shoes of an employee who is a victim</strong> of such an attack:</p>
<ul style="text-align: justify;">
<li>The victim receives a <strong>phishing email</strong> indicating an urgent action to be taken to keep their Microsoft account activated. Employees are made aware not to click on phishing links and not to enter their passwords on unknown platforms. The <strong>link</strong> in the format <span style="color: #048b9a;">https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=&lt;CLIENT_ID&gt;&amp;redirect_uri=&lt;Attacker_controled_URL&gt;&amp;response_type=code&amp;response_mode=query&amp;scope=Mail.ReadWrite%20Files.Read.All%20Mail.Send%20User.Read</span> contains a <strong>Microsoft-associated domain</strong>, which reassures the victim.</li>
<li>When clicking on the link, the victim must authenticate themself. This authentication is often automatic since it benefits from Microsoft&#8217;s single sign-on (SSO). The victim then receives <strong>a request to grant permissions</strong>:</li>
</ul>
<p><img decoding="async" class="aligncenter wp-image-20145 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagebis.png" alt="" width="493" height="696" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagebis.png 493w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagebis-135x191.png 135w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagebis-28x39.png 28w" sizes="(max-width: 493px) 100vw, 493px" /></p>
<p style="text-align: center;"><em>The malicious application asks the user to grant it permissions</em></p>
<ul style="text-align: justify;">
<li>If the victim clicks &#8220;Cancel&#8221; out of caution, they are redirected to the attacker&#8217;s server with a URL like <span style="color: #048b9a;">&lt;Attacker_controled_URL&gt;/?error=consent_required &amp;error_description=AADSTS65004%3a+User+declined+to+consent+to+access+the+app.&amp;error_uri=https%3a%2f%2flogin.microsoftonline.com%2ferror%3fcode%3d65004#</span>. The attacker, understanding that the victim has not accepted the prompt to grant them permissions, can then <strong>redirect the victim to the phishing page, giving them the impression that the requested permissions must be accepted</strong> to proceed to the next step.</li>
<li>Because of the legitimate domain name and the urgency indicated in the phishing email, the <strong>victim of the attack chooses to accept</strong><em>. </em>They then see a message indicating that their account will be kept activated, as suggested in the initial email. The victim then resumes normal activity.</li>
</ul>
<p style="text-align: justify;">However, this consent allows the attacker to perform <strong>actions on behalf of the victim</strong>, depending on the permissions granted. Note that the illicit consent grant attack has <strong>many advantages</strong> for an attacker, including:</p>
<ul style="text-align: justify;">
<li>The <strong>use of a Microsoft-associated URL</strong> when requesting consent, which is considered trusted and therefore implies less distrust on the part of targeted users.</li>
<li>Obtaining <em>persistent access </em>for 90 days, without knowledge of the user&#8217;s password or second authentication factor if no conditional access policy is implemented.</li>
<li>The ability to <strong>directly request Microsoft APIs</strong> to automatically retrieve files, emails, and other corporate resources accessible by the tricked user.</li>
</ul>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Technical sidebar</h2>
<p style="text-align: justify;">From a technical point of view, <strong>the illicit consent grant attack relies on the ability of an attacker to create an application that requires permission to be granted</strong>. Granting the permission is a feature that is regularly used by users without them realizing it, e.g., the Outlook client is allowed by default to retrieve and notify them of new incoming emails.</p>
<p style="text-align: justify;">Here are the key steps when performing this type of attack (which is based on the authorization code grant flow of OAuth 2.0):</p>
<ul style="text-align: justify;">
<li>The attacker <strong>creates an enterprise application on Azure AD</strong> (<span style="color: #048b9a;">application registration</span>), <strong>configures the permissions</strong> they want from <strong>users</strong> and instantiates a &#8220;<strong>client_secret</strong>&#8221; on the application. Some constraints related to this application are detailed below.</li>
<li>The attacker sets up a <strong>server to which users will be redirected</strong> following the consent and indication of its URL as a <strong>valid redirection URL for the application</strong>.</li>
<li>Following <em>a </em><strong>user&#8217;s consent</strong>, the user will be <strong>redirected</strong> <strong>to the malicious site</strong> and a <em>c</em><strong>ode will be provided to the attacker</strong>. This code is the proof to be shown to Microsoft that the user authorizes the application to do actions on their behalf.</li>
<li>Using <strong>this code </strong>and the application&#8217;s &#8220;<strong>client_secret</strong>&#8220;, the attacker will be able to <strong>retrieve an OAuth token</strong>. This token is a <strong>receipt signed by Microsoft</strong> that specifies the <strong>actions that the victim authorizes to be done on his behalf</strong>. The attacker can also retrieve a &#8220;refresh_token&#8221; that allows to <strong>renewal of the validity of the OAuth token</strong>.</li>
<li>This OAuth token can then be used to send <strong>requests to the Graph API</strong> in the name of the victim and therefore allows attackers to <strong>impersonate the user</strong>.</li>
</ul>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-20139 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2.png" alt="" width="3169" height="1705" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2.png 3169w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2-355x191.png 355w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2-768x413.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2-1536x826.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2-2048x1102.png 2048w" sizes="auto, (max-width: 3169px) 100vw, 3169px" /></p>
<p> </p>
<h1 style="text-align: justify;">What are the consequences of such an attack?</h1>
<p style="text-align: justify;">While some <strong>permissions require administrator approval by default</strong>, other permissions can be granted directly by users in non-hardened Azure environments. The <strong>permissions that can be recovered</strong> by the attacker during this type of attack <strong>depend on the configuration of the targeted Azure AD tenant</strong>.</p>
<p style="text-align: justify;">Here are some examples of possible abuse by an attacker who has managed to retrieve a user&#8217;s permissions on a non-hardened environment.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20143 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2.png" alt="" width="3083" height="1330" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2.png 3083w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2-437x189.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2-71x31.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2-768x331.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2-1536x663.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2-2048x884.png 2048w" sizes="auto, (max-width: 3083px) 100vw, 3083px" /></p>
<p style="text-align: center;"><em>Actions that can be taken following a successful malicious consent attack on an unhardened Azure environment</em></p>
<p style="text-align: justify;"> </p>
<ul style="text-align: justify;">
<li><strong>Azure Active Directory:</strong>
<ul>
<li>The <span style="color: #048b9a;">Microsoft Graph User.ReadBasic.All</span> permission allows <strong>retrieval of the email addresses of all users in a tenant</strong>, allowing the deployment of larger-scale phishing attacks from an initial compromise.</li>
</ul>
</li>
<li><strong>Outlook:</strong>
<ul>
<li>Sending an email on behalf of a user can enable so-called &#8220;<strong>president fraud</strong><em>&#8221; </em>attacks using the <span style="color: #048b9a;">Microsoft Graph Mail.Send</span> and <span style="color: #048b9a;">Mail.ReadWrite</span> permissions. A compromised employee with a high level of authority could, for example, send an email requesting that a large amount of money be sent urgently to a bank account not listed by the company.</li>
<li>Sent emails can also be hidden using <strong>Outlook filtering rules</strong> that can be modified using the <span style="color: #048b9a;">MailboxSettings.ReadWrite</span> permission. The attacker will then be able to <strong>redirect all emails</strong> related to his attack and associated replies to a different folder in the outbox and inbox.</li>
</ul>
</li>
<li><strong>Teams:</strong>
<ul>
<li><strong>Reading and sending messages</strong> via Teams (<span style="color: #048b9a;">Microsoft Graph Chat.ReadWrite</span>) is an effective method for an attacker to impersonate a user. This method can also be used to carry out &#8220;<strong>president fraud</strong>&#8221; attacks.</li>
</ul>
</li>
<li><strong>OneDrive and SharePoint:</strong>
<ul>
<li>Read access to <strong>files accessible on OneDrive and SharePoint</strong> (<span style="color: #048b9a;">Microsoft Graph Files.Read.All</span>) can provide access to all files accessible by the user. In addition, SharePoint files are often <strong>stored with permissive access rights </strong>which could allow attackers to retrieve a large number of <strong>files</strong>. It is not uncommon, for example, to have access to scripts or configuration files containing passwords in clear text.</li>
<li>In addition, SharePoint&#8217;s search capabilities, including reading and indexing the content of Office files, can be used to target certain keywords such as &#8220;password&#8221;.</li>
<li>The writing rights on a SharePoint file (<span style="color: #048b9a;">Microsoft Graph Files.ReadWrite.All</span>) can also have a significant impact: SharePoint&#8217;s versioning features limit the recording of old file versions to 100 versions by default. This means that in case of automated and successive rewrites more than 100 times, <strong>the initial version of the file would no longer be recoverable</strong>. This would allow an attacker to <strong>erase a large amount of data</strong> if an account with write rights to sensitive files is compromised. In case of deletion, it would then be necessary to contact Microsoft support to try to recover the data from the daily cold backups.</li>
</ul>
</li>
<li><strong>OneNote:</strong>
<ul>
<li>Synchronized OneNote files (<span style="color: #048b9a;">Microsoft Graph Notes.ReadWrite</span> or <span style="color: #048b9a;">Notes.Read.All</span>) can contain sensitive information such as <strong>meeting minutes, and confidential information, but also technical information</strong> such as passwords stored in an unsecured manner.</li>
</ul>
</li>
<li><strong>Azure Resources</strong>:
<ul>
<li>Access to key vaults and storage accounts (<span style="color: #048b9a;">Azure Key Vault</span> and <span style="color: #048b9a;">Azure Storage user_impersonation</span>) can give access to sensitive elements in <strong>case of compromise of developer</strong> or technical user <strong>accounts</strong>. These elements can <strong>facilitate the compromise of Azure resources</strong> such as virtual machines and serve as a <strong>rebound point for an external attacker</strong>.</li>
</ul>
</li>
</ul>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">These actions can have <strong>serious impacts</strong> on a company. In addition, they can <strong>facilitate more elaborate attacks</strong> by disclosing sensitive information to an external attacker.</p>
<p style="text-align: justify;">If <strong>approved by an administrator</strong>, more sensitive permissions can be retrieved such as write access to <em>a</em><strong>ll Azure Active Directory information.</strong></p>
<p style="text-align: justify;">Finally, administrators have the <strong>right to grant all users permission to an application</strong> of the tenant. In this case, the identity of all users could be impersonated to grant permission.</p>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">Microsoft&#8217;s implementation of the &#8220;risk-based consent step-up&#8221; to limit attacks by illicit consent</h1>
<p style="text-align: justify;">In response to this threat, <strong>Microsoft implemented</strong> additional protections <strong>in November 2020</strong> to limit the impact of this type of attack. The &#8220;<strong>risk-based consent step-up</strong>&#8221; feature aims to <strong>raise a warning</strong> and ask for <strong>an administrator&#8217;s validation</strong> in case of a permission <strong>request that seems fraudulent</strong>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20147 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imageter.png" alt="" width="397" height="412" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imageter.png 397w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imageter-184x191.png 184w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imageter-38x39.png 38w" sizes="auto, (max-width: 397px) 100vw, 397px" /></p>
<p style="text-align: center;"><em>The access request from an unverified application considered sensitive is blocked by default</em></p>
<p style="text-align: justify;">This applies in the case of a <strong>permission request by an unverified application created outside the targeted tenant</strong>. By default, all permissions are affected, except for reading the target user&#8217;s profile, to facilitate single sign-on (SSO) with third-party applications.</p>
<p style="text-align: justify;">This restriction is <strong>implemented by default </strong>on all Azure tenants.</p>
<p style="text-align: justify;">Although these <strong>restrictions limit attacks</strong>, 3 types of applications <strong>can still be used for malicious purposes:</strong> legacy applications, applications internal to the targeted tenant and verified applications.</p>
<ul style="text-align: justify;">
<li><strong>Legacy applications:</strong>
<ul>
<li>To allow for <strong>backward compatibility, no warning message is displayed </strong>for a permission request from an <strong>application created before November 2020</strong>.</li>
<li><em>Prerequisite for the attacker:</em> have an <strong>application created on an Azure tenant before November 2020</strong> or compromise a tenant containing such applications.</li>
</ul>
</li>
<li><strong>Internal applications of the targeted tenant:</strong>
<ul>
<li>These applications <strong>are not covered by the &#8220;risk-based consent step-up&#8221;</strong><em>. </em>By default, all users of an Azure tenant have the right to <strong>create an enterprise application on their tenant, which </strong>makes it easier to attack an unhardened environment.</li>
<li><em>Prerequisites for the attacker:</em> to have a first compromised account on the IS of the targeted company, to realize that the creation of applications is authorized for standard users and to <strong>deploy an internal application to the tenant.</strong></li>
</ul>
</li>
<li><strong>Verified applications:</strong>
<ul>
<li>Verified applications are not covered by the risk-based consent step-up. The Microsoft verification process requires integration into the Microsoft Partner Network.</li>
<li><em>Prerequisite for the attacker</em>: have a <strong>verified application</strong> or <strong>compromise an Azure tenant with verified applications</strong> and hijack the use of these legitimate applications.</li>
</ul>
</li>
</ul>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">Possible remediations</h1>
<p style="text-align: justify;">To limit the probability and impact of such attacks, the following recommendations can be <strong>applied and adapted to the company&#8217;s context:</strong></p>
<ul style="text-align: justify;">
<li>Allow <strong>only applications explicitly approved by administrators</strong>. This configuration is the most secure, but the validation step can be a bottleneck since it is usually the Global Administrators and Privileged Role Administrators who must give validation. In practice, some rights can also be granted via Cloud Application Administrators or Application Administrators.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20150 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagequa.png" alt="" width="1392" height="522" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagequa.png 1392w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagequa-437x164.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagequa-71x27.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagequa-768x288.png 768w" sizes="auto, (max-width: 1392px) 100vw, 1392px" /></p>
<p style="text-align: center;"><em>Granting privilege consent by standard users can be blocked via Azure AD configurations</em></p>
<ul style="text-align: justify;">
<li><strong>Limit the permissions which can be granted.</strong> An administrator can specify Low-risk permissions that can be granted directly by users.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20152 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagecin.png" alt="" width="949" height="361" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagecin.png 949w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagecin-437x166.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagecin-71x27.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagecin-768x292.png 768w" sizes="auto, (max-width: 949px) 100vw, 949px" /></p>
<p style="text-align: center;"><em>Granting privilege consent by standard users can be limited to rights considered non-sensitive via Azure AD configurations</em></p>
<ul style="text-align: justify;">
<li>Create a <strong>legitimate application validation process and admin consent workflow to track and justify these validations</strong>. By tightening up the consent process, it is necessary to jointly implement a simple and intuitive way for users to request exceptions to grant permissions related to legitimate use cases. These exceptions must be tracked and justified to ensure the legitimacy of the requests.</li>
<li><strong>Regularly review the rights granted to applications </strong>(Enterprise applications): permissions granted by users should be reviewed to ensure that only legitimate applications have rights to the tenant&#8217;s Office 365 resources.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20154 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagesext.png" alt="" width="1392" height="389" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagesext.png 1392w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagesext-437x122.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagesext-71x20.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagesext-768x215.png 768w" sizes="auto, (max-width: 1392px) 100vw, 1392px" /></p>
<p style="text-align: center;"><em>Regular review of trusted applications on an Azure tenant facilitates checking that the privileges granted are still valid</em></p>
<p style="text-align: justify;"> </p>
<ul style="text-align: justify;">
<li>Monitor suspicious access to Office 365 resources. For example, it is possible to set up <strong>alert rules </strong>on the number of files downloaded over a short period of time to identify <strong>data exfiltration attempts</strong>.</li>
<li><strong>Limit access rights to SharePoint files to what is strictly necessary</strong>: files that are accessible to all users within a company should be checked at regular intervals and access rights to the most sensitive files should be reviewed to ensure that only the necessary people have access.</li>
</ul>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">Conclusion</h1>
<p style="text-align: justify;">The <strong>various phishing attacks</strong> presented in this article are based on a <strong>lack of hardening of Azure AD configurations</strong>. The implementation of <strong>a second authentication factor</strong>, while necessary for traditional phishing attacks, is not sufficient to protect against the other attacks presented. For attacks via device code authentication, administrators can implement <strong>conditional access policies</strong> to limit suspicious connections from devices not under the control of the organization. For illicit consent grant attacks, the most effective measure is to <strong>only allow applications approved by administrators</strong>.</p>
<p style="text-align: justify;">These <strong>three elements of hardening</strong>, although simple in appearance, can be the subject of <strong>real security projects to consider the existing configurations and usages</strong>, in particular by ensuring that existing applications are not blocked by these measures, and by <strong>implementing</strong> regular review and validation <strong>processes</strong> for new applications.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Bibliography</h3>
<p style="text-align: justify;"><a href="https://aadinternals.com/post/phishing/">https://aadinternals.com/post/phishing/</a></p>
<p style="text-align: justify;"><a href="https://jeffreyappel.nl/protect-against-oauth-consent-phishing-attempts-illicit-consent-attack/">https://jeffreyappel.nl/protect-against-oauth-consent-phishing-attempts-illicit-consent-attack/</a></p>
<p style="text-align: justify;"><a href="https://positivethinking.tech/insights/what-is-an-illicit-consent-grant-attack-in-office-365/">https://positivethinking.tech/insights/what-is-an-illicit-consent-grant-attack-in-office-365/</a></p>
<p style="text-align: justify;"><a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/publisher-verification-overview">https://docs.microsoft.com/en-us/azure/active-directory/develop/publisher-verification-overview</a></p>
<p style="text-align: justify;"><a href="https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/user-admin-consent-overview">https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/user-admin-consent-overview</a></p>
<p style="text-align: justify;"><a href="https://learn.microsoft.com/en-us/security/operations/incident-response-playbook-app-consent">https://learn.microsoft.com/en-us/security/operations/incident-response-playbook-app-consent</a></p>
<p style="text-align: justify;"><a href="https://www.microsoft.com/en-us/security/blog/2021/07/14/microsoft-delivers-comprehensive-solution-to-battle-rise-in-consent-phishing-emails/">https://www.microsoft.com/en-us/security/blog/2021/07/14/microsoft-delivers-comprehensive-solution-to-battle-rise-in-consent-phishing-emails/</a></p>
<p style="text-align: justify;"><a href="#_ftnref1" name="_ftn1">[1]</a> https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/03/illicit-consent-grant-attacks-targeting-azure-and-office-365-still-a-threat/">Illicit consent grant attacks targeting Azure and Office 365: still a threat?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2023/03/illicit-consent-grant-attacks-targeting-azure-and-office-365-still-a-threat/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MS365 101: Manage Azure AD B2B Guest Identities</title>
		<link>https://www.riskinsight-wavestone.com/en/2022/08/ms365-101-manage-azure-ad-b2b-guest-identities/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2022/08/ms365-101-manage-azure-ad-b2b-guest-identities/#respond</comments>
		
		<dc:creator><![CDATA[Jules Haddad]]></dc:creator>
		<pubDate>Wed, 03 Aug 2022 13:21:16 +0000</pubDate>
				<category><![CDATA[Cloud & Next-Gen IT Security]]></category>
		<category><![CDATA[Focus]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Azure AD]]></category>
		<category><![CDATA[Collaboration]]></category>
		<category><![CDATA[identity]]></category>
		<category><![CDATA[O365]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=18362</guid>

					<description><![CDATA[<p>The use of &#8220;guest&#8221; identities to facilitate collaboration externally   The need for collaboration externally entails risks for companies Companies have always needed to collaborate with each other by sharing resources and exchanging data. To do this, their collaborators must...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2022/08/ms365-101-manage-azure-ad-b2b-guest-identities/">MS365 101: Manage Azure AD B2B Guest Identities</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 style="text-align: justify;">The use of &#8220;guest&#8221; identities to facilitate collaboration externally</h1>
<h2> </h2>
<h2 style="text-align: justify;">The need for collaboration externally entails risks for companies</h2>
<p style="text-align: justify;">Companies have always <strong>needed to collaborate</strong> with each other by sharing resources and exchanging data. To do this, their collaborators must be able to <strong>interact securely </strong>with users outside their environment.</p>
<p style="text-align: justify;">Several<strong> use cases</strong> can be applied, including <strong>time-bound collaboration with partners</strong>, external service providers, suppliers or B2B customers.</p>
<p style="text-align: justify;">Additionally, it is common to observe<strong> continuous collaboration between subsidiaries</strong> of the same group that have access to the resources and data of the company whilst not necessarily requiring to share the same Information Systems.</p>
<p style="text-align: justify;">Historically, collaboration could be achieved in several ways. However, collaboration also comes with certain disadvantages:</p>
<ul style="text-align: justify;">
<li>By <strong>successive exchange of emails</strong> &#8211; which can be inefficient and can result in a loss of control of the data exchanged;</li>
<li>By <strong>using solutions dedicated</strong> to share documents with third parties &#8211; which can be costly and unsuitable from a user experience point of view;</li>
<li>By <strong>creating a new identity in legacy systems</strong> (Active Directory, etc.), and by providing third-party entities with a means to access the company&#8217;s IS (VPN, virtual machines, physical machines, etc.) &#8211; which can significantly increase the company&#8217;s attack surface.</li>
</ul>
<h2> </h2>
<h2 style="text-align: justify;">Microsoft introduced Azure AD B2B to address the need for collaboration</h2>
<p style="text-align: justify;">Today, using Azure AD B2B allows two or more entities to <strong>collaborate within the host company&#8217;s Azure tenant</strong>.  Shared resources can be apps, documents, SharePoint sites, OneDrive, or Teams teams.</p>
<p style="text-align: justify;">In effect, the Azure B2B solution allows an external user to <strong>access the host company tenant through their regular account by</strong> creating a &#8220;guest&#8221; identity within the company&#8217;s Azure Active Directory (AAD).</p>
<p style="text-align: justify;">The &#8220;client&#8221; tenant then fully or partially trusts the &#8220;external&#8221; tenant for authentication via a token exchange mechanism.</p>
<p style="text-align: justify;">There are three native possibilities for creating a &#8220;guest&#8221; identity:</p>
<ul style="text-align: justify;">
<li>Directly from the <strong>Azure portal</strong>;</li>
<li>Via <strong>document sharing</strong> on OneDrive/SharePoint/Teams;</li>
<li>Through the use of the<strong> GRAPH API.</strong></li>
</ul>
<p> </p>
<p><em><img loading="lazy" decoding="async" class="wp-image-18366 size-full aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image1.png" alt="" width="4150" height="2385" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image1.png 4150w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image1-332x191.png 332w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image1-68x39.png 68w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image1-120x70.png 120w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image1-768x441.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image1-1536x883.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image1-2048x1177.png 2048w" sizes="auto, (max-width: 4150px) 100vw, 4150px" /></em></p>
<p style="text-align: center;"><em>Figure 1 &#8211; Native Operation: Authentication and Identity Creation</em></p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">At the level of the host tenant, the owner can choose to authorize the sharing of data to external users while also being able to administer guest accounts (creation, deactivation, deletion etc.).</p>
<p style="text-align: justify;">A direct benefit of this solution is the <strong>ease of use</strong> for users who are familiar with Microsoft environments.</p>
<p style="text-align: justify;">The second advantage is the<strong> cost of the solution</strong>. A &#8220;guest&#8221; identity has a licensing cost whereby up to a ceiling of 50,000 &#8220;guest&#8221; identities, their license is free. Beyond this and depending on the company&#8217;s subscriptions, a license may cost between €0.003 and €0.015 / month / user, which is then added on to a fixed fee of €0.029 for each multi-factor authentication attempt. This pricing policy is out of step with the usual price of an M365 license, which is between €10 and €50 / month / user depending on the license plan.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">However, Azure AD B2B has a default configuration that is too open, which creates risks for the company</h2>
<p style="text-align: justify;">Azure AD B2B introduces several factors that can lead to <strong>risk</strong>:</p>
<ul style="text-align: justify;">
<li>The <strong>creation of</strong> guest identities is very simple and uncontrolled (no identity manager, no traceability, no restrictions etc.);</li>
<li>The <strong>number of</strong> guest identities may increase in an uncontrolled manner, which makes managing their lifecycles difficult.</li>
<li>The company does <strong>not control the security</strong> of the initial holder of the &#8220;guest&#8221; identity;</li>
<li>No <strong>conditional access rules</strong> are set up by default (no strong authentication, no restriction of access to the Azure A D portal, etc.);</li>
<li>The &#8220;guest&#8221; identity <strong>has access to the Azure AD attributes</strong> of other users.</li>
</ul>
<p style="text-align: justify;">These factors create risks for the company&#8217;s data since the &#8220;guest&#8221; identity may have rights to a significant number of documents and information about its host owner.</p>
<p style="text-align: justify;">We can consider two triggering events for the different threat scenarios:</p>
<ul style="text-align: justify;">
<li>A <strong>malicious</strong> &#8220;guest&#8221; identity;</li>
<li>A &#8220;guest&#8221; identity <strong>compromised</strong> by an attacker.</li>
</ul>
<p style="text-align: justify;">An attacker would then have the opportunity to:</p>
<ul style="text-align: justify;">
<li><strong>Retrieve confidential data </strong>that the identity has access to;</li>
<li><strong>Destroy all data</strong> accessible by this identity;</li>
<li><strong>Compromise AD</strong> by assigning roles to this identity;</li>
<li><strong>Perform social engineering</strong> through their access to all user data.</li>
</ul>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">Depending on the level of maturity of the company and the willingness to hedge risk, it is necessary to implement a number of measures</h1>
<h2> </h2>
<h2 style="text-align: justify;">To get started: harden the default configuration</h2>
<h4> </h4>
<h4 style="text-align: justify;">Master the means to add &#8220;guest&#8221; identities on the tenant</h4>
<p style="text-align: justify;">The first step is to <strong>cut off access to the Azure portal</strong> to non-administrator employees of the company so that it is no longer a vector for creating &#8220;invited&#8221; identities.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18370 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen1.png" alt="" width="1595" height="761" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen1.png 1595w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen1-400x191.png 400w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen1-71x34.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen1-768x366.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen1-1536x733.png 1536w" sizes="auto, (max-width: 1595px) 100vw, 1595px" /></p>
<p style="text-align: center;"><em>Figure 2 &#8211; Restricting access to the Azure AD console</em></p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">It should be noted that it is also possible <strong>to restrict the population who can invite external users to collaborate</strong>. However, this will not be applicable to all companies &#8211; especially those wishing to decentralize the management of this population. The idea of restricting this population forces the creation of a service dedicated to the creation of these identities. This goes against the very principle of this service, which is to leave it in the hands of the user.</p>
<p style="text-align: justify;">Finally, there is a feature to<strong> apply constraints to the email addresses of &#8220;guest&#8221; identities</strong>, via white-listing or domain name blacklisting. However, before embarking on this action, it is necessary to consider the complexity of its implementation and the potential low level of associated risk reduction.</p>
<h4> </h4>
<h4 style="text-align: justify;">Restrict what these identities can access</h4>
<p style="text-align: justify;">It is also possible <strong>to restrict what can be accessed</strong> by the invited identities, so that they are unable to retrieve a large volume of information on the host tenant.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18374 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen3.png" alt="" width="1603" height="647" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen3.png 1603w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen3-437x176.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen3-71x29.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen3-768x310.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen3-1536x620.png 1536w" sizes="auto, (max-width: 1603px) 100vw, 1603px" /></p>
<p style="text-align: center;"><em>Figure 3 &#8211; Restrict access for &#8220;guest&#8221; identities</em></p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Strengthen authentication and access control of &#8220;guest&#8221; identities</h2>
<p style="text-align: justify;">The <strong>multi-factor authentication (MFA)</strong> mechanism for a &#8220;guest&#8221; identity is almost native and reduces the risk of spoofing by an attacker. It is also possible to set up a <strong>conditional access policy</strong> that specifically targets these &#8220;guest&#8221; identities.</p>
<p> </p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18372 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen2.png" alt="" width="1063" height="446" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen2.png 1063w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen2-437x183.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen2-71x30.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Screen2-768x322.png 768w" sizes="auto, (max-width: 1063px) 100vw, 1063px" /></p>
<p style="text-align: center;"><em>Figure 4 &#8211; Multi-Factor Authentication</em></p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">However, challenges can still complicate this operation and need to be considered:</p>
<ul style="text-align: justify;">
<li>Managing <strong>change management</strong> on these &#8220;guest&#8221; populations remains complex to perform, even if user onboarding operations are simple and carefully guided.</li>
<li>Managing <strong>second-factor reset processes</strong> in the event of loss or theft can be costly and complex if left unchecked.</li>
</ul>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Educate users about risks and best collaboration practices</h2>
<p style="text-align: justify;">The major complexity of the Azure AD B2B solution is <strong>the lack of a mechanism for managing &#8220;guest&#8221; identities</strong>. Users are therefore the <strong>main actors</strong> of the management strategy and must be informed at the right level by emphasizing:</p>
<ul style="text-align: justify;">
<li>Collaboration <strong>best practices</strong>: when should they use the solution, how to create a guest, and more;</li>
<li><strong>Proper management of their access</strong>: they must be removed as soon as possible in order to avoid subsequent illegitimate access;</li>
<li><strong>Disabling identities when they are no longer in use</strong>, especially for service providers/partners, ensuring that the documents produced are not lost.</li>
</ul>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Protect the data that guests can access</h2>
<p style="text-align: justify;">We must also not forget to protect the data to which a legitimate guest can have access to, which gives rise to several measures:</p>
<ul style="text-align: justify;">
<li>It is possible to set up constraints for &#8220;guest&#8221; identities via <strong>conditional access rules </strong>that include: mandatory use of thin clients (web clients), the prohibition of data downloading, constraints on the terminals to be used, etc.</li>
<li>If the company has deployed the Azure Identity Protection (AIP) classification tool, an alternate solution is to <strong>create a privacy label</strong> that encrypts the data for &#8220;guest&#8221; identities. This label can also be used to restrict certain actions for this population: modification restriction (via associated permissions), download restriction (via a DLP rule), etc.</li>
</ul>
<p style="text-align: justify;">Moving a step further, a <strong>Cloud Access Security Broker</strong> (such as Microsoft&#8217;s MS Defender for Cloud Apps) can enable the implementation of advanced and targeted rules, such as preventing uploads to specific Sharepoint spaces as an example.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Managing the Lifecycle of Guest Identities: 3 Scenarios to Consider</h2>
<p style="text-align: justify;">As mentioned earlier, the key topic is <strong>managing the lifecycle of &#8220;guest&#8221; identities</strong> i.e., the creation, deletion, and review of access. As such, there are 3 scenarios to be considered. These scenarios depend on the desired <strong>risk coverage</strong>, <strong>the level of maturity </strong>of identity and access management, and the <strong>cost of implementing</strong> the scenario.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18368 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image2.png" alt="" width="4457" height="2512" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image2.png 4457w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image2-339x191.png 339w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image2-69x39.png 69w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image2-768x433.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image2-1536x866.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image2-2048x1154.png 2048w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/08/Image2-800x450.png 800w" sizes="auto, (max-width: 4457px) 100vw, 4457px" /></p>
<p style="text-align: center;"><em>Figure 5 &#8211; Guest Identity Lifecycle Management Scenarios</em></p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Scenario 1 &#8211; Stay pragmatic on a budget: use native tools and configurations</h3>
<p style="text-align: justify;">In this scenario, the company <strong>creates a certain group typology for “External” groups</strong>, and therefore to the creation of guests. The distinction can be made by the use of language by the group. For example: all external groups must start with &#8220;X_&#8221;.</p>
<p style="text-align: justify;">It can thus carry out checks more easily on this limited perimeter of groups.</p>
<p style="text-align: justify;">The main prerequisite is <strong>to block the addition of &#8220;guest&#8221; identities to “Internal” groups. </strong>This is possible in two ways:</p>
<ul style="text-align: justify;">
<li>If the company has deployed the AIP classification tool on SharePoint and Teams spaces: a <strong>dedicated label</strong> can be used to prevent external sharing on these spaces. For example, the creation of an &#8220;Indull&#8221; label that blocks sharing with &#8220;guest&#8221; identities;  &#8211; <a href="https://docs.microsoft.com/en-us/microsoft-365/compliance/sensitivity-labels-teams-groups-sites?view=o365-worldwide">LINK</a></li>
<li><strong>Via a PowerShell script: </strong>block sharing with &#8220;guest&#8221; identities for &#8220;Internal&#8221; groups by identifying them via classifications. &#8211; <a href="https://docs.microsoft.com/en-us/microsoft-365/solutions/per-group-guest-access?view=o365-worldwide">LINK</a></li>
</ul>
<h4 style="text-align: justify;">Creating a &#8220;guest&#8221; identity</h4>
<p style="text-align: justify;">The only way to create a &#8220;guest&#8221; identity is to add<strong> them as external users to &#8220;External&#8221; group types.</strong></p>
<p style="text-align: justify;">If the company needs to give its tenant access to a subsidiary or an entire entity, it is possible to regularly synchronize their AD or Azure AD, and thus create their identities as a &#8220;guest&#8221; in the tenant of the company.</p>
<h4 style="text-align: justify;">Deleting a &#8220;guest&#8221; identity</h4>
<p style="text-align: justify;">The process of deleting identities is simple through the <strong>deletion of inactive &#8220;guest&#8221; identities. </strong>For example, using a PowerShell script based on the frequency of &#8220;Sign-In Activity&#8221;. Alternatively, it is also possible to remove &#8220;guest&#8221; identities that do not have access to any group via a PowerShell script.</p>
<h4 style="text-align: justify;">Review of &#8220;guest&#8221; access</h4>
<p style="text-align: justify;">It is possible <strong>to expire access for &#8220;guest&#8221; identities</strong> on SharePoint groups or OneDrives after 60 days. Note that the owner of the SharePoint or OneDrive group will be notified of the expiration 21 days beforehand.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18348 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/Picture7.png" alt="" width="1027" height="372" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/Picture7.png 1027w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/Picture7-437x158.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/Picture7-71x26.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/Picture7-768x278.png 768w" sizes="auto, (max-width: 1027px) 100vw, 1027px" /></p>
<p style="text-align: center;"><em>Figure 6 &#8211; Guest Access Expiration</em></p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Finally, it is possible to use the &#8220;Guest Access Review&#8221; feature for external groups. It should be noted, however, that this feature requires advanced licenses (AAD P2) assigned to the users who carry out the reviews i.e. all the owners of the groups (normally a small number).</p>
<p style="text-align: justify;"><strong>This scenario is an efficient way that reduces guest risk, maintains a near-native solution, and doesn’t require too much investment.</strong></p>
<p style="text-align: justify;"><strong> </strong></p>
<h3 style="text-align: justify;">Scenario 2 &#8211; To go further in the level of security: develop a guest management application</h3>
<p style="text-align: justify;">In this second scenario, the company wants to <strong>have complete control over the lifecycle management of &#8220;guest&#8221; identities</strong>. To do this, the company <strong>creates an application</strong> (for example by using Power App) to manage this lifecycle, making it the single point of creation and deletion.</p>
<p style="text-align: justify;">Once this lifecycle is in place, it is necessary to set the SharePoint sharing setting to &#8220;Existing guest only&#8221; mode, allowing only content to be shared with &#8220;guest&#8221; identities that already exist in the Azure AD tenant. This prevents the creation of new identities through this vector.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18350 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/Picture8.png" alt="" width="1048" height="585" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/Picture8.png 1048w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/Picture8-342x191.png 342w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/Picture8-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/Picture8-768x429.png 768w" sizes="auto, (max-width: 1048px) 100vw, 1048px" /></p>
<p style="text-align: center;"><em>Figure 7 &#8211; Restricting Sharing Opportunities</em></p>
<h4 style="text-align: justify;">Creating a &#8220;guest&#8221; identity</h4>
<p style="text-align: justify;">In this scenario, users <strong>use the dedicated application to create the &#8220;guest&#8221; identities</strong> by entering an end date. The user then designates the owner of the identity created.</p>
<h4 style="text-align: justify;">Deleting an &#8220;invite&#8221; identity</h4>
<p style="text-align: justify;">To delete identities, it is possible <strong>to trigger an automatic workflow</strong> before the end date by asking the owner of the identity in question whether to delete it or extend its end date. It should be noted that if the owner has left the company without making the change of ownership, consideration can be given to reassigning the guest to his or her supervisor.</p>
<h4 style="text-align: justify;">Review of &#8220;guest&#8221; access</h4>
<p style="text-align: justify;">With this type of &#8220;in-house&#8221; application, it is complicated to go much further in the management of the lifecycle &#8211; especially when it comes to access review.</p>
<p style="text-align: justify;">It is still possible, as in Scenario 1, to expire guest access or to use the &#8220;Guest Access review&#8221; feature (with the same constraints as stated above).</p>
<p style="text-align: justify;">To go further, we can also consider the use of third-party tools such as IDECSI or Sharegate that make it possible to manage these access journals automatically and intuitively.</p>
<p style="text-align: justify;"><strong>This scenario changes the native behavior and enables better control of the lifecycle, but at a significant blow with regard to the deployment and the management of the change to be implemented.</strong></p>
<h3 style="text-align: justify;">Scenario 2&#8242; &#8211; Integrating &#8220;guest&#8221; identities into traditional IAM processes</h3>
<p style="text-align: justify;">The last scenario to consider is a variant of the previous scenario, where the company still wants to have control over the lifecycle management of &#8220;guest&#8221; identities. In this case, the company can<strong> integrate &#8220;guest&#8221; identity management into its identity and access management (IAM) tools</strong> in the same way as &#8220;external&#8221; identities.</p>
<p style="text-align: justify;">The IAM tool then becomes the <strong>authoritarian source</strong> for this type of population and its management is done directly there.</p>
<p style="text-align: justify;">In this scenario, as in the previous one, you must also set the SharePoint sharing setting to &#8220;Existing guest only&#8221; mode.</p>
<h4 style="text-align: justify;">Creating a &#8220;guest&#8221; identity</h4>
<p style="text-align: justify;">Identities are created on external <strong>creation forms</strong> from IAM tools by choosing the &#8220;guest&#8221; type for the identity. The &#8220;guest&#8221; identity can then be provisioned automatically in the Azure AD by IAM tools.</p>
<h4 style="text-align: justify;">Deleting a &#8220;guest&#8221; identity</h4>
<p style="text-align: justify;">The removal of the identity is also <strong>done by the IAM tool</strong> according to the positioned end date and the workflows already defined.</p>
<h4 style="text-align: justify;">Reviews of &#8220;guest&#8221; access</h4>
<p style="text-align: justify;">In the event that the company&#8217;s IAM tools are used to manage rights on Sharepoint spaces, it is possible to use the <strong>access review capabilities of these tools</strong> to review access to sensitive resources for which &#8220;guest&#8221; identities have access.</p>
<p style="text-align: justify;">Alternatively, a second option is to use access governance features via IAM solutions, such as Sailpoint OneIdentity, or via dedicated Identity and Access Governance solutions, such as Brainwave or Varonis. We can imagine retrieving the rights assigned directly in the Azure AD and having them verified to the owners of the resources through these tools.</p>
<p style="text-align: justify;"><strong>This scenario is a variant of Scenario 2, which allows the most mature companies in identity and access management to capitalize on existing tools and processes.</strong></p>
<h2> </h2>
<h2 style="text-align: justify;">Finally, do not neglect the surveillance of this exposed population</h2>
<p style="text-align: justify;">It is useful to build a form of <strong>adapted reporting using KPIs and dashboards</strong>. A pool of information is available natively in the Azure AD (date of last connection, activity on the tenant as well as on Office 365 via the &#8220;unified audit logs&#8221;). This information can be interacted with via visualization tools, like Power Bi, for the generation of dashboards.</p>
<p style="text-align: justify;">Secondly, it is important to <strong>monitor the activities of these particularly exposed populations</strong>. Two levels of detection can be set up depending on monitoring capabilities:</p>
<ul style="text-align: justify;">
<li>Implement <strong>native DLP rules</strong> or <strong>classic alert scenarios</strong> in the Microsoft console: some alert scenarios are preconfigured, such as mass deletion of documents, elevation of privilege etc.</li>
<li>Implement<strong> advanced DLP rules</strong> and detection scenarios or specific thresholds for guests<strong> with the support of the company&#8217;s SOC</strong>. For example, the data download threshold allowed for a guest may be lower than the threshold allowed for an intern.</li>
</ul>
<p style="text-align: justify;">We can imagine the use of the <strong>Azure AD Identity Protection</strong> module to trigger alerts for guests with a high level of risk.</p>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">In conclusion, AAD B2B greatly facilitates collaboration, but its configuration needs to be hardened to reduce the level of risk induced by the solution</h1>
<p style="text-align: justify;">AAD B2B greatly <strong>simplifies</strong> collaboration with users outside the company, but entails risks<strong> related to the default operation</strong> of the solution. To control these risks, it is necessary to <strong>reduce </strong>the level of open access, and <strong>to control the lifecycle of these identities</strong> at a deeper level, depending on the potential level of investment that is planned. Finally, it is necessary to focus on <strong>monitoring</strong> via native tools or tools used by the company given the high exposure of these populations.</p>
<p style="text-align: justify;"> </p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2022/08/ms365-101-manage-azure-ad-b2b-guest-identities/">MS365 101: Manage Azure AD B2B Guest Identities</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2022/08/ms365-101-manage-azure-ad-b2b-guest-identities/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
