Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HYAS Protect Initial Commit #8804

Merged
merged 15 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
{
"Name":"HYASProtectDnsSecurityLogs_CL",
"Properties":[
{
"Name":"TenantId",
"Type":"String"
},
{
"Name":"SourceSystem",
"Type":"String"
},
{
"Name":"MG",
"Type":"String"
},
{
"Name":"ManagementGroupName",
"Type":"String"
},
{
"Name":"TimeGenerated",
"Type":"DateTime"
},
{
"Name":"Computer",
"Type":"String"
},
{
"Name":"RawData",
"Type":"String"
},
{
"Name":"IPVerdict_s",
"Type":"String"
},
{
"Name":"TLDVerdict_s",
"Type":"String"
},
{
"Name":"Reputation_d",
"Type":"Real"
},
{
"Name":"DateTime_s",
"Type":"String"
},
{
"Name":"Domain_s",
"Type":"String"
},
{
"Name":"DeviceName_s",
"Type":"String"
},
{
"Name":"ProcessName_s",
"Type":"String"
},
{
"Name":"Nameserver_s",
"Type":"String"
},
{
"Name":"Verdict_s",
"Type":"String"
},
{
"Name":"VerdictSource_s",
"Type":"String"
},
{
"Name":"VerdictStatus_s",
"Type":"String"
},
{
"Name":"Registrar_s",
"Type":"String"
},
{
"Name":"PolicyName_s",
"Type":"String"
},
{
"Name":"PolicyID_d",
"Type":"Real"
},
{
"Name":"RegistrarVerdict_s",
"Type":"String"
},
{
"Name":"TTL_d",
"Type":"Real"
},
{
"Name":"Tags_s",
"Type":"String"
},
{
"Name":"LogID_s",
"Type":"String"
},
{
"Name":"ClientID_g",
"Type":"String"
},
{
"Name":"ClientName_s",
"Type":"String"
},
{
"Name":"ClientIP_s",
"Type":"String"
},
{
"Name":"Domain2TLD_s",
"Type":"String"
},
{
"Name":"DomainTLD_s",
"Type":"String"
},
{
"Name":"Nameserver2TLD_s",
"Type":"String"
},
{
"Name":"NameserverTLD_s",
"Type":"String"
},
{
"Name":"NameserverIP_s",
"Type":"String"
},
{
"Name":"NameserverCountryISOCode_s",
"Type":"String"
},
{
"Name":"NameserverCountryName_s",
"Type":"String"
},
{
"Name":"ARecord_s",
"Type":"String"
},
{
"Name":"CName_s",
"Type":"String"
},
{
"Name":"CName2TLD_s",
"Type":"String"
},
{
"Name":"CNameTLD_s",
"Type":"String"
},
{
"Name":"ThreatLevel_s",
"Type":"String"
},
{
"Name":"QueryType_s",
"Type":"String"
},
{
"Name":"ResponseCode_d",
"Type":"Real"
},
{
"Name":"ResponseName_s",
"Type":"String"
},
{
"Name":"ResponseDescription_s",
"Type":"String"
},
{
"Name":"ResolverMode_s",
"Type":"String"
},
{
"Name":"ReasonLists_s",
"Type":"String"
},
{
"Name":"ReasonType_s",
"Type":"String"
},
{
"Name":"DomainAge_d",
"Type":"Real"
},
{
"Name":"DomainCategory_s",
"Type":"String"
},
{
"Name":"DomainCreationDate_t",
"Type":"DateTime"
},
{
"Name":"DomainExpiresDate_t",
"Type":"DateTime"
},
{
"Name":"DomainUpdatedDate_t",
"Type":"DateTime"
},
{
"Name":"NameserverVerdict_s",
"Type":"String"
},
{
"Name":"FQDNVerdict_s",
"Type":"String"
},
{
"Name":"DomainVerdict_s",
"Type":"String"
},
{
"Name":"Type",
"Type":"String"
},
{
"Name":"_ResourceId",
"Type":"String"
}
]
}
119 changes: 119 additions & 0 deletions Solutions/HYAS Protect/Data Connectors/HYASProtect_FunctionApp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"id": "HYASProtect",
"title": "HYAS Protect",
"publisher": "HYAS",
"descriptionMarkdown": "HYAS Protect provide logs based on reputation values - Blocked, Malicious, Permitted, Suspicious.",
"graphQueries": [
{
"metricName": "Total logs received",
"legend": "HYASProtectDnsSecurityLogs",
"baseQuery": "HYASProtectDnsSecurityLogs_CL"
}
],
"sampleQueries": [
{
"description": "All Logs",
"query": "HYASProtectDnsSecurityLogs_CL"
}
],
"dataTypes": [
{
"name": "HYASProtectDnsSecurityLogs_CL",
"lastDataReceivedQuery": "HYASProtectDnsSecurityLogs_CL\n | summarize Time = max(TimeGenerated)\n | where isnotempty(Time)"
}
],
"connectivityCriterias": [
{
"type": "IsConnectedQuery",
"value": [
"HYASProtectDnsSecurityLogs_CL\n | summarize LastLogReceived = max(TimeGenerated)\n | project IsConnected = LastLogReceived > ago(30d)"
]
}
],
"availability": {
"status": 1,
"isPreview": false
},
"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
}
},
{
"provider": "Microsoft.OperationalInsights/workspaces/sharedKeys",
"permissionsDisplayText": "read permissions to shared keys for the workspace are required. [See the documentation to learn more about workspace keys](https://docs.microsoft.com/azure/azure-monitor/platform/agent-windows#obtain-workspace-id-and-key).",
"providerDisplayName": "Keys",
"scope": "Workspace",
"requiredPermissions": {
"action": 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": "REST API Credentials/permissions",
"description": "**HYAS API Key** is required for making API calls."
}
]
},
"instructionSteps": [
{
"title": "",
"description": ">**NOTE:** This connector uses Azure Functions to connect to the HYAS API to pull Logs into Microsoft Sentinel. This might result in additional costs for data ingestion and for storing data in Azure Blob Storage costs. Check the [Azure Functions pricing page](https://azure.microsoft.com/pricing/details/functions/) and [Azure Blob Storage pricing page](https://azure.microsoft.com/pricing/details/storage/blobs/) 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."
},
{
"instructions": [
{
"parameters": {
"fillWith": [
"WorkspaceId"
],
"label": "Workspace ID"
},
"type": "CopyableLabel"
},
{
"parameters": {
"fillWith": [
"PrimaryKey"
],
"label": "Primary Key"
},
"type": "CopyableLabel"
}
]
},
{
"title": "Option 1 - Azure Resource Manager (ARM) Template",
"description": "Use this method for automated deployment of the HYAS Protect data connector using an ARM Tempate.\n\n1. Click the **Deploy to Azure** button below. \n\n\t[![Deploy To Azure](https://aka.ms/deploytoazurebutton)](https://aka.ms/sentinel-HYAS Protect-azuredeploy)\n2. Select the preferred **Subscription**, **Resource Group** and **Location**. \n3. Enter the **Function Name**, **Table Name**, **Workspace ID**, **Workspace Key**, **API Key**, **TimeInterval**, **FetchBlockedDomains**, **FetchMaliciousDomains**, **FetchSuspiciousDomains**, **FetchPermittedDomains** and deploy. \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 HYAS Protect Logs 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-HYAS Protect-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. HyasProtectLogsXXX).\n\n\te. **Select a runtime:** Choose Python 3.8.\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 string values (case-sensitive): \n\t\tAPIKey\n\t\tPolling\n\t\tWorkspaceID\n\t\tWorkspaceKey\n. Once all application settings have been entered, click **Save**."
}
]
}
Binary file not shown.
Loading
Loading