[Rule Tuning] Use cidrMatch for eql rules checking multiple IPs (#431)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
creation_date = "2020/04/23"
|
||||
ecs_version = ["1.6.0"]
|
||||
maturity = "production"
|
||||
updated_date = "2020/10/28"
|
||||
updated_date = "2020/10/29"
|
||||
|
||||
[rule]
|
||||
author = ["Elastic"]
|
||||
@@ -34,7 +34,8 @@ query = '''
|
||||
sequence by process.entity_id
|
||||
[process where process.name == "telnet" and event.type == "start"]
|
||||
[network where process.name == "telnet" and
|
||||
destination.ip not in ("127.0.0.0/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "FE80::/10", "::1/128")]
|
||||
not cidrmatch(destination.ip, "127.0.0.0/8", "10.0.0.0/8", "172.16.0.0/12",
|
||||
"192.168.0.0/16", "FE80::/10", "::1/128")]
|
||||
'''
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
creation_date = "2020/04/23"
|
||||
ecs_version = ["1.6.0"]
|
||||
maturity = "production"
|
||||
updated_date = "2020/10/28"
|
||||
updated_date = "2020/10/29"
|
||||
|
||||
[rule]
|
||||
author = ["Elastic"]
|
||||
@@ -34,8 +34,8 @@ query = '''
|
||||
sequence by process.entity_id
|
||||
[process where process.name == "telnet" and event.type == "start"]
|
||||
[network where process.name == "telnet" and
|
||||
destination.ip in ("10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "FE80::/10") and
|
||||
destination.ip not in ("127.0.0.0/8", "::1/128")]
|
||||
cidrmatch(destination.ip, "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "FE80::/10") and
|
||||
not cidrmatch(destination.ip, "127.0.0.0/8", "::1/128")]
|
||||
'''
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user