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