From 6de072391d72afeb1e0f7fb069ae8be68c4d1372 Mon Sep 17 00:00:00 2001 From: JP Bourget Date: Thu, 14 Sep 2023 12:01:11 -0400 Subject: [PATCH] zip and azuredeploy --- .../GreyNoiseAPISentinelConn.zip | Bin 0 -> 9193 bytes ...or_GreyNoiseAPISentinel_AzureFunction.json | 238 ++++++++++++++++++ 2 files changed, 238 insertions(+) create mode 100644 Solutions/GreyNoiseThreatIntelligence/Data Connectors/GreyNoiseAPISentinelConn.zip create mode 100644 Solutions/GreyNoiseThreatIntelligence/Data Connectors/azuredeploy_Connector_GreyNoiseAPISentinel_AzureFunction.json diff --git a/Solutions/GreyNoiseThreatIntelligence/Data Connectors/GreyNoiseAPISentinelConn.zip b/Solutions/GreyNoiseThreatIntelligence/Data Connectors/GreyNoiseAPISentinelConn.zip new file mode 100644 index 0000000000000000000000000000000000000000..3b1cd87e9e101d732dd3ec85b2220763f703c37b GIT binary patch literal 9193 zcmc&(by(DC*B-jNK^le<7`i2;yCejLW@zaa2Bf6ByF%DP{0bi>sH;p0dVm~bh$K%fOU2u*HXU=Z^vDLy`;X^?vrV2!{=krZ!@b?B_k zr!9Tx;aUF~gwcnk98&JhQvT3~MF`2KE#l#P`NOyGXt0<_=Yq(oR9SZq&16V>;LT*- zKygvSr5~fG>W0=!nhnUG@E|l$C0>*<;9nVanC>XVoqnVw{RPs7eKKi<_t%A8_lo0Me%wt<*hnL%uGlFZD^ z((NrA?a{bll%k*_GxZ~_+|mmp@;8d_>XiT$0AT)GO}V;3yyPq$Ih?(JRW3}mf1=!I z9mCj6LBfFTM_y#n0KT|Aw+#6zk0f0kDvuJ)W}L+eseuO!FS=x#)A;x zv)_4+4j(INk=?mpnQj_)qgDoC09&98BeaT3S7&HOcXM>t;g$BJZM=Z)pvt9WC3zze zcune)*SysFCI3)`&G9GG4g&%#WgQ}U>@3kqbY&GXTtY@_@fRP+505^c zdhX%i411NUCQZbtnn-=;joK;)Fph(&Kup^lkF)7o_^1wyyMTGWsGrge2^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#@iQlkDwk`?HzO5Dd^ac$$VT$NPr z!yPZV;7>^sv$kz90ym37w@EBZiM_Xqi*zlvirIqrX5fbme#sZj@yb8;HX~S8zX|4U zzA(YS+^;)=`McEr8`4Q?CO-A#qQf+W<0>$hL`CeQ<#?vVCOuEXWzKMs9wbQiRu??T z>MZ}3MMdR>@;il5CH9HoG3i#69pN-S32-mi%HGr-Y~yHeYHDk04>1Ls<=I);LXvFb zQj+X#z^0glN<4gus@$N)Mi5UOFQ1ws7gwD!Kes?LBH6#Bvnz(a_DAX5HD*A!RN~%J z>01Owi_+b$ zBkvBdw+crY=6>u&>v2LyK3V2$`+I)z3QX-qV-_~CM!eAH!B&cXp&lvfS9BTE_B!9b zuQpDuE_f=`+1^qK&)5kdT|4nYu-7m+?2y>&+##r;#Zp1Y?fd+IZHJS%VE^~mLtqL) zL$Z9?S2+{OA5=z&^uxttoYOGadC969QwmddjjPBEmHTXz$6N@>tj)|1EX48Ve9UFb zPc_jv+}R8`!sW{}TI>u#dksUVqi(zqPafh4s_WzU%zL z4DFv$6!iFSvHrcq`zQ9cy3+pzzUzm=jOCwE6r=(N_)R>2o$Y^UGvECWFv;HaWMIzg z&nOD2y&b*(HS|CCVSkT$cf1etdw#|(D)Qf<{$uy&_n>zhFqm`jGm3&1Zw;xxPW2!9 z2)~EC+tk21yPr`M^nwKN&-=XJFMGGt!#bj$Q4};vdPg|_L4R}?0ailq7FSry@H2{n zu*m`cp9bRh0C!6ctVaKgqM++rfIA20|D$5x#e!-4?tu*}Vn3rONZ}sfKQ3v%U;XYe m20QeBMp2L_<^Rd#KP>_3N=Ubx0RX_feGwu70I#WFzy1dex$-ao literal 0 HcmV?d00001 diff --git a/Solutions/GreyNoiseThreatIntelligence/Data Connectors/azuredeploy_Connector_GreyNoiseAPISentinel_AzureFunction.json b/Solutions/GreyNoiseThreatIntelligence/Data Connectors/azuredeploy_Connector_GreyNoiseAPISentinel_AzureFunction.json new file mode 100644 index 00000000000..d1d6c9fc23e --- /dev/null +++ b/Solutions/GreyNoiseThreatIntelligence/Data Connectors/azuredeploy_Connector_GreyNoiseAPISentinel_AzureFunction.json @@ -0,0 +1,238 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "FunctionName": { + "defaultValue": "GreyNoise", + "minLength": 1, + "maxLength": 11, + "type": "string" + }, + "WORKSPACE_ID": { + "type": "string", + "defaultValue": "Workspace ID" + }, + "GREYNOISE_KEY": { + "type": "string", + "defaultValue": "Greynoise API Key" + }, + "TENANT_ID": { + "type": "string", + "defaultValue": "Azure Tenand ID" + }, + "CLIENT_ID": { + "type": "string", + "defaultValue": "Client ID" + }, + "CLIENT_SECRET": { + "type": "string", + "defaultValue": "Client Secret" + }, + "GREYNOISE_CLASSIFICATIONS": { + "type": "string", + "defaultValue": "malicious,unknown" + } + }, + "variables": { + "FunctionName": "[concat(toLower(parameters('FunctionName')), uniqueString(resourceGroup().id))]", + "StorageSuffix": "[environment().suffixes.storage]" + }, + "resources": [ + { + "type": "Microsoft.Insights/components", + "apiVersion": "2015-05-01", + "name": "[variables('FunctionName')]", + "location": "[resourceGroup().location]", + "kind": "web", + "properties": { + "Application_Type": "web", + "ApplicationId": "[variables('FunctionName')]" + } + }, + + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2019-06-01", + "name": "[tolower(variables('FunctionName'))]", + "location": "[resourceGroup().location]", + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [ + ], + "ipRules": [ + ], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "keyType": "Account", + "enabled": true + }, + "blob": { + "keyType": "Account", + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + } + } + }, + { + "type": "Microsoft.Web/serverfarms", + "apiVersion": "2018-02-01", + "name": "[variables('FunctionName')]", + "location": "[resourceGroup().location]", + "sku": { + "name": "Y1", + "tier": "Dynamic" + }, + "kind": "functionapp,linux", + "properties": { + "name": "[variables('FunctionName')]", + "workerSize": "0", + "workerSizeId": "0", + "numberOfWorkers": "1", + "reserved": true, + "siteConfig": { + "linuxFxVersion": "Python|3.10" + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices", + "apiVersion": "2019-06-01", + "name": "[concat(variables('FunctionName'), '/default')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', tolower(variables('FunctionName')))]" + ], + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "properties": { + "cors": { + "corsRules": [ + ] + }, + "deleteRetentionPolicy": { + "enabled": false + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts/fileServices", + "apiVersion": "2019-06-01", + "name": "[concat(variables('FunctionName'), '/default')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', tolower(variables('FunctionName')))]" + ], + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "properties": { + "cors": { + "corsRules": [ + ] + } + } + }, + { + "type": "Microsoft.Web/sites", + "apiVersion": "2018-11-01", + "name": "[variables('FunctionName')]", + "location": "[resourceGroup().location]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', tolower(variables('FunctionName')))]", + "[resourceId('Microsoft.Web/serverfarms', variables('FunctionName'))]", + "[resourceId('Microsoft.Insights/components', variables('FunctionName'))]" + ], + "kind": "functionapp,linux", + "identity": { + "type": "SystemAssigned" + }, + "properties": { + "name": "[variables('FunctionName')]", + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('FunctionName'))]", + "httpsOnly": true, + "clientAffinityEnabled": true, + "alwaysOn": true, + "reserved": true, + "siteConfig": { + "linuxFxVersion": "Python|3.10" + } + }, + "resources": [ + { + "apiVersion": "2018-11-01", + "type": "config", + "name": "appsettings", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', variables('FunctionName'))]" + ], + "properties": { + "FUNCTIONS_EXTENSION_VERSION": "~4", + "FUNCTIONS_WORKER_RUNTIME": "python", + "APPINSIGHTS_INSTRUMENTATIONKEY": "[reference(resourceId('Microsoft.insights/components', variables('FunctionName')), '2015-05-01').InstrumentationKey]", + "APPLICATIONINSIGHTS_CONNECTION_STRING": "[reference(resourceId('microsoft.insights/components', variables('FunctionName')), '2015-05-01').ConnectionString]", + "AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', toLower(variables('FunctionName')),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', toLower(variables('FunctionName'))), '2019-06-01').keys[0].value, ';EndpointSuffix=',toLower(variables('StorageSuffix')))]", + "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING": "[concat('DefaultEndpointsProtocol=https;AccountName=', toLower(variables('FunctionName')),';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', toLower(variables('FunctionName'))), '2019-06-01').keys[0].value, ';EndpointSuffix=',toLower(variables('StorageSuffix')))]", + "WEBSITE_CONTENTSHARE": "[toLower(variables('FunctionName'))]", + "WORKSPACE_ID": "[parameters('WORKSPACE_ID')]", + "GREYNOISE_KEY": "[parameters('GREYNOISE_KEY')]", + "TENANT_ID": "[parameters('TENANT_ID')]", + "CLIENT_ID": "[parameters('CLIENT_ID')]", + "CLIENT_SECRET": "[parameters('CLIENT_SECRET')]", + "GREYNOISE_CLASSIFICATIONS": "[parameters('GREYNOISE_CLASSIFICATIONS')]", + "WEBSITE_RUN_FROM_PACKAGE": "https://github.com/Azure/Azure-Sentinel/raw/db458a54839b084eac0e70bbe6e2a41f34f37e2b/Solutions/GreyNoiseThreatIntelligence/Data%20Connectors/GreyNoiseAPISentinelConn.zip" + } + } + ] + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(variables('FunctionName'), '/default/azure-webjobs-hosts')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', variables('FunctionName'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', variables('FunctionName'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(variables('FunctionName'), '/default/azure-webjobs-secrets')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', variables('FunctionName'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', variables('FunctionName'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "apiVersion": "2019-06-01", + "name": "[concat(variables('FunctionName'), '/default/', tolower(variables('FunctionName')))]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/fileServices', variables('FunctionName'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', variables('FunctionName'))]" + ], + "properties": { + "shareQuota": 5120 + } + } + ] + } + \ No newline at end of file