Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Adds Authentication module with six ML jobs for ECS data (Auditbeat, Winlogbeat, Filebeat and Logs) #101840

Merged
merged 14 commits into from
Jun 14, 2021
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"icon": "logoSecurity"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"id": "security_auth",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the expected response for the auditbeat data set used in the x-pack/test/api_integration/apis/ml/modules/recognize_module·ts test needs editing, to add in the ID of the new module security_auth which also now matches our test data set. This block here

    {
      testTitleSuffix: 'for auditbeat dataset',
      sourceDataArchive: 'x-pack/test/functional/es_archives/ml/module_auditbeat',
      indexPattern: 'ft_module_auditbeat',
      user: USER.ML_POWERUSER,
      expected: {
        responseCode: 200,
        moduleIds: ['auditbeat_process_hosts_ecs', 'security_linux', 'siem_auditbeat'],
      },
    },

"title": "Security: Authentication",
"description": "Detect anomalous activity in your ECS-compatible authentication logs.",
"type": "auth data",
"logoFile": "logo.json",
"defaultIndexPattern": "auditbeat-*,logs-*,filebeat-*,winlogbeat-*",
"query": {
"bool": {
"filter": [
{
"term": {
"event.category": "authentication"
}
}
]
}
},
"jobs": [
{
"id": "auth_high_count_logon_events_for_a_source_ip",
"file": "auth_high_count_logon_events_for_a_source_ip.json"
},
{
"id": "auth_high_count_logon_fails",
"file": "auth_high_count_logon_fails.json"
},
{
"id": "auth_high_count_logon_events",
"file": "auth_high_count_logon_events.json"
},
{
"id": "auth_rare_hour_for_a_user",
"file": "auth_rare_hour_for_a_user.json"
},
{
"id": "auth_rare_source_ip_for_a_user",
"file": "auth_rare_source_ip_for_a_user.json"
},
{
"id": "auth_rare_user",
"file": "auth_rare_user.json"
}
],
"datafeeds": [
{
"id": "datafeed-auth_high_count_logon_events_for_a_source_ip",
"file": "datafeed_auth_high_count_logon_events_for_a_source_ip.json",
"job_id": "auth_high_count_logon_events_for_a_source_ip"
},
{
"id": "datafeed-auth_high_count_logon_fails",
"file": "datafeed_auth_high_count_logon_fails.json",
"job_id": "auth_high_count_logon_fails"
},
{
"id": "datafeed-auth_high_count_logon_events",
"file": "datafeed_auth_high_count_logon_events.json",
"job_id": "auth_high_count_logon_events"
},
{
"id": "datafeed-auth_rare_hour_for_a_user",
"file": "datafeed_auth_rare_hour_for_a_user.json",
"job_id": "auth_rare_hour_for_a_user"
},
{
"id": "datafeed-auth_rare_source_ip_for_a_user",
"file": "datafeed_auth_rare_source_ip_for_a_user.json",
"job_id": "auth_rare_source_ip_for_a_user"
},
{
"id": "datafeed-auth_rare_user",
"file": "datafeed_auth_rare_user.json",
"job_id": "auth_rare_user"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"job_type": "anomaly_detector",
"description": "",
"groups": [
"security",
"authentication"
],
"analysis_config": {
"bucket_span": "15m",
"detectors": [
{
"detector_description": "high count of logon events",
"function": "high_non_zero_count",
"detector_index": 0
}
],
"influencers": []
},
"allow_lazy_open": true,
"analysis_limits": {
"model_memory_limit": "2mb"
},
"data_description": {
"time_field": "@timestamp"
},
"custom_settings": {
"created_by": "ml-module-security-auth"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"job_type": "anomaly_detector",
"description": "",
"groups": [
"security",
"authentication"
],
"analysis_config": {
"bucket_span": "15m",
"detectors": [
{
"detector_description": "high count of auth events for a source IP",
"function": "high_non_zero_count",
"by_field_name": "source.ip",
"detector_index": 0
}
],
"influencers": [
"source.ip",
"winlog.event_data.LogonType",
"user.name"
]
},
"allow_lazy_open": true,
"analysis_limits": {
"model_memory_limit": "12mb"
},
"data_description": {
"time_field": "@timestamp"
},
"custom_settings": {
"created_by": "ml-module-security-auth"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"job_type": "anomaly_detector",
"description": "",
"groups": [
"security",
"authentication"
],
"analysis_config": {
"bucket_span": "15m",
"detectors": [
{
"detector_description": "high count of logon fails",
"function": "high_non_zero_count",
"detector_index": 0
}
],
"influencers": []
},
"allow_lazy_open": true,
"analysis_limits": {
"model_memory_limit": "2mb"
},
"data_description": {
"time_field": "@timestamp"
},
"custom_settings": {
"created_by": "ml-module-security-auth"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"job_type": "anomaly_detector",
"description": "",
"groups": [
"security",
"authentication"
],
"analysis_config": {
"bucket_span": "15m",
"detectors": [
{
"detector_description": "rare hour for a user",
"function": "time_of_day",
"by_field_name": "user.name",
"detector_index": 0
}
],
"influencers": [
"source.ip",
"user.name"
]
},
"allow_lazy_open": true,
"analysis_limits": {
"model_memory_limit": "3mb"
},
"data_description": {
"time_field": "@timestamp"
},
"custom_settings": {
"created_by": "ml-module-security-auth"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"job_type": "anomaly_detector",
"description": "",
"groups": [
"security",
"authentication"
],
"analysis_config": {
"bucket_span": "15m",
"detectors": [
{
"detector_description": "rare source IP for a user",
"function": "rare",
"by_field_name": "source.ip",
"partition_field_name": "user.name",
"detector_index": 0
}
],
"influencers": [
"source.ip",
"user.name"
]
},
"allow_lazy_open": true,
"analysis_limits": {
"model_memory_limit": "6mb"
},
"data_description": {
"time_field": "@timestamp"
},
"custom_settings": {
"created_by": "ml-module-security-auth"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"job_type": "anomaly_detector",
"description": "",
"groups": [
"security",
"authentication"
],
"analysis_config": {
"bucket_span": "15m",
"detectors": [
{
"detector_description": "rare user",
"function": "rare",
"by_field_name": "user.name",
"detector_index": 0
}
],
"influencers": [
"source.ip",
"user.name"
]
},
"allow_lazy_open": true,
"analysis_limits": {
"model_memory_limit": "2mb"
},
"data_description": {
"time_field": "@timestamp"
},
"custom_settings": {
"created_by": "ml-module-security-auth"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"job_id": "auth_high_count_logon_events",
"indices": [
"auditbeat-*",
"logs-*",
"filebeat-*",
"winlogbeat-*"
],
"max_empty_searches": 10,
"query": {
"bool": {
"filter": [
{
"term": {
"event.category": "authentication"
}
},
{
"term": {
"event.outcome": "success"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"job_id": "auth_high_count_logon_events_for_a_source_ip",
"indices": [
"auditbeat-*",
"logs-*",
"filebeat-*",
"winlogbeat-*"
],
"max_empty_searches": 10,
"query": {
"bool": {
"filter": [
{
"term": {
"event.category": "authentication"
}
},
{
"term": {
"event.outcome": "success"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"job_id": "auth_high_count_logon_fails",
"indices": [
"auditbeat-*",
"logs-*",
"filebeat-*",
"winlogbeat-*"
],
"max_empty_searches": 10,
"query": {
"bool": {
"filter": [
{
"term": {
"event.category": "authentication"
}
},
{
"term": {
"event.outcome": "failure"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"job_id": "auth_rare_hour_for_a_user",
"indices": [
"auditbeat-*",
"logs-*",
"filebeat-*",
"winlogbeat-*"
],
"max_empty_searches": 10,
"query": {
"bool": {
"filter": [
{
"term": {
"event.category": "authentication"
}
},
{
"term": {
"event.outcome": "success"
}
}
]
}
}
}
Loading