-
Notifications
You must be signed in to change notification settings - Fork 523
Trendmicro Integration #4471
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
Trendmicro Integration #4471
Changes from 1 commit
7b7eca3
184e65d
afda179
6f5650b
49d4388
901a246
297707c
26bc475
075d8e9
b0a7a09
619be4b
85e3de1
1f88608
0029449
71e7bb3
08be261
f2b2ce8
29d8791
ba4e43d
ead1de9
da03297
95d5c24
c6bbea2
8be15ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| dependencies: | ||
| ecs: | ||
| reference: [email protected] | ||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,16 @@ | ||||
| # Trendmicro Integration | ||||
emnp marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
|
||||
| This is an integration for parsing trendmicro events. It can accept | ||||
| data over syslog or read it from a file. | ||||
|
|
||||
| ## Compatibility | ||||
|
|
||||
| The trendmicro deepsecurity log has been developed against Deep Security 12 Long-Term Support but is expected to work with other versions. | ||||
|
|
||||
| ## Logs | ||||
|
|
||||
| # Deep Security Logs | ||||
|
|
||||
| Deep Security logs collect the trendmicro deep security logs. | ||||
|
|
||||
| {{fields "deep_security"}} | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
What is the goal here ? {{fields "deep_security"}} is not parsable here and will cause errors, please remove it and add relevant info. If you want to add the fields .. then please add them manually or use json tags .
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ShourieG , yes actually I would like to add the fields and I think
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| version: '2.3' | ||
| services: | ||
| trendmicro-log-logfile: | ||
| image: alpine | ||
| volumes: | ||
| - ./sample_logs:/sample_logs:ro | ||
| - ${SERVICE_LOGS_DIR}:/var/log | ||
| command: /bin/sh -c "cp /sample_logs/* /var/log/" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| CEF:0|Trend Micro|Deep Security Agent|10.2.229|4000000|Eicar_test_file|6|cn1=1 cn1Label=Host ID dvchost=hostname cn2=205 cn2Label=Quarantine File Size cs6=ContainerImageName | ContainerName | ContainerID cs6Label=Container filePath=C:\\Users\\trend\\Desktop\\eicar.exe act=Delete msg=Realtime TrendMicroDsMalwareTarget=N/A TrendMicroDsMalwareTargetType=N/A TrendMicroDsFileMD5=44D88612FEA8A8F36DE82E1278ABB02F TrendMicroDsFileSHA1=3395856CE81F2B7382DEE72602F798B642F14140 TrendMicroDsFileSHA256=275A021BBFB6489E54D471899F7DB9D1663FC695EC2FE2A2C4538AABF651FD0F TrendMicroDsDetectionConfidence=95 TrendMicroDsRelevantDetectionNames=Ransom_CERBER.BZC;Ransom_CERBER.C;Ransom_CRYPNISCA.SM | ||
emnp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| CEF:0|Trend Micro|Deep Security Agent|10.2.229|5000000|WebReputation|5|cn1=1 cn1Label=Host ID dvchost=hostname request=example.com msg=Blocked By Admin | ||
| CEF:0|Trend Micro|Deep Security Agent|10.2.229|6001200|AppControl detectOnly|6|cn1=202 cn1Label=Host ID dvc=192.168.33.128 TrendMicroDsTenant=Primary TrendMicroDsTenantId=0 fileHash=80D4AC182F97D2AB48EE4310AC51DA5974167C596D133D64A83107B9069745E0 suser=root suid=0 act=detectOnly filePath=/home/user1/Desktop/Directory1//heartbeatSync.sh fsize=20 aggregationType=0 repeatCount=1 cs1=notWhitelisted cs1Label=actionReason cs2=0CC9713BA896193A527213D9C94892D41797EB7C cs2Label=sha1 cs3=7EA8EF10BEB2E9876D4D7F7E5A46CF8D cs3Label=md5 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # newer versions go on top | ||
| - version: "0.0.1" | ||
emnp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| changes: | ||
| - description: Initial draft of the package | ||
| type: enhancement | ||
| link: https://github.com/elastic/integrations/pull/1 # FIXME Replace with the real PR link | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #dynamic_fields: | ||
| # event.ingested: ".*" | ||
kcreddy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| fields: | ||
| tags: | ||
| - preserve_original_event | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| CEF:0|Trend Micro|Deep Security Manager|10.2.229|600|User Signed In|3|src=10.52.116.160 suser=admin target=admin msg=User signed in from 2001:db8::5 | ||
| CEF:0|Trend Micro|Deep Security Agent|10.2.229|4000000|Eicar_test_file|6|cn1=1 cn1Label=Host ID dvchost=hostname cn2=205 cn2Label=Quarantine File Size cs6=ContainerImageName | ContainerName | ContainerID cs6Label=Container filePath=C:\\Users\\trend\\Desktop\\eicar.exe act=Delete msg=Realtime TrendMicroDsMalwareTarget=N/A TrendMicroDsMalwareTargetType=N/TrendMicroDsFileMD5=44D88612FEA8A8F36DE82E1278ABB02F TrendMicroDsFileSHA1=3395856CE81F2B7382DEE72602F798B642F14140 TrendMicroDsFileSHA256=275A021BBFB6489E54D471899F7DB9D1663FC695EC2FE2A2C4538AABF651FD0F TrendMicroDsDetectionConfidence=95 TrendMicroDsRelevantDetectionNames=Ransom_CERBER.BZC;Ransom_CERBER.C;Ransom_CRYPNISCA.SM |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| { | ||
| "expected": [ | ||
| { | ||
| "ecs": { | ||
| "version": "8.4.0" | ||
emnp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| "error": { | ||
| "message": "For input string: \\\"\\\"" | ||
|
||
| }, | ||
| "event": { | ||
| "ingested": "2022-10-18T09:04:35.311147327Z" | ||
| }, | ||
| "tags": [ | ||
| "preserve_original_event" | ||
| ], | ||
| "trendmicro": { | ||
| "event": { | ||
| "message": "CEF:0|Trend Micro|Deep Security Manager|10.2.229|600|User Signed In|3|src=10.52.116.160 suser=admin target=admin msg=User signed in from 2001:db8::5", | ||
| "signature_id": "" | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "ecs": { | ||
| "version": "8.4.0" | ||
| }, | ||
| "error": { | ||
| "message": "For input string: \\\"\\\"" | ||
| }, | ||
| "event": { | ||
| "ingested": "2022-10-18T09:04:35.311175329Z" | ||
| }, | ||
| "tags": [ | ||
| "preserve_original_event" | ||
| ], | ||
| "trendmicro": { | ||
| "event": { | ||
| "message": "CEF:0|Trend Micro|Deep Security Agent|10.2.229|4000000|Eicar_test_file|6|cn1=1 cn1Label=Host ID dvchost=hostname cn2=205 cn2Label=Quarantine File Size cs6=ContainerImageName | ContainerName | ContainerID cs6Label=Container filePath=C:\\\\Users\\\\trend\\\\Desktop\\\\eicar.exe act=Delete msg=Realtime TrendMicroDsMalwareTarget=N/A TrendMicroDsMalwareTargetType=N/TrendMicroDsFileMD5=44D88612FEA8A8F36DE82E1278ABB02F TrendMicroDsFileSHA1=3395856CE81F2B7382DEE72602F798B642F14140 TrendMicroDsFileSHA256=275A021BBFB6489E54D471899F7DB9D1663FC695EC2FE2A2C4538AABF651FD0F TrendMicroDsDetectionConfidence=95 TrendMicroDsRelevantDetectionNames=Ransom_CERBER.BZC;Ransom_CERBER.C;Ransom_CRYPNISCA.SM", | ||
| "signature_id": "" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| vars: ~ | ||
| service: trendmicro-log-logfile | ||
| input: logfile | ||
| data_stream: | ||
| vars: | ||
| paths: | ||
| - "{{SERVICE_LOGS_DIR}}/trendmicro.log" | ||
| decode_trendmicro_timezone: UTC |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| paths: | ||
| {{#each paths as |path i|}} | ||
| - {{path}} | ||
| {{/each}} | ||
| exclude_files: [".gz$"] | ||
| tags: | ||
| {{#if preserve_original_event}} | ||
| - preserve_original_event | ||
| {{/if}} | ||
| {{#each tags as |tag i|}} | ||
| - {{tag}} | ||
| {{/each}} | ||
| {{#contains "forwarded" tags}} | ||
| publisher_pipeline.disable_host: true | ||
| {{/contains}} | ||
| processors: | ||
| - rename: | ||
| fields: | ||
| - {from: "message", to: "event.original"} | ||
| - decode_cef: | ||
| field: event.original | ||
| {{#if decode_trendmicro_timezone}} | ||
| timezone: {{ decode_trendmicro_timezone }} | ||
| {{/if}} | ||
| {{#if processors}} | ||
| {{processors}} | ||
| {{/if}} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| host: "{{syslog_host}}:{{syslog_port}}" | ||
| tags: | ||
| {{#if preserve_original_event}} | ||
| - preserve_original_event | ||
| {{/if}} | ||
| {{#each tags as |tag i|}} | ||
| - {{tag}} | ||
| {{/each}} | ||
| {{#contains "forwarded" tags}} | ||
| publisher_pipeline.disable_host: true | ||
| {{/contains}} | ||
| processors: | ||
| - rename: | ||
| fields: | ||
| - {from: "message", to: "event.original"} | ||
| - decode_cef: | ||
| field: event.original | ||
| {{#if decode_cef_timezone}} | ||
| timezone: {{ decode_cef_timezone }} | ||
| {{/if}} | ||
| {{#if processors}} | ||
| {{processors}} | ||
| {{/if}} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| --- | ||
| description: Pipeline for processing Application Control event logs | ||
| processors: | ||
| - set: | ||
| field: trendmicro.event.category | ||
| value: "app-control" | ||
| - script: | ||
| lang: painless | ||
| params: | ||
| extensions: | ||
| # Rename field | ||
| - name: deviceCustomNumber1 | ||
| to: host.id | ||
| - name: deviceCustomString1 | ||
| to: trendmicro.event.action_reason | ||
| - name: deviceCustomString3 | ||
| to: file.hash.md5 | ||
| - name: deviceCustomString2 | ||
| to: file.hash.sha1 | ||
| - name: fileHash | ||
| to: file.hash.sha256 | ||
| - name: deviceAddress | ||
| to: host.ip | ||
| - name: deviceHostName | ||
| to: host.hostname | ||
| - name: TrendMicroDsTags | ||
| to: trendmicro.event.tags | ||
| - name: TrendMicroDsTenantId | ||
| to: trendmicro.event.tenant_id | ||
| - name: TrendMicroDsTenant | ||
| to: trendmicro.event.tenant_name | ||
| - name: aggregationType | ||
| to: trendmicro.event.aggregation_type | ||
| convert: | ||
| "0": The event is not aggregated | ||
| "1": The event is aggregated based on file name,path,and event type | ||
| "2": The event is aggregated based on event type | ||
| - name: repeatCount | ||
| to: trendmicro.event.count | ||
| #- name: event.severity | ||
emnp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # to: log.syslog.severity.name | ||
| # convert: | ||
| # '0': emergency | ||
| # '1': alert | ||
| # '2': critical | ||
| # '3': error | ||
| # '4': warning | ||
| # '5': notice | ||
| # '6': informational | ||
| # '7': debug | ||
|
|
||
| source: | | ||
| def actions = new ArrayList(); | ||
| def exts = ctx.cef?.extensions; | ||
| if (exts == null) return; | ||
| for (entry in params.extensions) { | ||
| def value = exts[entry.name]; | ||
| if (value == null || | ||
| (entry.convert != null && | ||
| (value=entry.convert[value.toLowerCase()]) == null)) | ||
| continue; | ||
| if (entry.to != null) { | ||
| actions.add([ | ||
| "value": value, | ||
| "to": entry.to | ||
| ]); | ||
| continue; | ||
| } | ||
| def label = exts[entry.name + "Label"]; | ||
| if (label == null) continue; | ||
| def dest = entry.labels[label.toLowerCase()]; | ||
| if (dest == null) continue; | ||
| actions.add([ | ||
| "value": value, | ||
| "to": dest | ||
| ]); | ||
| } | ||
| ctx["_tmp_copy"] = actions; | ||
| - foreach: | ||
| field: _tmp_copy | ||
| processor: | ||
| set: | ||
| field: "{{_ingest._value.to}}" | ||
| value: "{{_ingest._value.value}}" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add |
||
|
|
||
| - remove: | ||
| field: | ||
| - _tmp_copy | ||
kcreddy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| on_failure: | ||
| - set: | ||
| field: error.message | ||
| value: "{{ _ingest.on_failure_message }}" | ||
Uh oh!
There was an error while loading. Please reload this page.