Detection rules › Sigma
Webshell Detection With Command Line Keywords
Detects certain command line parameters often used during reconnaissance activity via web shells
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | T1505.003 Server Software Component: Web Shell |
| Discovery | T1018 Remote System Discovery, T1033 System Owner/User Discovery, T1087 Account Discovery |
Event coverage
| Provider | Event ID | Title |
|---|---|---|
| Sysmon | 1 | Process creation |
Stages and Predicates
Stage 1: 1 of selection_webserver_image
or:
ParentImage|endswith: '\caddy.exe'
ParentImage|endswith: '\httpd.exe'
ParentImage|endswith: '\nginx.exe'
ParentImage|endswith: '\php-cgi.exe'
ParentImage|endswith: '\w3wp.exe'
ParentImage|endswith: '\ws_tomcatservice.exe'
Stage 2: 1 of selection_webserver_characteristics_tomcat1
or:
ParentImage|endswith: '\java.exe'
ParentImage|endswith: '\javaw.exe'
or:
ParentImage|contains: -tomcat-
ParentImage|contains: '\tomcat'
Stage 3: 1 of selection_webserver_characteristics_tomcat2
or:
CommandLine|contains: CATALINA_HOME
CommandLine|contains: catalina.jar
or:
ParentImage|endswith: '\java.exe'
ParentImage|endswith: '\javaw.exe'
Stage 4: 1 of selection_susp_net_utility
or:
CommandLine|contains: ' group '
CommandLine|contains: ' use '
CommandLine|contains: ' user '
OriginalFileName: [net.exe, net1.exe]
Stage 5: 1 of selection_susp_ping_utility
CommandLine|contains: ' -n '
OriginalFileName: ping.exe
Stage 6: 1 of selection_susp_change_dir
or:
CommandLine|contains: '&cd&echo'
CommandLine|contains: 'cd /d '
Stage 7: 1 of selection_susp_wmic_utility
CommandLine|contains: ' /node:'
OriginalFileName: wmic.exe
Stage 8: 1 of selection_susp_powershell_cli
or:
CommandLine|contains: ' -EncodedCommand '
CommandLine|contains: ' -enc '
CommandLine|contains: ' -w hidden '
CommandLine|contains: ' -windowstyle hidden'
CommandLine|contains: '.WebClient).Download'
or:
Image|endswith: '\cmd.exe'
Image|endswith: '\powershell.exe'
Image|endswith: '\pwsh.exe'
Stage 9: 1 of selection_susp_misc_discovery_binaries
or:
Image|endswith: '\dsquery.exe'
Image|endswith: '\find.exe'
Image|endswith: '\findstr.exe'
Image|endswith: '\ipconfig.exe'
Image|endswith: '\netstat.exe'
Image|endswith: '\nslookup.exe'
Image|endswith: '\pathping.exe'
Image|endswith: '\quser.exe'
Image|endswith: '\schtasks.exe'
Image|endswith: '\systeminfo.exe'
Image|endswith: '\tasklist.exe'
Image|endswith: '\tracert.exe'
Image|endswith: '\ver.exe'
Image|endswith: '\wevtutil.exe'
Image|endswith: '\whoami.exe'
OriginalFileName: VSSADMIN.EXE
OriginalFileName: dsquery.exe
OriginalFileName: find.exe
OriginalFileName: findstr.exe
OriginalFileName: ipconfig.exe
OriginalFileName: netstat.exe
OriginalFileName: nslookup.exe
OriginalFileName: pathping.exe
OriginalFileName: quser.exe
OriginalFileName: schtasks.exe
OriginalFileName: sysinfo.exe
OriginalFileName: tasklist.exe
OriginalFileName: tracert.exe
OriginalFileName: ver.exe
OriginalFileName: wevtutil.exe
OriginalFileName: whoami.exe
Stage 10: 1 of selection_susp_misc_discovery_commands
or:
CommandLine|contains: ' Test-NetConnection '
CommandLine|contains: 'dir \'
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
CommandLine | match |
|
Image | ends_with |
|
OriginalFileName | eq |
|
ParentImage | ends_with |
|
ParentImage | match |
|