Windows WinSCP Configuration Security Access
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.
Query · spl
`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`
Implementation guide
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.
Analyst notes
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.