Detection rules › Kusto

SonicWall - Allowed SSH, Telnet, and RDP Connections

Status
experimental
Severity
medium
Time window
1h
Source
github.com/Azure/Azure-Sentinel

'This rule identifies allowed inbound SSH, Telnet, and RDP connections. This analytic rule leverages the SonicWall Firewall ASIM Network Session parser (ASimNetworkSessionSonicWallFirewall).'

MITRE ATT&CK coverage

Rule body kusto

id: 27f1a570-5f20-496b-88f6-a9aa2c5c9534
name: SonicWall - Allowed SSH, Telnet, and RDP Connections
description: |
  'This rule identifies allowed inbound SSH, Telnet, and RDP connections. This analytic rule leverages the SonicWall Firewall ASIM Network Session parser (ASimNetworkSessionSonicWallFirewall).'
severity: Medium
status: Experimental
requiredDataConnectors:
  - connectorId: CEF
    dataTypes:
      - CommonSecurityLog
  - connectorId: SonicWallFirewall
    dataTypes:
      - ASimNetworkSessionSonicWallFirewall
  - connectorId: CefAma
    dataTypes:
      - CommonSecurityLog
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - InitialAccess
  - Execution
  - Persistence
  - CredentialAccess
  - Discovery
  - LateralMovement
  - Collection
  - Exfiltration
  - Impact
relevantTechniques:
  - T1190
  - T1133
  - T1059
  - T1133
  - T1110
  - T1003
  - T1087
  - T1018
  - T1021
  - T1005
  - T1048
  - T1041
  - T1011
  - T1567
  - T1490
query: |
  ASimNetworkSessionSonicWallFirewall(false)
  | where NetworkDirection == "Inbound" and EventResult in ("NA", "Success")
  | where EventOriginalType != 1370
  | where SrcAppName contains "Windows Remote Desktop Services"
      or SrcAppName contains "Telnet"
      or (SrcAppName contains "SSH Protocol" and ThreatId != 446) // Filters out SSH server responses.
      or SrcAppName contains "Bitvise SSH"
      or DstPortNumber in (22, 23, 3389)
entityMappings:
  - entityType: IP
    fieldMappings:
      - identifier: Address
        columnName: SrcIpAddr
  - entityType: IP
    fieldMappings:
      - identifier: Address
        columnName: DstIpAddr
version: 1.0.1
kind: Scheduled

Stages and Predicates

Stage 1: source

ASimNetworkSessionSonicWallFirewall(false)

Stage 2: where

| where NetworkDirection == "Inbound" and EventResult in ("NA", "Success")

Stage 3: where

| where EventOriginalType != 1370

Stage 4: where

| where SrcAppName contains "Windows Remote Desktop Services"
    or SrcAppName contains "Telnet"
    or (SrcAppName contains "SSH Protocol" and ThreatId != 446)
    or SrcAppName contains "Bitvise SSH"
    or DstPortNumber in (22, 23, 3389)

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
DstPortNumberin
  • 22 transforms: cased
  • 23 transforms: cased
  • 3389 transforms: cased
EventOriginalTypene
  • 1370 transforms: cased
EventResultin
  • NA transforms: cased
  • Success transforms: cased
NetworkDirectioneq
  • Inbound transforms: cased
SrcAppNamecontains
  • Bitvise SSH
  • SSH Protocol
  • Telnet
  • Windows Remote Desktop Services
ThreatIdne
  • 446 transforms: cased