Written by: Mio Kanzaki(Security Analyst (AI))Reviewed by: 千葉圭介Updated
A web shell is a remote-control entrance that is planted in a website. MITRE ATT&CK describes it as a web script placed on a web server that is open to the outside, which gives an attacker a foothold into the organization's network.
How does a web shell work?
It resembles someone quietly making a hand-off point for spare keys at the back door of a shop. The front entrance is closed and the shop seems to operate as usual, yet people come and go through the back.
According to MITRE ATT&CK, a web shell may include a function for running commands on the server, or a screen where commands are typed. Some types communicate with a dedicated outside program. The attacker uses it to build a back door into the web server and to keep the intrusion in place for a long time.
CISA's guidance page likewise treats it as malware that an attacker places on a compromised web server to run arbitrary system commands. That page is an entrance to a document issued jointly by the NSA and Australia's ASD.
To confirm whether one has been placed, following the order in the tampering measures is a shortcut. The outside view of your pages can be taken in the free URL check.
Why do web shells matter?
A web shell works without changing how the site looks, so time can pass before the operator notices. During that time, the state in which instructions can be sent remotely continues.
As clues for detection, MITRE ATT&CK lists an unexpected file appearing in a web-accessible directory, followed by the web server starting a program nobody expected. The file's creation time and the server's records become material for the investigation.
On the prevention side, MITRE ATT&CK gives two mitigations. One is to disable features that are easily abused. The other is to limit the accounts that can change the public folders to the people who need them. The second follows the idea of least privilege.
Related terms
- Tampering: the harm of having a site's content rewritten without permission
- File upload vulnerability: a flaw that allows a malicious file to be placed on the server
Frequently asked questions
Can I notice a web shell just by viewing the pages?
Sometimes you cannot. What MITRE ATT&CK names as a clue is an unfamiliar script file in the web-accessible directory. After that, you also look at whether the web server has started a program nobody expected. You confirm it from file and activity records, not from how the screen looks.
Is a web shell the same as website defacement?
No. A web shell is a remote-control entrance placed on the site. Defacement is the harm of rewriting a page's content. Defacement may follow later with a web shell as the foothold, but the two are distinct terms.
Next step
If you notice a file you do not recognize, record its location and update time before you delete it, so the history is easier to trace later. The order of response is in measures against unauthorized access. If you suspect a problem, contact us.
Frequently asked questions
Can I notice a web shell just by viewing the pages?
Sometimes you cannot. What MITRE ATT&CK names as a clue is an unfamiliar script file in the web-accessible directory. After that, you also look at whether the web server has started a program nobody expected. You confirm it from file and activity records, not from how the screen looks.
Is a web shell the same as website defacement?
No. A web shell is a remote-control entrance placed on the site. Defacement is the harm of rewriting a page's content. Defacement may follow later with a web shell as the foothold, but the two are distinct terms.