Webshell-Indicative Process Tree
Hypothesis and description
A web shell is a web script placed on an openly accessible web server to allow an adversary to use the server as a gatway in a network. As the shell operates, commands will be issued from within the web application into the broader server operating system. This analytic looks for host enumeration executables initiated by any web service that would not normally be executed within that environment.
- Platforms
- Windows
- Domain
- Host
- Subtypes
- Process
- Submitted
- 2020-11-29
- Contributors
- Nichols Jasper
ATT&CK coverage
| Technique | Tactics | Coverage |
|---|---|---|
| T1505 Server Software ComponentT1505.003 | Persistence | Moderate |
1 technique, 2 ATT&CK ids including sub-techniques. Links open MITRE ATT&CK.
D3FEND techniques MITRE maps to this analytic
Data model references
Fields from the CAR data model (object/action/field) the analytic reads.
Pseudocode and implementations
This is a pseudocode representation of the below splunk search.
processes = search Process:Create
suspicious_processes = filter processes where (
(parent_exe == "w3wp.exe" OR
parent_exe == "httpd.exe" OR
parent_exe == "tomcat*.exe" OR
parent_exe == "nginx.exe" ) AND
(exe == "cmd.exe" OR
exe == "powershell.exe" OR
exe == "net.exe" OR
exe == "whoami.exe" OR
exe == "hostname.exe" OR
exe == "systeminfo.exe" OR
exe == "ipconfig.exe) )
output suspicious_processesLook for host enumeration commands spawned by web services.
(index=__your_sysmon_index__ EventCode=1)
(ParentImage="C:\\Windows\\System32\\*w3wp.exe" OR ParentImage="*httpd.exe" OR ParentImage="*tomcat*.exe" OR ParentImage="*nginx.exe")
(Image="C:\\Windows\\System32\\cmd.exe OR Image="C:\\Windows\\SysWOW64\\cmd.exe" OR Image="C:\\Windows\\System32\\*\\powershell.exe OR Image="C:\\Windows\SysWOW64\\*\powershell.exe OR Image="C:\\Windows\\System32\\net.exe" OR Image="C:\\Windows\\System32\\hostname.exe" OR Image="C:\\Windows\\System32\\whoami.exe" OR Image="*systeminfo.exe OR Image="C:\\Windows\\System32\\ipconfig.exe")Across MITRE's defensive frameworks
Linked through the 1 ATT&CK technique above.
Counter with D3FEND
Defensive techniques MITRE D3FEND maps to the same ATT&CK techniques.
- D3-CSCredential Scrubbing1 shared
- D3-DLVDomain Logic Validation1 shared
- D3-TLTrusted Library1 shared
- D3-VIVariable Initialization1 shared
- D3-RNARestore Network Access1 shared
- D3-EREmail Removal1 shared
- D3-EHBEndpoint Health Beacon1 shared
- D3-LLMLogical Link Mapping1 shared
- D3-NNINetwork Node Inventory1 shared
- D3-PLMPhysical Link Mapping1 shared
- D3-WSAMWeb Session Access Mediation1 shared
- D3-ABPIApplication-based Process Isolation1 shared