|
| 1 | +# Detect use of Alternate Data Streams |
| 2 | + |
| 3 | +This query was originally published in the threat analytics report, *Ransomware continues to hit healthcare, critical services*. There is also a related [blog](https://www.microsoft.com/security/blog/2020/04/28/ransomware-groups-continue-to-target-healthcare-critical-services-heres-how-to-reduce-risk/). |
| 4 | + |
| 5 | +In April of 2020, security researchers observed multiple ransomware campaigns using the same set of techniques. |
| 6 | + |
| 7 | +The following query detects suspicious use of [Alternate Data Streams](https://docs.microsoft.com/sysinternals/downloads/streams) (ADS), which may indicate an attempt to mask malicious activity. These campaigns have been known to deploy ransomware in-memory and exploit ADS. |
| 8 | + |
| 9 | +The [See also](#see=also) section below lists more queries related to techniques shared by these campaigns. |
| 10 | + |
| 11 | +## Query |
| 12 | + |
| 13 | +```Kusto |
| 14 | +// Alternate Data Streams execution |
| 15 | +DeviceProcessEvents |
| 16 | +| where Timestamp > ago(7d) |
| 17 | +// Command lines used |
| 18 | +| where ProcessCommandLine startswith "-q -s" and ProcessCommandLine hasprefix "-p" |
| 19 | +// Removing IDE processes |
| 20 | +and not(FolderPath has_any("visual studio", "ide")) |
| 21 | +| summarize make_set(ProcessCommandLine), make_set(FolderPath), |
| 22 | +make_set(InitiatingProcessCommandLine) by DeviceId, bin(Timestamp, 1h) |
| 23 | +``` |
| 24 | + |
| 25 | +## Category |
| 26 | + |
| 27 | +This query can be used to detect the following attack techniques and tactics ([see MITRE ATT&CK framework](https://attack.mitre.org/)) or security configuration states. |
| 28 | + |
| 29 | +| Technique, tactic, or state | Covered? (v=yes) | Notes | |
| 30 | +|-|-|-| |
| 31 | +| Initial access | | | |
| 32 | +| Execution | | | |
| 33 | +| Persistence | | | |
| 34 | +| Privilege escalation | | | |
| 35 | +| Defense evasion | v | | |
| 36 | +| Credential Access | | | |
| 37 | +| Discovery | | | |
| 38 | +| Lateral movement | | | |
| 39 | +| Collection | | | |
| 40 | +| Command and control | | | |
| 41 | +| Exfiltration | | | |
| 42 | +| Impact | | | |
| 43 | +| Vulnerability | | | |
| 44 | +| Misconfiguration | | | |
| 45 | +| Malware, component | | | |
| 46 | + |
| 47 | +## See also |
| 48 | + |
| 49 | +[Return backup files deletion events](../Impact/backup-deletion.md) |
| 50 | +[Detect attempts to turn off System Restore](./turn-off-system-restore.md) |
| 51 | +[Detect cipher.exe deleting data](./deleting-data-w-cipher-tool.md) |
| 52 | +[Detect clearing of system logs](./clear-system-logs.md) |
| 53 | + |
| 54 | +## Contributor info |
| 55 | + |
| 56 | +**Contributor:** Microsoft Threat Protection team |
0 commit comments