mihari 3.7.2 → 3.9.1
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 +6 -7
- data/README.md +1 -1
- data/config.ru +1 -1
- data/lib/mihari/analyzers/rule.rb +24 -19
- data/lib/mihari/analyzers/virustotal_intelligence.rb +63 -0
- data/lib/mihari/cli/analyzer.rb +2 -0
- data/lib/mihari/commands/passivetotal.rb +1 -0
- data/lib/mihari/commands/virustotal.rb +1 -0
- data/lib/mihari/commands/virustotal_intelligence.rb +22 -0
- data/lib/mihari/commands/web.rb +9 -5
- data/lib/mihari/database.rb +1 -1
- data/lib/mihari/errors.rb +2 -0
- data/lib/mihari/mixins/configuration.rb +12 -2
- data/lib/mihari/models/alert.rb +29 -54
- data/lib/mihari/models/artifact.rb +3 -0
- data/lib/mihari/structs/alert.rb +45 -0
- data/lib/mihari/structs/ipinfo.rb +3 -4
- data/lib/mihari/structs/virustotal_intelligence.rb +75 -0
- data/lib/mihari/types.rb +18 -3
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari/web/api.rb +43 -0
- data/lib/mihari/web/app.rb +48 -30
- data/lib/mihari/web/endpoints/alerts.rb +74 -0
- data/lib/mihari/web/endpoints/artifacts.rb +92 -0
- data/lib/mihari/web/endpoints/command.rb +32 -0
- data/lib/mihari/web/endpoints/configs.rb +22 -0
- data/lib/mihari/web/endpoints/ip_addresses.rb +27 -0
- data/lib/mihari/web/endpoints/sources.rb +18 -0
- data/lib/mihari/web/endpoints/tags.rb +38 -0
- data/lib/mihari/web/entities/alert.rb +23 -0
- data/lib/mihari/web/entities/artifact.rb +24 -0
- data/lib/mihari/web/entities/autonomous_system.rb +9 -0
- data/lib/mihari/web/entities/command.rb +14 -0
- data/lib/mihari/web/entities/config.rb +16 -0
- data/lib/mihari/web/entities/dns.rb +10 -0
- data/lib/mihari/web/entities/geolocation.rb +10 -0
- data/lib/mihari/web/entities/ip_address.rb +13 -0
- data/lib/mihari/web/entities/message.rb +9 -0
- data/lib/mihari/web/entities/reverse_dns.rb +9 -0
- data/lib/mihari/web/entities/source.rb +9 -0
- data/lib/mihari/web/entities/tag.rb +13 -0
- data/lib/mihari/web/entities/whois.rb +16 -0
- data/lib/mihari/web/public/grape.rb +73 -0
- data/lib/mihari/web/public/index.html +1 -1
- data/lib/mihari/web/public/redoc-static.html +53 -27
- data/lib/mihari/web/public/static/js/app.378da3dc.js +50 -0
- data/lib/mihari/web/public/static/js/app.378da3dc.js.map +1 -0
- data/lib/mihari/web/public/static/js/app.6b636b62.js +50 -0
- data/lib/mihari/web/public/static/js/app.6b636b62.js.map +1 -0
- data/lib/mihari/web/public/static/js/app.a862ebca.js +50 -0
- data/lib/mihari/web/public/static/js/app.a862ebca.js.map +1 -0
- data/lib/mihari.rb +5 -13
- data/mihari.gemspec +9 -7
- data/sig/lib/mihari/analyzers/rule.rbs +3 -3
- data/sig/lib/mihari/analyzers/virustotal_intelligence.rbs +32 -0
- data/sig/lib/mihari/models/alert.rbs +3 -31
- data/sig/lib/mihari/structs/alert.rbs +27 -0
- data/sig/lib/mihari/structs/virustotal_intelligence.rbs +33 -0
- data/sig/lib/mihari/web/app.rbs +2 -2
- metadata +123 -78
- data/lib/mihari/serializers/alert.rb +0 -14
- data/lib/mihari/serializers/artifact.rb +0 -18
- data/lib/mihari/serializers/autonomous_system.rb +0 -9
- data/lib/mihari/serializers/dns.rb +0 -11
- data/lib/mihari/serializers/geolocation.rb +0 -11
- data/lib/mihari/serializers/reverse_dns.rb +0 -11
- data/lib/mihari/serializers/tag.rb +0 -11
- data/lib/mihari/serializers/whois.rb +0 -11
- data/lib/mihari/web/controllers/alerts_controller.rb +0 -74
- data/lib/mihari/web/controllers/analyzers_controller.rb +0 -38
- data/lib/mihari/web/controllers/artifacts_controller.rb +0 -94
- data/lib/mihari/web/controllers/base_controller.rb +0 -22
- data/lib/mihari/web/controllers/command_controller.rb +0 -26
- data/lib/mihari/web/controllers/config_controller.rb +0 -13
- data/lib/mihari/web/controllers/ip_address_controller.rb +0 -21
- data/lib/mihari/web/controllers/sources_controller.rb +0 -12
- data/lib/mihari/web/controllers/tags_controller.rb +0 -30
- data/lib/mihari/web/helpers/json.rb +0 -53
data/lib/mihari.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "awrence"
|
3
4
|
require "colorize"
|
4
5
|
require "dry/configurable"
|
5
6
|
require "dry/files"
|
6
7
|
require "mem"
|
8
|
+
require "plissken"
|
7
9
|
require "yaml"
|
8
10
|
|
9
11
|
# Load .env
|
@@ -108,10 +110,12 @@ require "mihari/constants"
|
|
108
110
|
require "mihari/types"
|
109
111
|
|
110
112
|
# Structs
|
113
|
+
require "mihari/structs/alert"
|
111
114
|
require "mihari/structs/censys"
|
112
115
|
require "mihari/structs/ipinfo"
|
113
116
|
require "mihari/structs/onyphe"
|
114
117
|
require "mihari/structs/shodan"
|
118
|
+
require "mihari/structs/virustotal_intelligence"
|
115
119
|
|
116
120
|
# Schemas
|
117
121
|
require "mihari/schemas/analyzer"
|
@@ -133,18 +137,6 @@ require "mihari/models/tag"
|
|
133
137
|
require "mihari/models/tagging"
|
134
138
|
require "mihari/models/whois"
|
135
139
|
|
136
|
-
# Serializers
|
137
|
-
require "mihari/serializers/autonomous_system"
|
138
|
-
require "mihari/serializers/dns"
|
139
|
-
require "mihari/serializers/geolocation"
|
140
|
-
require "mihari/serializers/reverse_dns"
|
141
|
-
require "mihari/serializers/tag"
|
142
|
-
require "mihari/serializers/whois"
|
143
|
-
|
144
|
-
require "mihari/serializers/artifact"
|
145
|
-
|
146
|
-
require "mihari/serializers/alert"
|
147
|
-
|
148
140
|
# Analyzers
|
149
141
|
require "mihari/analyzers/base"
|
150
142
|
require "mihari/analyzers/basic"
|
@@ -163,9 +155,9 @@ require "mihari/analyzers/securitytrails"
|
|
163
155
|
require "mihari/analyzers/shodan"
|
164
156
|
require "mihari/analyzers/spyse"
|
165
157
|
require "mihari/analyzers/urlscan"
|
158
|
+
require "mihari/analyzers/virustotal_intelligence"
|
166
159
|
require "mihari/analyzers/virustotal"
|
167
160
|
require "mihari/analyzers/zoomeye"
|
168
|
-
|
169
161
|
require "mihari/analyzers/rule"
|
170
162
|
|
171
163
|
# Notifiers
|
data/mihari.gemspec
CHANGED
@@ -42,7 +42,6 @@ Gem::Specification.new do |spec|
|
|
42
42
|
spec.add_development_dependency "vcr", "~> 6.0"
|
43
43
|
spec.add_development_dependency "webmock", "~> 3.14"
|
44
44
|
|
45
|
-
spec.add_dependency "active_model_serializers", "~> 0.10"
|
46
45
|
spec.add_dependency "activerecord", "~> 6.1"
|
47
46
|
spec.add_dependency "activerecord-filter", "~> 6.1"
|
48
47
|
spec.add_dependency "addressable", "~> 2.8"
|
@@ -61,6 +60,10 @@ Gem::Specification.new do |spec|
|
|
61
60
|
spec.add_dependency "dry-struct", "~> 1.4"
|
62
61
|
spec.add_dependency "dry-validation", "~> 1.7"
|
63
62
|
spec.add_dependency "email_address", "~> 0.2"
|
63
|
+
spec.add_dependency "grape", "~> 1.5"
|
64
|
+
spec.add_dependency "grape-entity", "~> 0.10"
|
65
|
+
spec.add_dependency "grape-swagger", "~> 1.4"
|
66
|
+
spec.add_dependency "grape-swagger-entity", "~> 0.5"
|
64
67
|
spec.add_dependency "hachi", "~> 1.0"
|
65
68
|
spec.add_dependency "http", "~> 5.0"
|
66
69
|
spec.add_dependency "launchy", "~> 2.5"
|
@@ -71,20 +74,19 @@ Gem::Specification.new do |spec|
|
|
71
74
|
spec.add_dependency "normalize_country", "0.3"
|
72
75
|
spec.add_dependency "onyphe", "~> 2.0"
|
73
76
|
spec.add_dependency "otx_ruby", "~> 0.9"
|
74
|
-
spec.add_dependency "parallel", "~> 1.
|
77
|
+
spec.add_dependency "parallel", "~> 1.21"
|
75
78
|
spec.add_dependency "passive_circl", "~> 0.1"
|
76
79
|
spec.add_dependency "passivetotalx", "~> 0.1"
|
80
|
+
spec.add_dependency "plissken", "~> 1.4"
|
77
81
|
spec.add_dependency "public_suffix", "~> 4.0"
|
78
82
|
spec.add_dependency "pulsedive", "~> 0.1"
|
79
|
-
spec.add_dependency "puma", "~> 5.
|
83
|
+
spec.add_dependency "puma", "~> 5.5"
|
80
84
|
spec.add_dependency "rack", "~> 2.2"
|
81
85
|
spec.add_dependency "rack-contrib", "~> 2.3"
|
86
|
+
spec.add_dependency "rack-cors", "~> 1.1"
|
82
87
|
spec.add_dependency "safe_shell", "~> 1.1"
|
83
88
|
spec.add_dependency "securitytrails", "~> 1.0"
|
84
89
|
spec.add_dependency "shodanx", "~> 0.2"
|
85
|
-
spec.add_dependency "sinatra", "~> 2.1"
|
86
|
-
spec.add_dependency "sinatra-contrib", "~> 2.1"
|
87
|
-
spec.add_dependency "sinatra-param", "~> 1.6"
|
88
90
|
spec.add_dependency "slack-notifier", "~> 2.4"
|
89
91
|
spec.add_dependency "spysex", "~> 0.2"
|
90
92
|
spec.add_dependency "sqlite3", "~> 1.4"
|
@@ -92,7 +94,7 @@ Gem::Specification.new do |spec|
|
|
92
94
|
spec.add_dependency "thread_safe", "~> 0.3"
|
93
95
|
spec.add_dependency "urlscan", "~> 0.7"
|
94
96
|
spec.add_dependency "uuidtools", "~> 2.2"
|
95
|
-
spec.add_dependency "virustotalx", "~> 1.
|
97
|
+
spec.add_dependency "virustotalx", "~> 1.2"
|
96
98
|
spec.add_dependency "whois", "~> 5.0"
|
97
99
|
spec.add_dependency "whois-parser", "~> 1.2"
|
98
100
|
spec.add_dependency "zoomeye-rb", "~> 0.2"
|
@@ -1,5 +1,7 @@
|
|
1
1
|
module Mihari
|
2
2
|
module Analyzers
|
3
|
+
ANALYZER_TO_CLASS: Hash[String, singleton(Mihari::Analyzers::Base)]
|
4
|
+
|
3
5
|
class Rule < Base
|
4
6
|
include Mihari::Mixins::DisallowedDataValue
|
5
7
|
|
@@ -14,14 +16,12 @@ module Mihari
|
|
14
16
|
|
15
17
|
def initialize: (**untyped kwargs) -> void
|
16
18
|
|
17
|
-
ANALYZER_TO_CLASS: Hash[String, singleton(Mihari::Analyzers::Base)]
|
18
|
-
|
19
19
|
#
|
20
20
|
# Returns a list of artifacts matched with queries
|
21
21
|
#
|
22
22
|
# @return [Array<Mihari::Artifact>]
|
23
23
|
#
|
24
|
-
def artifacts: () -> (Array[
|
24
|
+
def artifacts: () -> (Array[Mihari::Artifact])
|
25
25
|
|
26
26
|
#
|
27
27
|
# Normalize artifacts
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class VirusTotalIntelligence < Base
|
4
|
+
attr_reader query: String
|
5
|
+
attr_reader title: String
|
6
|
+
attr_reader description: String
|
7
|
+
attr_reader tags: Array[String]
|
8
|
+
|
9
|
+
def initialize: (*untyped args, **untyped kwargs) -> void
|
10
|
+
|
11
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def configuration_keys: () -> ::Array["virustotal_api_key"]
|
16
|
+
|
17
|
+
#
|
18
|
+
# VT API
|
19
|
+
#
|
20
|
+
# @return [::VirusTotal::API]
|
21
|
+
#
|
22
|
+
def api: () -> untyped
|
23
|
+
|
24
|
+
#
|
25
|
+
# Search with cursor
|
26
|
+
#
|
27
|
+
# @return [Array<Mihari::Structs::VirusTotalIntelligence::Response>]
|
28
|
+
#
|
29
|
+
def search_witgh_cursor: () -> Array[Mihari::Structs::VirusTotalIntelligence::Response]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -7,40 +7,12 @@ module Mihari
|
|
7
7
|
attr_accessor artifacts(): Array[Mihari::Artifact]
|
8
8
|
attr_accessor Tags(): Array[Mihari::Tag]
|
9
9
|
|
10
|
-
|
11
|
-
# Search alerts
|
12
|
-
#
|
13
|
-
# @param [String, nil] artifact_data
|
14
|
-
# @param [String, nil] description
|
15
|
-
# @param [String, nil] source
|
16
|
-
# @param [String, nil] tag_name
|
17
|
-
# @param [String, nil] title
|
18
|
-
# @param [DateTime, nil] from_at
|
19
|
-
# @param [DateTime, nil] to_at
|
20
|
-
# @param [Integer, nil] limit
|
21
|
-
# @param [Integer, nil] page
|
22
|
-
#
|
23
|
-
# @return [Array<Hash>]
|
24
|
-
#
|
25
|
-
def self.search: (?artifact_data: String? artifact_data, ?description: String? description, ?source: String? source, ?tag_name: String? tag_name, ?title: String? title, ?from_at: DateTime? from_at, ?to_at: DateTime? to_at, ?limit: ::Integer limit, ?page: ::Integer page) -> Array[Hash[(String | Symbol), untyped]]
|
10
|
+
def self.search: (Mihari::Structs::Alert::SearchFilterWithPagination filter) -> Array[Hash[(String | Symbol), untyped]]
|
26
11
|
|
27
|
-
|
28
|
-
# Count alerts
|
29
|
-
#
|
30
|
-
# @param [String, nil] artifact_data
|
31
|
-
# @param [String, nil] description
|
32
|
-
# @param [String, nil] source
|
33
|
-
# @param [String, nil] tag_name
|
34
|
-
# @param [String, nil] title
|
35
|
-
# @param [DateTime, nil] from_at
|
36
|
-
# @param [DateTime, nil] to_at
|
37
|
-
#
|
38
|
-
# @return [Integer]
|
39
|
-
#
|
40
|
-
def self.count: (?artifact_data: String? artifact_data, ?description: String? description, ?source: String? source, ?tag_name: String? tag_name, ?title: String? title, ?from_at: DateTime? from_at, ?to_at: DateTime? to_at) -> Integer
|
12
|
+
def self.count: (Mihari::Structs::Alert::SearchFilter filter) -> Integer
|
41
13
|
|
42
14
|
private
|
43
15
|
|
44
|
-
def self.build_relation: (
|
16
|
+
def self.build_relation: (Mihari::Structs::Alert::SearchFilter filter) -> Mihari::Alert
|
45
17
|
end
|
46
18
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Structs
|
3
|
+
module Alert
|
4
|
+
class SearchFilter
|
5
|
+
attr_reader artifact_data: String?
|
6
|
+
attr_reader description: String?
|
7
|
+
attr_reader source: String?
|
8
|
+
attr_reader tag_name: String?
|
9
|
+
attr_reader title: String?
|
10
|
+
attr_reader from_at: DateTime?
|
11
|
+
attr_reader to_at: DateTime?
|
12
|
+
attr_reader asn: Integer?
|
13
|
+
attr_reader dns_record: String?
|
14
|
+
attr_reader reverse_dns_name: String?
|
15
|
+
|
16
|
+
def has_valid_artifact_filters: () -> bool
|
17
|
+
end
|
18
|
+
|
19
|
+
class SearchFilterWithPagination
|
20
|
+
attr_reader page: Integer
|
21
|
+
attr_reader limit: Integer
|
22
|
+
|
23
|
+
def without_pagination: () -> Mihari::Structs::Alert::SearchFilter
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Structs
|
3
|
+
module VirusTotalIntelligence
|
4
|
+
class ContextAttributes
|
5
|
+
attr_reader url: Array[String]?
|
6
|
+
|
7
|
+
def self.from_dynamic!: (Hash[(String | Symbol), untyped] d) -> Mihari::Structs::VirusTotalIntelligence::ContextAttributes
|
8
|
+
end
|
9
|
+
|
10
|
+
class Datum
|
11
|
+
attr_reader type: String
|
12
|
+
attr_reader context_attributes: Mihari::Structs::VirusTotalIntelligence::ContextAttributes?
|
13
|
+
|
14
|
+
def value: () -> String?
|
15
|
+
|
16
|
+
def self.from_dynamic!: (Hash[(String | Symbol), untyped] d) -> Mihari::Structs::VirusTotalIntelligence::Datum
|
17
|
+
end
|
18
|
+
|
19
|
+
class Meta
|
20
|
+
attr_reader cursor: String?
|
21
|
+
|
22
|
+
def self.from_dynamic!: (Hash[(String | Symbol), untyped] d) -> Mihari::Structs::VirusTotalIntelligence::Meta
|
23
|
+
end
|
24
|
+
|
25
|
+
class Response
|
26
|
+
attr_reader meta: Mihari::Structs::VirusTotalIntelligence::Meta
|
27
|
+
attr_reader data: Array[Mihari::Structs::VirusTotalIntelligence::Datum]
|
28
|
+
|
29
|
+
def self.from_dynamic!: (Hash[(String | Symbol), untyped] d) -> Mihari::Structs::VirusTotalIntelligence::Response
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/sig/lib/mihari/web/app.rbs
CHANGED
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: 3.
|
4
|
+
version: 3.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -234,20 +234,6 @@ dependencies:
|
|
234
234
|
- - "~>"
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '3.14'
|
237
|
-
- !ruby/object:Gem::Dependency
|
238
|
-
name: active_model_serializers
|
239
|
-
requirement: !ruby/object:Gem::Requirement
|
240
|
-
requirements:
|
241
|
-
- - "~>"
|
242
|
-
- !ruby/object:Gem::Version
|
243
|
-
version: '0.10'
|
244
|
-
type: :runtime
|
245
|
-
prerelease: false
|
246
|
-
version_requirements: !ruby/object:Gem::Requirement
|
247
|
-
requirements:
|
248
|
-
- - "~>"
|
249
|
-
- !ruby/object:Gem::Version
|
250
|
-
version: '0.10'
|
251
237
|
- !ruby/object:Gem::Dependency
|
252
238
|
name: activerecord
|
253
239
|
requirement: !ruby/object:Gem::Requirement
|
@@ -500,6 +486,62 @@ dependencies:
|
|
500
486
|
- - "~>"
|
501
487
|
- !ruby/object:Gem::Version
|
502
488
|
version: '0.2'
|
489
|
+
- !ruby/object:Gem::Dependency
|
490
|
+
name: grape
|
491
|
+
requirement: !ruby/object:Gem::Requirement
|
492
|
+
requirements:
|
493
|
+
- - "~>"
|
494
|
+
- !ruby/object:Gem::Version
|
495
|
+
version: '1.5'
|
496
|
+
type: :runtime
|
497
|
+
prerelease: false
|
498
|
+
version_requirements: !ruby/object:Gem::Requirement
|
499
|
+
requirements:
|
500
|
+
- - "~>"
|
501
|
+
- !ruby/object:Gem::Version
|
502
|
+
version: '1.5'
|
503
|
+
- !ruby/object:Gem::Dependency
|
504
|
+
name: grape-entity
|
505
|
+
requirement: !ruby/object:Gem::Requirement
|
506
|
+
requirements:
|
507
|
+
- - "~>"
|
508
|
+
- !ruby/object:Gem::Version
|
509
|
+
version: '0.10'
|
510
|
+
type: :runtime
|
511
|
+
prerelease: false
|
512
|
+
version_requirements: !ruby/object:Gem::Requirement
|
513
|
+
requirements:
|
514
|
+
- - "~>"
|
515
|
+
- !ruby/object:Gem::Version
|
516
|
+
version: '0.10'
|
517
|
+
- !ruby/object:Gem::Dependency
|
518
|
+
name: grape-swagger
|
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'
|
531
|
+
- !ruby/object:Gem::Dependency
|
532
|
+
name: grape-swagger-entity
|
533
|
+
requirement: !ruby/object:Gem::Requirement
|
534
|
+
requirements:
|
535
|
+
- - "~>"
|
536
|
+
- !ruby/object:Gem::Version
|
537
|
+
version: '0.5'
|
538
|
+
type: :runtime
|
539
|
+
prerelease: false
|
540
|
+
version_requirements: !ruby/object:Gem::Requirement
|
541
|
+
requirements:
|
542
|
+
- - "~>"
|
543
|
+
- !ruby/object:Gem::Version
|
544
|
+
version: '0.5'
|
503
545
|
- !ruby/object:Gem::Dependency
|
504
546
|
name: hachi
|
505
547
|
requirement: !ruby/object:Gem::Requirement
|
@@ -646,14 +688,14 @@ dependencies:
|
|
646
688
|
requirements:
|
647
689
|
- - "~>"
|
648
690
|
- !ruby/object:Gem::Version
|
649
|
-
version: '1.
|
691
|
+
version: '1.21'
|
650
692
|
type: :runtime
|
651
693
|
prerelease: false
|
652
694
|
version_requirements: !ruby/object:Gem::Requirement
|
653
695
|
requirements:
|
654
696
|
- - "~>"
|
655
697
|
- !ruby/object:Gem::Version
|
656
|
-
version: '1.
|
698
|
+
version: '1.21'
|
657
699
|
- !ruby/object:Gem::Dependency
|
658
700
|
name: passive_circl
|
659
701
|
requirement: !ruby/object:Gem::Requirement
|
@@ -682,6 +724,20 @@ dependencies:
|
|
682
724
|
- - "~>"
|
683
725
|
- !ruby/object:Gem::Version
|
684
726
|
version: '0.1'
|
727
|
+
- !ruby/object:Gem::Dependency
|
728
|
+
name: plissken
|
729
|
+
requirement: !ruby/object:Gem::Requirement
|
730
|
+
requirements:
|
731
|
+
- - "~>"
|
732
|
+
- !ruby/object:Gem::Version
|
733
|
+
version: '1.4'
|
734
|
+
type: :runtime
|
735
|
+
prerelease: false
|
736
|
+
version_requirements: !ruby/object:Gem::Requirement
|
737
|
+
requirements:
|
738
|
+
- - "~>"
|
739
|
+
- !ruby/object:Gem::Version
|
740
|
+
version: '1.4'
|
685
741
|
- !ruby/object:Gem::Dependency
|
686
742
|
name: public_suffix
|
687
743
|
requirement: !ruby/object:Gem::Requirement
|
@@ -716,14 +772,14 @@ dependencies:
|
|
716
772
|
requirements:
|
717
773
|
- - "~>"
|
718
774
|
- !ruby/object:Gem::Version
|
719
|
-
version: '5.
|
775
|
+
version: '5.5'
|
720
776
|
type: :runtime
|
721
777
|
prerelease: false
|
722
778
|
version_requirements: !ruby/object:Gem::Requirement
|
723
779
|
requirements:
|
724
780
|
- - "~>"
|
725
781
|
- !ruby/object:Gem::Version
|
726
|
-
version: '5.
|
782
|
+
version: '5.5'
|
727
783
|
- !ruby/object:Gem::Dependency
|
728
784
|
name: rack
|
729
785
|
requirement: !ruby/object:Gem::Requirement
|
@@ -753,7 +809,7 @@ dependencies:
|
|
753
809
|
- !ruby/object:Gem::Version
|
754
810
|
version: '2.3'
|
755
811
|
- !ruby/object:Gem::Dependency
|
756
|
-
name:
|
812
|
+
name: rack-cors
|
757
813
|
requirement: !ruby/object:Gem::Requirement
|
758
814
|
requirements:
|
759
815
|
- - "~>"
|
@@ -767,75 +823,47 @@ dependencies:
|
|
767
823
|
- !ruby/object:Gem::Version
|
768
824
|
version: '1.1'
|
769
825
|
- !ruby/object:Gem::Dependency
|
770
|
-
name:
|
771
|
-
requirement: !ruby/object:Gem::Requirement
|
772
|
-
requirements:
|
773
|
-
- - "~>"
|
774
|
-
- !ruby/object:Gem::Version
|
775
|
-
version: '1.0'
|
776
|
-
type: :runtime
|
777
|
-
prerelease: false
|
778
|
-
version_requirements: !ruby/object:Gem::Requirement
|
779
|
-
requirements:
|
780
|
-
- - "~>"
|
781
|
-
- !ruby/object:Gem::Version
|
782
|
-
version: '1.0'
|
783
|
-
- !ruby/object:Gem::Dependency
|
784
|
-
name: shodanx
|
785
|
-
requirement: !ruby/object:Gem::Requirement
|
786
|
-
requirements:
|
787
|
-
- - "~>"
|
788
|
-
- !ruby/object:Gem::Version
|
789
|
-
version: '0.2'
|
790
|
-
type: :runtime
|
791
|
-
prerelease: false
|
792
|
-
version_requirements: !ruby/object:Gem::Requirement
|
793
|
-
requirements:
|
794
|
-
- - "~>"
|
795
|
-
- !ruby/object:Gem::Version
|
796
|
-
version: '0.2'
|
797
|
-
- !ruby/object:Gem::Dependency
|
798
|
-
name: sinatra
|
826
|
+
name: safe_shell
|
799
827
|
requirement: !ruby/object:Gem::Requirement
|
800
828
|
requirements:
|
801
829
|
- - "~>"
|
802
830
|
- !ruby/object:Gem::Version
|
803
|
-
version: '
|
831
|
+
version: '1.1'
|
804
832
|
type: :runtime
|
805
833
|
prerelease: false
|
806
834
|
version_requirements: !ruby/object:Gem::Requirement
|
807
835
|
requirements:
|
808
836
|
- - "~>"
|
809
837
|
- !ruby/object:Gem::Version
|
810
|
-
version: '
|
838
|
+
version: '1.1'
|
811
839
|
- !ruby/object:Gem::Dependency
|
812
|
-
name:
|
840
|
+
name: securitytrails
|
813
841
|
requirement: !ruby/object:Gem::Requirement
|
814
842
|
requirements:
|
815
843
|
- - "~>"
|
816
844
|
- !ruby/object:Gem::Version
|
817
|
-
version: '
|
845
|
+
version: '1.0'
|
818
846
|
type: :runtime
|
819
847
|
prerelease: false
|
820
848
|
version_requirements: !ruby/object:Gem::Requirement
|
821
849
|
requirements:
|
822
850
|
- - "~>"
|
823
851
|
- !ruby/object:Gem::Version
|
824
|
-
version: '
|
852
|
+
version: '1.0'
|
825
853
|
- !ruby/object:Gem::Dependency
|
826
|
-
name:
|
854
|
+
name: shodanx
|
827
855
|
requirement: !ruby/object:Gem::Requirement
|
828
856
|
requirements:
|
829
857
|
- - "~>"
|
830
858
|
- !ruby/object:Gem::Version
|
831
|
-
version: '
|
859
|
+
version: '0.2'
|
832
860
|
type: :runtime
|
833
861
|
prerelease: false
|
834
862
|
version_requirements: !ruby/object:Gem::Requirement
|
835
863
|
requirements:
|
836
864
|
- - "~>"
|
837
865
|
- !ruby/object:Gem::Version
|
838
|
-
version: '
|
866
|
+
version: '0.2'
|
839
867
|
- !ruby/object:Gem::Dependency
|
840
868
|
name: slack-notifier
|
841
869
|
requirement: !ruby/object:Gem::Requirement
|
@@ -940,14 +968,14 @@ dependencies:
|
|
940
968
|
requirements:
|
941
969
|
- - "~>"
|
942
970
|
- !ruby/object:Gem::Version
|
943
|
-
version: '1.
|
971
|
+
version: '1.2'
|
944
972
|
type: :runtime
|
945
973
|
prerelease: false
|
946
974
|
version_requirements: !ruby/object:Gem::Requirement
|
947
975
|
requirements:
|
948
976
|
- - "~>"
|
949
977
|
- !ruby/object:Gem::Version
|
950
|
-
version: '1.
|
978
|
+
version: '1.2'
|
951
979
|
- !ruby/object:Gem::Dependency
|
952
980
|
name: whois
|
953
981
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1046,6 +1074,7 @@ files:
|
|
1046
1074
|
- lib/mihari/analyzers/spyse.rb
|
1047
1075
|
- lib/mihari/analyzers/urlscan.rb
|
1048
1076
|
- lib/mihari/analyzers/virustotal.rb
|
1077
|
+
- lib/mihari/analyzers/virustotal_intelligence.rb
|
1049
1078
|
- lib/mihari/analyzers/zoomeye.rb
|
1050
1079
|
- lib/mihari/cli/analyzer.rb
|
1051
1080
|
- lib/mihari/cli/base.rb
|
@@ -1072,6 +1101,7 @@ files:
|
|
1072
1101
|
- lib/mihari/commands/urlscan.rb
|
1073
1102
|
- lib/mihari/commands/validator.rb
|
1074
1103
|
- lib/mihari/commands/virustotal.rb
|
1104
|
+
- lib/mihari/commands/virustotal_intelligence.rb
|
1075
1105
|
- lib/mihari/commands/web.rb
|
1076
1106
|
- lib/mihari/commands/zoomeye.rb
|
1077
1107
|
- lib/mihari/constants.rb
|
@@ -1110,34 +1140,40 @@ files:
|
|
1110
1140
|
- lib/mihari/schemas/configuration.rb
|
1111
1141
|
- lib/mihari/schemas/macros.rb
|
1112
1142
|
- lib/mihari/schemas/rule.rb
|
1113
|
-
- lib/mihari/serializers/alert.rb
|
1114
|
-
- lib/mihari/serializers/artifact.rb
|
1115
|
-
- lib/mihari/serializers/autonomous_system.rb
|
1116
|
-
- lib/mihari/serializers/dns.rb
|
1117
|
-
- lib/mihari/serializers/geolocation.rb
|
1118
|
-
- lib/mihari/serializers/reverse_dns.rb
|
1119
|
-
- lib/mihari/serializers/tag.rb
|
1120
|
-
- lib/mihari/serializers/whois.rb
|
1121
1143
|
- lib/mihari/status.rb
|
1144
|
+
- lib/mihari/structs/alert.rb
|
1122
1145
|
- lib/mihari/structs/censys.rb
|
1123
1146
|
- lib/mihari/structs/ipinfo.rb
|
1124
1147
|
- lib/mihari/structs/onyphe.rb
|
1125
1148
|
- lib/mihari/structs/shodan.rb
|
1149
|
+
- lib/mihari/structs/virustotal_intelligence.rb
|
1126
1150
|
- lib/mihari/templates/rule.yml.erb
|
1127
1151
|
- lib/mihari/type_checker.rb
|
1128
1152
|
- lib/mihari/types.rb
|
1129
1153
|
- lib/mihari/version.rb
|
1154
|
+
- lib/mihari/web/api.rb
|
1130
1155
|
- lib/mihari/web/app.rb
|
1131
|
-
- lib/mihari/web/
|
1132
|
-
- lib/mihari/web/
|
1133
|
-
- lib/mihari/web/
|
1134
|
-
- lib/mihari/web/
|
1135
|
-
- lib/mihari/web/
|
1136
|
-
- lib/mihari/web/
|
1137
|
-
- lib/mihari/web/
|
1138
|
-
- lib/mihari/web/
|
1139
|
-
- lib/mihari/web/
|
1140
|
-
- lib/mihari/web/
|
1156
|
+
- lib/mihari/web/endpoints/alerts.rb
|
1157
|
+
- lib/mihari/web/endpoints/artifacts.rb
|
1158
|
+
- lib/mihari/web/endpoints/command.rb
|
1159
|
+
- lib/mihari/web/endpoints/configs.rb
|
1160
|
+
- lib/mihari/web/endpoints/ip_addresses.rb
|
1161
|
+
- lib/mihari/web/endpoints/sources.rb
|
1162
|
+
- lib/mihari/web/endpoints/tags.rb
|
1163
|
+
- lib/mihari/web/entities/alert.rb
|
1164
|
+
- lib/mihari/web/entities/artifact.rb
|
1165
|
+
- lib/mihari/web/entities/autonomous_system.rb
|
1166
|
+
- lib/mihari/web/entities/command.rb
|
1167
|
+
- lib/mihari/web/entities/config.rb
|
1168
|
+
- lib/mihari/web/entities/dns.rb
|
1169
|
+
- lib/mihari/web/entities/geolocation.rb
|
1170
|
+
- lib/mihari/web/entities/ip_address.rb
|
1171
|
+
- lib/mihari/web/entities/message.rb
|
1172
|
+
- lib/mihari/web/entities/reverse_dns.rb
|
1173
|
+
- lib/mihari/web/entities/source.rb
|
1174
|
+
- lib/mihari/web/entities/tag.rb
|
1175
|
+
- lib/mihari/web/entities/whois.rb
|
1176
|
+
- lib/mihari/web/public/grape.rb
|
1141
1177
|
- lib/mihari/web/public/index.html
|
1142
1178
|
- lib/mihari/web/public/redoc-static.html
|
1143
1179
|
- lib/mihari/web/public/static/favicon.ico
|
@@ -1175,8 +1211,14 @@ files:
|
|
1175
1211
|
- lib/mihari/web/public/static/js/app.06d5cf1c.js.map
|
1176
1212
|
- lib/mihari/web/public/static/js/app.365f1907.js
|
1177
1213
|
- lib/mihari/web/public/static/js/app.365f1907.js.map
|
1214
|
+
- lib/mihari/web/public/static/js/app.378da3dc.js
|
1215
|
+
- lib/mihari/web/public/static/js/app.378da3dc.js.map
|
1216
|
+
- lib/mihari/web/public/static/js/app.6b636b62.js
|
1217
|
+
- lib/mihari/web/public/static/js/app.6b636b62.js.map
|
1178
1218
|
- lib/mihari/web/public/static/js/app.8e3e5150.js
|
1179
1219
|
- lib/mihari/web/public/static/js/app.8e3e5150.js.map
|
1220
|
+
- lib/mihari/web/public/static/js/app.a862ebca.js
|
1221
|
+
- lib/mihari/web/public/static/js/app.a862ebca.js.map
|
1180
1222
|
- lib/mihari/web/public/static/js/app.ab213f7c.js
|
1181
1223
|
- lib/mihari/web/public/static/js/app.ab213f7c.js.map
|
1182
1224
|
- lib/mihari/web/public/static/js/app.b5914c39.js
|
@@ -1204,6 +1246,7 @@ files:
|
|
1204
1246
|
- sig/lib/mihari/analyzers/spyse.rbs
|
1205
1247
|
- sig/lib/mihari/analyzers/urlscan.rbs
|
1206
1248
|
- sig/lib/mihari/analyzers/virustotal.rbs
|
1249
|
+
- sig/lib/mihari/analyzers/virustotal_intelligence.rbs
|
1207
1250
|
- sig/lib/mihari/analyzers/zoomeye.rbs
|
1208
1251
|
- sig/lib/mihari/cli/analyzer.rbs
|
1209
1252
|
- sig/lib/mihari/cli/base.rbs
|
@@ -1265,10 +1308,12 @@ files:
|
|
1265
1308
|
- sig/lib/mihari/notifiers/exception_notifier.rbs
|
1266
1309
|
- sig/lib/mihari/notifiers/slack.rbs
|
1267
1310
|
- sig/lib/mihari/status.rbs
|
1311
|
+
- sig/lib/mihari/structs/alert.rbs
|
1268
1312
|
- sig/lib/mihari/structs/censys.rbs
|
1269
1313
|
- sig/lib/mihari/structs/ipinfo.rbs
|
1270
1314
|
- sig/lib/mihari/structs/onyphe.rbs
|
1271
1315
|
- sig/lib/mihari/structs/shodan.rbs
|
1316
|
+
- sig/lib/mihari/structs/virustotal_intelligence.rbs
|
1272
1317
|
- sig/lib/mihari/type_checker.rbs
|
1273
1318
|
- sig/lib/mihari/types.rbs
|
1274
1319
|
- sig/lib/mihari/version.rbs
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "active_model_serializers"
|
4
|
-
|
5
|
-
module Mihari
|
6
|
-
module Serializers
|
7
|
-
class AlertSerializer < ActiveModel::Serializer
|
8
|
-
attributes :id, :title, :description, :source, :created_at
|
9
|
-
|
10
|
-
has_many :artifacts, serializer: ArtifactSerializer
|
11
|
-
has_many :tags, through: :taggings, serializer: TagSerializer
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|