T1505.003 - ASP/ASPX Web Shell: Description
T1505.003 - ASP/ASPX Web Shell: Description
md 6/26/2023
When user visits the asp/aspx file in IIS server, the w3wp.exe will compile the asp/aspx file into a DLL file and
execute it.
1/7
T1505.003.md 6/26/2023
The .compiled file will points to the DLL file that contains the asp/aspx web code.
USER INFORMATION
----------------
GROUP INFORMATION
-----------------
PRIVILEGES INFORMATION
----------------------
3/7
T1505.003.md 6/26/2023
By default, log file only is selected. User can enable both log file and ETW event and refer to ETW event
since ETW reads from the raw log file.
Hunt
4/7
T1505.003.md 6/26/2023
Here are the list of the processes that the threat actor may spawn through w3wp.exe
It is quite common to have cmd.exe/powershell.exe process spawned under w3wp.exe, have to baseline it
based on your environment.
It needs to pivot with other telemetry such as file write/network events or baseline those files inside the
wwwroot folder.
However the rootpath might different for each case, For example, ProxyShell exploit drop its web shell in
%ExchangeInstallPath%\FrontEnd\HttpProxy\owa\auth\
It has limited write access to any windows folder when threat actor wants to upload their files with default IIS
privilege which includes:
the main drive folder (e.g. c:\) and then create file within that folder.
Some of the folder in %ALLUSERSPROFILE%, C:\ProgramData in Windows 10, e.g. USOShared
When user request any file from the IIS web server. There will have a file creation event on that. (e.g.
When user access on shell.asp, File event will be trigger on shell.asp)
Network (HTTP)
Check the data being receive from the attacker and vice versa.
5/7
T1505.003.md 6/26/2023
If https protocol used, those data will get encrypted which makes the hunting work harder.
Logs
These IIS logs contains information on the file that has been access by users, user-agent, source/destination
IP, request method, request status etc.
These information can access from both raw log file or ETW logs with Event ID 6200 in IIS-Loggin Logs.
6/7
T1505.003.md 6/26/2023
References
https://www.microsoft.com/en-us/security/blog/2022/12/12/iis-modules-the-evolution-of-web-shells-and-
how-to-detect-them/
7/7