mihari 0.17.4 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.rubocop.yml +155 -0
- data/.travis.yml +7 -1
- data/Gemfile +2 -0
- data/README.md +41 -72
- data/config/pre_commit.yml +3 -0
- data/docker/Dockerfile +1 -1
- data/lib/mihari.rb +12 -8
- data/lib/mihari/alert_viewer.rb +16 -34
- data/lib/mihari/analyzers/base.rb +7 -19
- data/lib/mihari/analyzers/basic.rb +3 -1
- data/lib/mihari/analyzers/binaryedge.rb +3 -3
- data/lib/mihari/analyzers/censys.rb +2 -2
- data/lib/mihari/analyzers/circl.rb +2 -2
- data/lib/mihari/analyzers/onyphe.rb +3 -3
- data/lib/mihari/analyzers/passivetotal.rb +2 -2
- data/lib/mihari/analyzers/pulsedive.rb +2 -2
- data/lib/mihari/analyzers/securitytrails.rb +2 -2
- data/lib/mihari/analyzers/securitytrails_domain_feed.rb +2 -2
- data/lib/mihari/analyzers/shodan.rb +2 -2
- data/lib/mihari/analyzers/virustotal.rb +2 -2
- data/lib/mihari/analyzers/zoomeye.rb +2 -2
- data/lib/mihari/cli.rb +13 -4
- data/lib/mihari/config.rb +68 -2
- data/lib/mihari/configurable.rb +1 -1
- data/lib/mihari/database.rb +68 -0
- data/lib/mihari/emitters/base.rb +1 -1
- data/lib/mihari/emitters/database.rb +29 -0
- data/lib/mihari/emitters/misp.rb +8 -1
- data/lib/mihari/emitters/slack.rb +4 -2
- data/lib/mihari/emitters/stdout.rb +2 -1
- data/lib/mihari/emitters/the_hive.rb +28 -14
- data/lib/mihari/models/alert.rb +11 -0
- data/lib/mihari/models/artifact.rb +27 -0
- data/lib/mihari/models/tag.rb +10 -0
- data/lib/mihari/models/tagging.rb +10 -0
- data/lib/mihari/notifiers/slack.rb +7 -4
- data/lib/mihari/serializers/alert.rb +12 -0
- data/lib/mihari/serializers/artifact.rb +9 -0
- data/lib/mihari/serializers/tag.rb +9 -0
- data/lib/mihari/slack_monkeypatch.rb +16 -0
- data/lib/mihari/status.rb +1 -1
- data/lib/mihari/type_checker.rb +1 -1
- data/lib/mihari/version.rb +1 -1
- data/mihari.gemspec +13 -6
- metadata +140 -36
- data/lib/mihari/artifact.rb +0 -36
- data/lib/mihari/cache.rb +0 -35
- data/lib/mihari/the_hive.rb +0 -42
- data/lib/mihari/the_hive/alert.rb +0 -25
- data/lib/mihari/the_hive/artifact.rb +0 -33
- data/lib/mihari/the_hive/base.rb +0 -14
data/lib/mihari/emitters/base.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mihari
|
4
|
+
module Emitters
|
5
|
+
class Database < Base
|
6
|
+
def valid?
|
7
|
+
true
|
8
|
+
end
|
9
|
+
|
10
|
+
def emit(title:, description:, artifacts:, source:, tags: [])
|
11
|
+
return if artifacts.empty?
|
12
|
+
|
13
|
+
tags = tags.map { |name| Tag.find_or_create_by(name: name) }.compact.uniq
|
14
|
+
taggings = tags.map { |tag| Tagging.new(tag_id: tag.id) }
|
15
|
+
|
16
|
+
alert = Alert.new(
|
17
|
+
title: title,
|
18
|
+
description: description,
|
19
|
+
artifacts: artifacts,
|
20
|
+
source: source,
|
21
|
+
taggings: taggings
|
22
|
+
)
|
23
|
+
|
24
|
+
alert.save
|
25
|
+
alert
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/mihari/emitters/misp.rb
CHANGED
@@ -6,6 +6,13 @@ require "net/ping"
|
|
6
6
|
module Mihari
|
7
7
|
module Emitters
|
8
8
|
class MISP < Base
|
9
|
+
def initialize
|
10
|
+
::MISP.configure do |config|
|
11
|
+
config.api_endpoint = Mihari.config.misp_api_endpoint
|
12
|
+
config.api_key = Mihari.config.misp_api_key
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
9
16
|
# @return [true, false]
|
10
17
|
def valid?
|
11
18
|
api_endpoint? && api_key? && ping?
|
@@ -28,7 +35,7 @@ module Mihari
|
|
28
35
|
private
|
29
36
|
|
30
37
|
def config_keys
|
31
|
-
%w(
|
38
|
+
%w(misp_api_endpoint misp_api_key)
|
32
39
|
end
|
33
40
|
|
34
41
|
def build_attribute(artifact)
|
@@ -4,6 +4,8 @@ require "slack-notifier"
|
|
4
4
|
require "digest/sha2"
|
5
5
|
require "mem"
|
6
6
|
|
7
|
+
require "mihari/slack_monkeypatch"
|
8
|
+
|
7
9
|
module Mihari
|
8
10
|
module Emitters
|
9
11
|
class Attachment
|
@@ -123,7 +125,7 @@ module Mihari
|
|
123
125
|
].join("\n")
|
124
126
|
end
|
125
127
|
|
126
|
-
def emit(title:, description:, artifacts:, tags: [])
|
128
|
+
def emit(title:, description:, artifacts:, tags: [], **_options)
|
127
129
|
return if artifacts.empty?
|
128
130
|
|
129
131
|
attachments = to_attachments(artifacts)
|
@@ -135,7 +137,7 @@ module Mihari
|
|
135
137
|
private
|
136
138
|
|
137
139
|
def config_keys
|
138
|
-
%w(
|
140
|
+
%w(slack_webhook_url)
|
139
141
|
end
|
140
142
|
end
|
141
143
|
end
|
@@ -9,11 +9,12 @@ module Mihari
|
|
9
9
|
true
|
10
10
|
end
|
11
11
|
|
12
|
-
def emit(title:, description:, artifacts:, tags:)
|
12
|
+
def emit(title:, description:, artifacts:, source:, tags:)
|
13
13
|
h = {
|
14
14
|
title: title,
|
15
15
|
description: description,
|
16
16
|
artifacts: artifacts.map(&:data),
|
17
|
+
source: source,
|
17
18
|
tags: tags
|
18
19
|
}
|
19
20
|
puts JSON.pretty_generate(h)
|
@@ -1,42 +1,56 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "hachi"
|
4
|
+
require "net/ping"
|
5
|
+
|
3
6
|
module Mihari
|
4
7
|
module Emitters
|
5
8
|
class TheHive < Base
|
6
9
|
# @return [true, false]
|
7
10
|
def valid?
|
8
|
-
|
11
|
+
api_endpont? && api_key? && ping?
|
9
12
|
end
|
10
13
|
|
11
|
-
def emit(title:, description:, artifacts:, tags: [])
|
14
|
+
def emit(title:, description:, artifacts:, tags: [], **_options)
|
12
15
|
return if artifacts.empty?
|
13
16
|
|
14
|
-
|
17
|
+
api.alert.create(
|
15
18
|
title: title,
|
16
19
|
description: description,
|
17
|
-
artifacts: artifacts.map
|
18
|
-
tags: tags
|
20
|
+
artifacts: artifacts.map { |artifact| { data: artifact.data, data_type: artifact.data_type, message: description } },
|
21
|
+
tags: tags,
|
22
|
+
type: "external",
|
23
|
+
source: "mihari"
|
19
24
|
)
|
20
|
-
|
21
|
-
save_as_cache artifacts.map(&:data)
|
22
25
|
end
|
23
26
|
|
24
27
|
private
|
25
28
|
|
26
29
|
def config_keys
|
27
|
-
%w(
|
30
|
+
%w(thehive_api_endpoint thehive_api_key)
|
28
31
|
end
|
29
32
|
|
30
|
-
def
|
31
|
-
@
|
33
|
+
def api
|
34
|
+
@api ||= Hachi::API.new(api_endpoint: Mihari.config.thehive_api_endpoint, api_key: Mihari.config.thehive_api_key)
|
32
35
|
end
|
33
36
|
|
34
|
-
|
35
|
-
|
37
|
+
# @return [true, false]
|
38
|
+
def api_endpont?
|
39
|
+
!Mihari.config.thehive_api_endpoint.nil?
|
36
40
|
end
|
37
41
|
|
38
|
-
|
39
|
-
|
42
|
+
# @return [true, false]
|
43
|
+
def api_key?
|
44
|
+
!Mihari.config.thehive_api_key.nil?
|
45
|
+
end
|
46
|
+
|
47
|
+
def ping?
|
48
|
+
base_url = Mihari.config.thehive_api_endpoint
|
49
|
+
base_url = base_url.end_with?("/") ? base_url[0..-2] : base_url
|
50
|
+
url = "#{base_url}/index.html"
|
51
|
+
|
52
|
+
http = Net::Ping::HTTP.new(url)
|
53
|
+
http.ping?
|
40
54
|
end
|
41
55
|
end
|
42
56
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "active_record"
|
4
|
+
|
5
|
+
class ArtifactValidator < ActiveModel::Validator
|
6
|
+
def validate(record)
|
7
|
+
return if record.data_type
|
8
|
+
|
9
|
+
record.errors[:data] << "#{record.data} is not supported"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
module Mihari
|
14
|
+
class Artifact < ActiveRecord::Base
|
15
|
+
include ActiveModel::Validations
|
16
|
+
validates_with ArtifactValidator
|
17
|
+
|
18
|
+
def initialize(attributes)
|
19
|
+
super
|
20
|
+
self.data_type = TypeChecker.type(data)
|
21
|
+
end
|
22
|
+
|
23
|
+
def unique?
|
24
|
+
self.class.find_by(data: data).nil?
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -1,5 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "slack-notifier"
|
4
|
+
require "mihari/slack_monkeypatch"
|
5
|
+
|
3
6
|
module Mihari
|
4
7
|
module Notifiers
|
5
8
|
class Slack < Base
|
@@ -8,15 +11,15 @@ module Mihari
|
|
8
11
|
DEFAULT_USERNAME = "mihari"
|
9
12
|
|
10
13
|
def slack_channel
|
11
|
-
|
14
|
+
Mihari.config.slack_channel || "#general"
|
12
15
|
end
|
13
16
|
|
14
17
|
def slack_webhook_url
|
15
|
-
|
18
|
+
Mihari.config.slack_webhook_url
|
16
19
|
end
|
17
20
|
|
18
21
|
def slack_webhook_url?
|
19
|
-
|
22
|
+
!Mihari.config.slack_webhook_url.nil?
|
20
23
|
end
|
21
24
|
|
22
25
|
def valid?
|
@@ -25,7 +28,7 @@ module Mihari
|
|
25
28
|
|
26
29
|
def notify(text:, attachments: [], mrkdwn: true)
|
27
30
|
notifier = ::Slack::Notifier.new(slack_webhook_url, channel: slack_channel, username: DEFAULT_USERNAME)
|
28
|
-
notifier.post(text: text, attachments: attachments, mrkdwn:
|
31
|
+
notifier.post(text: text, attachments: attachments, mrkdwn: mrkdwn)
|
29
32
|
end
|
30
33
|
end
|
31
34
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "active_model_serializers"
|
4
|
+
|
5
|
+
module Mihari
|
6
|
+
class AlertSerializer < ActiveModel::Serializer
|
7
|
+
attributes :title, :description, :source, :created_at
|
8
|
+
|
9
|
+
has_many :artifacts
|
10
|
+
has_many :tags, through: :taggings
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Slack
|
4
|
+
class Notifier
|
5
|
+
module Util
|
6
|
+
class LinkFormatter
|
7
|
+
class << self
|
8
|
+
def format(string, opts = {})
|
9
|
+
# Resolve warning in Ruby 2.7
|
10
|
+
LinkFormatter.new(string, **opts).formatted
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/mihari/status.rb
CHANGED
data/lib/mihari/type_checker.rb
CHANGED
data/lib/mihari/version.rb
CHANGED
data/mihari.gemspec
CHANGED
@@ -26,35 +26,42 @@ Gem::Specification.new do |spec|
|
|
26
26
|
|
27
27
|
spec.add_development_dependency "bundler", "~> 2.1"
|
28
28
|
spec.add_development_dependency "coveralls", "~> 0.8"
|
29
|
-
spec.add_development_dependency "
|
29
|
+
spec.add_development_dependency "execjs", "~> 2.7"
|
30
|
+
spec.add_development_dependency "fakefs", "~> 1.2"
|
31
|
+
spec.add_development_dependency "pre-commit", "~> 0.39"
|
30
32
|
spec.add_development_dependency "rake", "~> 13.0"
|
31
33
|
spec.add_development_dependency "rspec", "~> 3.9"
|
34
|
+
spec.add_development_dependency "rubocop", "~> 0.88"
|
35
|
+
spec.add_development_dependency "rubocop-performance", "~> 1.7"
|
32
36
|
spec.add_development_dependency "timecop", "~> 0.9"
|
33
|
-
spec.add_development_dependency "vcr", "~>
|
34
|
-
spec.add_development_dependency "webmock", "~> 3.
|
37
|
+
spec.add_development_dependency "vcr", "~> 6.0"
|
38
|
+
spec.add_development_dependency "webmock", "~> 3.8"
|
35
39
|
|
40
|
+
spec.add_dependency "active_model_serializers", "~> 0.10"
|
41
|
+
spec.add_dependency "activerecord", "~> 6.0"
|
36
42
|
spec.add_dependency "addressable", "~> 2.7"
|
37
43
|
spec.add_dependency "binaryedge", "~> 0.1"
|
38
44
|
spec.add_dependency "censu", "~> 0.2"
|
39
|
-
spec.add_dependency "crtsh-rb", "~> 0.
|
45
|
+
spec.add_dependency "crtsh-rb", "~> 0.3"
|
40
46
|
spec.add_dependency "dnpedia", "~> 0.1"
|
41
47
|
spec.add_dependency "dnstwister", "~> 0.1"
|
42
48
|
spec.add_dependency "email_address", "~> 0.1"
|
43
49
|
spec.add_dependency "hachi", "~> 0.3"
|
44
|
-
spec.add_dependency "lightly", "~> 0.3"
|
45
50
|
spec.add_dependency "mem", "~> 0.1"
|
46
51
|
spec.add_dependency "misp", "~> 0.1"
|
47
52
|
spec.add_dependency "murmurhash3", "~> 0.1"
|
48
53
|
spec.add_dependency "net-ping", "~> 2.0"
|
49
|
-
spec.add_dependency "onyphe", "~>
|
54
|
+
spec.add_dependency "onyphe", "~> 2.0"
|
50
55
|
spec.add_dependency "parallel", "~> 1.19"
|
51
56
|
spec.add_dependency "passive_circl", "~> 0.1"
|
52
57
|
spec.add_dependency "passivetotalx", "~> 0.1"
|
58
|
+
spec.add_dependency "pg", "~> 1.2"
|
53
59
|
spec.add_dependency "public_suffix", "~> 4.0"
|
54
60
|
spec.add_dependency "pulsedive", "~> 0.1"
|
55
61
|
spec.add_dependency "securitytrails", "~> 1.0"
|
56
62
|
spec.add_dependency "shodanx", "~> 0.2"
|
57
63
|
spec.add_dependency "slack-notifier", "~> 2.3"
|
64
|
+
spec.add_dependency "sqlite3", "~> 1.4"
|
58
65
|
spec.add_dependency "thor", "~> 1.0"
|
59
66
|
spec.add_dependency "urlscan", "~> 0.5"
|
60
67
|
spec.add_dependency "virustotalx", "~> 1.1"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mihari
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,20 +38,48 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.8'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: execjs
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.7'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.7'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: fakefs
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
61
|
+
version: '1.2'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
68
|
+
version: '1.2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pre-commit
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.39'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.39'
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
84
|
name: rake
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +108,34 @@ dependencies:
|
|
80
108
|
- - "~>"
|
81
109
|
- !ruby/object:Gem::Version
|
82
110
|
version: '3.9'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.88'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.88'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-performance
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.7'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.7'
|
83
139
|
- !ruby/object:Gem::Dependency
|
84
140
|
name: timecop
|
85
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,28 +156,56 @@ dependencies:
|
|
100
156
|
requirements:
|
101
157
|
- - "~>"
|
102
158
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
159
|
+
version: '6.0'
|
104
160
|
type: :development
|
105
161
|
prerelease: false
|
106
162
|
version_requirements: !ruby/object:Gem::Requirement
|
107
163
|
requirements:
|
108
164
|
- - "~>"
|
109
165
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
166
|
+
version: '6.0'
|
111
167
|
- !ruby/object:Gem::Dependency
|
112
168
|
name: webmock
|
113
169
|
requirement: !ruby/object:Gem::Requirement
|
114
170
|
requirements:
|
115
171
|
- - "~>"
|
116
172
|
- !ruby/object:Gem::Version
|
117
|
-
version: '3.
|
173
|
+
version: '3.8'
|
118
174
|
type: :development
|
119
175
|
prerelease: false
|
120
176
|
version_requirements: !ruby/object:Gem::Requirement
|
121
177
|
requirements:
|
122
178
|
- - "~>"
|
123
179
|
- !ruby/object:Gem::Version
|
124
|
-
version: '3.
|
180
|
+
version: '3.8'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: active_model_serializers
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0.10'
|
188
|
+
type: :runtime
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0.10'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: activerecord
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '6.0'
|
202
|
+
type: :runtime
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '6.0'
|
125
209
|
- !ruby/object:Gem::Dependency
|
126
210
|
name: addressable
|
127
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,14 +254,14 @@ dependencies:
|
|
170
254
|
requirements:
|
171
255
|
- - "~>"
|
172
256
|
- !ruby/object:Gem::Version
|
173
|
-
version: '0.
|
257
|
+
version: '0.3'
|
174
258
|
type: :runtime
|
175
259
|
prerelease: false
|
176
260
|
version_requirements: !ruby/object:Gem::Requirement
|
177
261
|
requirements:
|
178
262
|
- - "~>"
|
179
263
|
- !ruby/object:Gem::Version
|
180
|
-
version: '0.
|
264
|
+
version: '0.3'
|
181
265
|
- !ruby/object:Gem::Dependency
|
182
266
|
name: dnpedia
|
183
267
|
requirement: !ruby/object:Gem::Requirement
|
@@ -234,20 +318,6 @@ dependencies:
|
|
234
318
|
- - "~>"
|
235
319
|
- !ruby/object:Gem::Version
|
236
320
|
version: '0.3'
|
237
|
-
- !ruby/object:Gem::Dependency
|
238
|
-
name: lightly
|
239
|
-
requirement: !ruby/object:Gem::Requirement
|
240
|
-
requirements:
|
241
|
-
- - "~>"
|
242
|
-
- !ruby/object:Gem::Version
|
243
|
-
version: '0.3'
|
244
|
-
type: :runtime
|
245
|
-
prerelease: false
|
246
|
-
version_requirements: !ruby/object:Gem::Requirement
|
247
|
-
requirements:
|
248
|
-
- - "~>"
|
249
|
-
- !ruby/object:Gem::Version
|
250
|
-
version: '0.3'
|
251
321
|
- !ruby/object:Gem::Dependency
|
252
322
|
name: mem
|
253
323
|
requirement: !ruby/object:Gem::Requirement
|
@@ -310,14 +380,14 @@ dependencies:
|
|
310
380
|
requirements:
|
311
381
|
- - "~>"
|
312
382
|
- !ruby/object:Gem::Version
|
313
|
-
version: '
|
383
|
+
version: '2.0'
|
314
384
|
type: :runtime
|
315
385
|
prerelease: false
|
316
386
|
version_requirements: !ruby/object:Gem::Requirement
|
317
387
|
requirements:
|
318
388
|
- - "~>"
|
319
389
|
- !ruby/object:Gem::Version
|
320
|
-
version: '
|
390
|
+
version: '2.0'
|
321
391
|
- !ruby/object:Gem::Dependency
|
322
392
|
name: parallel
|
323
393
|
requirement: !ruby/object:Gem::Requirement
|
@@ -360,6 +430,20 @@ dependencies:
|
|
360
430
|
- - "~>"
|
361
431
|
- !ruby/object:Gem::Version
|
362
432
|
version: '0.1'
|
433
|
+
- !ruby/object:Gem::Dependency
|
434
|
+
name: pg
|
435
|
+
requirement: !ruby/object:Gem::Requirement
|
436
|
+
requirements:
|
437
|
+
- - "~>"
|
438
|
+
- !ruby/object:Gem::Version
|
439
|
+
version: '1.2'
|
440
|
+
type: :runtime
|
441
|
+
prerelease: false
|
442
|
+
version_requirements: !ruby/object:Gem::Requirement
|
443
|
+
requirements:
|
444
|
+
- - "~>"
|
445
|
+
- !ruby/object:Gem::Version
|
446
|
+
version: '1.2'
|
363
447
|
- !ruby/object:Gem::Dependency
|
364
448
|
name: public_suffix
|
365
449
|
requirement: !ruby/object:Gem::Requirement
|
@@ -430,6 +514,20 @@ dependencies:
|
|
430
514
|
- - "~>"
|
431
515
|
- !ruby/object:Gem::Version
|
432
516
|
version: '2.3'
|
517
|
+
- !ruby/object:Gem::Dependency
|
518
|
+
name: sqlite3
|
519
|
+
requirement: !ruby/object:Gem::Requirement
|
520
|
+
requirements:
|
521
|
+
- - "~>"
|
522
|
+
- !ruby/object:Gem::Version
|
523
|
+
version: '1.4'
|
524
|
+
type: :runtime
|
525
|
+
prerelease: false
|
526
|
+
version_requirements: !ruby/object:Gem::Requirement
|
527
|
+
requirements:
|
528
|
+
- - "~>"
|
529
|
+
- !ruby/object:Gem::Version
|
530
|
+
version: '1.4'
|
433
531
|
- !ruby/object:Gem::Dependency
|
434
532
|
name: thor
|
435
533
|
requirement: !ruby/object:Gem::Requirement
|
@@ -496,6 +594,7 @@ extra_rdoc_files: []
|
|
496
594
|
files:
|
497
595
|
- ".gitignore"
|
498
596
|
- ".rspec"
|
597
|
+
- ".rubocop.yml"
|
499
598
|
- ".travis.yml"
|
500
599
|
- Gemfile
|
501
600
|
- LICENSE
|
@@ -503,6 +602,7 @@ files:
|
|
503
602
|
- Rakefile
|
504
603
|
- bin/console
|
505
604
|
- bin/setup
|
605
|
+
- config/pre_commit.yml
|
506
606
|
- docker/Dockerfile
|
507
607
|
- examples/ipinfo_hosted_domains.rb
|
508
608
|
- exe/mihari
|
@@ -531,27 +631,31 @@ files:
|
|
531
631
|
- lib/mihari/analyzers/urlscan.rb
|
532
632
|
- lib/mihari/analyzers/virustotal.rb
|
533
633
|
- lib/mihari/analyzers/zoomeye.rb
|
534
|
-
- lib/mihari/artifact.rb
|
535
|
-
- lib/mihari/cache.rb
|
536
634
|
- lib/mihari/cli.rb
|
537
635
|
- lib/mihari/config.rb
|
538
636
|
- lib/mihari/configurable.rb
|
637
|
+
- lib/mihari/database.rb
|
539
638
|
- lib/mihari/emitters/base.rb
|
639
|
+
- lib/mihari/emitters/database.rb
|
540
640
|
- lib/mihari/emitters/misp.rb
|
541
641
|
- lib/mihari/emitters/slack.rb
|
542
642
|
- lib/mihari/emitters/stdout.rb
|
543
643
|
- lib/mihari/emitters/the_hive.rb
|
544
644
|
- lib/mihari/errors.rb
|
545
645
|
- lib/mihari/html.rb
|
646
|
+
- lib/mihari/models/alert.rb
|
647
|
+
- lib/mihari/models/artifact.rb
|
648
|
+
- lib/mihari/models/tag.rb
|
649
|
+
- lib/mihari/models/tagging.rb
|
546
650
|
- lib/mihari/notifiers/base.rb
|
547
651
|
- lib/mihari/notifiers/exception_notifier.rb
|
548
652
|
- lib/mihari/notifiers/slack.rb
|
549
653
|
- lib/mihari/retriable.rb
|
654
|
+
- lib/mihari/serializers/alert.rb
|
655
|
+
- lib/mihari/serializers/artifact.rb
|
656
|
+
- lib/mihari/serializers/tag.rb
|
657
|
+
- lib/mihari/slack_monkeypatch.rb
|
550
658
|
- lib/mihari/status.rb
|
551
|
-
- lib/mihari/the_hive.rb
|
552
|
-
- lib/mihari/the_hive/alert.rb
|
553
|
-
- lib/mihari/the_hive/artifact.rb
|
554
|
-
- lib/mihari/the_hive/base.rb
|
555
659
|
- lib/mihari/type_checker.rb
|
556
660
|
- lib/mihari/version.rb
|
557
661
|
- mihari.gemspec
|
@@ -563,7 +667,7 @@ homepage: https://github.com/ninoseki/mihari
|
|
563
667
|
licenses:
|
564
668
|
- MIT
|
565
669
|
metadata: {}
|
566
|
-
post_install_message:
|
670
|
+
post_install_message:
|
567
671
|
rdoc_options: []
|
568
672
|
require_paths:
|
569
673
|
- lib
|
@@ -578,8 +682,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
578
682
|
- !ruby/object:Gem::Version
|
579
683
|
version: '0'
|
580
684
|
requirements: []
|
581
|
-
rubygems_version: 3.
|
582
|
-
signing_key:
|
685
|
+
rubygems_version: 3.1.2
|
686
|
+
signing_key:
|
583
687
|
specification_version: 4
|
584
688
|
summary: A framework for continuous malicious hosts monitoring.
|
585
689
|
test_files: []
|