Detection rules › Kusto
SonicWall - Allowed SSH, Telnet, and RDP Connections
'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
| Tactic | Techniques |
|---|---|
| Initial Access | T1133 External Remote Services, T1190 Exploit Public-Facing Application |
| Execution | T1059 Command and Scripting Interpreter |
| Persistence | T1133 External Remote Services |
| Credential Access | T1003 OS Credential Dumping, T1110 Brute Force |
| Discovery | T1018 Remote System Discovery, T1087 Account Discovery |
| Lateral Movement | T1021 Remote Services |
| Collection | T1005 Data from Local System |
| Exfiltration | T1011 Exfiltration Over Other Network Medium, T1041 Exfiltration Over C2 Channel, T1048 Exfiltration Over Alternative Protocol, T1567 Exfiltration Over Web Service |
| Impact | T1490 Inhibit System Recovery |
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.
| Field | Kind | Values |
|---|---|---|
DstPortNumber | in |
|
EventOriginalType | ne |
|
EventResult | in |
|
NetworkDirection | eq |
|
SrcAppName | contains |
|
ThreatId | ne |
|