|
| 1 | +# Detect suspicious commands initiated by web server processes |
| 2 | + |
| 3 | +This query was originally published in the threat analytics report, *Operation Soft Cell*. |
| 4 | + |
| 5 | +[Operation Soft Cell](https://www.cybereason.com/blog/operation-soft-cell-a-worldwide-campaign-against-telecommunications-providers) is a series of campaigns targeting users' call logs at telecommunications providers throughout the world. These attacks date from as early as 2012. |
| 6 | + |
| 7 | +Operation Soft Cell operators sometimes use legitimate web server processes to launch commands, especially for network discovery and user/owner discovery. The following query detects activity of this kind. |
| 8 | + |
| 9 | +## Query |
| 10 | + |
| 11 | +```Kusto |
| 12 | +// Suspicious commands launched by web server processes |
| 13 | +DeviceProcessEvents |
| 14 | +| where Timestamp > ago(7d) |
| 15 | +// Pivoting on parents or grand parents |
| 16 | +and (((InitiatingProcessParentFileName in("w3wp.exe", "beasvc.exe", |
| 17 | +"httpd.exe") or InitiatingProcessParentFileName startswith "tomcat") |
| 18 | +or InitiatingProcessFileName in("w3wp.exe", "beasvc.exe", "httpd.exe") or |
| 19 | +InitiatingProcessFileName startswith "tomcat")) |
| 20 | + and FileName in~('cmd.exe','powershell.exe') |
| 21 | +| where ProcessCommandLine contains '%temp%' |
| 22 | + or ProcessCommandLine has 'wget' |
| 23 | + or ProcessCommandLine has 'whoami' |
| 24 | + or ProcessCommandLine has 'certutil' |
| 25 | + or ProcessCommandLine has 'systeminfo' |
| 26 | + or ProcessCommandLine has 'ping' |
| 27 | + or ProcessCommandLine has 'ipconfig' |
| 28 | + or ProcessCommandLine has 'timeout' |
| 29 | +| summarize any(Timestamp), any(Timestamp), any(FileName), |
| 30 | +makeset(ProcessCommandLine), any(InitiatingProcessFileName), |
| 31 | +any(InitiatingProcessParentFileName) by DeviceId |
| 32 | +``` |
| 33 | + |
| 34 | +## Category |
| 35 | + |
| 36 | +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. |
| 37 | + |
| 38 | +| Technique, tactic, or state | Covered? (v=yes) | Notes | |
| 39 | +|------------------------|----------|-------| |
| 40 | +| Initial access | | | |
| 41 | +| Execution | v | This query detects whenever, over the past seven days, a web server process launched a CLI command. This sort of activity, although suspicious, is not by itself actively harmful. Administrators should investigate further to determine if the event was malicious or associated with Operation Soft Cell. | |
| 42 | +| Persistence | | | |
| 43 | +| Privilege escalation | | | |
| 44 | +| Defense evasion | v | | |
| 45 | +| Credential Access | | | |
| 46 | +| Discovery | v | | |
| 47 | +| Lateral movement | | | |
| 48 | +| Collection | | | |
| 49 | +| Command and control | | | |
| 50 | +| Exfiltration | | | |
| 51 | +| Impact | | | |
| 52 | +| Vulnerability | | | |
| 53 | +| Misconfiguration | | | |
| 54 | +| Malware, component | | | |
| 55 | + |
| 56 | +## Contributor info |
| 57 | + |
| 58 | +**Contributor:** Microsoft Threat Protection team |
0 commit comments