mihari 4.11.0 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -1
- data/README.md +13 -3
- data/Steepfile +0 -1
- data/build_frontend.sh +0 -3
- data/docker/Dockerfile +11 -12
- data/images/Tines-Full_Logo-Tines_Black.png +0 -0
- data/lib/mihari/analyzers/base.rb +12 -28
- data/lib/mihari/analyzers/rule.rb +23 -36
- data/lib/mihari/cli/main.rb +6 -11
- data/lib/mihari/commands/initializer.rb +47 -0
- data/lib/mihari/commands/{search.rb → searcher.rb} +9 -20
- data/lib/mihari/commands/validator.rb +2 -2
- data/lib/mihari/commands/web.rb +4 -2
- data/lib/mihari/constants.rb +3 -3
- data/lib/mihari/database.rb +52 -87
- data/lib/mihari/emitters/database.rb +16 -7
- data/lib/mihari/emitters/misp.rb +13 -5
- data/lib/mihari/emitters/slack.rb +15 -8
- data/lib/mihari/emitters/the_hive.rb +42 -21
- data/lib/mihari/emitters/webhook.rb +99 -31
- data/lib/mihari/entities/alert.rb +7 -5
- data/lib/mihari/entities/artifact.rb +20 -8
- data/lib/mihari/entities/config.rb +2 -6
- data/lib/mihari/entities/rule.rb +8 -0
- data/lib/mihari/http.rb +13 -13
- data/lib/mihari/mixins/{disallowed_data_value.rb → falsepositive.rb} +8 -8
- data/lib/mihari/models/alert.rb +2 -15
- data/lib/mihari/models/artifact.rb +28 -17
- data/lib/mihari/models/rule.rb +7 -13
- data/lib/mihari/schemas/emitter.rb +6 -8
- data/lib/mihari/schemas/rule.rb +11 -13
- data/lib/mihari/structs/config.rb +41 -0
- data/lib/mihari/structs/filters.rb +2 -2
- data/lib/mihari/structs/rule.rb +96 -83
- data/lib/mihari/templates/rule.yml.erb +5 -23
- data/lib/mihari/types.rb +1 -1
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari/web/api.rb +0 -2
- data/lib/mihari/web/app.rb +10 -4
- data/lib/mihari/web/endpoints/alerts.rb +11 -3
- data/lib/mihari/web/endpoints/configs.rb +1 -6
- data/lib/mihari/web/endpoints/rules.rb +27 -15
- data/lib/mihari/web/public/assets/{fa-brands-400.c7ae37d3.ttf → fa-brands-400-2ef6fdde.ttf} +0 -0
- data/lib/mihari/web/public/assets/fa-brands-400-f4617423.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-regular-400-12dea17b.ttf +0 -0
- data/lib/mihari/web/public/assets/fa-regular-400-7ba24c41.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-solid-900-67a880b4.ttf +0 -0
- data/lib/mihari/web/public/assets/fa-solid-900-e2c5cf54.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-v4compatibility-7c377405.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-v4compatibility-8d9500e8.ttf +0 -0
- data/lib/mihari/web/public/assets/{index.e1e67d84.css → index-625e95fe.css} +3 -3
- data/lib/mihari/web/public/assets/index-63900d73.js +50 -0
- data/lib/mihari/web/public/index.html +3 -3
- data/lib/mihari/web/public/redoc-static.html +26 -27
- data/lib/mihari.rb +11 -21
- data/mihari.gemspec +14 -14
- metadata +46 -131
- data/lib/mihari/cli/init.rb +0 -11
- data/lib/mihari/cli/validator.rb +0 -11
- data/lib/mihari/commands/init.rb +0 -51
- data/lib/mihari/emitters/http.rb +0 -127
- data/lib/mihari/entities/source.rb +0 -9
- data/lib/mihari/status.rb +0 -55
- data/lib/mihari/web/endpoints/sources.rb +0 -19
- data/lib/mihari/web/public/assets/fa-brands-400.3fe890d0.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-regular-400.fdc1f753.ttf +0 -0
- data/lib/mihari/web/public/assets/fa-regular-400.fe69d948.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-solid-900.6d53c706.ttf +0 -0
- data/lib/mihari/web/public/assets/fa-solid-900.d27bc752.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-v4compatibility.4d73f280.ttf +0 -0
- data/lib/mihari/web/public/assets/fa-v4compatibility.7d1c2ce5.woff2 +0 -0
- data/lib/mihari/web/public/assets/index.d3a61a69.js +0 -68
- data/sig/lib/mihari/analyzers/base.rbs +0 -90
- data/sig/lib/mihari/analyzers/binaryedge.rbs +0 -26
- data/sig/lib/mihari/analyzers/censys.rbs +0 -41
- data/sig/lib/mihari/analyzers/circl.rbs +0 -31
- data/sig/lib/mihari/analyzers/crtsh.rbs +0 -17
- data/sig/lib/mihari/analyzers/dnpedia.rbs +0 -15
- data/sig/lib/mihari/analyzers/dnstwister.rbs +0 -25
- data/sig/lib/mihari/analyzers/feed.rbs +0 -20
- data/sig/lib/mihari/analyzers/onyphe.rbs +0 -34
- data/sig/lib/mihari/analyzers/otx.rbs +0 -33
- data/sig/lib/mihari/analyzers/passivetotal.rbs +0 -35
- data/sig/lib/mihari/analyzers/pulsedive.rbs +0 -27
- data/sig/lib/mihari/analyzers/rule.rbs +0 -68
- data/sig/lib/mihari/analyzers/securitytrails.rbs +0 -33
- data/sig/lib/mihari/analyzers/shodan.rbs +0 -36
- data/sig/lib/mihari/analyzers/urlscan.rbs +0 -31
- data/sig/lib/mihari/analyzers/virustotal.rbs +0 -31
- data/sig/lib/mihari/analyzers/virustotal_intelligence.rbs +0 -33
- data/sig/lib/mihari/analyzers/zoomeye.rbs +0 -35
- data/sig/lib/mihari/cli/base.rbs +0 -9
- data/sig/lib/mihari/cli/init.rbs +0 -7
- data/sig/lib/mihari/cli/main.rbs +0 -9
- data/sig/lib/mihari/cli/validator.rbs +0 -7
- data/sig/lib/mihari/commands/init.rbs +0 -9
- data/sig/lib/mihari/commands/json.rbs +0 -7
- data/sig/lib/mihari/commands/search.rbs +0 -35
- data/sig/lib/mihari/commands/validator.rbs +0 -9
- data/sig/lib/mihari/commands/web.rbs +0 -7
- data/sig/lib/mihari/constants.rbs +0 -5
- data/sig/lib/mihari/database.rbs +0 -25
- data/sig/lib/mihari/emitters/base.rbs +0 -18
- data/sig/lib/mihari/emitters/database.rbs +0 -9
- data/sig/lib/mihari/emitters/http.rbs +0 -35
- data/sig/lib/mihari/emitters/misp.rbs +0 -34
- data/sig/lib/mihari/emitters/slack.rbs +0 -73
- data/sig/lib/mihari/emitters/stdout.rbs +0 -9
- data/sig/lib/mihari/emitters/the_hive.rbs +0 -32
- data/sig/lib/mihari/emitters/webhook.rbs +0 -20
- data/sig/lib/mihari/enrichers/base.rbs +0 -12
- data/sig/lib/mihari/enrichers/google_public_dns.rbs +0 -18
- data/sig/lib/mihari/enrichers/ipinfo.rbs +0 -16
- data/sig/lib/mihari/errors.rbs +0 -10
- data/sig/lib/mihari/feed/parser.rbs +0 -11
- data/sig/lib/mihari/feed/reader.rbs +0 -56
- data/sig/lib/mihari/http.rbs +0 -64
- data/sig/lib/mihari/mixins/autonomous_system.rbs +0 -14
- data/sig/lib/mihari/mixins/configurable.rbs +0 -30
- data/sig/lib/mihari/mixins/configuration.rbs +0 -45
- data/sig/lib/mihari/mixins/disallowed_data_value.rbs +0 -23
- data/sig/lib/mihari/mixins/error_notification.rbs +0 -12
- data/sig/lib/mihari/mixins/hash.rbs +0 -14
- data/sig/lib/mihari/mixins/refang.rbs +0 -14
- data/sig/lib/mihari/mixins/retriable.rbs +0 -15
- data/sig/lib/mihari/models/alert.rbs +0 -18
- data/sig/lib/mihari/models/artifact.rbs +0 -69
- data/sig/lib/mihari/models/autonomous_system.rbs +0 -14
- data/sig/lib/mihari/models/cpe.rbs +0 -7
- data/sig/lib/mihari/models/dns.rbs +0 -19
- data/sig/lib/mihari/models/geolocation.rbs +0 -15
- data/sig/lib/mihari/models/port.rbs +0 -7
- data/sig/lib/mihari/models/reverse_dns.rbs +0 -14
- data/sig/lib/mihari/models/rule.rbs +0 -17
- data/sig/lib/mihari/models/tag.rbs +0 -5
- data/sig/lib/mihari/models/tagging.rbs +0 -4
- data/sig/lib/mihari/models/whois.rbs +0 -66
- data/sig/lib/mihari/status.rbs +0 -25
- data/sig/lib/mihari/structs/censys.rbs +0 -58
- data/sig/lib/mihari/structs/filters.rbs +0 -40
- data/sig/lib/mihari/structs/google_public_dns.rbs +0 -21
- data/sig/lib/mihari/structs/greynoise.rbs +0 -30
- data/sig/lib/mihari/structs/ipinfo.rbs +0 -17
- data/sig/lib/mihari/structs/onyphe.rbs +0 -25
- data/sig/lib/mihari/structs/rule.rbs +0 -57
- data/sig/lib/mihari/structs/shodan.rbs +0 -30
- data/sig/lib/mihari/structs/urlscan.rbs +0 -28
- data/sig/lib/mihari/structs/virustotal_intelligence.rbs +0 -33
- data/sig/lib/mihari/type_checker.rbs +0 -48
- data/sig/lib/mihari/types.rbs +0 -23
- data/sig/lib/mihari/version.rbs +0 -3
- data/sig/lib/mihari/web/app.rbs +0 -5
- data/sig/lib/mihari.rbs +0 -54
data/lib/mihari.rb
CHANGED
@@ -55,18 +55,11 @@ require "mihari/errors"
|
|
55
55
|
require "mihari/mixins/autonomous_system"
|
56
56
|
require "mihari/mixins/configurable"
|
57
57
|
require "mihari/mixins/database"
|
58
|
-
require "mihari/mixins/
|
58
|
+
require "mihari/mixins/falsepositive"
|
59
59
|
require "mihari/mixins/error_notification"
|
60
60
|
require "mihari/mixins/refang"
|
61
61
|
require "mihari/mixins/retriable"
|
62
62
|
|
63
|
-
def truthy?(value)
|
64
|
-
return true if value == "true"
|
65
|
-
return true if value == true
|
66
|
-
|
67
|
-
false
|
68
|
-
end
|
69
|
-
|
70
63
|
module Mihari
|
71
64
|
extend Dry::Configurable
|
72
65
|
|
@@ -78,14 +71,13 @@ module Mihari
|
|
78
71
|
setting :circl_passive_password, default: ENV.fetch("CIRCL_PASSIVE_PASSWORD", nil)
|
79
72
|
setting :circl_passive_username, default: ENV.fetch("CIRCL_PASSIVE_USERNAME", nil)
|
80
73
|
|
81
|
-
setting :
|
74
|
+
setting :database_url, default: URI(ENV.fetch("DATABASE_URL", "sqlite3:///mihari.db"))
|
82
75
|
|
83
76
|
setting :greynoise_api_key, default: ENV.fetch("GREYNOISE_API_KEY", nil)
|
84
77
|
|
85
78
|
setting :ipinfo_api_key, default: ENV.fetch("IPINFO_API_KEY", nil)
|
86
79
|
|
87
|
-
|
88
|
-
setting :misp_url, default: ENV.fetch("MISP_URL", nil) || ENV.fetch("MISP_API_ENDPOINT", nil)
|
80
|
+
setting :misp_url, default: ENV.fetch("MISP_URL", nil)
|
89
81
|
setting :misp_api_key, default: ENV.fetch("MISP_API_KEY", nil)
|
90
82
|
|
91
83
|
setting :onyphe_api_key, default: ENV.fetch("ONYPHE_API_KEY", nil)
|
@@ -104,8 +96,7 @@ module Mihari
|
|
104
96
|
setting :slack_channel, default: ENV.fetch("SLACK_CHANNEL", nil)
|
105
97
|
setting :slack_webhook_url, default: ENV.fetch("SLACK_WEBHOOK_URL", nil)
|
106
98
|
|
107
|
-
|
108
|
-
setting :thehive_url, default: ENV.fetch("THEHIVE_URL", nil) || ENV.fetch("THEHIVE_API_ENDPOINT", nil)
|
99
|
+
setting :thehive_url, default: ENV.fetch("THEHIVE_URL", nil)
|
109
100
|
setting :thehive_api_key, default: ENV.fetch("THEHIVE_API_KEY", nil)
|
110
101
|
setting :thehive_api_version, default: ENV.fetch("THEHIVE_API_VERSION", nil)
|
111
102
|
|
@@ -113,9 +104,6 @@ module Mihari
|
|
113
104
|
|
114
105
|
setting :virustotal_api_key, default: ENV.fetch("VIRUSTOTAL_API_KEY", nil)
|
115
106
|
|
116
|
-
setting :webhook_url, default: ENV.fetch("WEBHOOK_URL", nil)
|
117
|
-
setting :webhook_use_json_body, constructor: ->(value = ENV.fetch("WEBHOOK_USE_JSON_BODY", nil)) { truthy?(value) }
|
118
|
-
|
119
107
|
setting :zoomeye_api_key, default: ENV.fetch("ZOOMEYE_API_KEY", nil)
|
120
108
|
|
121
109
|
setting :sentry_dsn, default: ENV.fetch("SENTRY_DSN", nil)
|
@@ -138,6 +126,12 @@ module Mihari
|
|
138
126
|
end
|
139
127
|
memoize :enrichers
|
140
128
|
|
129
|
+
def configs
|
130
|
+
(Mihari.analyzers + Mihari.emitters + Mihari.enrichers).map do |klass|
|
131
|
+
Mihari::Structs::Config.from_class(klass)
|
132
|
+
end.compact
|
133
|
+
end
|
134
|
+
|
141
135
|
def logger
|
142
136
|
SemanticLogger.default_level = :info
|
143
137
|
SemanticLogger.add_appender(io: $stderr, formatter: :color)
|
@@ -171,6 +165,7 @@ require "mihari/types"
|
|
171
165
|
|
172
166
|
# Structs
|
173
167
|
require "mihari/structs/censys"
|
168
|
+
require "mihari/structs/config"
|
174
169
|
require "mihari/structs/filters"
|
175
170
|
require "mihari/structs/google_public_dns"
|
176
171
|
require "mihari/structs/greynoise"
|
@@ -212,7 +207,6 @@ require "mihari/models/whois"
|
|
212
207
|
require "mihari/emitters/base"
|
213
208
|
|
214
209
|
require "mihari/emitters/database"
|
215
|
-
require "mihari/emitters/http"
|
216
210
|
require "mihari/emitters/misp"
|
217
211
|
require "mihari/emitters/slack"
|
218
212
|
require "mihari/emitters/the_hive"
|
@@ -252,7 +246,6 @@ require "mihari/entities/geolocation"
|
|
252
246
|
require "mihari/entities/ip_address"
|
253
247
|
require "mihari/entities/port"
|
254
248
|
require "mihari/entities/reverse_dns"
|
255
|
-
require "mihari/entities/source"
|
256
249
|
require "mihari/entities/tag"
|
257
250
|
require "mihari/entities/whois"
|
258
251
|
|
@@ -262,9 +255,6 @@ require "mihari/entities/alert"
|
|
262
255
|
|
263
256
|
require "mihari/entities/rule"
|
264
257
|
|
265
|
-
# Status checker
|
266
|
-
require "mihari/status"
|
267
|
-
|
268
258
|
# Web app
|
269
259
|
require "mihari/web/app"
|
270
260
|
|
data/mihari.gemspec
CHANGED
@@ -27,25 +27,25 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
|
-
spec.add_development_dependency "bundler", "~> 2.
|
31
|
-
spec.add_development_dependency "coveralls_reborn", "~> 0.
|
32
|
-
spec.add_development_dependency "fakefs", "~>
|
30
|
+
spec.add_development_dependency "bundler", "~> 2.4"
|
31
|
+
spec.add_development_dependency "coveralls_reborn", "~> 0.27"
|
32
|
+
spec.add_development_dependency "fakefs", "~> 2.4"
|
33
33
|
spec.add_development_dependency "mysql2", "~> 0.5"
|
34
|
-
spec.add_development_dependency "overcommit", "~> 0.
|
34
|
+
spec.add_development_dependency "overcommit", "~> 0.60"
|
35
35
|
spec.add_development_dependency "pg", "~> 1.4"
|
36
36
|
spec.add_development_dependency "rack-test", "~> 2.0"
|
37
37
|
spec.add_development_dependency "rake", "~> 13.0"
|
38
38
|
spec.add_development_dependency "rb-fsevent", "~> 0.11"
|
39
|
-
spec.add_development_dependency "rerun", "~> 0.
|
39
|
+
spec.add_development_dependency "rerun", "~> 0.14"
|
40
40
|
spec.add_development_dependency "rspec", "~> 3.12"
|
41
41
|
spec.add_development_dependency "simplecov-lcov", "~> 0.8.0"
|
42
|
-
spec.add_development_dependency "standard", "~> 1.
|
42
|
+
spec.add_development_dependency "standard", "~> 1.24"
|
43
43
|
spec.add_development_dependency "steep", "~> 1.3"
|
44
44
|
spec.add_development_dependency "timecop", "~> 0.9"
|
45
45
|
spec.add_development_dependency "vcr", "~> 6.1"
|
46
46
|
spec.add_development_dependency "webmock", "~> 3.18"
|
47
47
|
|
48
|
-
spec.add_dependency "activerecord", "7.0.4"
|
48
|
+
spec.add_dependency "activerecord", "7.0.4.2"
|
49
49
|
spec.add_dependency "addressable", "2.8.1"
|
50
50
|
spec.add_dependency "awrence", "2.0.1"
|
51
51
|
spec.add_dependency "binaryedge", "0.1.0"
|
@@ -62,15 +62,15 @@ Gem::Specification.new do |spec|
|
|
62
62
|
spec.add_dependency "dry-struct", "1.6.0"
|
63
63
|
spec.add_dependency "dry-validation", "1.10.0"
|
64
64
|
spec.add_dependency "email_address", "0.2.4"
|
65
|
-
spec.add_dependency "grape", "1.
|
66
|
-
spec.add_dependency "grape-entity", "0.
|
65
|
+
spec.add_dependency "grape", "1.7.0"
|
66
|
+
spec.add_dependency "grape-entity", "1.0.0"
|
67
67
|
spec.add_dependency "grape-swagger", "1.5.0"
|
68
68
|
spec.add_dependency "grape-swagger-entity", "0.5.1"
|
69
69
|
spec.add_dependency "greynoise", "0.1.1"
|
70
70
|
spec.add_dependency "hachi", "2.0.0"
|
71
71
|
spec.add_dependency "insensitive_hash", "0.3.3"
|
72
72
|
spec.add_dependency "jr-cli", "0.6.0"
|
73
|
-
spec.add_dependency "launchy", "2.5.
|
73
|
+
spec.add_dependency "launchy", "2.5.2"
|
74
74
|
spec.add_dependency "memist", "2.0.2"
|
75
75
|
spec.add_dependency "misp", "0.1.4"
|
76
76
|
spec.add_dependency "net-ping", "2.0.8"
|
@@ -80,18 +80,18 @@ Gem::Specification.new do |spec|
|
|
80
80
|
spec.add_dependency "passive_circl", "0.1.0"
|
81
81
|
spec.add_dependency "passivetotalx", "0.1.1"
|
82
82
|
spec.add_dependency "plissken", "2.0.1"
|
83
|
-
spec.add_dependency "public_suffix", "5.0.
|
83
|
+
spec.add_dependency "public_suffix", "5.0.1"
|
84
84
|
spec.add_dependency "pulsedive", "0.1.5"
|
85
|
-
spec.add_dependency "puma", "6.0.
|
85
|
+
spec.add_dependency "puma", "6.0.2"
|
86
86
|
spec.add_dependency "rack", "2.2.4"
|
87
87
|
spec.add_dependency "rack-contrib", "2.3.0"
|
88
88
|
spec.add_dependency "rack-cors", "1.1.1"
|
89
89
|
spec.add_dependency "securitytrails", "1.0.0"
|
90
90
|
spec.add_dependency "semantic_logger", "4.12.0"
|
91
|
-
spec.add_dependency "sentry-ruby", "5.
|
91
|
+
spec.add_dependency "sentry-ruby", "5.7.0"
|
92
92
|
spec.add_dependency "shodanx", "0.2.1"
|
93
93
|
spec.add_dependency "slack-notifier", "2.4.0"
|
94
|
-
spec.add_dependency "sqlite3", "1.
|
94
|
+
spec.add_dependency "sqlite3", "1.6.0"
|
95
95
|
spec.add_dependency "thor", "1.2.1"
|
96
96
|
spec.add_dependency "urlscan", "0.8.0"
|
97
97
|
spec.add_dependency "uuidtools", "2.2.0"
|
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: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.4'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: coveralls_reborn
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.27'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
40
|
+
version: '0.27'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: fakefs
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.4'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.4'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mysql2
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
75
|
+
version: '0.60'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
82
|
+
version: '0.60'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: pg
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0.
|
145
|
+
version: '0.14'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '0.
|
152
|
+
version: '0.14'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rspec
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: '1.
|
187
|
+
version: '1.24'
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: '1.
|
194
|
+
version: '1.24'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: steep
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,14 +254,14 @@ dependencies:
|
|
254
254
|
requirements:
|
255
255
|
- - '='
|
256
256
|
- !ruby/object:Gem::Version
|
257
|
-
version: 7.0.4
|
257
|
+
version: 7.0.4.2
|
258
258
|
type: :runtime
|
259
259
|
prerelease: false
|
260
260
|
version_requirements: !ruby/object:Gem::Requirement
|
261
261
|
requirements:
|
262
262
|
- - '='
|
263
263
|
- !ruby/object:Gem::Version
|
264
|
-
version: 7.0.4
|
264
|
+
version: 7.0.4.2
|
265
265
|
- !ruby/object:Gem::Dependency
|
266
266
|
name: addressable
|
267
267
|
requirement: !ruby/object:Gem::Requirement
|
@@ -492,28 +492,28 @@ dependencies:
|
|
492
492
|
requirements:
|
493
493
|
- - '='
|
494
494
|
- !ruby/object:Gem::Version
|
495
|
-
version: 1.
|
495
|
+
version: 1.7.0
|
496
496
|
type: :runtime
|
497
497
|
prerelease: false
|
498
498
|
version_requirements: !ruby/object:Gem::Requirement
|
499
499
|
requirements:
|
500
500
|
- - '='
|
501
501
|
- !ruby/object:Gem::Version
|
502
|
-
version: 1.
|
502
|
+
version: 1.7.0
|
503
503
|
- !ruby/object:Gem::Dependency
|
504
504
|
name: grape-entity
|
505
505
|
requirement: !ruby/object:Gem::Requirement
|
506
506
|
requirements:
|
507
507
|
- - '='
|
508
508
|
- !ruby/object:Gem::Version
|
509
|
-
version: 0.
|
509
|
+
version: 1.0.0
|
510
510
|
type: :runtime
|
511
511
|
prerelease: false
|
512
512
|
version_requirements: !ruby/object:Gem::Requirement
|
513
513
|
requirements:
|
514
514
|
- - '='
|
515
515
|
- !ruby/object:Gem::Version
|
516
|
-
version: 0.
|
516
|
+
version: 1.0.0
|
517
517
|
- !ruby/object:Gem::Dependency
|
518
518
|
name: grape-swagger
|
519
519
|
requirement: !ruby/object:Gem::Requirement
|
@@ -604,14 +604,14 @@ dependencies:
|
|
604
604
|
requirements:
|
605
605
|
- - '='
|
606
606
|
- !ruby/object:Gem::Version
|
607
|
-
version: 2.5.
|
607
|
+
version: 2.5.2
|
608
608
|
type: :runtime
|
609
609
|
prerelease: false
|
610
610
|
version_requirements: !ruby/object:Gem::Requirement
|
611
611
|
requirements:
|
612
612
|
- - '='
|
613
613
|
- !ruby/object:Gem::Version
|
614
|
-
version: 2.5.
|
614
|
+
version: 2.5.2
|
615
615
|
- !ruby/object:Gem::Dependency
|
616
616
|
name: memist
|
617
617
|
requirement: !ruby/object:Gem::Requirement
|
@@ -744,14 +744,14 @@ dependencies:
|
|
744
744
|
requirements:
|
745
745
|
- - '='
|
746
746
|
- !ruby/object:Gem::Version
|
747
|
-
version: 5.0.
|
747
|
+
version: 5.0.1
|
748
748
|
type: :runtime
|
749
749
|
prerelease: false
|
750
750
|
version_requirements: !ruby/object:Gem::Requirement
|
751
751
|
requirements:
|
752
752
|
- - '='
|
753
753
|
- !ruby/object:Gem::Version
|
754
|
-
version: 5.0.
|
754
|
+
version: 5.0.1
|
755
755
|
- !ruby/object:Gem::Dependency
|
756
756
|
name: pulsedive
|
757
757
|
requirement: !ruby/object:Gem::Requirement
|
@@ -772,14 +772,14 @@ dependencies:
|
|
772
772
|
requirements:
|
773
773
|
- - '='
|
774
774
|
- !ruby/object:Gem::Version
|
775
|
-
version: 6.0.
|
775
|
+
version: 6.0.2
|
776
776
|
type: :runtime
|
777
777
|
prerelease: false
|
778
778
|
version_requirements: !ruby/object:Gem::Requirement
|
779
779
|
requirements:
|
780
780
|
- - '='
|
781
781
|
- !ruby/object:Gem::Version
|
782
|
-
version: 6.0.
|
782
|
+
version: 6.0.2
|
783
783
|
- !ruby/object:Gem::Dependency
|
784
784
|
name: rack
|
785
785
|
requirement: !ruby/object:Gem::Requirement
|
@@ -856,14 +856,14 @@ dependencies:
|
|
856
856
|
requirements:
|
857
857
|
- - '='
|
858
858
|
- !ruby/object:Gem::Version
|
859
|
-
version: 5.
|
859
|
+
version: 5.7.0
|
860
860
|
type: :runtime
|
861
861
|
prerelease: false
|
862
862
|
version_requirements: !ruby/object:Gem::Requirement
|
863
863
|
requirements:
|
864
864
|
- - '='
|
865
865
|
- !ruby/object:Gem::Version
|
866
|
-
version: 5.
|
866
|
+
version: 5.7.0
|
867
867
|
- !ruby/object:Gem::Dependency
|
868
868
|
name: shodanx
|
869
869
|
requirement: !ruby/object:Gem::Requirement
|
@@ -898,14 +898,14 @@ dependencies:
|
|
898
898
|
requirements:
|
899
899
|
- - '='
|
900
900
|
- !ruby/object:Gem::Version
|
901
|
-
version: 1.
|
901
|
+
version: 1.6.0
|
902
902
|
type: :runtime
|
903
903
|
prerelease: false
|
904
904
|
version_requirements: !ruby/object:Gem::Requirement
|
905
905
|
requirements:
|
906
906
|
- - '='
|
907
907
|
- !ruby/object:Gem::Version
|
908
|
-
version: 1.
|
908
|
+
version: 1.6.0
|
909
909
|
- !ruby/object:Gem::Dependency
|
910
910
|
name: thor
|
911
911
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1034,6 +1034,7 @@ files:
|
|
1034
1034
|
- docker/Dockerfile
|
1035
1035
|
- examples/ipinfo_hosted_domains.rb
|
1036
1036
|
- exe/mihari
|
1037
|
+
- images/Tines-Full_Logo-Tines_Black.png
|
1037
1038
|
- images/alert.png
|
1038
1039
|
- images/logo.png
|
1039
1040
|
- images/misp.png
|
@@ -1065,11 +1066,9 @@ files:
|
|
1065
1066
|
- lib/mihari/analyzers/virustotal_intelligence.rb
|
1066
1067
|
- lib/mihari/analyzers/zoomeye.rb
|
1067
1068
|
- lib/mihari/cli/base.rb
|
1068
|
-
- lib/mihari/cli/init.rb
|
1069
1069
|
- lib/mihari/cli/main.rb
|
1070
|
-
- lib/mihari/
|
1071
|
-
- lib/mihari/commands/
|
1072
|
-
- lib/mihari/commands/search.rb
|
1070
|
+
- lib/mihari/commands/initializer.rb
|
1071
|
+
- lib/mihari/commands/searcher.rb
|
1073
1072
|
- lib/mihari/commands/validator.rb
|
1074
1073
|
- lib/mihari/commands/version.rb
|
1075
1074
|
- lib/mihari/commands/web.rb
|
@@ -1077,7 +1076,6 @@ files:
|
|
1077
1076
|
- lib/mihari/database.rb
|
1078
1077
|
- lib/mihari/emitters/base.rb
|
1079
1078
|
- lib/mihari/emitters/database.rb
|
1080
|
-
- lib/mihari/emitters/http.rb
|
1081
1079
|
- lib/mihari/emitters/misp.rb
|
1082
1080
|
- lib/mihari/emitters/slack.rb
|
1083
1081
|
- lib/mihari/emitters/the_hive.rb
|
@@ -1099,7 +1097,6 @@ files:
|
|
1099
1097
|
- lib/mihari/entities/port.rb
|
1100
1098
|
- lib/mihari/entities/reverse_dns.rb
|
1101
1099
|
- lib/mihari/entities/rule.rb
|
1102
|
-
- lib/mihari/entities/source.rb
|
1103
1100
|
- lib/mihari/entities/tag.rb
|
1104
1101
|
- lib/mihari/entities/whois.rb
|
1105
1102
|
- lib/mihari/errors.rb
|
@@ -1109,8 +1106,8 @@ files:
|
|
1109
1106
|
- lib/mihari/mixins/autonomous_system.rb
|
1110
1107
|
- lib/mihari/mixins/configurable.rb
|
1111
1108
|
- lib/mihari/mixins/database.rb
|
1112
|
-
- lib/mihari/mixins/disallowed_data_value.rb
|
1113
1109
|
- lib/mihari/mixins/error_notification.rb
|
1110
|
+
- lib/mihari/mixins/falsepositive.rb
|
1114
1111
|
- lib/mihari/mixins/refang.rb
|
1115
1112
|
- lib/mihari/mixins/retriable.rb
|
1116
1113
|
- lib/mihari/models/alert.rb
|
@@ -1130,8 +1127,8 @@ files:
|
|
1130
1127
|
- lib/mihari/schemas/enricher.rb
|
1131
1128
|
- lib/mihari/schemas/macros.rb
|
1132
1129
|
- lib/mihari/schemas/rule.rb
|
1133
|
-
- lib/mihari/status.rb
|
1134
1130
|
- lib/mihari/structs/censys.rb
|
1131
|
+
- lib/mihari/structs/config.rb
|
1135
1132
|
- lib/mihari/structs/filters.rb
|
1136
1133
|
- lib/mihari/structs/google_public_dns.rb
|
1137
1134
|
- lib/mihari/structs/greynoise.rb
|
@@ -1152,106 +1149,24 @@ files:
|
|
1152
1149
|
- lib/mihari/web/endpoints/configs.rb
|
1153
1150
|
- lib/mihari/web/endpoints/ip_addresses.rb
|
1154
1151
|
- lib/mihari/web/endpoints/rules.rb
|
1155
|
-
- lib/mihari/web/endpoints/sources.rb
|
1156
1152
|
- lib/mihari/web/endpoints/tags.rb
|
1157
1153
|
- lib/mihari/web/middleware/connection_adapter.rb
|
1158
1154
|
- lib/mihari/web/middleware/error_notification_adapter.rb
|
1159
|
-
- lib/mihari/web/public/assets/fa-brands-400.
|
1160
|
-
- lib/mihari/web/public/assets/fa-brands-400.
|
1161
|
-
- lib/mihari/web/public/assets/fa-regular-400.
|
1162
|
-
- lib/mihari/web/public/assets/fa-regular-400.
|
1163
|
-
- lib/mihari/web/public/assets/fa-solid-900.
|
1164
|
-
- lib/mihari/web/public/assets/fa-solid-900.
|
1165
|
-
- lib/mihari/web/public/assets/fa-v4compatibility.
|
1166
|
-
- lib/mihari/web/public/assets/fa-v4compatibility.
|
1167
|
-
- lib/mihari/web/public/assets/index.
|
1168
|
-
- lib/mihari/web/public/assets/index.
|
1155
|
+
- lib/mihari/web/public/assets/fa-brands-400-2ef6fdde.ttf
|
1156
|
+
- lib/mihari/web/public/assets/fa-brands-400-f4617423.woff2
|
1157
|
+
- lib/mihari/web/public/assets/fa-regular-400-12dea17b.ttf
|
1158
|
+
- lib/mihari/web/public/assets/fa-regular-400-7ba24c41.woff2
|
1159
|
+
- lib/mihari/web/public/assets/fa-solid-900-67a880b4.ttf
|
1160
|
+
- lib/mihari/web/public/assets/fa-solid-900-e2c5cf54.woff2
|
1161
|
+
- lib/mihari/web/public/assets/fa-v4compatibility-7c377405.woff2
|
1162
|
+
- lib/mihari/web/public/assets/fa-v4compatibility-8d9500e8.ttf
|
1163
|
+
- lib/mihari/web/public/assets/index-625e95fe.css
|
1164
|
+
- lib/mihari/web/public/assets/index-63900d73.js
|
1169
1165
|
- lib/mihari/web/public/favicon.ico
|
1170
1166
|
- lib/mihari/web/public/index.html
|
1171
1167
|
- lib/mihari/web/public/redoc-static.html
|
1172
1168
|
- mihari.gemspec
|
1173
1169
|
- renovate.json
|
1174
|
-
- sig/lib/mihari.rbs
|
1175
|
-
- sig/lib/mihari/analyzers/base.rbs
|
1176
|
-
- sig/lib/mihari/analyzers/binaryedge.rbs
|
1177
|
-
- sig/lib/mihari/analyzers/censys.rbs
|
1178
|
-
- sig/lib/mihari/analyzers/circl.rbs
|
1179
|
-
- sig/lib/mihari/analyzers/crtsh.rbs
|
1180
|
-
- sig/lib/mihari/analyzers/dnpedia.rbs
|
1181
|
-
- sig/lib/mihari/analyzers/dnstwister.rbs
|
1182
|
-
- sig/lib/mihari/analyzers/feed.rbs
|
1183
|
-
- sig/lib/mihari/analyzers/onyphe.rbs
|
1184
|
-
- sig/lib/mihari/analyzers/otx.rbs
|
1185
|
-
- sig/lib/mihari/analyzers/passivetotal.rbs
|
1186
|
-
- sig/lib/mihari/analyzers/pulsedive.rbs
|
1187
|
-
- sig/lib/mihari/analyzers/rule.rbs
|
1188
|
-
- sig/lib/mihari/analyzers/securitytrails.rbs
|
1189
|
-
- sig/lib/mihari/analyzers/shodan.rbs
|
1190
|
-
- sig/lib/mihari/analyzers/urlscan.rbs
|
1191
|
-
- sig/lib/mihari/analyzers/virustotal.rbs
|
1192
|
-
- sig/lib/mihari/analyzers/virustotal_intelligence.rbs
|
1193
|
-
- sig/lib/mihari/analyzers/zoomeye.rbs
|
1194
|
-
- sig/lib/mihari/cli/base.rbs
|
1195
|
-
- sig/lib/mihari/cli/init.rbs
|
1196
|
-
- sig/lib/mihari/cli/main.rbs
|
1197
|
-
- sig/lib/mihari/cli/validator.rbs
|
1198
|
-
- sig/lib/mihari/commands/init.rbs
|
1199
|
-
- sig/lib/mihari/commands/json.rbs
|
1200
|
-
- sig/lib/mihari/commands/search.rbs
|
1201
|
-
- sig/lib/mihari/commands/validator.rbs
|
1202
|
-
- sig/lib/mihari/commands/web.rbs
|
1203
|
-
- sig/lib/mihari/constants.rbs
|
1204
|
-
- sig/lib/mihari/database.rbs
|
1205
|
-
- sig/lib/mihari/emitters/base.rbs
|
1206
|
-
- sig/lib/mihari/emitters/database.rbs
|
1207
|
-
- sig/lib/mihari/emitters/http.rbs
|
1208
|
-
- sig/lib/mihari/emitters/misp.rbs
|
1209
|
-
- sig/lib/mihari/emitters/slack.rbs
|
1210
|
-
- sig/lib/mihari/emitters/stdout.rbs
|
1211
|
-
- sig/lib/mihari/emitters/the_hive.rbs
|
1212
|
-
- sig/lib/mihari/emitters/webhook.rbs
|
1213
|
-
- sig/lib/mihari/enrichers/base.rbs
|
1214
|
-
- sig/lib/mihari/enrichers/google_public_dns.rbs
|
1215
|
-
- sig/lib/mihari/enrichers/ipinfo.rbs
|
1216
|
-
- sig/lib/mihari/errors.rbs
|
1217
|
-
- sig/lib/mihari/feed/parser.rbs
|
1218
|
-
- sig/lib/mihari/feed/reader.rbs
|
1219
|
-
- sig/lib/mihari/http.rbs
|
1220
|
-
- sig/lib/mihari/mixins/autonomous_system.rbs
|
1221
|
-
- sig/lib/mihari/mixins/configurable.rbs
|
1222
|
-
- sig/lib/mihari/mixins/configuration.rbs
|
1223
|
-
- sig/lib/mihari/mixins/disallowed_data_value.rbs
|
1224
|
-
- sig/lib/mihari/mixins/error_notification.rbs
|
1225
|
-
- sig/lib/mihari/mixins/hash.rbs
|
1226
|
-
- sig/lib/mihari/mixins/refang.rbs
|
1227
|
-
- sig/lib/mihari/mixins/retriable.rbs
|
1228
|
-
- sig/lib/mihari/models/alert.rbs
|
1229
|
-
- sig/lib/mihari/models/artifact.rbs
|
1230
|
-
- sig/lib/mihari/models/autonomous_system.rbs
|
1231
|
-
- sig/lib/mihari/models/cpe.rbs
|
1232
|
-
- sig/lib/mihari/models/dns.rbs
|
1233
|
-
- sig/lib/mihari/models/geolocation.rbs
|
1234
|
-
- sig/lib/mihari/models/port.rbs
|
1235
|
-
- sig/lib/mihari/models/reverse_dns.rbs
|
1236
|
-
- sig/lib/mihari/models/rule.rbs
|
1237
|
-
- sig/lib/mihari/models/tag.rbs
|
1238
|
-
- sig/lib/mihari/models/tagging.rbs
|
1239
|
-
- sig/lib/mihari/models/whois.rbs
|
1240
|
-
- sig/lib/mihari/status.rbs
|
1241
|
-
- sig/lib/mihari/structs/censys.rbs
|
1242
|
-
- sig/lib/mihari/structs/filters.rbs
|
1243
|
-
- sig/lib/mihari/structs/google_public_dns.rbs
|
1244
|
-
- sig/lib/mihari/structs/greynoise.rbs
|
1245
|
-
- sig/lib/mihari/structs/ipinfo.rbs
|
1246
|
-
- sig/lib/mihari/structs/onyphe.rbs
|
1247
|
-
- sig/lib/mihari/structs/rule.rbs
|
1248
|
-
- sig/lib/mihari/structs/shodan.rbs
|
1249
|
-
- sig/lib/mihari/structs/urlscan.rbs
|
1250
|
-
- sig/lib/mihari/structs/virustotal_intelligence.rbs
|
1251
|
-
- sig/lib/mihari/type_checker.rbs
|
1252
|
-
- sig/lib/mihari/types.rbs
|
1253
|
-
- sig/lib/mihari/version.rbs
|
1254
|
-
- sig/lib/mihari/web/app.rbs
|
1255
1170
|
homepage: https://github.com/ninoseki/mihari
|
1256
1171
|
licenses:
|
1257
1172
|
- MIT
|
@@ -1272,7 +1187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1272
1187
|
- !ruby/object:Gem::Version
|
1273
1188
|
version: '0'
|
1274
1189
|
requirements: []
|
1275
|
-
rubygems_version: 3.
|
1190
|
+
rubygems_version: 3.4.1
|
1276
1191
|
signing_key:
|
1277
1192
|
specification_version: 4
|
1278
1193
|
summary: A framework for continuous OSINT based threat hunting
|
data/lib/mihari/cli/init.rb
DELETED
data/lib/mihari/cli/validator.rb
DELETED
data/lib/mihari/commands/init.rb
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Mihari
|
4
|
-
module Commands
|
5
|
-
module Initialization
|
6
|
-
def self.included(thor)
|
7
|
-
thor.class_eval do
|
8
|
-
desc "rule", "Create a rule file"
|
9
|
-
method_option :filename, type: :string, default: "rule.yml"
|
10
|
-
def rule
|
11
|
-
filename = options["filename"]
|
12
|
-
|
13
|
-
warning = "#{filename} exists. Do you want to overwrite it? (y/n)"
|
14
|
-
if File.exist?(filename) && !(yes? warning)
|
15
|
-
return
|
16
|
-
end
|
17
|
-
|
18
|
-
initialize_rule_yaml filename
|
19
|
-
|
20
|
-
Mihari.logger.info "The rule file is initialized as #{filename}."
|
21
|
-
end
|
22
|
-
|
23
|
-
no_commands do
|
24
|
-
#
|
25
|
-
# Returns a template for rule
|
26
|
-
#
|
27
|
-
# @return [String] A template for rule
|
28
|
-
#
|
29
|
-
def rule_template
|
30
|
-
rule = Structs::Rule.from_path_or_id File.expand_path("../templates/rule.yml.erb", __dir__)
|
31
|
-
rule.yaml
|
32
|
-
end
|
33
|
-
|
34
|
-
#
|
35
|
-
# Create (blank) rule file
|
36
|
-
#
|
37
|
-
# @param [String] filename
|
38
|
-
# @param [Dry::Files] files
|
39
|
-
# @param [String] template
|
40
|
-
#
|
41
|
-
# @return [nil]
|
42
|
-
#
|
43
|
-
def initialize_rule_yaml(filename, files = Dry::Files.new, template: rule_template)
|
44
|
-
files.write(filename, template)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|