{
    "id": "TeamCymruScout",
    "title": "Team Cymru Scout Data Connector",
    "publisher": "Team Cymru Scout",
    "descriptionMarkdown": "The [TeamCymruScout](https://scout.cymru.com/) Data Connector allows users to bring Team Cymru Scout IP, domain and account usage data in Microsoft Sentinel for enrichment.",
    "graphQueries": [
        {
            "metricName": "Total Domain data received",
            "legend": "Cymru_Scout_Domain_Data_CL",
            "baseQuery": "Cymru_Scout_Domain_Data_CL"
        },
        {
            "metricName": "Total IP Foundation data received",
            "legend": "Cymru_Scout_IP_Data_Foundation_CL",
            "baseQuery": "Cymru_Scout_IP_Data_Foundation_CL"
        },
        {
            "metricName": "Total IP Details data received",
            "legend": "Cymru_Scout_IP_Data_Details_CL",
            "baseQuery": "Cymru_Scout_IP_Data_Details_CL"
        },
        {
            "metricName": "Total IP Communications data received",
            "legend": "Cymru_Scout_IP_Data_Communications_CL",
            "baseQuery": "Cymru_Scout_IP_Data_Communications_CL"
        },
        {
            "metricName": "Total IP PDNS data received",
            "legend": "Cymru_Scout_IP_Data_PDNS_CL",
            "baseQuery": "Cymru_Scout_IP_Data_PDNS_CL"
        },
        {
            "metricName": "Total IP Fingerprints data received",
            "legend": "Cymru_Scout_IP_Data_Fingerprints_CL",
            "baseQuery": "Cymru_Scout_IP_Data_Fingerprints_CL"
        },
        {
            "metricName": "Total IP OpenPorts data received",
            "legend": "Cymru_Scout_IP_Data_OpenPorts_CL",
            "baseQuery": "Cymru_Scout_IP_Data_OpenPorts_CL"
        },
        {
            "metricName": "Total IP x509 data received",
            "legend": "Cymru_Scout_IP_Data_x509_CL",
            "baseQuery": "Cymru_Scout_IP_Data_x509_CL"
        },
        {
            "metricName": "Total IP Summary Details data received",
            "legend": "Cymru_Scout_IP_Data_Summary_Details_CL",
            "baseQuery": "Cymru_Scout_IP_Data_Summary_Details_CL"
        },
        {
            "metricName": "Total IP Summary PDNS data received",
            "legend": "Cymru_Scout_IP_Data_Summary_PDNS_CL",
            "baseQuery": "Cymru_Scout_IP_Data_Summary_PDNS_CL"
        },
        {
            "metricName": "Total IP Summary OpenPorts data received",
            "legend": "Cymru_Scout_IP_Data_Summary_OpenPorts_CL",
            "baseQuery": "Cymru_Scout_IP_Data_Summary_OpenPorts_CL"
        },
        {
            "metricName": "Total IP Summary Certs data received",
            "legend": "Cymru_Scout_IP_Data_Summary_Certs_CL",
            "baseQuery": "Cymru_Scout_IP_Data_Summary_Certs_CL"
        },
        {
            "metricName": "Total IP Summary Fingerprints data received",
            "legend": "Cymru_Scout_IP_Data_Summary_Fingerprints_CL",
            "baseQuery": "Cymru_Scout_IP_Data_Summary_Fingerprints_CL"
        },
        {
            "metricName": "Total Account Usage data received",
            "legend": "Cymru_Scout_Account_Usage_Data_CL",
            "baseQuery": "Cymru_Scout_Account_Usage_Data_CL"
        }
    ],
    "sampleQueries": [
        {
            "description": "Team Cymru Scout Domain Data",
            "query": "Cymru_Scout_Domain_Data_CL\n | sort by TimeGenerated desc"
        },
        {
            "description": "Team Cymru Scout IP Data Foundation",
            "query": "Cymru_Scout_IP_Data_Foundation_CL\n | sort by TimeGenerated desc"
        },
        {
            "description": "Team Cymru Scout IP Data Details",
            "query": "Cymru_Scout_IP_Data_Details_CL\n | sort by TimeGenerated desc"
        },
        {
            "description": "Team Cymru Scout IP Data Communications",
            "query": "Cymru_Scout_IP_Data_Communications_CL\n | sort by TimeGenerated desc"
        },
        {
            "description": "Team Cymru Scout IP Data PDNS",
            "query": "Cymru_Scout_IP_Data_PDNS_CL\n | sort by TimeGenerated desc"
        },
        {
            "description": "Team Cymru Scout IP Data Fingerprints",
            "query": "Cymru_Scout_IP_Data_Fingerprints_CL\n | sort by TimeGenerated desc"
        },
        {
            "description": "Team Cymru Scout IP Data OpenPorts",
            "query": "Cymru_Scout_IP_Data_OpenPorts_CL\n | sort by TimeGenerated desc"
        },
        {
            "description": "Team Cymru Scout IP Data x509",
            "query": "Cymru_Scout_IP_Data_x509_CL\n | sort by TimeGenerated desc"
        },
        {
            "description": "Team Cymru Scout IP Data Summary Details",
            "query": "Cymru_Scout_IP_Data_Summary_Details_CL\n | sort by TimeGenerated desc"
        },
        {
            "description": "Team Cymru Scout IP Data Summary PDNS",
            "query": "Cymru_Scout_IP_Data_Summary_PDNS_CL\n | sort by TimeGenerated desc"
        },
        {
            "description": "Team Cymru Scout IP Data Summary OpenPorts",
            "query": "Cymru_Scout_IP_Data_Summary_OpenPorts_CL\n | sort by TimeGenerated desc"
        },
        {
            "description": "Team Cymru Scout IP Data Summary Certs",
            "query": "Cymru_Scout_IP_Data_Summary_Certs_CL\n | sort by TimeGenerated desc"
        },
        {
            "description": "Team Cymru Scout IP Data Summary Fingerprints",
            "query": "Cymru_Scout_IP_Data_Summary_Fingerprints_CL\n | sort by TimeGenerated desc"
        },
        {
            "description": "Team Cymru Scout Account Usage Data",
            "query": "Cymru_Scout_Account_Usage_Data_CL\n | sort by TimeGenerated desc"
        }
    ],
    "dataTypes": [
        {
            "name": "Cymru_Scout_Domain_Data_CL",
            "lastDataReceivedQuery": "Cymru_Scout_Domain_Data_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        },
        {
            "name": "Cymru_Scout_IP_Data_Foundation_CL",
            "lastDataReceivedQuery": "Cymru_Scout_IP_Data_Foundation_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        },
        {
            "name": "Cymru_Scout_IP_Data_Details_CL",
            "lastDataReceivedQuery": "Cymru_Scout_IP_Data_Details_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        },
        {
            "name": "Cymru_Scout_IP_Data_Communications_CL",
            "lastDataReceivedQuery": "Cymru_Scout_IP_Data_Communications_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        },
        {
            "name": "Cymru_Scout_IP_Data_PDNS_CL",
            "lastDataReceivedQuery": "Cymru_Scout_IP_Data_PDNS_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        },
        {
            "name": "Cymru_Scout_IP_Data_Fingerprints_CL",
            "lastDataReceivedQuery": "Cymru_Scout_IP_Data_Fingerprints_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        },
        {
            "name": "Cymru_Scout_IP_Data_OpenPorts_CL",
            "lastDataReceivedQuery": "Cymru_Scout_IP_Data_OpenPorts_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        },
        {
            "name": "Cymru_Scout_IP_Data_x509_CL",
            "lastDataReceivedQuery": "Cymru_Scout_IP_Data_x509_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        },
        {
            "name": "Cymru_Scout_IP_Data_Summary_Details_CL",
            "lastDataReceivedQuery": "Cymru_Scout_IP_Data_Summary_Details_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        },
        {
            "name": "Cymru_Scout_IP_Data_Summary_PDNS_CL",
            "lastDataReceivedQuery": "Cymru_Scout_IP_Data_Summary_PDNS_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        },
        {
            "name": "Cymru_Scout_IP_Data_Summary_OpenPorts_CL",
            "lastDataReceivedQuery": "Cymru_Scout_IP_Data_Summary_OpenPorts_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        },
        {
            "name": "Cymru_Scout_IP_Data_Summary_Certs_CL",
            "lastDataReceivedQuery": "Cymru_Scout_IP_Data_Summary_Certs_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        },
        {
            "name": "Cymru_Scout_IP_Data_Summary_Fingerprints_CL",
            "lastDataReceivedQuery": "Cymru_Scout_IP_Data_Summary_Fingerprints_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        },
        {
            "name": "Cymru_Scout_Account_Usage_Data_CL",
            "lastDataReceivedQuery": "Cymru_Scout_Account_Usage_Data_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
        }
    ],
    "connectivityCriterias": [
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_Domain_Data_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        },
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_IP_Data_Foundation_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        },
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_IP_Data_Details_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        },
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_IP_Data_Communications_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        },
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_IP_Data_PDNS_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        },
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_IP_Data_Fingerprints_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        },
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_IP_Data_OpenPorts_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        },
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_IP_Data_x509_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        },
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_IP_Data_Summary_Details_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        },
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_IP_Data_Summary_PDNS_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        },
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_IP_Data_Summary_OpenPorts_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        },
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_IP_Data_Summary_Certs_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        },
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_IP_Data_Summary_Fingerprints_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        },
        {
            "type": "IsConnectedQuery",
            "value": [
                "Cymru_Scout_Account_Usage_Data_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
            ]
        }
    ],
    "availability": {
        "status": 1,
        "isPreview": true
    },
    "permissions": {
        "resourceProvider": [
            {
                "provider": "Microsoft.OperationalInsights/workspaces",
                "permissionsDisplayText": "read and write permissions on the workspace are required.",
                "providerDisplayName": "Workspace",
                "scope": "Workspace",
                "requiredPermissions": {
                    "write": true,
                    "read": true,
                    "delete": true
                }
            }
        ],
        "customs": [
        {
            "name": "Microsoft.Web/sites permissions",
            "description": "Read and write permissions to Azure Functions to create a Function App is required. [See the documentation to learn more about Azure Functions](https://docs.microsoft.com/azure/azure-functions/)."
        },
        {
            "name": "Permission to assign a role to the registered application",
            "description": "Permission to assign a role to the registered application in Microsoft Entra ID is required."
        },
        {
            "name": "Team Cymru Scout Credentials/permissions",
            "description": "Team Cymru Scout account credentials(Username, Password) is required."
        }
        ]
    },
    "instructionSteps": [{
            "title": "",
            "description": ">**NOTE:** This connector uses Azure Functions to connect to the Team Cymru Scout API to pull its logs into Microsoft Sentinel. This might result in additional data ingestion costs. Check the [Azure Functions pricing page](https://azure.microsoft.com/pricing/details/functions/) for details."
        },
        {
            "title": "",
            "description": ">**(Optional Step)** Securely store workspace and API authorization key(s) or token(s) in Azure Key Vault. Azure Key Vault provides a secure mechanism to store and retrieve key values. [Follow these instructions](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references) to use Azure Key Vault with an Azure Function App."
        },
        {
            "title": "",
            "description": "**STEP 1 - Steps to Create Team Cymru Scout API Key**\n\n Follow these instructions to create a Team Cymru Scout API Key.\n 1. Refer to the [API Keys](https://scout.cymru.com/docs/api#api-keys) document to generate an API key to use as an alternate form of authorization.\n"
        },
        {
            "title": "",
            "description": "**STEP 2 - App Registration steps for the Application in Microsoft Entra ID**\n\n This integration requires an App registration in the Azure portal. Follow the steps in this section to create a new application in Microsoft Entra ID:\n 1. Sign in to the [Azure portal](https://portal.azure.com/).\n 2. Search for and select **Microsoft Entra ID**.\n 3. Under **Manage**, select **App registrations > New registration**.\n 4. Enter a display **Name** for your application.\n 5. Select **Register** to complete the initial app registration.\n 6. When registration finishes, the Azure portal displays the app registration's Overview pane. You see the **Application (client) ID** and **Tenant ID**. The client ID and Tenant ID is required as configuration parameters for the execution of TeamCymruScout Data Connector. \n\n> **Reference link:** [https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app)"
        },
        {
            "title": "",
            "description": "**STEP 3 - Add a client secret for application in Microsoft Entra ID**\n\n Sometimes called an application password, a client secret is a string value required for the execution of TeamCymruScout Data Connector. Follow the steps in this section to create a new Client Secret:\n 1. In the Azure portal, in **App registrations**, select your application.\n 2. Select **Certificates & secrets > Client secrets > New client secret**.\n 3. Add a description for your client secret.\n 4. Select an expiration for the secret or specify a custom lifetime. Limit is 24 months.\n 5. Select **Add**. \n 6. *Record the secret's value for use in your client application code. This secret value is never displayed again after you leave this page.* The secret value is required as configuration parameter for the execution of TeamCymruScout Data Connector. \n\n> **Reference link:** [https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app#add-a-client-secret](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app#add-a-client-secret)"
        },
        {
            "title": "",
            "description": "**STEP 4 - Get Object ID of your application in Microsoft Entra ID**\n\n After creating your app registration, follow the steps in this section to get Object ID:\n 1. Go to **Microsoft Entra ID**.\n 2. Select **Enterprise applications** from the left menu.\n 3. Find your newly created application in the list (you can search by the name you provided).\n 4. Click on the application.\n 5. On the overview page, copy the **Object ID**. This is the **AzureEntraObjectId** needed for your ARM template role assignment.\n"
        },
        {
            "title": "",
            "description": "**STEP 5 - Assign role of Contributor to application in Microsoft Entra ID**\n\n Follow the steps in this section to assign the role:\n 1. In the Azure portal, Go to **Resource Group** and select your resource group.\n 2. Go to **Access control (IAM)** from left panel.\n 3. Click on **Add**, and then select **Add role assignment**.\n 4. Select **Contributor** as role and click on next.\n 5. In **Assign access to**, select `User, group, or service principal`.\n 6. Click on **add members** and type **your app name** that you have created and select it.\n 7. Now click on **Review + assign** and then again click on **Review + assign**. \n\n> **Reference link:** [https://learn.microsoft.com/azure/role-based-access-control/role-assignments-portal](https://learn.microsoft.com/azure/role-based-access-control/role-assignments-portal)"
        },
        {
            "title": "",
            "description": "**STEP 6 - Upload csv with indictaors in Watchlist**\n\n Follow the steps in this section to upload csv containing indicators in watchlist:\n 1. In the Azure portal, Go to **Microsoft Sentinel** and select your workspace.\n 2. Go to **Watchlist** under **Configuration** section from left panel.\n 3. Click on **TeamCymruScoutDomainData**, and then select **Bulk update** from **Update watchlist**.\n 4. Upload your csv files with domain indicators in **Upload file** input and click on **Next: Review+Create**.\n 5. Once validation is successful, click on **Update**.\n 6. Follow the same steps to update *TeamCymruScoutIPData* watchlist for ip indicators. \n\n> **Reference link:** [Bulk update a watchlist](https://learn.microsoft.com/en-us/azure/sentinel/watchlists-manage#bulk-update-a-watchlist)"
        },
        {
            "title": "",
            "description": "**STEP 7 - Choose ONE from the following two deployment options to deploy the connector and the associated Azure Function**\n\n>"
        },
        {
            "title": "Option 1 - Azure Resource Manager (ARM) Template",
            "description": "Use this method for automated deployment of the TeamCymruScout data connector.\n\n1. Click the **Deploy to Azure** button below. \n\n\t[![Deploy To Azure](https://aka.ms/deploytoazurebutton)](https://aka.ms/sentinel-TeamCymruScout-azuredeploy)\n2. Select the preferred **Subscription**, **Resource Group** and **Location**. \n3. Enter the below information : \n\t\tLocation \n\t\tWorkspaceName \n\t\tFunction Name \n\t\tTeamCymruScoutBaseURL \n\t\tAuthenticationType \n\t\tUsername \n\t\tPassword \n\t\tAPIKey \n\t\tIPValues \n\t\tDomainValues \n\t\tAPIType \n\t\tAzureClientId \n\t\tAzureClientSecret \n\t\tTenantId \n\t\tAzureEntraObjectId \n\t\tIPTableName \n\t\tDomainTableName \n\t\tAccountUsageTableName \n\t\tSchedule \n\t\tAccountUsageSchedule \n\t\tLogLevel \n4. Mark the checkbox labeled **I agree to the terms and conditions stated above**. \n5. Click **Purchase** to deploy."
        },
        {
            "title": "Option 2 - Manual Deployment of Azure Functions",
            "description": "Use the following step-by-step instructions to deploy the TeamCymruScout data connector manually with Azure Functions (Deployment via Visual Studio Code)."
        },
        {
            "title": "",
            "description": "**1. Deploy a Function App**\n\n> **NOTE:** You will need to [prepare VS code](https://docs.microsoft.com/azure/azure-functions/functions-create-first-function-python#prerequisites) for Azure function development.\n\n1. Download the [Azure Function App](https://aka.ms/sentinel-TeamCymruScout310-functionapp) file. Extract archive to your local development computer.\n2. Start VS Code. Choose File in the main menu and select Open Folder.\n3. Select the top level folder from extracted files.\n4. Choose the Azure icon in the Activity bar, then in the **Azure: Functions** area, choose the **Deploy to function app** button.\nIf you aren't already signed in, choose the Azure icon in the Activity bar, then in the **Azure: Functions** area, choose **Sign in to Azure**\nIf you're already signed in, go to the next step.\n5. Provide the following information at the prompts:\n\n\ta. **Select folder:** Choose a folder from your workspace or browse to one that contains your function app.\n\n\tb. **Select Subscription:** Choose the subscription to use.\n\n\tc. Select **Create new Function App in Azure** (Don't choose the Advanced option)\n\n\td. **Enter a globally unique name for the function app:** Type a name that is valid in a URL path. The name you type is validated to make sure that it's unique in Azure Functions. (e.g. CymruScoutXXXXX).\n\n\te. **Select a runtime:** Choose Python 3.12 or above.\n\n\tf. Select a location for new resources. For better performance and lower costs choose the same [region](https://azure.microsoft.com/regions/) where Microsoft Sentinel is located.\n\n6. Deployment will begin. A notification is displayed after your function app is created and the deployment package is applied.\n7. Go to Azure Portal for the Function App configuration."
        },
        {
            "title": "",
            "description": "**2. Configure the Function App**\n\n1. In the Function App, select the Function App Name and select **Configuration**.\n2. In the **Application settings** tab, select **+ New application setting**.\n3. Add each of the following application settings individually, with their respective values (case-sensitive): \n\t\tCymruScoutBaseURL \n\t\tAuthenticationType \n\t\tTeamCymruScoutUsername \n\t\tTeamCymruScoutPassword \n\t\tAPIKey \n\t\tIPValues \n\t\tDomainValues \n\t\tAPIType \n\t\tAZURE_CLIENT_ID \n\t\tAZURE_CLIENT_SECRET \n\t\tAZURE_TENANT_ID \n\t\tIPTableName \n\t\tDomainTableName \n\t\tAccountUsageTableName \n\t\tSchedule \n\t\tAccountUsageSchedule \n\t\tLogLevel \n\t\tAZURE_DATA_COLLECTION_ENDPOINT \n\t\tAZURE_DATA_COLLECTION_RULE_ID_MAIN_TABLES \n\t\tAZURE_DATA_COLLECTION_RULE_ID_SUB_TABLES\n4. Once all application settings have been entered, click **Save**."
        }
    ]
}