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

OCI - SSH scanner

Back
Ide087d4fb-af0b-4e08-a067-b9ba9e5f8840
RulenameOCI - SSH scanner
DescriptionDetects possible SSH scanning activity.
SeverityHigh
TacticsReconnaissance
TechniquesT1595
Required data connectorsOracleCloudInfrastructureLogsConnector
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Oracle Cloud Infrastructure/Analytic Rules/OCISSHScan.yaml
Version1.0.1
Arm templatee087d4fb-af0b-4e08-a067-b9ba9e5f8840.json
Deploy To Azure
let threshold = 5;
OCILogs
| where EventType contains 'vcn.flowlogs'
| where data_action_s =~ 'REJECT'
| where ipv4_is_private(DstIpAddr)
| where ipv4_is_private(SrcIpAddr) == False
| where DstPortNumber == 22
| summarize p_count = dcount(DstIpAddr) by SrcIpAddr, bin(TimeGenerated, 5m)
| where p_count > threshold
| extend IPCustomEntity = SrcIpAddr
triggerOperator: gt
requiredDataConnectors:
- dataTypes:
  - OCILogs
  connectorId: OracleCloudInfrastructureLogsConnector
queryPeriod: 1h
status: Available
kind: Scheduled
description: |
    'Detects possible SSH scanning activity.'
query: |
  let threshold = 5;
  OCILogs
  | where EventType contains 'vcn.flowlogs'
  | where data_action_s =~ 'REJECT'
  | where ipv4_is_private(DstIpAddr)
  | where ipv4_is_private(SrcIpAddr) == False
  | where DstPortNumber == 22
  | summarize p_count = dcount(DstIpAddr) by SrcIpAddr, bin(TimeGenerated, 5m)
  | where p_count > threshold
  | extend IPCustomEntity = SrcIpAddr  
relevantTechniques:
- T1595
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Oracle Cloud Infrastructure/Analytic Rules/OCISSHScan.yaml
severity: High
triggerThreshold: 0
name: OCI - SSH scanner
tactics:
- Reconnaissance
version: 1.0.1
entityMappings:
- entityType: IP
  fieldMappings:
  - identifier: Address
    columnName: IPCustomEntity
id: e087d4fb-af0b-4e08-a067-b9ba9e5f8840
queryFrequency: 1h
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2023-02-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/e087d4fb-af0b-4e08-a067-b9ba9e5f8840')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/e087d4fb-af0b-4e08-a067-b9ba9e5f8840')]",
      "properties": {
        "alertRuleTemplateName": "e087d4fb-af0b-4e08-a067-b9ba9e5f8840",
        "customDetails": null,
        "description": "'Detects possible SSH scanning activity.'\n",
        "displayName": "OCI - SSH scanner",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "IPCustomEntity",
                "identifier": "Address"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Oracle Cloud Infrastructure/Analytic Rules/OCISSHScan.yaml",
        "query": "let threshold = 5;\nOCILogs\n| where EventType contains 'vcn.flowlogs'\n| where data_action_s =~ 'REJECT'\n| where ipv4_is_private(DstIpAddr)\n| where ipv4_is_private(SrcIpAddr) == False\n| where DstPortNumber == 22\n| summarize p_count = dcount(DstIpAddr) by SrcIpAddr, bin(TimeGenerated, 5m)\n| where p_count > threshold\n| extend IPCustomEntity = SrcIpAddr\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "High",
        "status": "Available",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Reconnaissance"
        ],
        "techniques": [
          "T1595"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}