T1505.004: IIS Components
Adversaries may install malicious components that run on Internet Information Services (IIS) web servers to establish persistence. IIS provides several mechanisms to extend the functionality of the web servers. For example, Internet Server Application Programming Interface (ISAPI) extensions and filters can be installed to examine and/or modify incoming and outgoing IIS web requests. Extensions and filters are deployed as DLL files that export three functions: Get{Extension/Filter}Version
, Http{Extension/Filter}Proc
, and (optionally) Terminate{Extension/Filter}
. IIS modules may also be installed to extend IIS web servers.
Adversaries may install malicious ISAPI extensions and filters to observe and/or modify traffic, execute commands on compromised machines, or proxy command and control traffic. ISAPI extensions and filters may have access to all IIS web requests and responses. For example, an adversary may abuse these mechanisms to modify HTTP responses in order to distribute malicious commands/content to previously comprised hosts.
Adversaries may also install malicious IIS modules to observe and/or modify traffic. IIS 7.0 introduced modules that provide the same unrestricted access to HTTP requests and responses as ISAPI extensions and filters. IIS modules can be written as a DLL that exports RegisterModule
, or as a .NET application that interfaces with ASP.NET APIs to access IIS HTTP requests.
Positive Technologies products that cover the technique
MaxPatrol SIEM knowledge base
mitre_attck_persistence: PT-CR-568: IIS_Native_Module_Installation: An attempt to install an Internet Information Services module using аppcmd.exe is detected
Detection
ID | DS0022 | Data source and component | File: File Creation | Description | Monitor for creation of files (especially DLLs on webservers) that could be abused as malicious ISAPI extensions/filters or IIS modules. |
---|
ID | DS0017 | Data source and component | Command: Command Execution | Description | Monitor execution and command-line arguments of |
---|
ID | DS0022 | Data source and component | File: File Modification | Description | Monitor for modification of files (especially DLLs on webservers) that could be abused as malicious ISAPI extensions/filters or IIS modules. Changes to |
---|
Mitigation
ID | M1026 | Name | Privileged Account Management | Description | Do not allow administrator accounts that have permissions to add IIS components to be used for day-to-day operations that may expose these permissions to potential adversaries and/or other unprivileged systems. |
---|
ID | M1038 | Name | Execution Prevention | Description | Restrict unallowed ISAPI extensions and filters from running by specifying a list of ISAPI extensions and filters that can run on IIS. |
---|
ID | M1047 | Name | Audit | Description | Regularly check installed IIS components to verify the integrity of the web server and identify if unexpected changes have been made. |
---|
ID | M1045 | Name | Code Signing | Description | Ensure IIS DLLs and binaries are signed by the correct application developers. |
---|