Analytic rule catalog
OCI - Multiple rejects on rare ports
Back
| Id | 482c24b9-a700-4b2a-85d3-1c42110ba78c |
| Rulename | OCI - Multiple rejects on rare ports |
| Description | Detects multiple rejects on rare ports. |
| Severity | Medium |
| Tactics | Reconnaissance |
| Techniques | T1595 |
| Required data connectors | OracleCloudInfrastructureLogsConnector |
| Kind | Scheduled |
| Query frequency | 1h |
| Query period | 14d |
| Trigger threshold | 0 |
| Trigger operator | gt |
| Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Oracle%20Cloud%20Infrastructure/Analytic%20Rules/OCIMultipleRejects.yaml |
| Version | 1.0.0 |
| Arm template | 482c24b9-a700-4b2a-85d3-1c42110ba78c.json |
let threshold = 50;
let r_dports =
OCILogs
| where EventType contains 'vcn.flowlogs'
| where ipv4_is_private(DstIpAddr)
| where ipv4_is_private(SrcIpAddr) == False
| summarize count() by DstPortNumber
| top 10 by count_ asc
| summarize dports = makeset(DstPortNumber)
| extend k = 1;
OCILogs
| where EventType contains 'vcn.flowlogs'
| where data_action_s =~ 'REJECT'
| where ipv4_is_private(DstIpAddr)
| where ipv4_is_private(SrcIpAddr) == False
| extend k = 1
| join kind=innerunique (r_dports) on k
| where dports has tostring(DstPortNumber)
| summarize count() by SrcIpAddr, bin(TimeGenerated, 5m)
| where count_ > threshold
| extend IPCustomEntity = SrcIpAddr
name: OCI - Multiple rejects on rare ports
version: 1.0.0
description: |
'Detects multiple rejects on rare ports.'
severity: Medium
tactics:
- Reconnaissance
id: 482c24b9-a700-4b2a-85d3-1c42110ba78c
requiredDataConnectors:
- dataTypes:
- OCILogs
connectorId: OracleCloudInfrastructureLogsConnector
triggerOperator: gt
query: |
let threshold = 50;
let r_dports =
OCILogs
| where EventType contains 'vcn.flowlogs'
| where ipv4_is_private(DstIpAddr)
| where ipv4_is_private(SrcIpAddr) == False
| summarize count() by DstPortNumber
| top 10 by count_ asc
| summarize dports = makeset(DstPortNumber)
| extend k = 1;
OCILogs
| where EventType contains 'vcn.flowlogs'
| where data_action_s =~ 'REJECT'
| where ipv4_is_private(DstIpAddr)
| where ipv4_is_private(SrcIpAddr) == False
| extend k = 1
| join kind=innerunique (r_dports) on k
| where dports has tostring(DstPortNumber)
| summarize count() by SrcIpAddr, bin(TimeGenerated, 5m)
| where count_ > threshold
| extend IPCustomEntity = SrcIpAddr
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Oracle%20Cloud%20Infrastructure/Analytic%20Rules/OCIMultipleRejects.yaml
relevantTechniques:
- T1595
triggerThreshold: 0
queryPeriod: 14d
kind: Scheduled
entityMappings:
- fieldMappings:
- identifier: Address
columnName: IPCustomEntity
entityType: IP
status: Available
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": "2024-01-01-preview",
"id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/482c24b9-a700-4b2a-85d3-1c42110ba78c')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/482c24b9-a700-4b2a-85d3-1c42110ba78c')]",
"properties": {
"alertRuleTemplateName": "482c24b9-a700-4b2a-85d3-1c42110ba78c",
"customDetails": null,
"description": "'Detects multiple rejects on rare ports.'\n",
"displayName": "OCI - Multiple rejects on rare ports",
"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/OCIMultipleRejects.yaml",
"query": "let threshold = 50;\nlet r_dports = \nOCILogs\n| where EventType contains 'vcn.flowlogs'\n| where ipv4_is_private(DstIpAddr)\n| where ipv4_is_private(SrcIpAddr) == False\n| summarize count() by DstPortNumber\n| top 10 by count_ asc\n| summarize dports = makeset(DstPortNumber)\n| extend k = 1;\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| extend k = 1\n| join kind=innerunique (r_dports) on k\n| where dports has tostring(DstPortNumber)\n| summarize count() by SrcIpAddr, bin(TimeGenerated, 5m)\n| where count_ > threshold\n| extend IPCustomEntity = SrcIpAddr\n",
"queryFrequency": "PT1H",
"queryPeriod": "P14D",
"severity": "Medium",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"Reconnaissance"
],
"techniques": [
"T1595"
],
"templateVersion": "1.0.0",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}