Detection rules › Kusto
Ubiquiti - Possible connection to cryptominning pool
'Detects connections which may indicate that device is infected with cryptominer.'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Rule body
id: 7feb3c32-2a11-4eb8-a2d7-e3792b31cb80
name: Ubiquiti - Possible connection to cryptominning pool
description: |
'Detects connections which may indicate that device is infected with cryptominer.'
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: CustomLogsAma
dataTypes:
- Ubiquiti_CL
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
- CommandAndControl
relevantTechniques:
- T1071
- T1095
- T1571
query: |
let susp_dst_ports = dynamic(['14433', '14444', '3333', '3334', '3335', '3336', '4444', '45560', '45700', '5555', '5556', '6666', '7777', '8788', '8888', '8899', '9999', '10034']);
UbiquitiAuditEvent
| where ipv4_is_private(SrcIpAddr)
| where ipv4_is_private(DstIpAddr) == 'False'
| where DstPortNumber in (susp_dst_ports) or (DnsQuery contains 'pool' and DnsQuery contains 'xmr')
| extend IPCustomEntity = SrcIpAddr
entityMappings:
- entityType: IP
fieldMappings:
- identifier: Address
columnName: IPCustomEntity
version: 1.0.2
kind: Scheduled
Stages and Predicates
Let binding: susp_dst_ports
let susp_dst_ports = dynamic(['14433', '14444', '3333', '3334', '3335', '3336', '4444', '45560', '45700', '5555', '5556', '6666', '7777', '8788', '8888', '8899', '9999', '10034']);
Stage 1: source
UbiquitiAuditEvent
Stage 2: where
| where ipv4_is_private(SrcIpAddr)
Stage 3: where
| where ipv4_is_private(DstIpAddr) == 'False'
Stage 4: where
| where DstPortNumber in (susp_dst_ports) or (DnsQuery contains 'pool' and DnsQuery contains 'xmr')
Stage 5: extend
| extend IPCustomEntity = SrcIpAddr
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
DstIpAddr | cidr_match | 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, 127.0.0.0/8 | excludes:DstIpAddr |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
DnsQuery | contains |
| field:"DnsQuery" kind:contains |
DstPortNumber | in |
| field:"DstPortNumber" kind:in |
SrcIpAddr | cidr_match |
| field:"src_ip" kind:cidr_match |
Output fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
IPCustomEntity | extend |