Skip to content

Detect CVE-2026-65400 Screen Sharing exploitation via SSFileCopy helpers - #6675

Open
shashank-elastic wants to merge 11 commits into
mainfrom
CVE-2026-65400
Open

Detect CVE-2026-65400 Screen Sharing exploitation via SSFileCopy helpers#6675
shashank-elastic wants to merge 11 commits into
mainfrom
CVE-2026-65400

Conversation

@shashank-elastic

@shashank-elastic shashank-elastic commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Issue link(s): NA

Summary - What I changed

How To Test

Process Events

image

File Events

image

Checklist

  • Added a label for the type of pr: bug, enhancement, schema, maintenance, Rule: New, Rule: Deprecation, Rule: Tuning, Hunt: New, or Hunt: Tuning so guidelines can be generated
  • Added the meta:rapid-merge label if planning to merge within 24 hours
  • Secret and sensitive material has been managed correctly
  • Automated testing was updated or added to match the most common scenarios
  • Documentation and comments were added for features that require explanation

Contributor checklist

@shashank-elastic shashank-elastic self-assigned this Aug 19, 2026
@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 19, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ SSFileCopyReceiver Writing to Common Persistence Locations (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta
  • ❌ SSFileCopySender Executed as Root (kuery)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@shashank-elastic
shashank-elastic marked this pull request as ready for review August 19, 2026 12:47
Copilot AI lite review requested due to automatic review settings August 19, 2026 12:47
@shashank-elastic
shashank-elastic requested a review from a team August 19, 2026 12:47
@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 19, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ SSFileCopyReceiver Writing to Common Persistence Locations (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta
  • ❌ SSFileCopySender Executed as Root (kuery)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new macOS Elastic Defend detection rules to identify suspected exploitation activity related to CVE-2026-65400 (Screen Sharing), focusing on the Screen Sharing file-copy helper binaries and their related persistence behaviors.

Changes:

  • Adds a file-based EQL rule to detect SSFileCopyReceiver writing to common macOS persistence locations.
  • Adds a process-based rule intended to detect anomalous SSFileCopySender execution consistent with pre-auth exploitation attempts.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
rules/macos/persistence_ssfilecopyreceiver_file_writes.toml New EQL file-write detection for SSFileCopyReceiver targeting persistence-relevant paths.
rules/macos/initial_access_ssfilecopysender_root_execution.toml New process execution detection for SSFileCopySender intended to flag pre-auth exploitation indicators.
Suppressed comments (1)

rules/macos/initial_access_ssfilecopysender_root_execution.toml:100

  • This rule is set to type = "query", but the query body is EQL (process where ...). Set the rule type to "eql" (and ensure language = "eql") or rewrite the query in KQL.
type = "query"

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread rules/macos/initial_access_ssfilecopysender_root_execution.toml Outdated
"/Library/LaunchDaemons/*.plist",
"/Library/LaunchAgents/*.plist",
"/Users/*/Library/LaunchAgents/*.plist",
"/private/var/*/Library/LaunchAgents/*.plist"
Comment on lines +111 to +115
file.name in (
".zshenv", ".zshrc", ".zprofile", ".zlogin",
".bashrc", ".bash_profile", ".bash_login", ".profile",
"config.fish", "environment.plist"
) or
id = "T1098.004"
name = "SSH Authorized Keys"
reference = "https://attack.mitre.org/techniques/T1098/004/"

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 19, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ SSFileCopyReceiver Writing to Common Persistence Locations (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta
  • ❌ SSFileCopySender Executed as Root (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 19, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ SSFileCopyReceiver Writing to Common Persistence Locations (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta
  • ❌ SSFileCopySender Executed as Root (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

Comment thread rules/macos/persistence_ssfilecopyreceiver_file_writes.toml Outdated
Comment thread rules/macos/persistence_ssfilecopyreceiver_file_writes.toml Outdated
Co-authored-by: Eric Forte <119343520+eric-forte-elastic@users.noreply.github.com>
@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 20, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ SSFileCopyReceiver Writing to Common Persistence Locations (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta
  • ❌ SSFileCopySender Executed as Root (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 20, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ SSFileCopyReceiver Writing to Common Persistence Locations (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta
  • ❌ SSFileCopySender Executed as Root (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 20, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ SSFileCopyReceiver Writing to Common Persistence Locations (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta
  • ❌ SSFileCopySender Executed as Root (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 20, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ SSFileCopyReceiver Writing to Common Persistence Locations (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta
  • ❌ SSFileCopySender Executed as Root (eql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

Comment thread rules/macos/persistence_ssfilecopyreceiver_file_writes.toml Outdated
Comment thread rules/macos/initial_access_ssfilecopysender_root_execution.toml Outdated
@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 24, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ SSFileCopyReceiver Writing to Common Persistence Locations (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta
  • ❌ SSFileCopySender Executed as Root (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

Comment thread rules/macos/initial_access_ssfilecopysender_root_execution.toml Outdated
Comment thread rules/macos/initial_access_ssfilecopysender_root_execution.toml Outdated
Comment thread rules/macos/initial_access_ssfilecopysender_root_execution.toml
Comment thread rules/macos/initial_access_ssfilecopysender_root_execution.toml Outdated
Comment thread rules/macos/persistence_ssfilecopyreceiver_file_writes.toml Outdated
Comment thread rules/macos/persistence_ssfilecopyreceiver_file_writes.toml Outdated
Comment thread rules/macos/persistence_ssfilecopyreceiver_file_writes.toml Outdated
Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>
@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 25, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ SSFileCopyReceiver Writing to Common Persistence Locations (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta
  • ❌ SSFileCopySender Executed as Root (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

Comment thread rules/macos/initial_access_ssfilecopysender_root_execution.toml
Comment thread rules/macos/persistence_ssfilecopyreceiver_file_writes.toml
Comment thread rules/macos/persistence_ssfilecopyreceiver_file_writes.toml Outdated
Comment thread rules/macos/persistence_ssfilecopyreceiver_file_writes.toml
Comment thread rules/macos/persistence_ssfilecopyreceiver_file_writes.toml
@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Aug 25, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ SSFileCopyReceiver Writing to Common Persistence Locations (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta
  • ❌ SSFileCopySender Executed as Root (esql)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

description = """
Identifies the macOS Screen Sharing file copy helper SSFileCopyReceiver creating or modifying files in common
persistence locations such as LaunchDaemons/LaunchAgents, shell profiles, SSH authorized_keys, cron tabs, and hidden paths
under root's home directory. SSFileCopyReceiver performs file writes with root authority on behalf of a remote viewer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current logic does not filter by location to just the root's home directory. Should this be updated to match?

OR file.path LIKE "/private/var/at/tabs/*"
OR file.path LIKE "/var/at/tabs/*"
OR file.path LIKE "/private/var/root/.*/*"
OR file.path LIKE "/var/root/.*/*"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Paths like .*/* only match a hidden directory plus a hidden file. Is this intentional? Current logic would miss something like /var/root/.payload.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

[rule.threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/" No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit. Missing EOF newline.

[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/" No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit. Missing EOF newline.

| WHERE host.os.type == "macos"
AND event.type == "start"
AND process.name == "SSFileCopySender"
AND KQL(""" process.args : "0" AND process.args : "80" """)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking, based off reading through https://www.huntress.com/blog/macos-screen-sharing-rce-patched this can also happen on legacy VNC auth where root is expected and not malicious. Should we note that in the FP guidance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants