IIS HTTP Logging Disabled
Identifies when Internet Information Services (IIS) HTTP Logging is disabled on a server. An attacker with IIS server access via a webshell or other mechanism can disable HTTP Logging as an effective anti-forensics measure.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/04/14"
3integration = ["endpoint", "windows"]
4maturity = "production"
5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
6min_stack_version = "8.3.0"
7updated_date = "2023/06/22"
8
9[rule]
10author = ["Elastic"]
11description = """
12Identifies when Internet Information Services (IIS) HTTP Logging is disabled on a server. An attacker with IIS server
13access via a webshell or other mechanism can disable HTTP Logging as an effective anti-forensics measure.
14"""
15from = "now-9m"
16index = ["winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*", "endgame-*"]
17language = "eql"
18license = "Elastic License v2"
19max_signals = 33
20name = "IIS HTTP Logging Disabled"
21note = """## Triage and analysis
22
23### Investigating IIS HTTP Logging Disabled
24
25IIS (Internet Information Services) is a Microsoft web server software used to host websites and web applications on Windows. It provides features for serving dynamic and static content, and can be managed through a graphical interface or command-line tools.
26
27IIS logging is a data source that can be used for security monitoring, forensics, and incident response. It contains mainly information related to requests done to the web server, and can be used to spot malicious activities like webshells. Adversaries can tamper, clear, and delete this data to evade detection, cover their tracks, and slow down incident response.
28
29This rule monitors commands that disable IIS logging.
30
31#### Possible investigation steps
32
33- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
34- Identify the user account that performed the action and whether it should perform this kind of action.
35- Contact the account owner and confirm whether they are aware of this activity.
36- Investigate other alerts associated with the user/host during the past 48 hours.
37 - Verify if any other anti-forensics behaviors were observed.
38- Verify whether the logs stored in the `C:\\inetpub\\logs\\logfiles\\w3svc1` directory were deleted after this action.
39- Check if this operation is done under change management and approved according to the organization's policy.
40
41### False positive analysis
42
43- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.
44
45### Response and remediation
46
47- Initiate the incident response process based on the outcome of the triage.
48- Isolate the involved host to prevent further post-compromise behavior.
49- Re-enable affected logging components, services, and security monitoring.
50- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
51- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
52- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
53- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
54
55## Setup
56
57If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.
58"""
59risk_score = 73
60rule_id = "ebf1adea-ccf2-4943-8b96-7ab11ca173a5"
61severity = "high"
62tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Defense Evasion", "Data Source: Elastic Endgame", "Resources: Investigation Guide", "Data Source: Elastic Defend"]
63timestamp_override = "event.ingested"
64type = "eql"
65
66query = '''
67process where host.os.type == "windows" and event.type == "start" and
68 (process.name : "appcmd.exe" or process.pe.original_file_name == "appcmd.exe") and
69 process.args : "/dontLog*:*True" and
70 not process.parent.name : "iissetup.exe"
71'''
72
73
74[[rule.threat]]
75framework = "MITRE ATT&CK"
76[[rule.threat.technique]]
77id = "T1562"
78name = "Impair Defenses"
79reference = "https://attack.mitre.org/techniques/T1562/"
80[[rule.threat.technique.subtechnique]]
81id = "T1562.002"
82name = "Disable Windows Event Logging"
83reference = "https://attack.mitre.org/techniques/T1562/002/"
84
85
86
87[rule.threat.tactic]
88id = "TA0005"
89name = "Defense Evasion"
90reference = "https://attack.mitre.org/tactics/TA0005/"
Triage and analysis
Investigating IIS HTTP Logging Disabled
IIS (Internet Information Services) is a Microsoft web server software used to host websites and web applications on Windows. It provides features for serving dynamic and static content, and can be managed through a graphical interface or command-line tools.
IIS logging is a data source that can be used for security monitoring, forensics, and incident response. It contains mainly information related to requests done to the web server, and can be used to spot malicious activities like webshells. Adversaries can tamper, clear, and delete this data to evade detection, cover their tracks, and slow down incident response.
This rule monitors commands that disable IIS logging.
Possible investigation steps
- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
- Identify the user account that performed the action and whether it should perform this kind of action.
- Contact the account owner and confirm whether they are aware of this activity.
- Investigate other alerts associated with the user/host during the past 48 hours.
- Verify if any other anti-forensics behaviors were observed.
- Verify whether the logs stored in the
C:\inetpub\logs\logfiles\w3svc1
directory were deleted after this action. - Check if this operation is done under change management and approved according to the organization's policy.
False positive analysis
- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.
Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Isolate the involved host to prevent further post-compromise behavior.
- Re-enable affected logging components, services, and security monitoring.
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
Setup
If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define event.ingested
and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate event.ingested
to @timestamp for this rule to work.
Related rules
- Adding Hidden File Attribute via Attrib
- Clearing Windows Console History
- Clearing Windows Event Logs
- Code Signing Policy Modification Through Built-in tools
- Code Signing Policy Modification Through Registry