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

OCI - Inbound SSH connection

Back
Ideb6e07a1-2895-4c55-9c27-ac84294f0e46
RulenameOCI - Inbound SSH connection
DescriptionDetects inbound SSH connection.
SeverityMedium
TacticsInitialAccess
TechniquesT1190
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/OCIInboundSSHConnection.yaml
Version1.0.0
Arm templateeb6e07a1-2895-4c55-9c27-ac84294f0e46.json
Deploy To Azure
OCILogs
| where EventType contains 'vcn.flowlogs'
| where data_action_s =~ 'ACCEPT'
| where ipv4_is_private(DstIpAddr)
| where ipv4_is_private(SrcIpAddr) == False
| where DstPortNumber == 22
| extend IPCustomEntity = DstIpAddr
relevantTechniques:
- T1190
name: OCI - Inbound SSH connection
requiredDataConnectors:
- dataTypes:
  - OCILogs
  connectorId: OracleCloudInfrastructureLogsConnector
entityMappings:
- fieldMappings:
  - identifier: Address
    columnName: IPCustomEntity
  entityType: IP
triggerThreshold: 0
id: eb6e07a1-2895-4c55-9c27-ac84294f0e46
tactics:
- InitialAccess
version: 1.0.0
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Oracle Cloud Infrastructure/Analytic Rules/OCIInboundSSHConnection.yaml
queryPeriod: 1h
kind: Scheduled
queryFrequency: 1h
severity: Medium
status: Available
description: |
    'Detects inbound SSH connection.'
query: |
  OCILogs
  | where EventType contains 'vcn.flowlogs'
  | where data_action_s =~ 'ACCEPT'
  | where ipv4_is_private(DstIpAddr)
  | where ipv4_is_private(SrcIpAddr) == False
  | where DstPortNumber == 22
  | extend IPCustomEntity = DstIpAddr  
triggerOperator: gt
{
  "$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/eb6e07a1-2895-4c55-9c27-ac84294f0e46')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/eb6e07a1-2895-4c55-9c27-ac84294f0e46')]",
      "properties": {
        "alertRuleTemplateName": "eb6e07a1-2895-4c55-9c27-ac84294f0e46",
        "customDetails": null,
        "description": "'Detects inbound SSH connection.'\n",
        "displayName": "OCI - Inbound SSH connection",
        "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/OCIInboundSSHConnection.yaml",
        "query": "OCILogs\n| where EventType contains 'vcn.flowlogs'\n| where data_action_s =~ 'ACCEPT'\n| where ipv4_is_private(DstIpAddr)\n| where ipv4_is_private(SrcIpAddr) == False\n| where DstPortNumber == 22\n| extend IPCustomEntity = DstIpAddr\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1190"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}