ID | Technique | Tactic |
---|---|---|
T1505 | Server Software Component | Persistence |
T1505.004 | IIS Components | Persistence |
Detection: Windows IIS Components New Module Added
Description
The following analytic detects the addition of new IIS modules on a Windows IIS server. It leverages the Windows Event log - Microsoft-IIS-Configuration/Operational, specifically EventCode 29, to identify this activity. This behavior is significant because IIS modules are rarely added to production servers, and unauthorized modules could indicate malicious activity. If confirmed malicious, an attacker could use these modules to execute arbitrary code, escalate privileges, or maintain persistence within the environment, potentially compromising the server and sensitive data.
Search
1`iis_operational_logs` EventCode=29
2| stats count min(_time) as firstTime max(_time) as lastTime by OpCode EventCode ComputerName Message
3| rename ComputerName AS dest
4| `security_content_ctime(firstTime)`
5| `security_content_ctime(lastTime)`
6| `windows_iis_components_new_module_added_filter`
Data Source
Name | Platform | Sourcetype | Source |
---|---|---|---|
Windows IIS 29 | Windows | 'IIS:Configuration:Operational' |
'IIS:Configuration:Operational' |
Macros Used
Name | Value |
---|---|
iis_operational_logs | sourcetype="IIS:Configuration:Operational" |
windows_iis_components_new_module_added_filter | search * |
windows_iis_components_new_module_added_filter
is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
Setting | Value |
---|---|
Disabled | true |
Cron Schedule | 0 * * * * |
Earliest Time | -70m@m |
Latest Time | -10m@m |
Schedule Window | auto |
Creates Notable | Yes |
Rule Title | %name% |
Rule Description | %description% |
Notable Event Fields | user, dest |
Creates Risk Event | True |
Implementation
You must enabled the IIS Configuration Operational log before ingesting in Splunk. Setup and inputs may be found here https://gist.github.com/MHaggis/64396dfd9fc3734e1d1901a8f2f07040.
Known False Positives
False positives may be present when updates or an administrator adds a new module to IIS. Monitor and filter as needed.
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message | Risk Score | Impact | Confidence |
---|---|---|---|
A new IIS Module has been loaded and should be reviewed on $dest$. | 48 | 60 | 80 |
References
-
https://gist.github.com/MHaggis/64396dfd9fc3734e1d1901a8f2f07040
-
https://unit42.paloaltonetworks.com/unit42-oilrig-uses-rgdoor-iis-backdoor-targets-middle-east/
-
https://github.com/redcanaryco/atomic-red-team/tree/master/atomics/T1505.004
-
https://strontic.github.io/xcyclopedia/library/appcmd.exe-055B2B09409F980BF9B5A3969D01E5B2.html
Detection Testing
Test Type | Status | Dataset | Source | Sourcetype |
---|---|---|---|---|
Validation | ✅ Passing | N/A | N/A | N/A |
Unit | ✅ Passing | Dataset | IIS:Configuration:Operational |
IIS:Configuration:Operational |
Integration | ✅ Passing | Dataset | IIS:Configuration:Operational |
IIS:Configuration:Operational |
Replay any dataset to Splunk Enterprise by using our replay.py
tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub | Version: 3