Detection rule
PUA - Rclone Execution
Overview
Detects execution of RClone utility for exfiltration as used by various ransomwares strains like REvil, Conti, FiveHands, etc
- Rule id
e37db05d-d1f9-49c8-b464-cee1a4b11638- ATT&CK techniques
- T1567.002 Exfiltration Over Web Service: Exfiltration to Cloud Storage
- Severity
- High
- Confidence
- Low
- Origin
- SigmaHQ (community)
- SigmaHQ status
test- Used in defense packs
- qilin, Akira, safepay, nightspire
Validation
- ExperimentalSyntax checked only. Not yet tested on events.
- Test-data validatedMatched positive test events and ignored near-miss events. Not yet run in a production SIEM.
- SIEM-validatedRun in a real SIEM, with a recorded result.
2 of 2 positive test events matched; 2 of 2 near-miss events were correctly ignored. Community rule reused unmodified from SigmaHQ. OffSet7 converted it and tested it on synthetic events.
Detection logic and queries
Queries are shown exactly as generated. Test them in your environment before you deploy them.
Sigma
Sigma (YAML) · e37db05d-d1f9-49c8-b464-cee1a4b11638
title: PUA - Rclone Execution
id: e37db05d-d1f9-49c8-b464-cee1a4b11638
related:
- id: a0d63692-a531-4912-ad39-4393325b2a9c
type: obsolete
- id: cb7286ba-f207-44ab-b9e6-760d82b84253
type: obsolete
status: test
description: Detects execution of RClone utility for exfiltration as used by various ransomwares strains like REvil, Conti, FiveHands, etc
references:
- https://www.nccgroup.com/research/detecting-rclone-an-effective-tool-for-exfiltration/
- https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware
- https://us-cert.cisa.gov/ncas/analysis-reports/ar21-126a
- https://labs.sentinelone.com/egregor-raas-continues-the-chaos-with-cobalt-strike-and-rclone
- https://www.splunk.com/en_us/blog/security/darkside-ransomware-splunk-threat-update-and-detections.html
author: Bhabesh Raj, Sittikorn S, Aaron Greetham (@beardofbinary) - NCC Group
date: 2021-05-10
modified: 2023-03-05
tags:
- attack.exfiltration
- attack.t1567.002
logsource:
product: windows
category: process_creation
detection:
selection_specific_options:
CommandLine|contains|all:
- '--config '
- '--no-check-certificate '
- ' copy '
selection_rclone_img:
- Image|endswith: '\rclone.exe'
- Description: 'Rsync for cloud storage'
selection_rclone_cli:
CommandLine|contains:
- 'pass'
- 'user'
- 'copy'
- 'sync'
- 'config'
- 'lsd'
- 'remote'
- 'ls'
- 'mega'
- 'pcloud'
- 'ftp'
- 'ignore-existing'
- 'auto-confirm'
- 'transfers'
- 'multi-thread-streams'
- 'no-check-certificate '
condition: selection_specific_options or all of selection_rclone_*
falsepositives:
- Unknown
level: highQRadar CRE
Design for the QRadar Rule Wizard. It is not importable and has not been tested in QRadar.
- Rule name
OffSet7: PUA - Rclone Execution- Rule type
- Event rule (Local)
- Log source types
- Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1
Building blocks
BB:OffSet7:PUA Rclone Execution:selection_specific_options(match)All test lines must match (AND).Commandcontains:--config,--no-check-certificate,copy
BB:OffSet7:PUA Rclone Execution:selection_rclone_img(match)Any of the groups matches (OR): build one BB per group and a parent BB "when an event matches any of" them.Process Path / Process Nameends with:\rclone.exe- custom property needed:
Descriptionis equal to (case-insensitive):Rsync for cloud storageNo QRadar property mapped for "Description": create a custom event property (regex or JSON) on the DSM first.
BB:OffSet7:PUA Rclone Execution:selection_rclone_cli(match)All test lines must match (AND).Commandcontains:pass,user,copy,sync,config,lsd,remote,ls,mega,pcloud,ftp,ignore-existing,auto-confirm,transfers,multi-thread-streams,no-check-certificate
Main rule, option A (building blocks)
- when the event(s) were detected by one or more of these log source types:
Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1 - when an event matches the condition built from these building blocks:
BB:OffSet7:PUA Rclone Execution:selection_specific_options OR (ALL of [BB:OffSet7:PUA Rclone Execution:selection_rclone_img, BB:OffSet7:PUA Rclone Execution:selection_rclone_cli])
Main rule, option B (AQL filter test)
Not available: the AQL conversion failed for this rule.
Rule response
- Severity 7, credibility 6, relevance 7
- Ensure the detected event is part of an offense; index offense on Log Source (host) and annotate with the rule title and OffSet7 rule id
- Respond no more than once per 30 minutes per Log Source (tune per environment)
Limitations
- AQL conversion failed (field 'Description' is not supported); only the building-block design is available.
- QRadar AQL LIKE / CRE string tests are case-sensitive unless the property is lower-cased; the AQL option uses LOWER() where the backend applied it.
Splunk
Splunk SPLSearch
Search for Splunk with Windows/Sysmon field names. A scheduled search or ES correlation search also needs a schedule, time range, throttling and an adaptive response, set in your environment.
(CommandLine="*--config *" CommandLine="*--no-check-certificate *" CommandLine="* copy *") OR ((Image="*\\rclone.exe" OR Description="Rsync for cloud storage") (CommandLine IN ("*pass*", "*user*", "*copy*", "*sync*", "*config*", "*lsd*", "*remote*", "*ls*", "*mega*", "*pcloud*", "*ftp*", "*ignore-existing*", "*auto-confirm*", "*transfers*", "*multi-thread-streams*", "*no-check-certificate *")))Splunk savedsearches.conf stanzaScheduled search template
Template stanza. Review schedule, alert actions and index/sourcetype for your environment before enabling.
[default]
dispatch.earliest_time = -30d
dispatch.latest_time = now
[PUA - Rclone Execution]
description = Detects execution of RClone utility for exfiltration as used by various ransomwares strains like REvil, Conti, FiveHands, etc
search = (CommandLine="*--config *" CommandLine="*--no-check-certificate *" CommandLine="* copy *") OR ((Image="*\\rclone.exe" OR Description="Rsync for cloud storage") (CommandLine IN ("*pass*", "*user*", "*copy*", "*sync*", "*config*", "*lsd*", "*remote*", "*ls*", "*mega*", "*pcloud*", "*ftp*", "*ignore-existing*", "*auto-confirm*", "*transfers*", "*multi-thread-streams*", "*no-check-certificate *")))Microsoft Sentinel
Microsoft Sentinel KQL (ASIM)Hunting query
Hunting query over ASIM-normalized tables. An analytics rule also needs a schedule, entity mapping and alert grouping.
imProcessCreate
| where (TargetProcessCommandLine contains "--config " and TargetProcessCommandLine contains "--no-check-certificate " and TargetProcessCommandLine contains " copy ") or ((TargetProcessName endswith "\\rclone.exe" or TargetProcessFileDescription =~ "Rsync for cloud storage") and (TargetProcessCommandLine contains "pass" or TargetProcessCommandLine contains "user" or TargetProcessCommandLine contains "copy" or TargetProcessCommandLine contains "sync" or TargetProcessCommandLine contains "config" or TargetProcessCommandLine contains "lsd" or TargetProcessCommandLine contains "remote" or TargetProcessCommandLine contains "ls" or TargetProcessCommandLine contains "mega" or TargetProcessCommandLine contains "pcloud" or TargetProcessCommandLine contains "ftp" or TargetProcessCommandLine contains "ignore-existing" or TargetProcessCommandLine contains "auto-confirm" or TargetProcessCommandLine contains "transfers" or TargetProcessCommandLine contains "multi-thread-streams" or TargetProcessCommandLine contains "no-check-certificate "))Defender XDR
Microsoft Defender XDR KQLHunting query
Advanced hunting query. A custom detection rule also needs a frequency, impacted entities and actions.
DeviceProcessEvents
| where (ProcessCommandLine contains "--config " and ProcessCommandLine contains "--no-check-certificate " and ProcessCommandLine contains " copy ") or ((FolderPath endswith "\\rclone.exe" or ProcessVersionInfoFileDescription =~ "Rsync for cloud storage") and (ProcessCommandLine contains "pass" or ProcessCommandLine contains "user" or ProcessCommandLine contains "copy" or ProcessCommandLine contains "sync" or ProcessCommandLine contains "config" or ProcessCommandLine contains "lsd" or ProcessCommandLine contains "remote" or ProcessCommandLine contains "ls" or ProcessCommandLine contains "mega" or ProcessCommandLine contains "pcloud" or ProcessCommandLine contains "ftp" or ProcessCommandLine contains "ignore-existing" or ProcessCommandLine contains "auto-confirm" or ProcessCommandLine contains "transfers" or ProcessCommandLine contains "multi-thread-streams" or ProcessCommandLine contains "no-check-certificate "))Elastic
Elastic Lucene (ECS)Hunting query
Lucene query over ECS fields (Winlogbeat/Elastic Agent Windows mappings). A detection rule also needs an index pattern, schedule and actions.
(process.command_line:*\-\-config\ * AND process.command_line:*\-\-no\-check\-certificate\ * AND process.command_line:*\ copy\ *) OR ((process.executable:*\\rclone.exe OR process.pe.description:"Rsync for cloud storage") AND (process.command_line:(*pass* OR *user* OR *copy* OR *sync* OR *config* OR *lsd* OR *remote* OR *ls* OR *mega* OR *pcloud* OR *ftp* OR *ignore\-existing* OR *auto\-confirm* OR *transfers* OR *multi\-thread\-streams* OR *no\-check\-certificate\ *)))Elastic EQL (ECS)Hunting query
EQL query over ECS fields. Usable in an Elastic Security EQL rule after review; index pattern and schedule are set per environment.
any where (process.command_line:"*--config *" and process.command_line:"*--no-check-certificate *" and process.command_line:"* copy *") or ((process.executable:"*\\rclone.exe" or process.pe.description:"Rsync for cloud storage") and (process.command_line like~ ("*pass*", "*user*", "*copy*", "*sync*", "*config*", "*lsd*", "*remote*", "*ls*", "*mega*", "*pcloud*", "*ftp*", "*ignore-existing*", "*auto-confirm*", "*transfers*", "*multi-thread-streams*", "*no-check-certificate *")))Elastic ES|QL (ECS)Hunting query
ES|QL query over ECS fields; the FROM clause uses * and must be narrowed to your indices.
from * metadata _id, _index, _version | where process.command_line like "*--config *" and process.command_line like "*--no-check-certificate *" and process.command_line like "* copy *" or (ends_with(process.executable, "\\rclone.exe") or process.pe.description=="Rsync for cloud storage") and (process.command_line like "*pass*" or process.command_line like "*user*" or process.command_line like "*copy*" or process.command_line like "*sync*" or process.command_line like "*config*" or process.command_line like "*lsd*" or process.command_line like "*remote*" or process.command_line like "*ls*" or process.command_line like "*mega*" or process.command_line like "*pcloud*" or process.command_line like "*ftp*" or process.command_line like "*ignore-existing*" or process.command_line like "*auto-confirm*" or process.command_line like "*transfers*" or process.command_line like "*multi-thread-streams*" or process.command_line like "*no-check-certificate *")No working conversion: IBM QRadar AQL (hunting query) (QRadar AQL backend has no property mapping for field "Description")
Required telemetry
- Log source
product: windows · category: process_creation- Fields used
CommandLineDescriptionImage
False positives
- Unknown
Investigation and response
No OffSet7 investigation guidance has been written for this rule yet. Start from the false positives above and the ATT&CK technique pages.
References
- https://www.nccgroup.com/research/detecting-rclone-an-effective-tool-for-exfiltration/
- https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware
- https://us-cert.cisa.gov/ncas/analysis-reports/ar21-126a
- https://labs.sentinelone.com/egregor-raas-continues-the-chaos-with-cobalt-strike-and-rclone
- https://www.splunk.com/en_us/blog/security/darkside-ransomware-splunk-threat-update-and-detections.html
Author and attribution
- Author
- Bhabesh Raj, Sittikorn S, Aaron Greetham (@beardofbinary) - NCC Group
- Source
- SigmaHQ ·
rules/windows/process_creation/proc_creation_win_pua_rclone_execution.yml - Upstream commit
9688134317a2- Licence
- Detection Rule License (DRL) 1.1
Version history
- Version 1Imported from SigmaHQ
- OffSet7 build · SigmaHQ
9688134317a2