|
| 1 | +--- |
| 2 | +title: Enable File Integrity Monitoring (Azure Monitor Agent) |
| 3 | +description: Learn how to enable File Integrity Monitor when you collect data with the Azure Monitor Agent (AMA) |
| 4 | +author: bmansheim |
| 5 | +ms.author: benmansheim |
| 6 | +ms.topic: how-to |
| 7 | +ms.date: 09/04/2022 |
| 8 | +--- |
| 9 | +# Enable File Integrity Monitoring when using the Azure Monitor Agent |
| 10 | + |
| 11 | +To provide [File Integrity Monitoring (FIM)](file-integrity-monitoring-overview.md), the Azure Monitor Agent (AMA) collects data from machines according to [Data Collection Rules](../azure-monitor/essentials/data-collection-rule-overview.md). When the current state of your system files is compared with the state during the previous scan, FIM notifies you about suspicious modifications. |
| 12 | + |
| 13 | +FIM uses the Azure Change Tracking solution to track and identify changes in your environment. When File Integrity Monitoring is enabled, you have a **Change Tracking** resource of type **Solution**. Learn about [data collection for Change Tracking](../automation/change-tracking/overview.md#change-tracking-and-inventory-data-collection). |
| 14 | + |
| 15 | +File Integrity Monitoring with the Azure Monitor Agent offers: |
| 16 | + |
| 17 | +- **Compatibility with the unified monitoring agent** - Compatible with the [Azure Monitor Agent](../azure-monitor/agents/agents-overview.md) that enhances security, reliability, and facilitates multi-homing experience to store data. |
| 18 | +- **Compatibility with tracking tool**- Compatible with the Change tracking (CT) extension deployed through the Azure Policy on the client's virtual machine. You can switch to Azure Monitor Agent (AMA), and then the CT extension pushes the software, files, and registry to AMA. |
| 19 | +- **Simplified onboarding**- You can [onboard FIM](#enable-file-integrity-monitoring-with-ama) from Microsoft Defender for Cloud. |
| 20 | +- **Multi-homing experience** – Provides standardization of management from one central workspace. You can [transition from Log Analytics (LA) to AMA](../azure-monitor/agents/azure-monitor-agent-migration.md) so that all VMs point to a single workspace for data collection and maintenance. |
| 21 | +- **Rules management** – Uses [Data Collection Rules](https://azure.microsoft.com/updates/azure-monitor-agent-and-data-collection-rules-public-preview/) to configure or customize various aspects of data collection. For example, you can change the frequency of file collection. |
| 22 | + |
| 23 | +> [!NOTE] |
| 24 | +> If you [remove the **Change Tracking** resource](../automation/change-tracking/remove-feature.md#remove-changetracking-solution), you will also disable the File Integrity Monitoring in Defender for Cloud. |
| 25 | +
|
| 26 | +## Availability |
| 27 | + |
| 28 | +|Aspect|Details| |
| 29 | +|----|:----| |
| 30 | +|Release state:|Preview| |
| 31 | +|Pricing:|Requires [Microsoft Defender for Servers Plan 2](defender-for-servers-introduction.md#defender-for-servers-plans)| |
| 32 | +|Required roles and permissions:|**Owner**<br>**Contributor**| |
| 33 | +|Clouds:|:::image type="icon" source="./media/icons/yes-icon.png"::: Commercial clouds - Supported only in regions: `australiaeast`, `australiasoutheast`, `canadacentral`, `centralindia`, `centralus`, `eastasia`, `eastus2euap`, `eastus`, `eastus2`, `francecentral`, `japaneast`, `koreacentral`, `northcentralus`, `northeurope`, `southcentralus`, `southeastasia`, `switzerlandnorth`, `uksouth`, `westcentralus`, `westeurope`, `westus`, `westus2`<br>:::image type="icon" source="./media/icons/no-icon.png"::: National (Azure Government, Azure China 21Vianet)<br>:::image type="icon" source="./media/icons/yes-icon.png"::: [Azure Arc](../azure-arc/servers/overview.md) enabled devices.<br>:::image type="icon" source="./media/icons/yes-icon.png"::: Connected AWS accounts<br>:::image type="icon" source="./media/icons/yes-icon.png"::: Connected GCP accounts| |
| 34 | + |
| 35 | +## Prerequisites |
| 36 | + |
| 37 | +To track changes to your files on machines with AMA: |
| 38 | + |
| 39 | +- Enable [Defender for Servers Plan 2](defender-for-servers-introduction.md) |
| 40 | + |
| 41 | +- [Install AMA](auto-deploy-azure-monitoring-agent.md) on machines that you want to monitor |
| 42 | + |
| 43 | +## Enable File Integrity Monitoring with AMA |
| 44 | + |
| 45 | +To enable File Integrity Monitoring (FIM): |
| 46 | + |
| 47 | +1. Use the FIM recommendation to select machines for file integrity monitoring: |
| 48 | + 1. From Defender for Cloud's sidebar, open the **Recommendations** page. |
| 49 | + 1. Select the recommendation [File integrity monitoring should be enabled on machines](https://portal.azure.com/#blade/Microsoft_Azure_Security/RecommendationsBlade/assessmentKey/9b7d740f-c271-4bfd-88fb-515680c33440). Learn more about [Defender for Cloud recommendations](review-security-recommendations.md). |
| 50 | + 1. Select the machines that you want to use File Integrity Monitoring on, select **Fix**, and select **Fix X resources**. |
| 51 | + |
| 52 | + The recommendation fix: |
| 53 | + |
| 54 | + - Installs the `ChangeTracking-Windows` or `ChangeTracking-Linux` extension on the machines. |
| 55 | + - Generates a data collection rule (DCR) for the subscription, named `Microsoft-ChangeTracking-[subscriptionId]-default-dcr`, that defines what files and registries should be monitored based on default settings. The fix attaches the DCR to all machines in the subscription that have AMA installed and FIM enabled. |
| 56 | + - Creates a new Log Analytics workspace with the naming convention `defaultWorkspace-[subscriptionId]-fim` and with the default workspace settings. |
| 57 | + |
| 58 | + You can update the DCR and Log Analytics workspace settings later. |
| 59 | + |
| 60 | +1. From Defender for Cloud's sidebar, go to **Workload protections** > **File integrity monitoring**, and select the banner to show the results for machines with Azure Monitor Agent. |
| 61 | + |
| 62 | + :::image type="content" source="media/file-integrity-monitoring-enable-ama/file-integrity-monitoring-azure-monitoring-agent-banner.png" alt-text="Screenshot of banner in File integrity monitoring to show the results for machines with Azure Monitor Agent."::: |
| 63 | + |
| 64 | +1. The machines with File Integrity Monitoring enabled are shown. |
| 65 | + |
| 66 | + :::image type="content" source="media/file-integrity-monitoring-enable-ama/file-integrity-monitoring-azure-monitoring-agent-results.png" alt-text="Screenshot of File integrity monitoring results for machines with Azure Monitor Agent." lightbox="media/file-integrity-monitoring-enable-ama/file-integrity-monitoring-azure-monitoring-agent-results.png"::: |
| 67 | + |
| 68 | + You can see the number of changes that were made to the tracked files, and you can select **View changes** to see the changes made to the tracked files on that machine. |
| 69 | + |
| 70 | +## Edit the list of tracked files and registry keys |
| 71 | + |
| 72 | +File Integrity Monitoring (FIM) for machines with Azure Monitor Agent uses [Data Collection Rules (DCRs)](../azure-monitor/essentials/data-collection-rule-overview.md) to define the list of files and registry keys to track. Each subscription has a DCR for the machines in that subscription. |
| 73 | + |
| 74 | +FIM creates DCRs with a default configuration of tracked files and registry keys. You can edit the DCRs to add, remove, or update the list of files and registries that are tracked by FIM. |
| 75 | + |
| 76 | +To edit the list of tracked files and registries: |
| 77 | + |
| 78 | +1. In File integrity monitoring, select **Data collection rules**. |
| 79 | + |
| 80 | + You can see each of the rules that were created for the subscriptions that you have access to. |
| 81 | + |
| 82 | +1. Select the DCR that you want to update for a subscription. |
| 83 | + |
| 84 | + Each file in the list of Windows registry keys, Windows files, and Linux files contains a definition for a file or registry key, including name, path, and other options. You can also set **Enabled** to **False** to untrack the file or registry key without removing the definition. |
| 85 | + |
| 86 | + Learn more about [system file and registry key definitions](../automation/change-tracking/manage-change-tracking.md#track-files). |
| 87 | + |
| 88 | +1. Select a file, and then add or edit the file or registry key definition. |
| 89 | + |
| 90 | +1. Select **Add** to save the changes. |
| 91 | + |
| 92 | +## Exclude machines from File Integrity Monitoring |
| 93 | + |
| 94 | +Every machine in the subscription that is attached to the DCR is monitored. You can detach a machine from the DCR so that the files and registry keys aren't tracked. |
| 95 | + |
| 96 | +To exclude a machine from File Integrity Monitoring: |
| 97 | + |
| 98 | +- In the list of monitored machines in the FIM results, select the menu (**...**) for the machine and select **Detach data collection rule**. |
| 99 | + |
| 100 | +:::image type="content" source="media/file-integrity-monitoring-enable-ama/file-integrity-monitoring-azure-monitoring-agent-detach-rule.png" alt-text="Screenshot of the option to detach a machine from a data collection rule and exclude the machines from File Integrity Monitoring." lightbox="media/file-integrity-monitoring-enable-ama/file-integrity-monitoring-azure-monitoring-agent-detach-rule.png"::: |
| 101 | + |
| 102 | +The machine moves to the list of unmonitored machines, and file changes aren't tracked for that machine anymore. |
| 103 | + |
| 104 | +## Next steps |
| 105 | + |
| 106 | +Learn more about Defender for Cloud in: |
| 107 | + |
| 108 | +- [Setting security policies](tutorial-security-policy.md) - Learn how to configure security policies for your Azure subscriptions and resource groups. |
| 109 | +- [Managing security recommendations](review-security-recommendations.md) - Learn how recommendations help you protect your Azure resources. |
| 110 | +- [Azure Security blog](https://azure.microsoft.com/blog/topics/security/) - Get the latest Azure security news and information. |
0 commit comments