|
| 1 | +[metadata] |
| 2 | +creation_date = "2025/11/19" |
| 3 | +integration = ["nginx", "apache", "apache_tomcat", "iis"] |
| 4 | +maturity = "production" |
| 5 | +updated_date = "2025/11/19" |
| 6 | + |
| 7 | +[rule] |
| 8 | +author = ["Elastic"] |
| 9 | +description = """ |
| 10 | +This rule detects unusual spikes in error logs from web servers, which may indicate reconnaissance activities such |
| 11 | +as vulnerability scanning or fuzzing attempts by adversaries. These activities often generate a high volume of error |
| 12 | +responses as they probe for weaknesses in web applications. Error response codes may potentially indicate server-side |
| 13 | +issues that could be exploited. |
| 14 | +""" |
| 15 | +from = "now-61m" |
| 16 | +interval = "1h" |
| 17 | +language = "esql" |
| 18 | +license = "Elastic License v2" |
| 19 | +name = "Web Server Unusual Spike in Error Logs" |
| 20 | +risk_score = 47 |
| 21 | +rule_id = "6631a759-4559-4c33-a392-13f146c8bcc4" |
| 22 | +severity = "medium" |
| 23 | +tags = [ |
| 24 | + "Domain Scope: Single", |
| 25 | + "Domain: Web", |
| 26 | + "OS: Linux", |
| 27 | + "OS: macOS", |
| 28 | + "OS: Windows", |
| 29 | + "Use Case: Threat Detection", |
| 30 | + "Tactic: Reconnaissance", |
| 31 | + "Data Source: Network Packet Capture", |
| 32 | + "Data Source: Nginx", |
| 33 | + "Data Source: Apache", |
| 34 | + "Data Source: Apache Tomcat", |
| 35 | + "Data Source: IIS", |
| 36 | +] |
| 37 | +timestamp_override = "event.ingested" |
| 38 | +type = "esql" |
| 39 | +query = ''' |
| 40 | +from |
| 41 | + logs-nginx.error-*, |
| 42 | + logs-apache.error-*, |
| 43 | + logs-apache.error-*, |
| 44 | + logs-iis.error-* |
| 45 | +| where |
| 46 | + @timestamp > now() - 1 hours |
| 47 | +| keep |
| 48 | + @timestamp, |
| 49 | + event.type, |
| 50 | + event.dataset, |
| 51 | + source.ip, |
| 52 | + agent.id, |
| 53 | + host.name |
| 54 | +| stats |
| 55 | + Esql.event_count = count(), |
| 56 | + Esql.host_name_values = values(host.name), |
| 57 | + Esql.agent_id_values = values(agent.id), |
| 58 | + Esql.event_dataset_values = values(event.dataset) |
| 59 | + by source.ip |
| 60 | +| where |
| 61 | + Esql.event_count > 25 |
| 62 | +| limit 100 |
| 63 | +''' |
| 64 | + |
| 65 | +[[rule.threat]] |
| 66 | +framework = "MITRE ATT&CK" |
| 67 | + |
| 68 | +[[rule.threat.technique]] |
| 69 | +id = "T1595" |
| 70 | +name = "Active Scanning" |
| 71 | +reference = "https://attack.mitre.org/techniques/T1595/" |
| 72 | + |
| 73 | +[[rule.threat.technique.subtechnique]] |
| 74 | +id = "T1595.002" |
| 75 | +name = "Vulnerability Scanning" |
| 76 | +reference = "https://attack.mitre.org/techniques/T1595/002/" |
| 77 | + |
| 78 | +[[rule.threat.technique.subtechnique]] |
| 79 | +id = "T1595.003" |
| 80 | +name = "Wordlist Scanning" |
| 81 | +reference = "https://attack.mitre.org/techniques/T1595/003/" |
| 82 | + |
| 83 | +[rule.threat.tactic] |
| 84 | +id = "TA0043" |
| 85 | +name = "Reconnaissance" |
| 86 | +reference = "https://attack.mitre.org/tactics/TA0043/" |
0 commit comments