Detection rules › Kusto

Ubiquiti - Possible connection to cryptominning pool

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

'Detects connections which may indicate that device is infected with cryptominer.'

MITRE ATT&CK coverage

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 used in Stage 4

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.

FieldKindExcluded valuesSearch
DstIpAddrcidr_match10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, 127.0.0.0/8excludes:DstIpAddr

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
DnsQuerycontains
  • pool
  • xmr
field:"DnsQuery" kind:contains
DstPortNumberin
  • 10034
  • 14433
  • 14444
  • 3333
  • 3334
  • 3335
  • 3336
  • 4444
  • 45560
  • 45700
  • 5555
  • 5556
  • 6666
  • 7777
  • 8788
  • 8888
  • 8899
  • 9999
field:"DstPortNumber" kind:in
SrcIpAddrcidr_match
  • 10.0.0.0/8
  • 127.0.0.0/8
  • 169.254.0.0/16
  • 172.16.0.0/12
  • 192.168.0.0/16
field:"src_ip" kind:cidr_match

Output fields

These fields are emitted when the rule matches.

FieldSource
IPCustomEntityextend