|
| 1 | +--- |
| 2 | +title: Add indicators in bulk to threat intelligence by file |
| 3 | +titleSuffix: Microsoft Sentinel |
| 4 | +description: Learn how to bulk add indicators to threat intelligence from flat files in Microsoft Sentinel. |
| 5 | +author: austinmccollum |
| 6 | +ms.author: austinmc |
| 7 | +ms.service: microsoft-sentinel |
| 8 | +ms.topic: how-to |
| 9 | +ms.date: 07/26/2022 |
| 10 | +ms.custom: template-how-to |
| 11 | +#Customer intent: As a security analyst, I want to bulk import indicators from common file types to my threat intelligence (TI), so I can more effectively share TI during an investigation. |
| 12 | +--- |
| 13 | + |
| 14 | +# Add indicators in bulk to Microsoft Sentinel threat intelligence from a CSV or JSON file |
| 15 | + |
| 16 | +In this how-to guide, you'll add indicators from a CSV or JSON file into Microsoft Sentinel threat intelligence. A lot of threat intelligence sharing still happens across emails and other informal channels during an ongoing investigation. The ability to import indicators directly into Microsoft Sentinel threat intelligence allows you to quickly socialize emerging threats for your team and make them available to power other analytics such as producing security alerts, incidents, and automated responses. |
| 17 | + |
| 18 | +> [!IMPORTANT] |
| 19 | +> This feature is currently in PREVIEW. See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for additional legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability. |
| 20 | +
|
| 21 | +## Prerequisites |
| 22 | + |
| 23 | +You must have read and write permissions to the Microsoft Sentinel workspace to store your threat indicators. |
| 24 | + |
| 25 | +## Select an import template for your indicators |
| 26 | + |
| 27 | +Add multiple indicators to your threat intelligence with a specially crafted CSV or JSON file. Download the file templates to get familiar with the fields and how they map to the data you have. Review the required fields for each template type to validate your data before importing. |
| 28 | + |
| 29 | +1. From the [Azure portal](https://portal.azure.com), go to **Microsoft Sentinel**. |
| 30 | + |
| 31 | +1. Select the workspace you want to import threat indicators into. |
| 32 | + |
| 33 | +1. Go to **Threat Intelligence** under the **Threat Management** heading. |
| 34 | + |
| 35 | + :::image type="content" source="media/indicators-bulk-file-import/import-using-file-menu-fixed.png" alt-text="Screenshot of the menu options to import indicators using a file menu." lightbox="media/indicators-bulk-file-import/import-using-file-menu-fixed.png"::: |
| 36 | + |
| 37 | +1. Select **Import** > **Import using a file**. |
| 38 | + |
| 39 | +1. Choose CSV or JSON from the **File Format** drop down menu. |
| 40 | + |
| 41 | + :::image type="content" source="media/indicators-bulk-file-import/format-select-and-download.png" alt-text="Screenshot of the menu flyout to upload a CSV or JSON file, choose a template to download, and specify a source highlighting the file format selection."::: |
| 42 | + |
| 43 | +1. Select the **Download template** link once you've chosen a bulk upload template. |
| 44 | + |
| 45 | +1. Consider grouping your indicators by source since each file upload requires one. |
| 46 | + |
| 47 | +The templates provide all the fields you need to create a single valid indicator, including required fields and validation parameters. Replicate that structure to populate additional indicators in one file. For more information on the templates, see [Understand the import templates](indicators-bulk-file-import.md#understand-the-import-templates). |
| 48 | + |
| 49 | + |
| 50 | +## Upload the indicator file |
| 51 | + |
| 52 | +1. Change the file name from the template default, but keep the file extension as .csv or .json. When you create a unique file name, it will be easier to monitor your imports from the **Manage file imports** pane. |
| 53 | + |
| 54 | +1. Drag your indicators file to the **Upload a file** section or browse for the file using the link. |
| 55 | + |
| 56 | +1. Enter a source for the indicators in the **Source** text box. This value will be stamped on all the indicators included in that file. You can view this property as the **SourceSystem** field. The source will also be displayed in the **Manage file imports** pane. Learn more about how to view indicator properties here: [Work with threat indicators](work-with-threat-indicators.md#find-and-view-your-indicators-in-logs). |
| 57 | + |
| 58 | +1. Choose how you want Microsoft Sentinel to handle invalid indicator entries by selecting one of the radio buttons at the bottom of the **Import using a file** pane. |
| 59 | + - Import only the valid indicators and leave aside any invalid indicators from the file. |
| 60 | + - Don't import any indicators if a single indicator in the file is invalid. |
| 61 | + |
| 62 | + :::image type="content" source="media/indicators-bulk-file-import/upload-file-pane.png" alt-text="Screenshot of the menu flyout to upload a CSV or JSON file, choose a template to download, and specify a source highlighting the Import button."::: |
| 63 | + |
| 64 | +1. Select the **Import** button. |
| 65 | + |
| 66 | + |
| 67 | +## Manage file imports |
| 68 | + |
| 69 | +Monitor your imports and view error reports for partially imported or failed imports. |
| 70 | + |
| 71 | +1. Select **Import** > **Manage file imports**. |
| 72 | + |
| 73 | + :::image type="content" source="media/indicators-bulk-file-import/manage-file-imports.png" alt-text="Screenshot of the menu option to manage file imports."::: |
| 74 | + |
| 75 | +1. Review the status of imported files and the number of invalid indicator entries. |
| 76 | + |
| 77 | + :::image type="content" source="media/indicators-bulk-file-import/manage-file-imports-pane.png" alt-text="Screenshot of the manage file imports pane with example ingestion data. The columns show sorted by imported number with various sources."::: |
| 78 | + |
| 79 | +1. View and sort imports by selecting **Source**, indicator file **Name**, the number **Imported**, the **Total** number of indicators in each file, or the **Created** date. |
| 80 | + |
| 81 | +1. Select the preview of the error file or download the error file containing the errors about invalid indicators. |
| 82 | + |
| 83 | +Microsoft Sentinel maintains the status of the file import for 30 days. The actual file and the associated error file are maintained in the system for 24 hours. After 24 hours the file and the error file are deleted, and the ingested indicators will continue to show in the Threat Intelligence menu. |
| 84 | + |
| 85 | + |
| 86 | +## Understand the import templates |
| 87 | + |
| 88 | +Review each template to ensure your indicators are imported successfully. If this is your first import, be sure to reference the instructions in the template file and follow the supplemental guidance below. |
| 89 | + |
| 90 | +### CSV template structure |
| 91 | + |
| 92 | +1. Choose between the **File indicators** or **All other indicator types** option from the **Indicator type** drop down menu when you select **CSV**. |
| 93 | + |
| 94 | + The CSV template needs multiple columns to accommodate the file indicator type because file indicators can have multiple hash types like MD5, SHA256, and more. All other indicator types like IP addresses only require the observable type and the observable value. |
| 95 | + |
| 96 | +1. The column headings for the CSV **All other indicator types** template include fields such as `threatTypes`, single or multiple `tags`, `confidence`, and `tlpLevel`. TLP or Traffic Light Protocol is a sensitivity designation to help make decisions on threat intelligence sharing. |
| 97 | + |
| 98 | +1. Only the `validFrom`, `observableType` and `observableValue` fields are required. |
| 99 | + |
| 100 | +1. Delete the entire first row from the template to remove the comments before upload. |
| 101 | + |
| 102 | +1. Keep in mind the max file size for a CSV file import is 50MB. |
| 103 | + |
| 104 | +Here's an example domain-name indicator using the CSV template. |
| 105 | + |
| 106 | +```CSV |
| 107 | +threatTypes,tags,name,description,confidence,revoked,validFrom,validUntil,tlpLevel,severity,observableType,observableValue |
| 108 | +Phishing,"demo, csv",MDTI article - Franken-Phish domainname,Entity appears in MDTI article Franken-phish,100,,2022-07-18T12:00:00.000Z,,white,5,domain-name,1776769042.tailspintoys.com |
| 109 | +``` |
| 110 | + |
| 111 | +### JSON template structure |
| 112 | + |
| 113 | +1. There is only one JSON template for all indicator types. |
| 114 | + |
| 115 | +1. The `pattern` element supports indicator types of: file, ipv4-addr, ipv6-addr, domain-name, url, user-account, email-addr, and windows-registry-key types. |
| 116 | + |
| 117 | +1. Remove the template comments before upload. |
| 118 | + |
| 119 | +1. Close the last indicator in the array using the "}" without a comma. |
| 120 | + |
| 121 | +1. Keep in mind the max file size for a JSON file import is 250MB. |
| 122 | + |
| 123 | +Here's an example ipv4-addr indicator using the JSON template. |
| 124 | + |
| 125 | +```json |
| 126 | +[ |
| 127 | + { |
| 128 | + "type": "indicator", |
| 129 | + "id": "indicator--dbc48d87-b5e9-4380-85ae-e1184abf5ff4", |
| 130 | + "spec_version": "2.1", |
| 131 | + "pattern": "([ipv4-addr:value = '198.168.100.5' ] AND [ipv4-addr:value = '198.168.100.10']) WITHIN 300 SECONDS", |
| 132 | + "pattern_type": "stix", |
| 133 | + "created": "2022-07-27T12:00:00.000Z", |
| 134 | + "modified": "2022-07-27T12:00:00.000Z", |
| 135 | + "valid_from": "2016-07-20T12:00:00.000Z", |
| 136 | + "name": "Sample IPv4 indicator", |
| 137 | + "description": "This indicator implements an observation expression.", |
| 138 | + "indicator_types": [ |
| 139 | + "anonymization", |
| 140 | + "malicious-activity" |
| 141 | + ], |
| 142 | + "kill_chain_phases": [ |
| 143 | + { |
| 144 | + "kill_chain_name": "mandiant-attack-lifecycle-model", |
| 145 | + "phase_name": "establish-foothold" |
| 146 | + } |
| 147 | + ], |
| 148 | + "labels": ["proxy","demo"], |
| 149 | + "confidence": "95", |
| 150 | + "lang": "", |
| 151 | + "external_references": [], |
| 152 | + "object_marking_refs": [], |
| 153 | + "granular_markings": [], |
| 154 | + } |
| 155 | +] |
| 156 | +``` |
| 157 | + |
| 158 | +## Next steps |
| 159 | + |
| 160 | +This article has shown you how to manually bolster your threat intelligence by importing indicators gathered in flat files. Check out these links to learn how indicators power other analytics in Microsoft Sentinel. |
| 161 | +- [Work with threat indicators in Microsoft Sentinel](work-with-threat-indicators.md) |
| 162 | +- [Threat indicators for cyber threat intelligence in Microsoft Sentinel](/azure/architecture/example-scenario/data/sentinel-threat-intelligence.md) |
| 163 | +- [Detect threats quickly with near-real-time (NRT) analytics rules in Microsoft Sentinel](near-real-time-rules.md) |
0 commit comments