Type something to search...
Microsoft Defender for Cloud Apps - DLP Policies

Microsoft Defender for Cloud Apps - DLP Policies

Microsoft Defender for Cloud Apps

The Microsoft Defender for Cloud Apps or MDCA offers powerful DLP capabilities as part of its CASB offering, especially if your organization owns E5 licenses and uses AzureAD Conditional Access Policies. Previously known as Microsoft for Cloud App Security or MCAS, this CASB capability works closely with the DLP capability of Microsoft Information Protection to protect data in cloud apps. By bringing the solution under the Defender umbrella of products, all of the settings and policies can now be managed in the Microsoft Security Portal. The guide will walk you through getting started with some basic DLP policies.

Concepts

MDCA works by leveraging a reverse proxy between the cloud app that is being secured and the user. This enables MDCA to provide real-time DLP and Session controls on the cloud app. Since all data travels over the proxied connection, MDCA gets visibility into all information passing between the user device and the cloud app. This is evidenced by the change in the domain. As shown below, any protected cloud app will be routed through “mcas.ms” and will be shown as a subdomain of this domain. Eg: For Outlook, the original URL which is “outlook.office.com” will appear as “outlook.office.com.mcas.ms”

Data flows through the MDCA proxy between the device and the cloud app

This means to work with MDCA, you must enable “session control” using Conditional Access application control with AzureAD Conditional Access Policy (CAP). Thus using conditional access, you can direct users under specific scenarios through the MDCA reverse proxy, rather than routing everyone through it. Some common scenarios to consider are:

  • User or Device shows a high risk -> Use MDCA to monitor all traffic to and from the cloud app
  • User is accessing cloud app from an unmanaged device (Eg: not Azure joined) -> Use MDCA to block any file download, while allowing user to work on the online version of the file, or encrypt the file upon download.
  • Third-party user is accessing a high value cloud app -> Use MDCA to detect and prevent copy/paste/print of sensitive info types such as Credit Card numbers

Thus the CAP determines the conditions under which data should be protected, while the MDCA Policies determine the action based on certain conditions about the data, user and device.

Prerequisites

As mentioned earlier, the first prerequisite is to use AAD CAP to route user via the MDCA reverse proxy. By selecting the “Office 365” app under “Cloud apps or action” and selecting “Use Conditional Access App Control” with the “Use custom policy…” setting, all the Office 365 apps will be brought under MDCA protection. You may apply additional conditions to define the conditions under which this policy should come into effect.

Select the Office 365 app in the policy setting

Select the Use custom policy... option under Conditional Access App Control

The other requirement before a policy can even be defined is to have MDCA detect the cloud app. This occurs when at least one user logs in to the protected cloud app and the user is routed via the reverse proxy due to the Conditional Access application Control setting. When this first login occurs, the applications will appear in the Conditional Access App Control apps section of the Security portal (found under Settings -> Connected apps menu). Without any apps added to this section, you may see the error below when trying to define a DLP policy.

If no apps are detected, you cannot create a DLP Policy

There are additional requirements that are detailed here. Once these prerequisites have been met, we can proceed with creating our first few DLP policies.

Understanding DLP Policies using Session Control

To create a new policy, navigate to the Policy Management section of Cloud Apps, click on “Create policy” and choose “Session Policy” from the dropdown. Note that you must have the appropriate role to create and manage Cloud App Policies.

You may opt to create a policy from scratch, or use prebuilt templates to create the policy. The prebuilt templates are a good starting point and have some good options to get started with controls for cloud app protection.

Prebuilt policy templates in MDCA

Otherwise, building a policy from scratch is also a good way to get granular controls. A Session policy has the following main components (ignoring the basics like name and description):

Session control type

The session control type determines what type of control will be applied to that session. The options available are shown below. Depending on the option selected, there will be additional options that appear.

Session Control Types

  • Monitor only is the most basic option, offering logging of all activity on the cloud app. There are no additional options to configure.
  • Block activities, as the name suggests, offer blocking controls. This should be applied with an “Activity Type” under the “Activity Source” setting. By filtering on these activities the block control will apply on them. Available activity types are:
    • Cut/Copy item
    • Paste item
    • Print
    • Send item
  • Control file download (with inspection) enables controls on download of files. This control has a filter option for matching files. The filter options available are:
    • Extension
    • File name (works with regex)
    • File size (MB) with lt, gt and “in between” options
    • Sensitivity Label -> This is a powerful capability to scope down controls on documents of a specific sensitive type. Eg: You may choose to only apply controls on Confidential documents. Note that you must have sensitivity labels created and published via label policy in the Compliance portal under Information Protection for the labels to appear in MDCA.

In addition to the filters above, there are content inspection options available under “Inspection method”. The options available are:

  • None -> No content inspection will be performed
  • Built-in DLP -> Enables content inspection and has the following sub options:
    • Include files that match a preset expression -> Uses prebuilt matching based on some common data types such as Email address, Credit Card Numbers, SWIFT code, Passport numbers along with some country specific data PII types for US, CA and UK. There is an option available to ignore context which will lead to higher false positives but lower false negatives.
    • Include files that match a custom expression -> Allows you to specify custom expressions to search for in the contents. Also offers the option to exclude certain files based on content.
    • Advanced Settings -> Allow setting the option to perform content search in the Content, Metadata and File name. It also offers the option to unmask 4 characters of a match, which is completely masked by default.

Example DLP Policies

Now begins the fun part. Creating policies that actually do something. Here are some starter policies that can help understand and test the DLP capabilities in MDCA.

Block Sending of Chat containing sensitive info

This policy as shown below uses content inspection to check for Credit Card numbers and prevents the content from being sent via Teams chat.

Policy definition to block Send in chat

When this policy is enforced in Teams chat, the user will see the “Failed to send” message in the chat:

Users is blocked from sending chat containing CC numbers

In addition, a popup will appear which shows the customized message from the policy:

Customized message showing the block action

Block download of file based on sensitivity label

This policy filters the file based on the Sensitivity Label and blocks downloads of Confidential labelled files. Ideally, this policy would be used in conjunction with a device check such that downloads are blocked on untrusted/unmanaged devices.

This policy detects files that are labelled Confidential

The popup will appear similar to the case above but with the message as customized for this policy:

User is blocked from download files classified as Confidential

These policy matches or violations are also recorded in the app activity logs and if configured, will also be recorded as alerts.

Known Limitations

The MDCA reverse proxy is not foolproof and there are conditions under which it can be bypassed. These are documented here along with other limitations. Thus it is important to add compensating controls depending on the level of protection required.

Suggested Reading

Related Posts

Yet another Phishing Incident Response Playbook

Yet another Phishing Incident Response Playbook

After some discussions with peers from other organizations, I was surprised by the lack of automation and end-to-end process for managing phishing incidents. So, without much preamble, let's jump in t

read more
Zero Trust - Application Security

Zero Trust - Application Security

"You Hear That Mr. Anderson? That Is The Sound Of Inevitability!" This will be Part 3 of my series of articles on Zero Trust. Applications perhaps receive the least amount of attention when it com

read more
Zero Trust - Data Security

Zero Trust - Data Security

"We live in a twilight world, and there are no friends at dusk" This will be Part 2 of my series of articles on Zero Trust. And let's start with data, the "chewy core" of the traditional M&M Infor

read more
Zero Trust - Device Security

Zero Trust - Device Security

"Do you read me, HAL?" In my previous article on Zero Trust for Applications, I concluded with how we need to focus on ZT approach for code compile/build and for application execution. Next, let's

read more
Zero Trust

Zero Trust

Zero Trust is a term attributed to Stephen Marsh and mentioned in his '94 doctoral thesis "Formalising Trust as a Computational Concept" ([link to original thesis](https://dspace.stir.ac.uk/bitstr

read more
Zero Trust - Network Security

Zero Trust - Network Security

"Know the enemy and know yourself" Know the enemy and know yourself is perhaps the most well known quote from Art of War. In Cybersecurity a lot of focus is given to the

read more
Zero Trust - Identity as a Perimeter

Zero Trust - Identity as a Perimeter

"Sometimes, it's easier living the lie" If we ever needed to jumpstart the move to "Identity-as-a-Perimeter", COVID-19 certainly made sure it happened. For more than a year most of the global work

read more
The Trust Algorithm

The Trust Algorithm

Wait, doesn't Zero Trust mean no trust? A common misconception about zero trust is that there should be no trust. Rather, the philosophy of zero trust directs us to start with zero implicit trus

read more