Detection rule
PUA - Chisel Tunneling Tool Execution
Overview
Detects usage of the Chisel tunneling tool via the commandline arguments
- Rule id
8b0e12da-d3c3-49db-bb4f-256703f380e5- ATT&CK techniques
- T1090.001 Proxy: Internal Proxy
- Severity
- High
- Confidence
- Low
- Origin
- SigmaHQ (community)
- SigmaHQ status
test- Used in defense packs
- The Gentlemen, qilin, Akira, safepay
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; 1 of 1 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) · 8b0e12da-d3c3-49db-bb4f-256703f380e5
title: PUA - Chisel Tunneling Tool Execution
id: 8b0e12da-d3c3-49db-bb4f-256703f380e5
related:
- id: cf93e05e-d798-4d9e-b522-b0248dc61eaf
type: similar
status: test
description: Detects usage of the Chisel tunneling tool via the commandline arguments
references:
- https://github.com/jpillora/chisel/
- https://arcticwolf.com/resources/blog/lorenz-ransomware-chiseling-in/
- https://blog.sekoia.io/lucky-mouse-incident-response-to-detection-engineering/
author: Florian Roth (Nextron Systems)
date: 2022-09-13
modified: 2023-02-13
tags:
- attack.command-and-control
- attack.t1090.001
logsource:
category: process_creation
product: windows
detection:
selection_img:
Image|endswith: '\chisel.exe'
selection_param1:
CommandLine|contains:
- 'exe client '
- 'exe server '
selection_param2:
CommandLine|contains:
- '-socks5'
- '-reverse'
- ' r:'
- ':127.0.0.1:'
- '-tls-skip-verify '
- ':socks'
condition: selection_img or all of selection_param*
falsepositives:
- Some false positives may occur with other tools with similar commandlines
level: highQRadar AQL
IBM QRadar AQL (hunting query)Hunting query
Hunting search for the Log Activity tab or the API. It is not a QRadar rule.
AQL search for the Log Activity tab or the API. It is NOT a deployable QRadar rule: real-time detection in QRadar is a CRE (Custom Rule Engine) rule, for which this build only writes a design specification (qradar_cre).
SELECT * FROM events WHERE devicetype=12 AND ((LOWER("Process Path") LIKE '%\chisel.exe' OR LOWER("Process Name") LIKE '%\chisel.exe') OR ((LOWER(Command) LIKE '%exe client %' OR LOWER(Command) LIKE '%exe server %') AND (LOWER(Command) LIKE '%-socks5%' OR LOWER(Command) LIKE '%-reverse%' OR LOWER(Command) LIKE '% r:%' OR LOWER(Command) LIKE '%:127.0.0.1:%' OR LOWER(Command) LIKE '%-tls-skip-verify %' OR LOWER(Command) LIKE '%:socks%')))QRadar CRE
Design for the QRadar Rule Wizard. It is not importable and has not been tested in QRadar.
- Rule name
OffSet7: PUA - Chisel Tunneling Tool 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 Chisel Tunneling Tool Execution:selection_img(match)All test lines must match (AND).Process Path / Process Nameends with:\chisel.exe
BB:OffSet7:PUA Chisel Tunneling Tool Execution:selection_param1(match)All test lines must match (AND).Commandcontains:exe client,exe server
BB:OffSet7:PUA Chisel Tunneling Tool Execution:selection_param2(match)All test lines must match (AND).Commandcontains:-socks5,-reverse,r:,:127.0.0.1:,-tls-skip-verify,:socks
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 Chisel Tunneling Tool Execution:selection_img OR (ALL of [BB:OffSet7:PUA Chisel Tunneling Tool Execution:selection_param1, BB:OffSet7:PUA Chisel Tunneling Tool Execution:selection_param2])
Main rule, option B (AQL filter test)
- when the event matches this AQL filter query:
devicetype=12 AND ((LOWER("Process Path") LIKE '%\chisel.exe' OR LOWER("Process Name") LIKE '%\chisel.exe') OR ((LOWER(Command) LIKE '%exe client %' OR LOWER(Command) LIKE '%exe server %') AND (LOWER(Command) LIKE '%-socks5%' OR LOWER(Command) LIKE '%-reverse%' OR LOWER(Command) LIKE '% r:%' OR LOWER(Command) LIKE '%:127.0.0.1:%' OR LOWER(Command) LIKE '%-tls-skip-verify %' OR LOWER(Command) LIKE '%:socks%')))
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
- 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.
Image="*\\chisel.exe" OR ((CommandLine IN ("*exe client *", "*exe server *")) (CommandLine IN ("*-socks5*", "*-reverse*", "* r:*", "*:127.0.0.1:*", "*-tls-skip-verify *", "*:socks*")))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 - Chisel Tunneling Tool Execution]
description = Detects usage of the Chisel tunneling tool via the commandline arguments
search = Image="*\\chisel.exe" OR ((CommandLine IN ("*exe client *", "*exe server *")) (CommandLine IN ("*-socks5*", "*-reverse*", "* r:*", "*:127.0.0.1:*", "*-tls-skip-verify *", "*:socks*")))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 TargetProcessName endswith "\\chisel.exe" or ((TargetProcessCommandLine contains "exe client " or TargetProcessCommandLine contains "exe server ") and (TargetProcessCommandLine contains "-socks5" or TargetProcessCommandLine contains "-reverse" or TargetProcessCommandLine contains " r:" or TargetProcessCommandLine contains ":127.0.0.1:" or TargetProcessCommandLine contains "-tls-skip-verify " or TargetProcessCommandLine contains ":socks"))Defender XDR
Microsoft Defender XDR KQLHunting query
Advanced hunting query. A custom detection rule also needs a frequency, impacted entities and actions.
DeviceProcessEvents
| where FolderPath endswith "\\chisel.exe" or ((ProcessCommandLine contains "exe client " or ProcessCommandLine contains "exe server ") and (ProcessCommandLine contains "-socks5" or ProcessCommandLine contains "-reverse" or ProcessCommandLine contains " r:" or ProcessCommandLine contains ":127.0.0.1:" or ProcessCommandLine contains "-tls-skip-verify " or ProcessCommandLine contains ":socks"))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.executable:*\\chisel.exe OR ((process.command_line:(*exe\ client\ * OR *exe\ server\ *)) AND (process.command_line:(*\-socks5* OR *\-reverse* OR *\ r\:* OR *\:127.0.0.1\:* OR *\-tls\-skip\-verify\ * OR *\:socks*)))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.executable:"*\\chisel.exe" or ((process.command_line like~ ("*exe client *", "*exe server *")) and (process.command_line like~ ("*-socks5*", "*-reverse*", "* r:*", "*:127.0.0.1:*", "*-tls-skip-verify *", "*:socks*")))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 ends_with(process.executable, "\\chisel.exe") or (process.command_line like "*exe client *" or process.command_line like "*exe server *") and (process.command_line like "*-socks5*" or process.command_line like "*-reverse*" or process.command_line like "* r:*" or process.command_line like "*:127.0.0.1:*" or process.command_line like "*-tls-skip-verify *" or process.command_line like "*:socks*")Required telemetry
- Log source
product: windows · category: process_creation- Fields used
CommandLineImage
False positives
- Some false positives may occur with other tools with similar commandlines
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
Author and attribution
- Author
- Florian Roth (Nextron Systems)
- Source
- SigmaHQ ·
rules/windows/process_creation/proc_creation_win_pua_chisel.yml - Upstream commit
9688134317a2- Licence
- Detection Rule License (DRL) 1.1
Version history
- Version 1Imported from SigmaHQ
- OffSet7 build · SigmaHQ
9688134317a2