-
Notifications
You must be signed in to change notification settings - Fork 419
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
fortinet_fortiedr: new package for Fortinet FortiEDR ingestion #4070
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dependencies: | ||
ecs: | ||
reference: git@v8.3.0 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Fortinet FortiEDR Integration | ||
|
||
This integration is for Fortinet FortiEDR logs sent in the syslog format. | ||
|
||
## Configuration | ||
|
||
The Fortinet FortiEDR integration requires that the **Send Syslog Notification** opion be turned on in the FortiEDR Playbook policy that includes the devices that are to be monitored by the integration. | ||
|
||
### Log | ||
|
||
The `log` dataset collects Fortinet FortiEDR logs. | ||
|
||
{{event "log"}} | ||
|
||
{{fields "log"}} |
18 changes: 18 additions & 0 deletions
18
packages/fortinet_fortiedr/_dev/deploy/docker/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: '2.3' | ||
services: | ||
fortinet-logfile: | ||
image: alpine | ||
volumes: | ||
- ./sample_logs:/sample_logs:ro | ||
- ${SERVICE_LOGS_DIR}:/var/log | ||
command: /bin/sh -c "cp /sample_logs/* /var/log/" | ||
fortinet-edr-tcp: | ||
image: docker.elastic.co/observability/stream:v0.7.0 | ||
volumes: | ||
- ./sample_logs:/sample_logs:ro | ||
command: log --start-signal=SIGHUP --delay=5s --addr elastic-agent:9514 -p=tcp /sample_logs/fortinet-edr.log | ||
fortinet-edr-udp: | ||
image: docker.elastic.co/observability/stream:v0.7.0 | ||
volumes: | ||
- ./sample_logs:/sample_logs:ro | ||
command: log --start-signal=SIGHUP --delay=5s --addr elastic-agent:9515 -p=udp /sample_logs/fortinet-edr.log |
1 change: 1 addition & 0 deletions
1
packages/fortinet_fortiedr/_dev/deploy/docker/sample_logs/fortinet-edr.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<133>1 2019-09-18T06:42:18.000Z 1.1.1.1 enSilo - - - Organization: Demo;Organization ID: 156646;Event ID: 458478; Raw Data ID: 1270886879;Device Name: WIN10-VICTIM;Operating System: Windows 10 Pro N; Process Name: svchost.exe;Process Path: \Device\HarddiskVolume4\Windows\System32\svchost.exe; Process Type: 64bit;Severity: Critical;Classification: Suspicious;Destination: File Creation; First Seen: 18-Sep-2019, 02:42:18;Last Seen: 18-Sep-2019, 02:42:18;Action: Blocked;Count: 1; Certificate: yes;Rules List: File Encryptor - Suspicious file modification;Users: WIN10-VICTIM\U; MAC Address: 00-0C-29-D4-75-EC;Script: N/A;Script Path: N/A;Autonomous System: N/A;Country: N/A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# newer versions go on top | ||
- version: "1.0.0" | ||
changes: | ||
- description: Initial version of Fortinet FortiEDR package | ||
type: enhancement | ||
link: https://github.com/elastic/integrations/pull/4070 |
3 changes: 3 additions & 0 deletions
3
packages/fortinet_fortiedr/data_stream/log/_dev/test/pipeline/test-common-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fields: | ||
tags: | ||
- preserve_original_event |
2 changes: 2 additions & 0 deletions
2
packages/fortinet_fortiedr/data_stream/log/_dev/test/pipeline/test-generated.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<133>1 2019-09-18T06:42:18.000Z 1.1.1.1 enSilo - - - Organization: Demo;Organization ID: 156646;Event ID: 458478; Raw Data ID: 1270886879;Device Name: WIN10-VICTIM;Operating System: Windows 10 Pro N; Process Name: svchost.exe;Process Path: \Device\HarddiskVolume4\Windows\System32\svchost.exe; Process Type: 64bit;Severity: Critical;Classification: Suspicious;Destination: File Creation; First Seen: 18-Sep-2019, 02:42:18;Last Seen: 18-Sep-2019, 02:42:18;Action: Blocked;Count: 1; Certificate: yes;Rules List: File Encryptor - Suspicious file modification;Users: WIN10-VICTIM\U; MAC Address: 00-0C-29-D4-75-EC;Script: N/A;Script Path: N/A;Autonomous System: N/A;Country: N/A | ||
<133>1 2019-09-18T07:42:18.000Z 1.1.1.1 enSilo 8710 - - Organization: Demo;Organization ID: 156646;Event ID: 458478; Raw Data ID: 1270886879;Device Name: WIN10-VICTIM;Operating System: Windows 10 Pro N; Process Name: svchost.exe;Process Path: \Device\HarddiskVolume4\Windows\System32\svchost.exe; Process Type: 64bit;Severity: Critical;Classification: Suspicious;Destination: File Creation; First Seen: 18-Sep-2019, 02:42:18;Last Seen: 18-Sep-2019, 02:42:18;Action: Blocked;Count: 1; Certificate: yes;Rules List: File Encryptor - Suspicious file modification;Users: WIN10-VICTIM\U; MAC Address: 00-0C-29-D4-75-EC;Script: N/A;Script Path: N/A;Autonomous System: N/A;Country: N/A |
183 changes: 183 additions & 0 deletions
183
...ges/fortinet_fortiedr/data_stream/log/_dev/test/pipeline/test-generated.log-expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
{ | ||
"expected": [ | ||
{ | ||
"@timestamp": "2019-09-18T06:42:18.000Z", | ||
"ecs": { | ||
"version": "8.4.0" | ||
}, | ||
"event": { | ||
"action": "blocked", | ||
"category": "malware", | ||
"end": "2019-09-18T02:42:18.000Z", | ||
"id": "458478", | ||
"original": "\u003c133\u003e1 2019-09-18T06:42:18.000Z 1.1.1.1 enSilo - - - Organization: Demo;Organization ID: 156646;Event ID: 458478; Raw Data ID: 1270886879;Device Name: WIN10-VICTIM;Operating System: Windows 10 Pro N; Process Name: svchost.exe;Process Path: \\Device\\HarddiskVolume4\\Windows\\System32\\svchost.exe; Process Type: 64bit;Severity: Critical;Classification: Suspicious;Destination: File Creation; First Seen: 18-Sep-2019, 02:42:18;Last Seen: 18-Sep-2019, 02:42:18;Action: Blocked;Count: 1; Certificate: yes;Rules List: File Encryptor - Suspicious file modification;Users: WIN10-VICTIM\\U; MAC Address: 00-0C-29-D4-75-EC;Script: N/A;Script Path: N/A;Autonomous System: N/A;Country: N/A", | ||
"start": "2019-09-18T02:42:18.000Z" | ||
}, | ||
"fortinet": { | ||
"edr": { | ||
"action": "Blocked", | ||
"autonomous_system": "N/A", | ||
"certificate": "yes", | ||
"classification": "Suspicious", | ||
"count": "1", | ||
"country": "N/A", | ||
"destination": "File Creation", | ||
"device_name": "WIN10-VICTIM", | ||
"event_id": "458478", | ||
"first_seen": "2019-09-18T02:42:18.000Z", | ||
"last_seen": "2019-09-18T02:42:18.000Z", | ||
"mac_address": "00-0C-29-D4-75-EC", | ||
"operating_system": "Windows 10 Pro N", | ||
"organization": "Demo", | ||
"organization_id": "156646", | ||
"process_name": "svchost.exe", | ||
"process_path": "\\Device\\HarddiskVolume4\\Windows\\System32\\svchost.exe", | ||
"process_type": "64bit", | ||
"raw_data_id": "1270886879", | ||
"rules_list": "File Encryptor - Suspicious file modification", | ||
"script": "N/A", | ||
"script_path": "N/A", | ||
"severity": "Critical", | ||
"users": "WIN10-VICTIM\\U" | ||
} | ||
}, | ||
"host": { | ||
"hostname": "WIN10-VICTIM", | ||
"mac": [ | ||
"00-0C-29-D4-75-EC" | ||
], | ||
"os": { | ||
"full": "Windows 10 Pro N" | ||
} | ||
}, | ||
"log": { | ||
"syslog": { | ||
"appname": "enSilo", | ||
"facility": { | ||
"code": 16 | ||
}, | ||
"hostname": "1.1.1.1", | ||
"priority": 133, | ||
"severity": { | ||
"code": 5 | ||
}, | ||
"version": "1" | ||
} | ||
}, | ||
"observer": { | ||
"product": "FortiEDR", | ||
"type": "edr", | ||
"vendor": "Fortinet" | ||
}, | ||
"process": { | ||
"executable": "\\Device\\HarddiskVolume4\\Windows\\System32\\svchost.exe", | ||
"name": "svchost.exe" | ||
}, | ||
"related": { | ||
"hosts": [ | ||
"WIN10-VICTIM", | ||
"1.1.1.1" | ||
], | ||
"user": [ | ||
"WIN10-VICTIM\\U" | ||
] | ||
}, | ||
"tags": [ | ||
"preserve_original_event" | ||
], | ||
"user": { | ||
"id": "WIN10-VICTIM\\U" | ||
} | ||
}, | ||
{ | ||
"@timestamp": "2019-09-18T07:42:18.000Z", | ||
"ecs": { | ||
"version": "8.4.0" | ||
}, | ||
"event": { | ||
"action": "blocked", | ||
"category": "malware", | ||
"end": "2019-09-18T02:42:18.000Z", | ||
"id": "458478", | ||
"original": "\u003c133\u003e1 2019-09-18T07:42:18.000Z 1.1.1.1 enSilo 8710 - - Organization: Demo;Organization ID: 156646;Event ID: 458478; Raw Data ID: 1270886879;Device Name: WIN10-VICTIM;Operating System: Windows 10 Pro N; Process Name: svchost.exe;Process Path: \\Device\\HarddiskVolume4\\Windows\\System32\\svchost.exe; Process Type: 64bit;Severity: Critical;Classification: Suspicious;Destination: File Creation; First Seen: 18-Sep-2019, 02:42:18;Last Seen: 18-Sep-2019, 02:42:18;Action: Blocked;Count: 1; Certificate: yes;Rules List: File Encryptor - Suspicious file modification;Users: WIN10-VICTIM\\U; MAC Address: 00-0C-29-D4-75-EC;Script: N/A;Script Path: N/A;Autonomous System: N/A;Country: N/A", | ||
"start": "2019-09-18T02:42:18.000Z" | ||
}, | ||
"fortinet": { | ||
"edr": { | ||
"action": "Blocked", | ||
"autonomous_system": "N/A", | ||
"certificate": "yes", | ||
"classification": "Suspicious", | ||
"count": "1", | ||
"country": "N/A", | ||
"destination": "File Creation", | ||
"device_name": "WIN10-VICTIM", | ||
"event_id": "458478", | ||
"first_seen": "2019-09-18T02:42:18.000Z", | ||
"last_seen": "2019-09-18T02:42:18.000Z", | ||
"mac_address": "00-0C-29-D4-75-EC", | ||
"operating_system": "Windows 10 Pro N", | ||
"organization": "Demo", | ||
"organization_id": "156646", | ||
"process_name": "svchost.exe", | ||
"process_path": "\\Device\\HarddiskVolume4\\Windows\\System32\\svchost.exe", | ||
"process_type": "64bit", | ||
"raw_data_id": "1270886879", | ||
"rules_list": "File Encryptor - Suspicious file modification", | ||
"script": "N/A", | ||
"script_path": "N/A", | ||
"severity": "Critical", | ||
"users": "WIN10-VICTIM\\U" | ||
} | ||
}, | ||
"host": { | ||
"hostname": "WIN10-VICTIM", | ||
"mac": [ | ||
"00-0C-29-D4-75-EC" | ||
], | ||
"os": { | ||
"full": "Windows 10 Pro N" | ||
} | ||
}, | ||
"log": { | ||
"syslog": { | ||
"appname": "enSilo", | ||
"facility": { | ||
"code": 16 | ||
}, | ||
"hostname": "1.1.1.1", | ||
"priority": 133, | ||
"procid": "8710", | ||
"severity": { | ||
"code": 5 | ||
}, | ||
"version": "1" | ||
} | ||
}, | ||
"observer": { | ||
"product": "FortiEDR", | ||
"type": "edr", | ||
"vendor": "Fortinet" | ||
}, | ||
"process": { | ||
"executable": "\\Device\\HarddiskVolume4\\Windows\\System32\\svchost.exe", | ||
"name": "svchost.exe" | ||
}, | ||
"related": { | ||
"hosts": [ | ||
"WIN10-VICTIM", | ||
"1.1.1.1" | ||
], | ||
"user": [ | ||
"WIN10-VICTIM\\U" | ||
] | ||
}, | ||
"tags": [ | ||
"preserve_original_event" | ||
], | ||
"user": { | ||
"id": "WIN10-VICTIM\\U" | ||
} | ||
} | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/fortinet_fortiedr/data_stream/log/_dev/test/system/test-logfile-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
service: fortinet-logfile | ||
input: logfile | ||
data_stream: | ||
vars: | ||
paths: | ||
- "{{SERVICE_LOGS_DIR}}/*edr*.log" | ||
preserve_original_event: true |
8 changes: 8 additions & 0 deletions
8
packages/fortinet_fortiedr/data_stream/log/_dev/test/system/test-tcp-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
service: fortinet-edr-tcp | ||
service_notify_signal: SIGHUP | ||
input: tcp | ||
data_stream: | ||
vars: | ||
tcp_host: 0.0.0.0 | ||
tcp_port: 9514 | ||
preserve_original_event: true |
8 changes: 8 additions & 0 deletions
8
packages/fortinet_fortiedr/data_stream/log/_dev/test/system/test-udp-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
service: fortinet-edr-udp | ||
service_notify_signal: SIGHUP | ||
input: udp | ||
data_stream: | ||
vars: | ||
udp_host: 0.0.0.0 | ||
udp_port: 9515 | ||
preserve_original_event: true |
20 changes: 20 additions & 0 deletions
20
packages/fortinet_fortiedr/data_stream/log/agent/stream/log.yml.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
paths: | ||
{{#each paths as |path|}} | ||
- {{path}} | ||
{{/each}} | ||
exclude_files: [".gz$"] | ||
tags: | ||
{{#if preserve_original_event}} | ||
- preserve_original_event | ||
{{/if}} | ||
{{#each tags as |tag|}} | ||
- {{tag}} | ||
{{/each}} | ||
{{#contains "forwarded" tags}} | ||
publisher_pipeline.disable_host: true | ||
{{/contains}} | ||
processors: | ||
- add_locale: ~ | ||
{{#if processors}} | ||
{{processors}} | ||
{{/if}} |
17 changes: 17 additions & 0 deletions
17
packages/fortinet_fortiedr/data_stream/log/agent/stream/tcp.yml.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
tcp: | ||
host: "{{tcp_host}}:{{tcp_port}}" | ||
tags: | ||
{{#if preserve_original_event}} | ||
- preserve_original_event | ||
{{/if}} | ||
{{#each tags as |tag|}} | ||
- {{tag}} | ||
{{/each}} | ||
{{#contains "forwarded" tags}} | ||
publisher_pipeline.disable_host: true | ||
{{/contains}} | ||
processors: | ||
{{#if processors}} | ||
{{processors}} | ||
{{/if}} | ||
- add_locale: ~ |
17 changes: 17 additions & 0 deletions
17
packages/fortinet_fortiedr/data_stream/log/agent/stream/udp.yml.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
udp: | ||
host: "{{udp_host}}:{{udp_port}}" | ||
tags: | ||
{{#if preserve_original_event}} | ||
- preserve_original_event | ||
{{/if}} | ||
{{#each tags as |tag|}} | ||
- {{tag}} | ||
{{/each}} | ||
{{#contains "forwarded" tags}} | ||
publisher_pipeline.disable_host: true | ||
{{/contains}} | ||
processors: | ||
{{#if processors}} | ||
{{processors}} | ||
{{/if}} | ||
- add_locale: ~ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we bump this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done