Persistence · ATT&CK v20
T1505.003 Server Software Component: Web Shell
A Persistence technique. Keeping access across reboots, password changes and clean-ups.
- T1505.003Technique ID
- PersistenceTactic
- 6Places taught
What the attacker does
The attacker puts a script on a web server (a web shell) that runs commands sent over HTTP. It keeps them in through the server's own port.
How it shows up in the logs
- The web server process (w3wp.exe, httpd, nginx, java) starting cmd, PowerShell, bash or whoami.
- A new .aspx, .php or .jsp file in the web root (Sysmon 11, file integrity monitoring).
- POST requests to that file from a few IP addresses, in the web server access log.
Questions to ask in triage
- Which file is the shell, when was it written, and how (an upload, an exploit)?
- What commands ran through it?
- Did the attacker move from the web server to other systems?
Read T1505.003 on attack.mitre.org
A sub-technique of T1505.
Where you meet it in CyberSim
Detection rules in the shift
Alerts tagged with this technique, the way Sentinel tags an analytics rule.
- Web server process spawned a shell
In the L3 war room
- A web shell was uploaded to the internet-facing IIS server; the worker process spawned a shell and began beaconing.
In the detection lab
Write the rule yourself.
- Web server spawning a shell (web shell)
In the theory
In the hands-on labs
A simulated machine in your browser.
In the cases
Part of the answer in 1 investigation, in this learning path:
Which case is not said here: finding it is the case.
Events that can show it
In the glossary
More Persistence techniques
- T1053.003 Scheduled Task/Job: Cron
- T1053.005 Scheduled Task/Job: Scheduled Task
- T1098 Account Manipulation
- T1098.003 Account Manipulation: Additional Cloud Roles
- T1098.004 Account Manipulation: SSH Authorized Keys
- T1098.005 Account Manipulation: Device Registration
- T1136.001 Create Account: Local Account
- T1136.002 Create Account: Domain Account
- T1543.002 Create or Modify System Process: Systemd Service
- T1543.003 Create or Modify System Process: Windows Service
- T1547.001 Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder
- T1556.006 Modify Authentication Process: Multi-Factor Authentication
Source: MITRE ATT&CK T1505.003, tactic TA0003.