Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

PaloAlto - Possible port scan

Back
Id3575a9c0-51c9-11ec-bf63-0242ac130002
RulenamePaloAlto - Possible port scan
DescriptionDetects possible port scan.
SeverityHigh
TacticsReconnaissance
TechniquesT1595
Required data connectorsCefAma
PaloAltoCDL
PaloAltoCDLAma
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/PaloAltoCDL/Analytic Rules/PaloAltoCDLPossiblePortScan.yaml
Version1.0.3
Arm template3575a9c0-51c9-11ec-bf63-0242ac130002.json
Deploy To Azure
let threshold = 10;
PaloAltoCDLEvent
| where EventResourceId =~ 'TRAFFIC'
| where isnotempty(DstPortNumber) and isnotempty(SrcIpAddr)
| summarize PortSet = make_set(DstPortNumber) by SrcIpAddr, bin(TimeGenerated, 5m)
| where array_length(PortSet) > threshold
| extend IPCustomEntity = SrcIpAddr
id: 3575a9c0-51c9-11ec-bf63-0242ac130002
name: PaloAlto - Possible port scan
triggerOperator: gt
status: Available
query: |
  let threshold = 10;
  PaloAltoCDLEvent
  | where EventResourceId =~ 'TRAFFIC'
  | where isnotempty(DstPortNumber) and isnotempty(SrcIpAddr)
  | summarize PortSet = make_set(DstPortNumber) by SrcIpAddr, bin(TimeGenerated, 5m)
  | where array_length(PortSet) > threshold
  | extend IPCustomEntity = SrcIpAddr  
queryPeriod: 1h
requiredDataConnectors:
- connectorId: PaloAltoCDL
  dataTypes:
  - PaloAltoCDLEvent
- connectorId: PaloAltoCDLAma
  dataTypes:
  - PaloAltoCDLEvent
- connectorId: CefAma
  dataTypes:
  - CommonSecurityLog
severity: High
queryFrequency: 1h
relevantTechniques:
- T1595
version: 1.0.3
kind: Scheduled
tactics:
- Reconnaissance
triggerThreshold: 0
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/PaloAltoCDL/Analytic Rules/PaloAltoCDLPossiblePortScan.yaml
entityMappings:
- fieldMappings:
  - identifier: Address
    columnName: IPCustomEntity
  entityType: IP
description: |
    'Detects possible port scan.'
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/3575a9c0-51c9-11ec-bf63-0242ac130002')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/3575a9c0-51c9-11ec-bf63-0242ac130002')]",
      "properties": {
        "alertRuleTemplateName": "3575a9c0-51c9-11ec-bf63-0242ac130002",
        "customDetails": null,
        "description": "'Detects possible port scan.'\n",
        "displayName": "PaloAlto - Possible port scan",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "IPCustomEntity",
                "identifier": "Address"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/PaloAltoCDL/Analytic Rules/PaloAltoCDLPossiblePortScan.yaml",
        "query": "let threshold = 10;\nPaloAltoCDLEvent\n| where EventResourceId =~ 'TRAFFIC'\n| where isnotempty(DstPortNumber) and isnotempty(SrcIpAddr)\n| summarize PortSet = make_set(DstPortNumber) by SrcIpAddr, bin(TimeGenerated, 5m)\n| where array_length(PortSet) > threshold\n| extend IPCustomEntity = SrcIpAddr\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "High",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Reconnaissance"
        ],
        "techniques": [
          "T1595"
        ],
        "templateVersion": "1.0.3",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}