logstash-codec-idmef 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ad1c943dcf4ab893042f3a2f1422dfa0a65ab106f70ea36f5b64c7588d5200bf
4
+ data.tar.gz: eb60b7f7dbe4171f683a474f20ed3f11d0c694d63d5a195c03330c31ccae6810
5
+ SHA512:
6
+ metadata.gz: f4f99f78a379d0feb60e3b05af8397eeb1fe7c840ac678c69a63edb7259cda2dce303825e33f75e5811506f39644a4db18986764fdb1b918db9302a9efc27f50
7
+ data.tar.gz: 005b837b9f15b6e09bb321884e63f018ab2270dd1a94d4c2498f4c06bff3a870b6b54f261b4cda22946e68d42bec2e605f4b10ce04ad3269b3312511ca9fba78
data/CHANGELOG.md ADDED
@@ -0,0 +1,2 @@
1
+ ## 0.9.0
2
+ - Initial release
data/CONTRIBUTORS ADDED
@@ -0,0 +1,13 @@
1
+ The following is a list of people who have contributed ideas, code, bug
2
+ reports, or in general have helped logstash along its way.
3
+
4
+ Maintainers:
5
+ * Prelude Team
6
+
7
+ Contributors:
8
+ * Prelude Team
9
+
10
+ Note: If you've sent us patches, bug reports, or otherwise contributed to
11
+ Logstash, and you aren't on the list above and want to be, please let us know
12
+ and we'll make sure you're here. Contributions from folks like you are what make
13
+ open source awesome.
data/DEVELOPER.md ADDED
@@ -0,0 +1,3 @@
1
+ # logstash-codec-idmef
2
+ IDMEF codec plugin.
3
+ RFC: https://tools.ietf.org/html/rfc4765
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ logstash_path = ENV["LOGSTASH_PATH"] || "../../logstash"
6
+ use_logstash_source = ENV["LOGSTASH_SOURCE"] && ENV["LOGSTASH_SOURCE"].to_s == "1"
7
+
8
+ if Dir.exist?(logstash_path) && use_logstash_source
9
+ gem 'logstash-core', :path => "#{logstash_path}/logstash-core"
10
+ gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
11
+ end
data/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2020 Elastic and contributors
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
data/NOTICE.TXT ADDED
@@ -0,0 +1,5 @@
1
+ Elasticsearch
2
+ Copyright 2012-2015 Elasticsearch
3
+
4
+ This product includes software developed by The Apache Software
5
+ Foundation (http://www.apache.org/).
data/README.md ADDED
@@ -0,0 +1,102 @@
1
+ # Logstash Plugin
2
+
3
+ [![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-codec-idmef.svg)](https://travis-ci.org/logstash-plugins/logstash-codec-idmef)
4
+
5
+ This is a plugin for [Logstash](https://github.com/elastic/logstash).
6
+
7
+ It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
8
+
9
+ ## Documentation
10
+
11
+ Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one [central location](http://www.elastic.co/guide/en/logstash/current/).
12
+
13
+ - For formatting code or config example, you can use the asciidoc `[source,ruby]` directive
14
+ - For more asciidoc formatting tips, see the excellent reference here https://github.com/elastic/docs#asciidoc-guide
15
+
16
+ ## Need Help?
17
+
18
+ Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/logstash discussion forum.
19
+
20
+ ## Developing
21
+
22
+ ### 1. Plugin Developement and Testing
23
+
24
+ #### Code
25
+ - To get started, you'll need JRuby with the Bundler gem installed.
26
+
27
+ - Create a new plugin or clone and existing from the GitHub [logstash-plugins](https://github.com/logstash-plugins) organization.
28
+
29
+ - Install dependencies
30
+ ```sh
31
+ bundle install
32
+ ```
33
+
34
+ #### Test
35
+
36
+ ```sh
37
+ bundle exec rspec
38
+ ```
39
+
40
+ The Logstash code required to run the tests/specs is specified in the `Gemfile` by the line similar to:
41
+ ```ruby
42
+ gem "logstash", :github => "elasticsearch/logstash", :branch => "1.5"
43
+ ```
44
+ To test against another version or a local Logstash, edit the `Gemfile` to specify an alternative location, for example:
45
+ ```ruby
46
+ gem "logstash", :github => "elasticsearch/logstash", :ref => "master"
47
+ ```
48
+ ```ruby
49
+ gem "logstash", :path => "/your/local/logstash"
50
+ ```
51
+
52
+ Then update your dependencies and run your tests:
53
+
54
+ ```sh
55
+ bundle install
56
+ bundle exec rspec
57
+ ```
58
+
59
+ ### 2. Running your unpublished Plugin in Logstash
60
+
61
+ #### 2.1 Run in a local Logstash clone
62
+
63
+ - Edit Logstash `tools/Gemfile` and add the local plugin path, for example:
64
+ ```ruby
65
+ gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
66
+ ```
67
+ - Update Logstash dependencies
68
+ ```sh
69
+ rake vendor:gems
70
+ ```
71
+ - Run Logstash with your plugin
72
+ ```sh
73
+ bin/logstash -e 'filter {awesome {}}'
74
+ ```
75
+ At this point any modifications to the plugin code will be applied to this local Logstash setup. After modifying the plugin, simply rerun Logstash.
76
+
77
+ #### 2.2 Run in an installed Logstash
78
+
79
+ - Build your plugin gem
80
+ ```sh
81
+ gem build logstash-filter-awesome.gemspec
82
+ ```
83
+ - Install the plugin from the Logstash home
84
+ ```sh
85
+ # Logstash 2.3 and higher
86
+ bin/logstash-plugin install --no-verify
87
+
88
+ # Prior to Logstash 2.3
89
+ bin/plugin install --no-verify
90
+
91
+ ```
92
+ - Start Logstash and proceed to test the plugin
93
+
94
+ ## Contributing
95
+
96
+ All contributions are welcome: ideas, patches, documentation, bug reports, complaints, and even something you drew up on a napkin.
97
+
98
+ Programming is not a required skill. Whatever you've seen about open source and maintainers or community members saying "send patches or die" - you will not see that here.
99
+
100
+ It is more important to me that you are able to contribute.
101
+
102
+ For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
@@ -0,0 +1,138 @@
1
+ :plugin: idmef
2
+ :type: codec
3
+
4
+ ///////////////////////////////////////////
5
+ START - GENERATED VARIABLES, DO NOT EDIT!
6
+ ///////////////////////////////////////////
7
+ :version: %VERSION%
8
+ :release_date: %RELEASE_DATE%
9
+ :changelog_url: %CHANGELOG_URL%
10
+ :include_path: ../../../../logstash/docs/include
11
+ ///////////////////////////////////////////
12
+ END - GENERATED VARIABLES, DO NOT EDIT!
13
+ ///////////////////////////////////////////
14
+
15
+ [id="plugins-{type}s-{plugin}"]
16
+
17
+ === IDMEF codec plugin
18
+
19
+ include::{include_path}/plugin_header.asciidoc[]
20
+
21
+ ==== Description
22
+
23
+ Implementation of a Logstash codec for IDMEF based on RFC4765.
24
+ https://tools.ietf.org/html/rfc4765
25
+
26
+ [id="plugins-{type}s-{plugin}-options"]
27
+ ==== IDMEF Codec Configuration Options
28
+
29
+ [cols="<,<,<",options="header",]
30
+ |=======================================================================
31
+ |Setting |Input type|Required
32
+ | <<plugins-{type}s-{plugin}-paths>> |<<hash,hash>>|No
33
+ | <<plugins-{type}s-{plugin}-defaults>> |<<boolean,boolean>>|No
34
+ | <<plugins-{type}s-{plugin}-additionaldata>> |<<boolean,boolean>>|No
35
+ | <<plugins-{type}s-{plugin}-type>> |<<string,string>>|No
36
+ |=======================================================================
37
+
38
+ &nbsp;
39
+
40
+ [id="plugins-{type}s-{plugin}-paths"]
41
+ ===== `paths`
42
+
43
+ * Value type is <<hash,hash>>
44
+ * The defautl value is an empty `hash`.
45
+
46
+ This parameter let you add IDMEF paths to map from logstash event to IDMEF
47
+ field.
48
+
49
+ For example, if:
50
+ * the name of your alert is in `event.get('message')`
51
+ * the target host is in `event.get('host')`
52
+ * the name of your analyzer is "ACME"
53
+
54
+ you probably want to put this:
55
+
56
+ output {
57
+ tcp {
58
+ codec => idmef {
59
+ paths => {
60
+ "alert.classification.text" => "$message"
61
+ "alert.target(0).node.name" => "$host"
62
+ "alert.analyzer(0).name" => "ACME"
63
+ }
64
+ }
65
+ # ...
66
+ }
67
+ }
68
+
69
+ The keys of the hash are IDMEF path as described here:
70
+ https://redmine.secef.net/projects/secef/wiki/LibPrelude_IDMEF_path
71
+
72
+ The values of the hash are values to set in final IDMEF. If a value starts with
73
+ a `$`, then the plugin try to retrieve the value from the event.
74
+
75
+ [id="plugins-{type}s-{plugin}-defaults"]
76
+ ===== `defaults`
77
+
78
+ * Value type is <<boolean,boolean>>
79
+ * Default value is `true`
80
+
81
+ Try to use default paths mapping or not.
82
+
83
+ Default paths are:
84
+ * alert.classification.text: ["$rule_name", "$event", "$message"]
85
+ * alert.detect_time: "$@timestamp"
86
+ * alert.create_time: "$@timestamp"
87
+ * alert.analyzer_time: "$@timestamp"
88
+ * alert.analyzer(0).name: ["$product", "$devname"]
89
+ * alert.analyzer(0).manufacturer: "$vendor"
90
+ * alert.source(0).node.address(0).address: ["$srcip", "$src"]
91
+ * alert.source(0).node.name: ["$shost", "$srchost", "$shostname", "$srchostname", "$sname", "$srcname"]
92
+ * alert.source(0).service.port: ["$spt", "$sport", "$s_port"]
93
+ * alert.source(0).service.name: ["$sservice", "$srcservice"]
94
+ * alert.target(0).node.address(0).address: ["$hostip", "$dstip", "$dst", "$ip"]
95
+ * alert.target(0).node.name: ["$host", "$hostname", "$shost", "$srchost", "$shostname", "$srchostname", "$sname", "$srcname"]
96
+ * alert.target(0).service.port: ["$dpt", "$dport", "$d_port"]
97
+ * alert.target(0).service.name: ["$service", "$service_id", "$dservice", "$dstservice",]
98
+ * alert.target(0).user.user_id(0).name: ["$user", "$dstuser", "$duser"]
99
+ * alert.target(0).user.user_id(0).number: ["$uid", "$dstuid", "$duid"]
100
+ * alert.target(0).process.name: ["$proc", "$process"]
101
+ * alert.target(0).process.pid: ["$dpid", "$pid"]
102
+ * alert.assessment.impact.severity: ["$severity", "$level"]
103
+ * alert.assessment.action.description: ["$action"]
104
+
105
+ [id="plugins-{type}s-{plugin}-additionaldata"]
106
+ ===== `additionaldata`
107
+
108
+ * Value type is <<boolean,boolean>>
109
+ * Default value is `true`
110
+
111
+ When an alert is transformed in IDMEF, the remaining fields of the initial
112
+ event are translated into IDMEF's Additional Data. If you don't want to do this
113
+ translation, set this setting to `false`.
114
+
115
+ [id="plugins-{type}s-{plugin}-type"]
116
+ ===== `type`
117
+
118
+ * Value type is <<string,string>>
119
+ * Default value is `"alert"`
120
+
121
+ IDMEF can defined two types of message:
122
+ * alert
123
+
124
+ RFC definition: Generally, every time an analyzer detects an event that it has
125
+ been configured to look for, it sends an Alert message to its manager(s).
126
+ Depending on the analyzer, an Alert message may correspond to a single detected
127
+ event or multiple detected events. Alerts occur asynchronously in response to
128
+ outside events.
129
+
130
+ * heartbeat
131
+
132
+ RFC definition: Analyzers use Heartbeat messages to indicate their current
133
+ status to managers. Heartbeats are intended to be sent in a regular period,
134
+ say, every ten minutes or every hour. The receipt of a Heartbeat message from
135
+ an analyzer indicates to the manager that the analyzer is up and running; lack
136
+ of a Heartbeat message (or more likely, lack of some number of consecutive
137
+ Heartbeat messages) indicates that the analyzer or its network connection has
138
+ failed.
@@ -0,0 +1,489 @@
1
+ # encoding: utf-8
2
+ require "logstash/codecs/base"
3
+
4
+ require 'nokogiri'
5
+ require 'json'
6
+ require 'date'
7
+
8
+ # Implementation of a Logstash codec for IDMEF based on RFC4765.
9
+ # https://tools.ietf.org/html/rfc4765
10
+ class LogStash::Codecs::IDMEF < LogStash::Codecs::Base
11
+ config_name "idmef"
12
+
13
+ # This parameter let you add IDMEF paths to map from logstash event to IDMEF
14
+ # field.
15
+ #
16
+ # For example, if:
17
+ # * the name of your alert is in `event.get('message')`
18
+ # * the target host is in `event.get('host')`
19
+ # * the name of your analyzer is "ACME"
20
+ #
21
+ # you probably want to put this:
22
+ #
23
+ # output {
24
+ # tcp {
25
+ # codec => idmef {
26
+ # paths => {
27
+ # "alert.classification.text" => "$message"
28
+ # "alert.target(0).node.name" => "$host"
29
+ # "alert.analyzer(0).name" => "ACME"
30
+ # }
31
+ # }
32
+ # # ...
33
+ # }
34
+ # }
35
+ #
36
+ # The keys of the hash are IDMEF path as described here:
37
+ # https://redmine.secef.net/projects/secef/wiki/LibPrelude_IDMEF_path
38
+ #
39
+ # The values of the hash are values to set in final IDMEF. If a value starts with
40
+ # a `$`, then the plugin try to retrieve the value from the event.
41
+ config :paths, :validate => :array, :default => {}
42
+
43
+ # Try to use default paths mapping or not.
44
+ #
45
+ # Default paths are:
46
+ # * alert.classification.text: ["$rule_name", "$event", "$message"]
47
+ # * alert.detect_time: "$@timestamp"
48
+ # * alert.create_time: "$@timestamp"
49
+ # * alert.analyzer_time: "$@timestamp"
50
+ # * alert.analyzer(0).name: ["$product", "$devname"]
51
+ # * alert.analyzer(0).manufacturer: "$vendor"
52
+ # * alert.source(0).node.address(0).address: ["$srcip", "$src"]
53
+ # * alert.source(0).node.name: ["$shost", "$srchost", "$shostname", "$srchostname", "$sname", "$srcname"]
54
+ # * alert.source(0).service.port: ["$spt", "$sport", "$s_port"]
55
+ # * alert.source(0).service.name: ["$sservice", "$srcservice"]
56
+ # * alert.target(0).node.address(0).address: ["$hostip", "$dstip", "$dst", "$ip"]
57
+ # * alert.target(0).node.name: ["$host", "$hostname", "$shost", "$srchost", "$shostname", "$srchostname", "$sname", "$srcname"]
58
+ # * alert.target(0).service.port: ["$dpt", "$dport", "$d_port"]
59
+ # * alert.target(0).service.name: ["$service", "$service_id", "$dservice", "$dstservice",]
60
+ # * alert.target(0).user.user_id(0).name: ["$user", "$dstuser", "$duser"]
61
+ # * alert.target(0).user.user_id(0).number: ["$uid", "$dstuid", "$duid"]
62
+ # * alert.target(0).process.name: ["$proc", "$process"]
63
+ # * alert.target(0).process.pid: ["$dpid", "$pid"]
64
+ # * alert.assessment.impact.severity: ["$severity", "$level"]
65
+ # * alert.assessment.action.description: ["$action"]
66
+ config :defaults, :validate => :boolean, :default => true
67
+
68
+ # When an alert is transformed in IDMEF, the remaining fields of the initial
69
+ # event are translated into IDMEF's Additional Data. If you don't want to do this
70
+ # translation, set this setting to `false`.
71
+ config :additionaldata, :validate => :boolean, :default => true
72
+
73
+ # IDMEF can defined two types of message:
74
+ # * alert
75
+ #
76
+ # RFC definition: Generally, every time an analyzer detects an event that it has
77
+ # been configured to look for, it sends an Alert message to its manager(s).
78
+ # Depending on the analyzer, an Alert message may correspond to a single detected
79
+ # event or multiple detected events. Alerts occur asynchronously in response to
80
+ # outside events.
81
+ #
82
+ # * heartbeat
83
+ #
84
+ # RFC definition: Analyzers use Heartbeat messages to indicate their current
85
+ # status to managers. Heartbeats are intended to be sent in a regular period,
86
+ # say, every ten minutes or every hour. The receipt of a Heartbeat message from
87
+ # an analyzer indicates to the manager that the analyzer is up and running; lack
88
+ # of a Heartbeat message (or more likely, lack of some number of consecutive
89
+ # Heartbeat messages) indicates that the analyzer or its network connection has
90
+ # failed.
91
+ config :type, :validate => :string, :default => "alert"
92
+
93
+ # RFC 4765: UserID Class
94
+ IDMEFUserId = { :type => :class,
95
+ :name => "UserId",
96
+ "name" => { :type => :list_value, :name => "name" },
97
+ "type" => { :type => :attr, :name => "type", :default => "original-user" },
98
+ "tty" => { :type => :attr, :name => "tty" },
99
+ "number" => { :type => :list_value, :name => "number" }
100
+ }
101
+
102
+ # RFC 4765: User Class
103
+ IDMEFUser = { :type => :class,
104
+ :name => "User",
105
+ "category" => { :type => :attr, :name => "category", :default => "unknown" },
106
+ "user_id" => { :type => :list_class, :class => IDMEFUserId }
107
+ }
108
+
109
+ # RFC 4765: FileAccess Class
110
+ IDMEFFileAccess = { :type => :class,
111
+ :name => "FileAccess",
112
+ "user_id" => { :type => :list_class, :class => IDMEFUserId }
113
+ }
114
+
115
+ # RFC 4765: File Class
116
+ IDMEFFile = { :type => :class,
117
+ :name => "File",
118
+ "category" => { :type => :attr, :name => "category" },
119
+ "fstype" => { :type => :attr, :name => "fstype" },
120
+ "file-type" => { :type => :attr, :name => "file-type" },
121
+ "name" => { :type => :list_value, :name => "name" },
122
+ "path" => { :type => :list_value, :name => "path" },
123
+ "file_access" => { :type => :list_class, :class => IDMEFFileAccess }
124
+ }
125
+
126
+ # RFC 4765: WebService Class
127
+ IDMEFWebService = { :type => :class,
128
+ :name => "WebService",
129
+ "url" => { :type => :list_value, :name => "url" }
130
+ }
131
+
132
+ # RFC 4765: SNMPService Class
133
+ IDMEFSNMPService = { :type => :class,
134
+ :name => "SNMPService",
135
+ "command" => { :type => :list_value, :name => "command" }
136
+ }
137
+
138
+ # RFC 4765: Service Class
139
+ IDMEFService = { :type => :class,
140
+ :name => "Service",
141
+ "ip_version" => { :type => :attr, :name => "ip_version" },
142
+ "iana_protocol_number" => { :type => :attr, :name => "iana_protocol_number" },
143
+ "iana_protocol_name" => { :type => :attr, :name => "iana_protocol_name" },
144
+ "name" => { :type => :list_value, :name => "name" },
145
+ "port" => { :type => :list_value, :name => "port" },
146
+ "portlist" => { :type => :list_value, :name => "portlist" },
147
+ "protocol" => { :type => :list_value, :name => "protocol" },
148
+ "web_service" => { :type => :list_class, :class => IDMEFWebService },
149
+ "snmp_service" => { :type => :list_class, :class => IDMEFSNMPService }
150
+ }
151
+
152
+ # RFC 4765: Address Class
153
+ IDMEFAddress = { :type => :class,
154
+ :name => "Address",
155
+ "category" => { :type => :attr, :name => "category", :default => "unknown" },
156
+ "vlan-name" => { :type => :attr, :name => "vlan-name" },
157
+ "vlan-num" => { :type => :attr, :name => "vlan-num" },
158
+ "address" => { :type => :list_value, :name => "address" },
159
+ "netmask" => { :type => :list_value, :name => "netmask" },
160
+ }
161
+
162
+ # RFC 4765: Node Class
163
+ IDMEFNode = { :type => :class,
164
+ :name => "Node",
165
+ "category" => { :type => :attr, :name => "category", :default => "unknown" },
166
+ "location" => { :type => :list_value, :name => "location" },
167
+ "name" => { :type => :list_value, :name => "name" },
168
+ "address" => { :type => :list_class, :class => IDMEFAddress },
169
+ }
170
+
171
+ # RFC 4765: Process Class
172
+ IDMEFProcess = { :type => :class,
173
+ :name => "Process",
174
+ "name" => { :type => :list_value, :name => "name" },
175
+ "pid" => { :type => :list_value, :name => "pid" },
176
+ "path" => { :type => :list_value, :name => "path" },
177
+ "arg" => { :type => :list_value, :name => "arg" },
178
+ "env" => { :type => :list_value, :name => "env" },
179
+ }
180
+
181
+ # RFC 4765: Analyzer Class
182
+ IDMEFAnalyzer = { :type => :class,
183
+ :name => "Analyzer",
184
+ "analyzerid" => { :type => :attr, :name => "analyzerid" },
185
+ "name" => { :type => :attr, :name => "name" },
186
+ "manufacturer" => { :type => :attr, :name => "manufacturer" },
187
+ "model" => { :type => :attr, :name => "model" },
188
+ "version" => { :type => :attr, :name => "version" },
189
+ "class" => { :type => :attr, :name => "class" },
190
+ "ostype" => { :type => :attr, :name => "ostype" },
191
+ "osversion" => { :type => :attr, :name => "osversion" },
192
+ "node" => { :type => :list_class, :class => IDMEFNode },
193
+ "process" => { :type => :list_class, :class => IDMEFProcess },
194
+ }
195
+ IDMEFAnalyzer["analyzer"] = { :type => :list_class, :class => IDMEFAnalyzer }
196
+
197
+ # RFC 4765: Source Class
198
+ IDMEFSource = { :type => :class,
199
+ :name => "Source",
200
+ "spoofed" => { :type => :attr, :name => "spoofed", :default => "unknown" },
201
+ "interface" => { :type => :attr, :name => "interface" },
202
+ "node" => { :type => :list_class, :class => IDMEFNode },
203
+ "user" => { :type => :list_class, :class => IDMEFUser },
204
+ "process" => { :type => :list_class, :class => IDMEFProcess },
205
+ "service" => { :type => :list_class, :class => IDMEFService },
206
+ }
207
+
208
+ # RFC 4765: Target Class
209
+ IDMEFTarget = { :type => :class,
210
+ :name => "Target",
211
+ "decoy" => { :type => :attr, :name => "decoy", :default => "unknown" },
212
+ "interface" => { :type => :attr, :name => "interface" },
213
+ "node" => { :type => :list_class, :class => IDMEFNode },
214
+ "user" => { :type => :list_class, :class => IDMEFUser },
215
+ "process" => { :type => :list_class, :class => IDMEFProcess },
216
+ "service" => { :type => :list_class, :class => IDMEFService },
217
+ "file" => { :type => :list_class, :class => IDMEFFile }
218
+ }
219
+
220
+ # RFC 4765: Impact Class
221
+ IDMEFImpact = { :type => :class,
222
+ :name => "Impact",
223
+ "severity" => { :type => :attr, :name => "severity" },
224
+ "completion" => { :type => :attr, :name => "completion" },
225
+ "type" => { :type => :attr, :name => "type", :default => "other" },
226
+ }
227
+
228
+ # RFC 4765: Action Class
229
+ IDMEFAction = { :type => :class,
230
+ :name => "Action",
231
+ "category" => { :type => :attr, :name => "category", :default => "other" },
232
+ "description" => { :type => :value },
233
+ }
234
+
235
+ # RFC 4765: Confidence Class
236
+ IDMEFConfidence = { :type => :class,
237
+ :name => "Confidence",
238
+ "rating" => { :type => :attr, :name => "rating", :default => "numeric" },
239
+ "confidence" => { :type => :value },
240
+ }
241
+
242
+ # RFC 4765: Reference Class
243
+ IDMEFReference = { :type => :class,
244
+ :name => "Reference",
245
+ "origin" => { :type => :attr, :name => "origin", :default => "unknown" },
246
+ "meaning" => { :type => :attr, :name => "meaning" },
247
+ "name" => { :type => :list_value, :name => "name" },
248
+ "url" => { :type => :list_value, :name => "url" }
249
+ }
250
+
251
+ # RFC 4765: AdditionalData Class
252
+ IDMEFAdditionalData = { :type => :class,
253
+ :name => "AdditionalData",
254
+ "meaning" => { :type => :attr, :name => "meaning" },
255
+ "type" => { :type => :attr, :name => "type" },
256
+ "data" => { :type => :value }
257
+ }
258
+ # RFC 4765: CorrelationAlert Class
259
+ IDMEFCorrelationAlert = { :type => :class,
260
+ :name => "CorrelationAlert",
261
+ "name" => { :type => :list_value, :name => "name" },
262
+ "alertident" => { :type => :list_value, :name => "alertident" }
263
+ }
264
+
265
+ # RFC 4765: Assessment Class
266
+ IDMEFAssessment = { :type => :class,
267
+ :name => "Assessment",
268
+ "impact" => { :type => :list_class, :class => IDMEFImpact },
269
+ "action" => { :type => :list_class, :class => IDMEFAction },
270
+ "confidence" => { :type => :list_class, :class => IDMEFConfidence }
271
+ }
272
+
273
+ # RFC 4765: Classification Class
274
+ IDMEFClassification = { :type => :class,
275
+ :name => "Classification",
276
+ "text" => { :type => :attr, :name => "text" },
277
+ "reference" => { :type => :list_class, :class => IDMEFReference }
278
+ }
279
+
280
+ # RFC 4765: Alert Class
281
+ IDMEFAlert = { :type => :class,
282
+ :name => "Alert",
283
+ "messageid" => { :type => :attr, :name => "messageid" },
284
+ "create_time" => { :type => :list_value, :name => "CreateTime", :format => :datetime},
285
+ "detect_time" => { :type => :list_value, :name => "DetectTime", :format => :datetime },
286
+ "analyzer_time" => { :type => :list_value, :name => "AnalyzerTime", :format => :datetime },
287
+ "analyzer" => { :type => :list_class, :class => IDMEFAnalyzer },
288
+ "classification" => { :type => :list_class, :class => IDMEFClassification },
289
+ "source" => { :type => :list_class, :class => IDMEFSource },
290
+ "target" => { :type => :list_class, :class => IDMEFTarget },
291
+ "assessment" => { :type => :list_class, :class => IDMEFAssessment },
292
+ "additional_data" => { :type => :list_class, :class => IDMEFAdditionalData },
293
+ "correlation_alert" => { :type => :list_class, :class => IDMEFCorrelationAlert },
294
+ }
295
+
296
+ # RFC 4765: Message Class
297
+ IDMEFMessage = { :type => :class,
298
+ :name => "IDMEF-Message",
299
+ "alert" => { :type => :list_class, :class => IDMEFAlert },
300
+ }
301
+ private
302
+ def idmefpaths_to_xml(event, paths, doc = nil)
303
+ if doc.nil?
304
+ doc = Nokogiri::XML::Document.new
305
+ doc.root = Nokogiri::XML::Node.new('IDMEF-Message', doc)
306
+ doc.root.add_namespace_definition('idmef', 'http://iana.org/idmef')
307
+ end
308
+ event_to_remove = []
309
+ paths.each do |path, value|
310
+ if !value.kind_of?(Array)
311
+ value = [value]
312
+ end
313
+ value.each do |v|
314
+ if v.to_s.start_with?("$")
315
+ c = ''
316
+ f = true
317
+ v[1..-1].split('.').each do |ppath|
318
+ if !event.get(c + '[' + ppath + ']').nil?
319
+ c = c + '[' + ppath + ']'
320
+ else
321
+ f = false
322
+ end
323
+ end
324
+ if !f then next end
325
+ value = event.get(c)
326
+ event_to_remove << c
327
+ else
328
+ value = v
329
+ end
330
+ end
331
+ if value.kind_of?(Array)
332
+ next
333
+ end
334
+ if value.kind_of?(String)
335
+ @utf8_charset.convert(value)
336
+ end
337
+ curr = doc.root
338
+ rfc = IDMEFMessage
339
+ path.split('.').each do |name|
340
+ ret = name.match(/^(.*)\((\d+)\)/)
341
+ if ret
342
+ name = ret[1]
343
+ v = (ret ? ret[2] : 0).to_i
344
+ end
345
+
346
+ ne = rfc[name][:class]
347
+ ne_t = rfc[name][:type]
348
+ path_idmef = rfc[name][:type] == :list_class ? ne[:name] : nil
349
+
350
+ if ret && ne_t == :list_class
351
+ c = curr.xpath(path_idmef)
352
+ if c.empty?
353
+ no = Nokogiri::XML::Node.new(ne[:name], doc)
354
+ curr << no
355
+ elsif c.length <= v
356
+ nod = c[-1]
357
+ (c.length..v).each do |t|
358
+ no = Nokogiri::XML::Node.new(ne[:name], doc)
359
+ nod.after(no)
360
+ nod = no
361
+ end
362
+ elsif c.length > v
363
+ no = c[v]
364
+ end
365
+ curr = no
366
+ rfc = ne
367
+ elsif !ret && ne_t == :list_class
368
+ no = curr.xpath(path_idmef).first || Nokogiri::XML::Node.new(ne[:name], doc)
369
+ curr << no
370
+ curr = no
371
+ rfc = ne
372
+ elsif ne_t == :list_value
373
+ if rfc[name][:format] == :datetime
374
+ value = DateTime.parse(value.to_s).strftime("%FT%T%:z")
375
+ end
376
+ no = Nokogiri::XML::Node.new(rfc[name][:name], doc)
377
+ no.content = value.to_s
378
+ curr << no
379
+ curr = no
380
+ elsif ne_t == :attr
381
+ if rfc[name][:format] == :datetime
382
+ value = DateTime.parse(value.to_s).strftime("%FT%T%:z")
383
+ end
384
+ curr[rfc[name][:name]] = value.to_s
385
+ elsif ne_t == :value
386
+ if rfc[name][:format] == :datetime
387
+ value = DateTime.parse(value.to_s).strftime("%FT%T%:z")
388
+ end
389
+ curr.content = value.to_s
390
+ end
391
+ rfc.each do |kk, vv|
392
+ if vv.respond_to?(:each_pair) && vv[:default] && vv[:type] == :attr && !curr[vv[:name]]
393
+ curr[vv[:name]] = vv[:default]
394
+ end
395
+ end
396
+ end
397
+ end
398
+ event_to_remove.each do |v|
399
+ event.remove(v)
400
+ end
401
+ return doc
402
+ end
403
+
404
+ private
405
+ def xml_to_string(doc)
406
+ doc.root.traverse { |node|
407
+ if node.type != Nokogiri::XML::Node::TEXT_NODE
408
+ node.name = 'idmef:' + node.name
409
+ end
410
+ }
411
+ return doc.serialize(:save_with => Nokogiri::XML::Node::SaveOptions::AS_XML).sub("\n", "").strip
412
+ end
413
+
414
+ public
415
+ def initialize(params={})
416
+ super(params)
417
+ @utf8_charset = LogStash::Util::Charset.new('UTF-8')
418
+ @utf8_charset.logger = self.logger
419
+
420
+ @local_paths = {
421
+ "alert.classification.text" => ["$rule_name", "$event", "$message"],
422
+ "alert.detect_time" => "$@timestamp",
423
+ "alert.create_time" => "$@timestamp",
424
+ "alert.analyzer_time" => "$@timestamp",
425
+ "alert.analyzer(0).name" => ["$product", "$devname"],
426
+ "alert.analyzer(0).manufacturer" => "$vendor",
427
+ "alert.source(0).node.address(0).address" => ["$srcip", "$src"],
428
+ "alert.source(0).node.name" => ["$shost", "$srchost", "$shostname", "$srchostname", "$sname", "$srcname"],
429
+ "alert.source(0).service.port" => ["$spt", "$sport", "$s_port"],
430
+ "alert.source(0).service.name" => ["$sservice", "$srcservice"],
431
+ "alert.target(0).node.address(0).address" => ["$hostip", "$dstip", "$dst", "$ip"],
432
+ "alert.target(0).node.name" => ["$host", "$hostname", "$shost", "$srchost", "$shostname", "$srchostname", "$sname", "$srcname"],
433
+ "alert.target(0).service.port" => ["$dpt", "$dport", "$d_port"],
434
+ "alert.target(0).service.name" => ["$service", "$service_id", "$dservice", "$dstservice",],
435
+ "alert.target(0).user.user_id(0).name" => ["$user", "$dstuser", "$duser"],
436
+ "alert.target(0).user.user_id(0).number" => ["$uid", "$dstuid", "$duid"],
437
+ "alert.target(0).process.name" => ["$proc", "$process"],
438
+ "alert.target(0).process.pid" => ["$dpid", "$pid"],
439
+ "alert.assessment.impact.severity" => ["$severity", "$level"],
440
+ "alert.assessment.action.description" => ["$action"],
441
+ }
442
+ if @defaults
443
+ @allpaths = @local_paths.merge(@paths)
444
+ else
445
+ @allpaths = @paths
446
+ end
447
+ end
448
+
449
+ public
450
+ def encode(event)
451
+ # Reload configuration
452
+ @allpaths = @allpaths.merge(@paths)
453
+
454
+ # Copy event
455
+ e = event.clone
456
+
457
+ # Set paths
458
+ xml = idmefpaths_to_xml(e, @allpaths)
459
+
460
+ # Set messageid
461
+ if !@allpaths.key?("%s.messageid" % @type)
462
+ xml = idmefpaths_to_xml(e, {"%s.messageid" % @type => java.util.UUID.randomUUID.to_s}, xml)
463
+ end
464
+
465
+ # Set Additional data
466
+ if @additionaldata
467
+ idx = xml.xpath('/IDMEF-Message/Alert/AddionnalData').length
468
+ e.to_hash.each do |key, value|
469
+ if value.kind_of?(Integer)
470
+ t = "integer"
471
+ elsif value.kind_of?(Float)
472
+ t = "real"
473
+ else
474
+ t = "string"
475
+ end
476
+ p = { "alert.additional_data(%d).meaning" % idx => key,
477
+ "alert.additional_data(%d).data" % idx => value.to_s,
478
+ "alert.additional_data(%d).type" % idx => t,
479
+ }
480
+ xml = idmefpaths_to_xml(e, p , xml)
481
+ idx = idx + 1
482
+ end
483
+ end
484
+
485
+ # Create the XML
486
+ @on_event.call(event, xml_to_string(xml) + NL)
487
+ end
488
+
489
+ end
@@ -0,0 +1,29 @@
1
+ Gem::Specification.new do |s|
2
+
3
+ s.name = 'logstash-codec-idmef'
4
+ s.version = '0.9.0'
5
+ s.licenses = ['Apache License (2.0)']
6
+ s.summary = "Create IDMEF in XML"
7
+ s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
8
+ s.authors = ["Prelude Team"]
9
+ s.email = 'support.prelude@c-s.fr'
10
+ s.homepage = "https://www.prelude-siem.com"
11
+ s.require_paths = ["lib"]
12
+
13
+ # Files
14
+ s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "VERSION", "docs/**/*"]
15
+
16
+ # Tests
17
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
+
19
+ # Special flag to let us know this is actually a logstash plugin
20
+ s.metadata = { "logstash_plugin" => "true", "logstash_group" => "codec" }
21
+
22
+ # Gem dependencies
23
+ s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
24
+ s.add_runtime_dependency "logstash-codec-plain"
25
+ s.add_runtime_dependency 'nokogiri'
26
+
27
+ s.add_development_dependency 'logstash-devutils'
28
+ s.add_development_dependency 'insist'
29
+ end
@@ -0,0 +1,25 @@
1
+ # encoding: utf-8
2
+ require "logstash/devutils/rspec/spec_helper"
3
+ require "logstash/codecs/idmef"
4
+ require "logstash/util/charset"
5
+ require 'insist'
6
+
7
+ describe LogStash::Codecs::IDMEF do
8
+
9
+ context "encode IDMEF" do
10
+ subject(:codec) { LogStash::Codecs::IDMEF.new }
11
+
12
+ let(:expected_result) { %Q(<?xml version="1.0"?><idmef:IDMEF-Message xmlns:idmef="http://iana.org/idmef"><idmef:Alert messageid="67a63ad4-11b9-4ee2-8aee-d1c032a13b35"><idmef:Classification text="Login attempt"/><idmef:DetectTime>2020-05-24T09:05:26+00:00</idmef:DetectTime><idmef:CreateTime>2020-05-24T09:05:26+00:00</idmef:CreateTime><idmef:AnalyzerTime>2020-05-24T09:05:26+00:00</idmef:AnalyzerTime><idmef:Target decoy="unknown"><idmef:Node category="unknown"><idmef:name category="unknown">localhost.localdomain</idmef:name></idmef:Node></idmef:Target><idmef:AdditionalData meaning="@version" type="string">1</idmef:AdditionalData></idmef:Alert></idmef:IDMEF-Message>\n) }
13
+ let(:results) { []}
14
+
15
+ it "should return proper IDMEF XML from event" do
16
+ codec.on_event{|data, newdata| results << newdata}
17
+ codec.paths = {"alert.messageid" => "67a63ad4-11b9-4ee2-8aee-d1c032a13b35" }
18
+ event = LogStash::Event.new("@timestamp" => DateTime.parse("2020-05-24T09:05:26.758Z").to_time, "host" => "localhost.localdomain", "message" => "Login attempt", "@version" => "1")
19
+ codec.encode(event)
20
+ insist {results.first} == expected_result
21
+ end
22
+
23
+ end
24
+
25
+ end
metadata ADDED
@@ -0,0 +1,135 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: logstash-codec-idmef
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.0
5
+ platform: ruby
6
+ authors:
7
+ - Prelude Team
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-05-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '1.60'
19
+ - - "<="
20
+ - !ruby/object:Gem::Version
21
+ version: '2.99'
22
+ name: logstash-core-plugin-api
23
+ prerelease: false
24
+ type: :runtime
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '1.60'
30
+ - - "<="
31
+ - !ruby/object:Gem::Version
32
+ version: '2.99'
33
+ - !ruby/object:Gem::Dependency
34
+ requirement: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ name: logstash-codec-plain
40
+ prerelease: false
41
+ type: :runtime
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ requirement: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ name: nokogiri
54
+ prerelease: false
55
+ type: :runtime
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ - !ruby/object:Gem::Dependency
62
+ requirement: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ name: logstash-devutils
68
+ prerelease: false
69
+ type: :development
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ - !ruby/object:Gem::Dependency
76
+ requirement: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ name: insist
82
+ prerelease: false
83
+ type: :development
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ description: This gem is a Logstash plugin required to be installed on top of the
90
+ Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
91
+ gem is not a stand-alone program
92
+ email: support.prelude@c-s.fr
93
+ executables: []
94
+ extensions: []
95
+ extra_rdoc_files: []
96
+ files:
97
+ - CHANGELOG.md
98
+ - CONTRIBUTORS
99
+ - DEVELOPER.md
100
+ - Gemfile
101
+ - LICENSE
102
+ - NOTICE.TXT
103
+ - README.md
104
+ - docs/index.asciidoc
105
+ - lib/logstash/codecs/idmef.rb
106
+ - logstash-codec-idmef.gemspec
107
+ - spec/codecs/idmef_spec.rb
108
+ homepage: https://www.prelude-siem.com
109
+ licenses:
110
+ - Apache License (2.0)
111
+ metadata:
112
+ logstash_plugin: 'true'
113
+ logstash_group: codec
114
+ post_install_message:
115
+ rdoc_options: []
116
+ require_paths:
117
+ - lib
118
+ required_ruby_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ required_rubygems_version: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ requirements: []
129
+ rubyforge_project:
130
+ rubygems_version: 2.7.10
131
+ signing_key:
132
+ specification_version: 4
133
+ summary: Create IDMEF in XML
134
+ test_files:
135
+ - spec/codecs/idmef_spec.rb