Detection rules › Kusto

RunningRAT request parameters

Severity
high
Time window
1d
Author
Thomas McElroy
Source
github.com/Azure/Azure-Sentinel

'This detection will alert when RunningRAT URI parameters or paths are detect in an HTTP request. Id the device blocked this communication presence of this alert means the RunningRAT implant is likely still executing on the source host.'

MITRE ATT&CK coverage

Rule body

id: baedfdf4-7cc8-45a1-81a9-065821628b83
name: RunningRAT request parameters
description: |
  'This detection will alert when RunningRAT URI parameters or paths are detect in an HTTP request.
  Id the device blocked this communication presence of this alert means the RunningRAT implant is likely still executing on the source host.'
severity: High
requiredDataConnectors:
  - connectorId: Zscaler
    dataTypes:
      - CommonSecurityLog
  - connectorId: Fortinet
    dataTypes:
      - CommonSecurityLog
  - connectorId: CheckPoint
    dataTypes:
      - CommonSecurityLog
  - connectorId: PaloAltoNetworks
    dataTypes:
      - CommonSecurityLog
queryFrequency: 1d
queryPeriod: 1d
triggerOperator: gt
triggerThreshold: 0
tactics:
  - Exfiltration
  - CommandAndControl
relevantTechniques:
  - T1041
  - T1071.001
tags:
  - POLONIUM
query: |
  let runningRAT_parameters = dynamic(['/ui/chk', 'mactok=', 'UsRnMe=', 'IlocalP=', 'kMnD=']);
  CommonSecurityLog
  | where RequestMethod == "GET"
  | project TimeGenerated, DeviceVendor, DeviceProduct, DeviceAction, DestinationDnsDomain, DestinationIP, RequestURL, SourceIP, SourceHostName, RequestClientApplication
  | where RequestURL has_any (runningRAT_parameters)
entityMappings:
  - entityType: IP
    fieldMappings:
      - identifier: Address
        columnName: SourceIP
  - entityType: IP
    fieldMappings:
      - identifier: Address
        columnName: DestinationIP
  - entityType: Host
    fieldMappings:
      - identifier: HostName
        columnName: SourceHostName
  - entityType: URL
    fieldMappings:
      - identifier: Url
        columnName: RequestURL
version: 1.0.2
kind: Scheduled
metadata:
    source:
        kind: Community
    author:
        name: Thomas McElroy
    support:
        tier: Community
    categories:
        domains: [ "Security - Others" ]

Stages and Predicates

Parameters

let runningRAT_parameters = dynamic(['/ui/chk', 'mactok=', 'UsRnMe=', 'IlocalP=', 'kMnD=']);

Stage 1: source

CommonSecurityLog

Stage 2: where

| where RequestMethod == "GET"

Stage 3: project

| project TimeGenerated, DeviceVendor, DeviceProduct, DeviceAction, DestinationDnsDomain, DestinationIP, RequestURL, SourceIP, SourceHostName, RequestClientApplication

Stage 4: where

| where RequestURL has_any (runningRAT_parameters)

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
RequestMethodeq
  • GET
field:"RequestMethod" kind:eq value:"GET"
RequestURLmatch
  • /ui/chk transforms: term
  • IlocalP= transforms: term
  • UsRnMe= transforms: term
  • kMnD= transforms: term
  • mactok= transforms: term
field:"RequestURL" kind:match

Output fields

These fields are emitted when the rule matches.

FieldSource
DestinationDnsDomainproject
DestinationIPproject
DeviceActionproject
DeviceProductproject
DeviceVendorproject
RequestClientApplicationproject
RequestURLproject
SourceHostNameproject
SourceIPproject
TimeGeneratedproject