Latest alertCVE-2018-11776 in Apache Struts Confirmed Exploited in the WildRead
Search all news in the platform

Detection rule

Remote Access Tool - ScreenConnect Server Web Shell Execution

HighTest-data validatedSigmaHQ (community)T1190

Overview

Detects potential web shell execution from the ScreenConnect server process.

Rule id
b19146a3-25d4-41b4-928b-1e2a92641b1b
ATT&CK techniques
T1190 Exploit Public-Facing Application
Severity
High
Confidence
Low
Origin
SigmaHQ (community)
SigmaHQ status
test
Used in defense packs
The Gentlemen, qilin, INC Ransom, Akira, safepay, Play, nightspire

Validation

  1. ExperimentalSyntax checked only. Not yet tested on events.
  2. Test-data validatedMatched positive test events and ignored near-miss events. Not yet run in a production SIEM.
  3. SIEM-validatedRun in a real SIEM, with a recorded result.

1 of 1 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) · b19146a3-25d4-41b4-928b-1e2a92641b1b

Download
title: Remote Access Tool - ScreenConnect Server Web Shell Execution
id: b19146a3-25d4-41b4-928b-1e2a92641b1b
status: test
description: Detects potential web shell execution from the ScreenConnect server process.
references:
    - https://blackpointcyber.com/resources/blog/breaking-through-the-screen/
    - https://www.connectwise.com/company/trust/security-bulletins/connectwise-screenconnect-23.9.8
author: Jason Rathbun (Blackpoint Cyber)
date: 2024-02-26
tags:
    - attack.initial-access
    - attack.t1190
logsource:
    product: windows
    category: process_creation
detection:
    selection:
        ParentImage|endswith: '\ScreenConnect.Service.exe'
        Image|endswith:
            - '\cmd.exe'
            - '\csc.exe'
    condition: selection
falsepositives:
    - Unlikely
level: high

QRadar 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("Parent Process Path") LIKE '%\screenconnect.service.exe' AND ((LOWER("Process Path") LIKE '%\cmd.exe' OR LOWER("Process Path") LIKE '%\csc.exe') OR (LOWER("Process Name") LIKE '%\cmd.exe' OR LOWER("Process Name") LIKE '%\csc.exe'))

QRadar CRE

Design for the QRadar Rule Wizard. It is not importable and has not been tested in QRadar.

Rule name
OffSet7: Remote Access Tool - ScreenConnect Server Web Shell 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:Remote Access Tool ScreenConnect Server Web Shel:selection (match)
    All test lines must match (AND).
    • Parent Process Path ends with: \ScreenConnect.Service.exe
    • Process Path / Process Name ends with: \cmd.exe, \csc.exe

Main rule, option A (building blocks)

  1. 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
  2. when an event matches the condition built from these building blocks: BB:OffSet7:Remote Access Tool ScreenConnect Server Web Shel:selection

Main rule, option B (AQL filter test)

  1. when the event matches this AQL filter query: devicetype=12 AND LOWER("Parent Process Path") LIKE '%\screenconnect.service.exe' AND ((LOWER("Process Path") LIKE '%\cmd.exe' OR LOWER("Process Path") LIKE '%\csc.exe') OR (LOWER("Process Name") LIKE '%\cmd.exe' OR LOWER("Process Name") LIKE '%\csc.exe'))

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.

ParentImage="*\\ScreenConnect.Service.exe" (Image IN ("*\\cmd.exe", "*\\csc.exe"))

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

[Remote Access Tool - ScreenConnect Server Web Shell Execution]
description = Detects potential web shell execution from the ScreenConnect server process.
search = ParentImage="*\\ScreenConnect.Service.exe" (Image IN ("*\\cmd.exe", "*\\csc.exe"))

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 (ParentProcessName endswith "\\ScreenConnect.Service.exe" or ActingProcessName endswith "\\ScreenConnect.Service.exe") and (TargetProcessName endswith "\\cmd.exe" or TargetProcessName endswith "\\csc.exe")

Defender XDR

Microsoft Defender XDR KQLHunting query

Advanced hunting query. A custom detection rule also needs a frequency, impacted entities and actions.

DeviceProcessEvents
| where InitiatingProcessFolderPath endswith "\\ScreenConnect.Service.exe" and (FolderPath endswith "\\cmd.exe" or FolderPath endswith "\\csc.exe")

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.parent.executable:*\\ScreenConnect.Service.exe AND (process.executable:(*\\cmd.exe OR *\\csc.exe))

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.parent.executable:"*\\ScreenConnect.Service.exe" and (process.executable like~ ("*\\cmd.exe", "*\\csc.exe"))

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.parent.executable, "\\ScreenConnect.Service.exe") and (ends_with(process.executable, "\\cmd.exe") or ends_with(process.executable, "\\csc.exe"))

Required telemetry

Log source
product: windows · category: process_creation
Fields used
Image ParentImage

False positives

  • Unlikely

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
Jason Rathbun (Blackpoint Cyber)
Source
SigmaHQ · rules/windows/process_creation/proc_creation_win_remote_access_tools_screenconnect_webshell.yml
Upstream commit
9688134317a2
Licence
Detection Rule License (DRL) 1.1

Version history

  1. Version 1Imported from SigmaHQ
  2. OffSet7 build · SigmaHQ 9688134317a2

Related rules