Detection rules › Splunk

Windows WinSCP Configuration Security Access

Status
production
Severity
low
Group by
dest, object_file_name, process_id, process_name, signature_id, target_filename
Author
Teoderick Contreras, Splunk
Source
github.com/splunk/security_content

This analytic detects unauthorized access to the WinSCP security configuration folder by processes other than WinSCP itself. WinSCP stores sensitive SSH and FTP session credentials, including passwords and private key references, under the user profile path Martin Prikryl\WinSCP 2\Configuration\Security. Information-stealing malware such as Phantom Stealer targets this directory to harvest stored credentials for exfiltration. The detection uses Windows Security Event 4663 (Object Access) to identify any non-WinSCP process reading or accessing files within this path, which is abnormal during routine system operation. Analysts should investigate the accessing process, its parent, and any associated network activity to determine whether a credential theft attempt is underway.

Known false positives

  • False positive may occur during backup or anti-virus scanning process, as well as from WinSCP itself if it is installed in a different path than the default path. Filter as needed.

MITRE ATT&CK coverage

Telemetry coverage

Rule body

name: Windows WinSCP Configuration Security Access
id: 90013cc4-585b-4437-a95f-099933974f3e
version: 2
creation_date: '2026-06-24'
modification_date: '2026-07-22'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
description: |-
    This analytic detects unauthorized access to the WinSCP security configuration folder by processes other than WinSCP itself.
    WinSCP stores sensitive SSH and FTP session credentials, including passwords and private key references, under the user profile path Martin Prikryl\WinSCP 2\Configuration\Security. Information-stealing malware such as Phantom Stealer targets this directory to harvest stored credentials for exfiltration.
    The detection uses Windows Security Event 4663 (Object Access) to identify any non-WinSCP process reading or accessing files within this path, which is abnormal during routine system operation.
    Analysts should investigate the accessing process, its parent, and any associated network activity to determine whether a credential theft attempt is underway.
data_source:
    - Windows Event Log Security 4663
search: |-
    `wineventlog_security`
    EventCode=4663
    object_file_path="*\\Martin Prikryl\\WinSCP 2\\Configuration\\Security*"
    NOT process_path IN ("*:\\Program Files (x86)\\WinSCP\\WinSCP.exe")
    
    | stats count min(_time) as firstTime
                  max(_time) as lastTime
      by object_file_name object_file_path
         process_name process_path process_id
         EventCode dest
    
    | `security_content_ctime(firstTime)`
    | `security_content_ctime(lastTime)`
    | `windows_winscp_configuration_security_access_filter`
how_to_implement: |-
    To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663.
    For 4663, enable "Audit Object Access" in Group Policy. Then check the two boxes listed for both "Success" and "Failure."
known_false_positives: |-
    False positive may occur during backup or anti-virus scanning process, as well as from WinSCP itself if it is installed in a different path than the default path. Filter as needed.
references:
    - https://malpedia.caad.fkie.fraunhofer.de/details/win.phantom_stealer
    - https://www.proofpoint.com/us/blog/threat-insight/not-safe-work-tracking-and-investigating-stealerium-and-phantom-infostealers
intermediate_findings:
    entities:
        - field: dest
          type: system
          score: 20
          message: a non winscp process [$process_name$] accessed the winscp configuration file [$object_file_path$] on $dest$.
analytic_story:
    - Phantom Stealer
asset_type: Endpoint
mitre_attack_id:
    - T1552.001
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: search

`wineventlog_security`
EventCode=4663
object_file_path="*\\Martin Prikryl\\WinSCP 2\\Configuration\\Security*"
NOT process_path IN ("*:\\Program Files (x86)\\WinSCP\\WinSCP.exe")

Stage 2: stats

| stats count min(_time) as firstTime
              max(_time) as lastTime
  by object_file_name object_file_path
     process_name process_path process_id
     EventCode dest

Stage 3: search

| `security_content_ctime(firstTime)`

Stage 4: search

| `security_content_ctime(lastTime)`

Stage 5: search

| `windows_winscp_configuration_security_access_filter`

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process_patheq"*:\\Program Files (x86)\\WinSCP\\WinSCP.exe"excludes:process_path

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 4663 corpus 35 (splunk 30, kusto 5)
field:"EventID" kind:eq value:"4663"
object_file_patheq
  • "*\\Martin Prikryl\\WinSCP 2\\Configuration\\Security*"
field:"TargetFilename" kind:eq