UbiquitiAuditEvent
| where EventCategory =~ 'firewall'
| where ipv4_is_private(SrcIpAddr) == 'False'
| where ipv4_is_private(DstIpAddr)
| where DstPortNumber == '22'
| extend IPCustomEntity = DstIpAddr
name: Ubiquiti - SSH from external source
kind: Scheduled
tactics:
- InitialAccess
triggerThreshold: 0
triggerOperator: gt
version: 1.0.2
status: Available
queryFrequency: 1h
id: 0998a19d-8451-4cdd-8493-fc342816a197
requiredDataConnectors:
- connectorId: CustomLogsAma
dataTypes:
- Ubiquiti_CL
relevantTechniques:
- T1133
description: |
'Detects remote to local (R2L) SSH connection to internal host.'
entityMappings:
- entityType: IP
fieldMappings:
- columnName: IPCustomEntity
identifier: Address
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Ubiquiti UniFi/Analytic Rules/UbiquitiR2LSSH.yaml
queryPeriod: 1h
severity: Medium
query: |
UbiquitiAuditEvent
| where EventCategory =~ 'firewall'
| where ipv4_is_private(SrcIpAddr) == 'False'
| where ipv4_is_private(DstIpAddr)
| where DstPortNumber == '22'
| extend IPCustomEntity = DstIpAddr