<?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>Raymond Chan, Auteur</title>
	<atom:link href="https://www.riskinsight-wavestone.com/en/author/raymond-chan/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.riskinsight-wavestone.com/en/author/raymond-chan/</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>Raymond Chan, Auteur</title>
	<link>https://www.riskinsight-wavestone.com/en/author/raymond-chan/</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>How to manage administration in Microsoft 365?</title>
		<link>https://www.riskinsight-wavestone.com/en/2020/10/how-to-manage-administration-in-microsoft-365/</link>
		
		<dc:creator><![CDATA[Raymond Chan]]></dc:creator>
		<pubDate>Mon, 19 Oct 2020 13:03:15 +0000</pubDate>
				<category><![CDATA[Cloud & Next-Gen IT Security]]></category>
		<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[administrator]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[Azure AD]]></category>
		<category><![CDATA[IAM]]></category>
		<category><![CDATA[MFA]]></category>
		<category><![CDATA[Office 365]]></category>
		<category><![CDATA[PIM]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=14420</guid>

					<description><![CDATA[<p>Within any infrastructure or application, privileged accounts are particularly sensitive accounts. Securing them is a key issue. This is especially true for SaaS services, where the shared responsibility model requires an organization to protect its data and identities, and the...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2020/10/how-to-manage-administration-in-microsoft-365/">How to manage administration in Microsoft 365?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">Within any infrastructure or application, privileged accounts are particularly sensitive accounts. Securing them is a key issue. This is especially true for SaaS services, where the shared responsibility model requires an organization to protect its data and identities, and the Microsoft 365 suite is no exception.</p>
<p style="text-align: justify;"><strong>In fact, if there&#8217;s one thing you need to protect, it&#8217;s your administrators!</strong></p>
<p style="text-align: justify;">Whether it concerns authentication methods, third-party application permissions via APIs (allowing a third-party application to synchronize data with an external storage service, for example) or changing retention policies, an administrative action can significantly affect the data and security of the tenant on a larger scale. If it is necessary to make this point even more explicit, a Global Administrator has the ability to access all data or manage all the settings of Office 365, Windows 10, Azure AD&#8230; but also Azure!</p>
<p style="text-align: justify;">
<h1 style="text-align: justify;">What are the native functionalities in the Microsoft platform?</h1>
<h2 style="text-align: justify;">Which rights models within Microsoft 365?</h2>
<p style="text-align: justify;">To date, Microsoft 365 has two main levels of rights. These two levels schematically allow the delegation of administrative rights by adapting to different organisational models (small / medium / large, centralised / decentralised):</p>
<ul style="text-align: justify;">
<li>Azure AD roles: Administration of Azure AD and Microsoft 365 services;</li>
<li>RBAC roles: Administration of objects within services.</li>
</ul>
<h4 style="text-align: justify;">Level One: Using Azure AD roles to manage services</h4>
<p style="text-align: justify;">The person behind the opening of the tenant automatically takes over the role of General Administrator. He can then appoint other administrators to accompany him in his tasks. As far as possible, Global Admin&#8217;s rights should not be used in order to limit overexposure of the administration accounts. It is good practice to limit this general role to a maximum of 3-4 accounts. In addition, for almost all actions there is an equivalent service administration role (e.g. SharePoint Administrator, User Administrator, etc.).</p>
<p style="text-align: justify;">These service administration roles are also known as <a href="https://docs.microsoft.com/en-en/microsoft-365/admin/add-users/azure-ad-roles-in-the-mac?view=o365-worldwide">Azure AD roles</a>. Each service can be viewed as an Azure AD application. An administrator would thus be equivalent to the owner of the service in question. At the time of writing this article, Microsoft offers 59 different roles, which provides a <strong>good level of segregation of rights</strong> in most cases.</p>
<p style="text-align: justify;">However, the default roles provide access to the entire Admin Service for the entire tenant and may in some cases provide access to the underlying data (e.g. for SharePoint Administrator, Exchange Administrator and User Administrator).</p>
<p>&nbsp;</p>
<figure id="post-14425 media-14425" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-14425 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image3.png" alt="" width="1750" height="1031" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image3.png 1750w, https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image3-324x191.png 324w, https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image3-66x39.png 66w, https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image3-120x70.png 120w, https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image3-768x452.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image3-1536x905.png 1536w" sizes="auto, (max-width: 1750px) 100vw, 1750px" /></figure>
<p style="text-align: center;">Figure 1 – Example of sensitive rights</p>
<p style="text-align: justify;">
<p style="text-align: justify;">In the case of <strong>advanced maturity</strong>, it is possible to go further in the segregation of rights by creating <strong>personalised Azure AD roles</strong>. In concrete terms, this means deciding what permissions this role has (e.g. &#8220;microsoft.directory/applications/create&#8221; allows you to create applications in Azure Active Directory).</p>
<p style="text-align: justify;">The downside will be that it will be more complicated to audit the administration and that it will be necessary to monitor the evolution of services to ensure that permissions remain consistent with the needs of administrators.</p>
<h4 style="text-align: justify;">Second level: Using the RBAC model to manage objects</h4>
<p style="text-align: justify;">Certain services such as Exchange Online, Intune, Security and Compliance Centres or Cloud App Security offer <a href="https://docs.microsoft.com/en-en/microsoft-365/security/office-365-security/permissions-microsoft-365-compliance-security?view=o365-worldwide">specific RBAC rights models</a>.</p>
<p style="text-align: justify;">As its name suggests, <em>Role Based Access Control</em> (RBAC), allows for the implementation of more refined permissions management; with the ability to define roles for defined perimeters (e.g. for certain user groups). For example, it will be possible to create &#8220;Helpdesk A&#8221; and &#8220;Helpdesk B&#8221; in Exchange Online to give support rights to two separate teams on a perimeter A and a perimeter B.</p>
<p style="text-align: justify;">
<h2 style="text-align: justify;">How to provision the accounts of administrators?</h2>
<p style="text-align: justify;">The first question is how to create an administrator&#8217;s identity. Two strategies are possible:</p>
<ul style="text-align: justify;">
<li>The creation of an account in the organisation&#8217;s identity repository, which will then be synchronised with Azure AD (ex: wavestone.com);</li>
<li>The creation of the account directly in Azure AD. This account will then be called &#8220;cloud-only&#8221; (example: wavestone.onmicrosoft.com).</li>
</ul>
<p style="text-align: justify;">Regardless of the administration role, it is recommended for a SaaS service such as Microsoft 365 that <strong>the account be located as close as possible to the administered resource</strong>. Here, this amounts to <strong>using cloud-only accounts</strong>. The objective is twofold: to protect against a possible unavailability or of a compromise of the organisation&#8217;s identity repository.</p>
<p style="text-align: justify;">
<h2 style="text-align: justify;">How to assign permissions?</h2>
<p style="text-align: justify;">The second question is how to assign the right privileges to the administrative roles created.</p>
<h4 style="text-align: justify;">In the case of service administration</h4>
<p style="text-align: justify;">In order to assign an AAD role, it is possible to use 3 methods (via the portal or the corresponding PowerShell command):</p>
<ul style="text-align: justify;">
<li>The <strong>Azure portal</strong> (portal.azure.com): this is <strong>the method</strong> that should be favoured, as it allows the association of rights as close as possible to the resources and the use of PIMs, which we will discuss in the rest of the article;</li>
<li>The <strong>Microsoft 365 portal</strong> (admin.microsoft.com): it is possible to carry out the assignment of roles directly through the main administration portal. However, this method is not compatible with PIM;</li>
<li>The use of <strong>third party IAM tools</strong>: these solutions now have connectors with Office 365 to perform identity and privilege provisioning. These solutions offer less granularity, are not compatible with PIM and are a source of common errors. For example, synchronisation is typically one-way, resulting in the administration account reappearing if it is only deleted in Azure AD.</li>
</ul>
<p style="text-align: justify;">Note that it is also now possible to assign an Azure AD role to a security group (Cloud only) via a <a href="https://docs.microsoft.com/en-en/azure/active-directory/users-groups-roles/roles-groups-concept">preview feature</a>. This may simplify certain administrative models, such as where the Unified Communications team needs the SharePoint Administrator role and Teams Administrator. However, be careful with the management of this group.</p>
<h4 style="text-align: justify;">In the case of the administration of objects</h4>
<p style="text-align: justify;">For RBAC roles, the definition of roles is done directly in the administration platform of the service concerned. It is then possible to assign the role in question manually or to a security group, in the portal or via an IAM solution.</p>
<p>&nbsp;</p>
<figure id="post-14423 media-14423" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-14423 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image2-1-e1603286671893.png" alt="" width="1492" height="948" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image2-1-e1603286671893.png 1492w, https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image2-1-e1603286671893-301x191.png 301w, https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image2-1-e1603286671893-61x39.png 61w, https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image2-1-e1603286671893-768x488.png 768w" sizes="auto, (max-width: 1492px) 100vw, 1492px" /></figure>
<p style="text-align: center;">Figure 2 – Natives functionalities of the solution</p>
<p>&nbsp;</p>
<h1 style="text-align: justify;">How to build and implement your administration model?</h1>
<h2 style="text-align: justify;">What strategy to define your rights model?</h2>
<p style="text-align: justify;">The construction of a delegation model must be based on the <strong>principle of least privilege</strong>. The core of the work is to make an inventory of the cases of Office 365 administration usage and to <strong>match your teams with the available rights</strong>.</p>
<p style="text-align: justify;">This can be an opportunity to rethink the organisation of teams dealing with the working environment. Two observations are quite significant:</p>
<ul style="text-align: justify;">
<li>Mobile terminals and workstations are intended to be managed by unified solutions (UEM) such as Intune, Workspace One or MobileIron, and therefore by the same team.</li>
<li>Security and compliance tools are increasingly integrated natively in Office 365. It is therefore necessary to break down the wall that existed between the workplace world and the security world, in order to create a team with the same ambition: to create and maintain a controlled and secure platform.</li>
</ul>
<p style="text-align: justify;">Office 365 has the particularity of bringing together a multitude of different services, such as file or information storage (SharePoint, OneDrive), communication tools (Exchange, Teams) but also security (Defender, Information Protection, etc.). It is therefore essential to group the services into categories and define a <strong>correspondence matrix</strong> between team and administration roles.</p>
<p style="text-align: justify;">Concretely, we advise you first to <strong>use the default Azure AD roles for service administration</strong>, <strong>and then to define more granular roles</strong> with RBAC and custom roles.</p>
<p style="text-align: justify;">It is also interesting to <strong>identify the most sensitive roles</strong>, such as those allowing access to data or security settings (for example: Global Admin, Exchange Admin, Security Administrator and Application Administration) in order to be able to adapt the security of these roles.</p>
<p style="text-align: justify;">
<h2 style="text-align: justify;">How to delegate administration rights on objects in a multi-entity context ?</h2>
<p style="text-align: justify;">Before talking about security in the strict sense of the word, there is another question. Although <strong>the configuration of services and security parameters can only be done centrally, local teams need to carry out support actions</strong>: creation or modification of an internal or guest account, resetting of authenticators, creation of a Microsoft 365 group or a distribution list, etc.</p>
<p style="text-align: justify;">The service administration roles, the Azure AD roles, <strong>do not offer privilege segregation by perimeter</strong>; an Exchange Online administrator will therefore be able to handle all mailboxes. It will not be conceivable to give them in complex organisations or in regulated contexts. Several strategies are available, depending on the maturity and complexity of the organisation.</p>
<p style="text-align: justify;">In the case of small structures, it is easiest to use the native functionalities:</p>
<ul style="text-align: justify;">
<li><strong>RBAC roles</strong>: RBAC Exchange and Intune roles generally provide the right level of granularity to manage objects in native portals;</li>
<li><strong>Administrative Units</strong>: Administrative Units, <a href="https://docs.microsoft.com/en-en/azure/active-directory/users-groups-roles/directory-administrative-units">finally in GA</a> since the end of September, are the equivalent of RBAC for Azure Active Directory. They take the form of containers in which an administrator can create or modify objects, which makes sense for support activities.</li>
</ul>
<p style="text-align: justify;">In the case of larger structures, good practice is not to manage objects (users, mailboxes, groups, SharePoint sites, etc.) directly in native portals. What is needed is an <strong>interface that allows all these objects to be managed, while taking into account the business logic and the target administration model</strong>. Below are three examples of interfaces:</p>
<ul style="text-align: justify;">
<li><strong>In-house development of a &#8220;Custom Automation Engine&#8221;</strong>: this interface will be decorrelated from the IAM and very often a large powershell / Graph API machine;</li>
<li><strong>Integration of a connector to the current IAM solution</strong> in order to present a complete management of the objects by disregarding their direct hosting;</li>
<li><strong>Investment in a SaaS Management Platform (SMP)</strong>: software publishers have specialised in the creation of management tools for Office 365, combining object administration, licence management and security and operational supervision functions. Among these solutions, which are still relatively unknown, are ManageEngine, CoreView and Quadrotech.</li>
</ul>
<p style="text-align: justify;">Please note: this interface, dedicated to support teams, will be distinct from an interface open to all users allowing them to centrally create guest users, SharePoint sites, Teams, etc. In concrete terms, this second interface could be integrated with ITSM tools, SMP or even be developed based on Power Apps and Graph API.</p>
<p style="text-align: justify;">
<h1 style="text-align: justify;">How to protect access to these accounts ?</h1>
<h2 style="text-align: justify;">10 measures to secure administration accounts</h2>
<h2 style="text-align: justify;">Depending on the security licenses, mainly the EMS bundle, Microsoft provides a number of controls to secure administration accounts.</h2>
<p style="text-align: justify;">Most of these could also be obtained via third-party tools.</p>
<h3 style="text-align: justify;">Basic measures to secure the administration account</h3>
<ol>
<li style="text-align: justify;"><strong>A dedicated administrator account</strong></li>
</ol>
<p style="text-align: justify;">An administrator must have an account dedicated to administration, different from the office automation account. It should be cloud-only where possible (e.g. wavestone.onmicrosoft.com).</p>
<ol style="text-align: justify;" start="2">
<li><strong>Multi-Factor Authentication</strong></li>
</ol>
<p style="text-align: justify;">Multi-factor authentication is no longer an option today, and even less so for administrators.</p>
<p style="text-align: justify;">This measure is available for everyone, for all licences:</p>
<ul style="text-align: justify;">
<li>Via MFA for Office 365 (also called MFA with per-person inheritance) which forces a challenge at every connection;</li>
<li>Via Security Defaults which forces an additional factor to be registered for all users and imposes the MFA for administrators at each login;</li>
</ul>
<p style="text-align: justify;">It is also important to ensure that <a href="https://docs.microsoft.com/en-en/azure/active-directory/conditional-access/block-legacy-authentication">legacy authentication protocols</a> that do not support MFA are disabled. These would allow single sign-on to be bypassed.</p>
<p style="text-align: justify;">It will also make sense to limit the types of additional factors available; what is the point of securing administration accounts if the second factor is the administrator&#8217;s Gmail address.</p>
<h3 style="text-align: justify;">Highly recommended security measures</h3>
<ol style="text-align: justify;" start="3">
<li><strong>Unlicensed Office 365 account</strong></li>
</ol>
<p style="text-align: justify;">Without a licence, it will not be possible for an administrator to access the different services and data of the platform, or to have a mailbox.</p>
<p style="text-align: justify;">Please note that some services, such as Power Apps or Power BI, require a licence to access the administration portal. In practice, it can be interesting to create a security group that allocates the necessary licences for administrators.</p>
<ol style="text-align: justify;" start="4">
<li><strong>Conditional Access (with Azure AD P1)</strong></li>
</ol>
<p style="text-align: justify;"><a href="https://docs.microsoft.com/en-en/azure/active-directory/conditional-access/overview">Conditional access</a> allows you to evaluate the context when accessing an Office 365 service and to authorise access accordingly. For example, access can be blocked depending on the type of workstation used (whether managed by the company or not), the network on which the user is connected, the application in question or the user&#8217;s administrative role.</p>
<p style="text-align: justify;">In a Zero Trust logic, there should be no differentiation between the internal and external network, especially for administrators, but rather focus on the status of the workstation and the risk of connection.</p>
<ol style="text-align: justify;" start="5">
<li><strong>Password Protection (with </strong><strong>Azure AD P1)</strong></li>
</ol>
<p style="text-align: justify;"><a href="https://docs.microsoft.com/en-en/azure/active-directory/authentication/concept-password-ban-bad-on-premises">Azure AD Password Protection</a> provides controls over passwords. It will thus be possible to prohibit the use of a current password or a derivative (with a list predefined by Microsoft or maintained by the organisation).</p>
<p style="text-align: justify;">A good practice is to apply this protection to all Cloud-only administration accounts as a minimum.</p>
<ol style="text-align: justify;" start="6">
<li><strong>Azure AD Identity Protection (with Azure AD P2)</strong></li>
</ol>
<p style="text-align: justify;"><a href="https://docs.microsoft.com/en-en/azure/active-directory/identity-protection/overview-identity-protection">Azure AD Identity Protection</a> adds a notion of risk in the evaluation of user access and behaviour. Concretely, it will be advisable to define the following policies;</p>
<ul style="text-align: justify;">
<li>Risky users: Force password change for an administrator likely to be compromised (with a Medium or High risk);</li>
<li>Risky sign-in: Forcing an MFA challenge during risky access (e.g. anonymous or unusual IP).</li>
</ul>
<ol style="text-align: justify;" start="7">
<li><strong>Azure AD Privileged Identity Management (with Azure AD P2): </strong></li>
</ol>
<p style="text-align: justify;"><a href="https://docs.microsoft.com/en-en/azure/active-directory/privileged-identity-management/">Azure AD Privileged Identity Management</a> is a service to control the assignment and use of administrative roles:</p>
<ul style="text-align: justify;">
<li>Allocate just-in-time rights by giving an eligible role instead of a permanent one;</li>
<li>Submit role activation to third party validation;</li>
<li>Set up an end date for an administrative role;</li>
<li>Force recertifications of administrators.</li>
</ul>
<p style="text-align: justify;">It will be relevant to distinguish the so-called sensitive roles from the others during implementation.</p>
<p style="text-align: justify;">The monitoring of eligible administrators allows, as a bonus, to become aware of the real use of administration rights and therefore to clean up the list of administrators more easily.</p>
<p style="text-align: justify;">It should be noted that the PIM functionalities have recently been <a href="https://docs.microsoft.com/en-us/azure/active-directory/privileged-identity-management/groups-features">extended to the different groups</a>, which makes it possible to set up &#8220;Just-in-time&#8221; for more <a href="https://techcommunity.microsoft.com/t5/microsoft-security-and/using-azure-pim-for-the-aip-super-user-feature-management/ba-p/1587690">exotic cases such as RMS / AIP Super-Users</a>.</p>
<h3 style="text-align: justify;">To go even further</h3>
<ol style="text-align: justify;" start="8">
<li><strong>Supervision of administrator actions to detect abnormal behaviour</strong></li>
</ol>
<p style="text-align: justify;">Once all these security measures are in place, all that remains is for you to implement supervision to detect non-compliance with the previous rules and abnormal behaviour.</p>
<p style="text-align: justify;">And for this, nothing better than to refer to <a href="https://www.riskinsight-wavestone.com/en/2020/04/logging-of-office-365-a-case-study-with-administrators/">our article</a> on the subject to understand the available logs.</p>
<ol style="text-align: justify;" start="9">
<li><strong>Setting up a Privileged Access Workstation</strong></li>
</ol>
<p style="text-align: justify;">Administration is by definition a critical action. It must be carried out within a perimeter of trust. The provision of <a href="https://docs.microsoft.com/en-en/windows-server/identity/securing-privileged-access/privileged-access-workstations">PAW, or administration post</a>, will enable us to achieve this objective.</p>
<p style="text-align: justify;">The configuration of the administration station should be simple (no local administration rights, restricted Internet browsing, blocked USB ports, pre-installed PowerShell modules, etc.). But restricting the connection of an Office 365 administrator from this workstation may cause more problems. There are several possibilities for this:</p>
<ul style="text-align: justify;">
<li>In a modern context, a simple answer is to rely on Microsoft tools: define an administration workstation profile in Intune and assign it to the administrators. With a conditional access rule, it is possible to require a compliant workstation when connecting.</li>
<li>In a more traditional model, it is possible to set up an <a href="https://docs.microsoft.com/en-en/windows-server/security/credentials-protection-and-management/authentication-policies-and-authentication-policy-silos">authentication silo</a> with administrators and associated workstations. In this way, we would have a model similar to the third-party model well known to AD teams.</li>
<li>Other approaches are also possible, even if more complex: association of a certificate and a reverse proxy or even a bastion.</li>
</ul>
<ol style="text-align: justify;" start="10">
<li><strong>Keep up to date with good practices and news </strong></li>
</ol>
<p style="text-align: justify;">It cannot be repeated often enough that Office 365 is a Cloud platform and is constantly evolving. Keeping up to date will continue to increase its level of security over time.</p>
<p style="text-align: justify;">
<figure id="post-14421 media-14421" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-14421 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image1-1.png" alt="" width="1875" height="785" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image1-1.png 1875w, https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image1-1-437x183.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image1-1-71x30.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image1-1-768x322.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2020/10/Image1-1-1536x643.png 1536w" sizes="auto, (max-width: 1875px) 100vw, 1875px" /></figure>
<p style="text-align: center;">Figure 3 &#8211; The security of accounts, measures that can be counted on the fingers of one hand</p>
<p style="text-align: justify;">
<h2 style="text-align: justify;">Focus on glass breaking accounts</h2>
<p style="text-align: justify;">A good practice in the administration of the Microsoft platform is the setting up of administrator accounts that allow control over the platform to be regained in the event of an incident.  These are called glass-breaking accounts. These accounts should allow full control over the Office 365 tenant and are therefore assigned the role of Global Administrator.</p>
<p style="text-align: justify;">These accounts must be secure; however, we must not forget their specificity which consists in using them in the event of an incident. Thus, <strong>the security imposed on these accounts must remain compatible with the urgent nature of their use</strong>.  These accounts must therefore comply with the following recommendations:</p>
<ul style="text-align: justify;">
<li>To be cloud-only accounts</li>
<li>No MFA configured (or at least a third party MFA)</li>
<li>Storage of the password in a safe which only identified members of the security team or Office 365 can access</li>
<li>Setting up alerts to check that these accounts are not used outside of an incident procedure requiring the use of glass breakage.</li>
</ul>
<p style="text-align: justify;">It is also recommended not to use a specific naming convention for these accounts, they should not catch the eye of a possible attacker!</p>
<p style="text-align: justify;">
<h1 style="text-align: justify;">Conclusion</h1>
<p style="text-align: justify;">Security on Office 365 is based on technical measures to protect administrator accounts, as well as the implementation of a target administration model, which includes clear governance and processes, tools to implement this delegation of rights, and mechanisms to maintain it over time.</p>
<p style="text-align: justify;">But whatever protection measures are implemented, security rests first and foremost with the administrators of the solution. <strong>Awareness raising and controls for administrators will be essential</strong>.</p>
<p style="text-align: justify;">Administrators must bear in mind that their accounts give access to extremely sensitive information and actions: they are therefore the preferred target of hackers!</p>
<p style="text-align: justify;">As O365 is constantly evolving, each new feature introduced by Microsoft may also bring with it its share of security problems that need to be studied and taken into account. Take the opportunity to update your documentation: O365 risk analysis, service configuration, delegation model&#8230;always <strong>without forgetting to allow your administrators to train</strong>!</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2020/10/how-to-manage-administration-in-microsoft-365/">How to manage administration in Microsoft 365?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
