Back
Ideb6e07a1-2895-4c55-9c27-ac84294f0e46
RulenameOCI - Inbound SSH connection
DescriptionDetects inbound SSH connection.
SeverityMedium
TacticsInitialAccess
TechniquesT1190
Required data connectorsOracleCloudInfraConnector
OracleCloudInfrastructureLogsConnector
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Oracle%20Cloud%20Infrastructure/Analytic%20Rules/OCIInboundSSHConnection.yaml
Version1.0.1
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
entityMappings:
- entityType: IP
  fieldMappings:
  - identifier: Address
    columnName: IPCustomEntity
name: OCI - Inbound SSH connection
kind: Scheduled
triggerOperator: gt
status: Available
queryPeriod: 1h
requiredDataConnectors:
- connectorId: OracleCloudInfrastructureLogsConnector
  dataTypes:
  - OCILogs
- connectorId: OracleCloudInfraConnector
  dataTypes:
  - OCI_LogsV2_CL
tactics:
- InitialAccess
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
description: |
  'Detects inbound SSH connection.'
severity: Medium
id: eb6e07a1-2895-4c55-9c27-ac84294f0e46
triggerThreshold: 0
queryFrequency: 1h
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Oracle%20Cloud%20Infrastructure/Analytic%20Rules/OCIInboundSSHConnection.yaml
version: 1.0.1
relevantTechniques:
- T1190
{
  "$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%20Cloud%20Infrastructure/Analytic%20Rules/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.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}