mihari 3.9.2 → 3.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mihari/analyzers/greynoise.rb +65 -0
- data/lib/mihari/analyzers/rule.rb +1 -0
- data/lib/mihari/analyzers/shodan.rb +3 -1
- data/lib/mihari/cli/analyzer.rb +2 -0
- data/lib/mihari/commands/greynoise.rb +21 -0
- data/lib/mihari/schemas/configuration.rb +3 -2
- data/lib/mihari/structs/greynoise.rb +55 -0
- data/lib/mihari/structs/shodan.rb +2 -2
- data/lib/mihari/types.rb +1 -0
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari/web/public/index.html +1 -1
- data/lib/mihari/web/public/static/js/app.0a0cc502.js +21 -0
- data/lib/mihari/web/public/static/js/app.0a0cc502.js.map +1 -0
- data/lib/mihari.rb +5 -2
- data/mihari.gemspec +1 -0
- data/sig/lib/mihari/structs/greynoise.rbs +30 -0
- data/sig/lib/mihari/structs/shodan.rbs +1 -1
- metadata +22 -2
data/lib/mihari.rb
CHANGED
@@ -37,6 +37,8 @@ module Mihari
|
|
37
37
|
setting :censys_secret, default: ENV["CENSYS_SECRET"]
|
38
38
|
setting :circl_passive_password, default: ENV["CIRCL_PASSIVE_PASSWORD"]
|
39
39
|
setting :circl_passive_username, default: ENV["CIRCL_PASSIVE_USERNAME"]
|
40
|
+
setting :database, default: ENV["DATABASE"] || "mihari.db"
|
41
|
+
setting :greynoise_api_key, default: ENV["GREYNOISE_API_KEY"]
|
40
42
|
setting :ipinfo_api_key, default: ENV["IPINFO_API_KEY"]
|
41
43
|
setting :misp_api_endpoint, default: ENV["MISP_API_ENDPOINT"]
|
42
44
|
setting :misp_api_key, default: ENV["MISP_API_KEY"]
|
@@ -54,10 +56,9 @@ module Mihari
|
|
54
56
|
setting :thehive_api_key, default: ENV["THEHIVE_API_KEY"]
|
55
57
|
setting :urlscan_api_key, default: ENV["URLSCAN_API_KEY"]
|
56
58
|
setting :virustotal_api_key, default: ENV["VIRUSTOTAL_API_KEY"]
|
57
|
-
setting :zoomeye_api_key, default: ENV["ZOOMEYE_API_KEY"]
|
58
59
|
setting :webhook_url, default: ENV["WEBHOOK_URL"]
|
59
60
|
setting :webhook_use_json_body, constructor: ->(value = ENV["WEBHOOK_USE_JSON_BODY"]) { truthy?(value) }
|
60
|
-
setting :
|
61
|
+
setting :zoomeye_api_key, default: ENV["ZOOMEYE_API_KEY"]
|
61
62
|
|
62
63
|
class << self
|
63
64
|
include Mem
|
@@ -112,6 +113,7 @@ require "mihari/types"
|
|
112
113
|
# Structs
|
113
114
|
require "mihari/structs/alert"
|
114
115
|
require "mihari/structs/censys"
|
116
|
+
require "mihari/structs/greynoise"
|
115
117
|
require "mihari/structs/ipinfo"
|
116
118
|
require "mihari/structs/onyphe"
|
117
119
|
require "mihari/structs/shodan"
|
@@ -147,6 +149,7 @@ require "mihari/analyzers/circl"
|
|
147
149
|
require "mihari/analyzers/crtsh"
|
148
150
|
require "mihari/analyzers/dnpedia"
|
149
151
|
require "mihari/analyzers/dnstwister"
|
152
|
+
require "mihari/analyzers/greynoise"
|
150
153
|
require "mihari/analyzers/onyphe"
|
151
154
|
require "mihari/analyzers/otx"
|
152
155
|
require "mihari/analyzers/passivetotal"
|
data/mihari.gemspec
CHANGED
@@ -65,6 +65,7 @@ Gem::Specification.new do |spec|
|
|
65
65
|
spec.add_dependency "grape-entity", "~> 0.10"
|
66
66
|
spec.add_dependency "grape-swagger", "~> 1.4"
|
67
67
|
spec.add_dependency "grape-swagger-entity", "~> 0.5"
|
68
|
+
spec.add_dependency "greynoise", "~> 0.1"
|
68
69
|
spec.add_dependency "hachi", "~> 1.0"
|
69
70
|
spec.add_dependency "http", "~> 5.0"
|
70
71
|
spec.add_dependency "launchy", "~> 2.5"
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Structs
|
3
|
+
module GreyNoise
|
4
|
+
class Metadata < Dry::Struct
|
5
|
+
attr_reader country: String
|
6
|
+
attr_reader country_code: String
|
7
|
+
attr_reader asn: String
|
8
|
+
|
9
|
+
def self.from_dynamic!: (Hash[(String | Symbol), untyped] d) -> untyped
|
10
|
+
end
|
11
|
+
|
12
|
+
class Datum < Dry::Struct
|
13
|
+
attr_reader ip: String
|
14
|
+
attr_reader metadata: Mihari::Structs::GreyNoise::Metadata
|
15
|
+
|
16
|
+
def self.from_dynamic!: (Hash[(String | Symbol), untyped] d) -> untyped
|
17
|
+
end
|
18
|
+
|
19
|
+
class Response < Dry::Struct
|
20
|
+
attr_reader complete: Boolean
|
21
|
+
attr_reader count: Integer
|
22
|
+
attr_reader data: Array[Mihari::Structs::GreyNoise::Danum]
|
23
|
+
attr_reader message: String
|
24
|
+
attr_reader query: String
|
25
|
+
|
26
|
+
def self.from_dynamic!: (Hash[(String | Symbol), untyped] d) -> untyped
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
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.10.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: 2021-10-
|
11
|
+
date: 2021-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -556,6 +556,20 @@ dependencies:
|
|
556
556
|
- - "~>"
|
557
557
|
- !ruby/object:Gem::Version
|
558
558
|
version: '0.5'
|
559
|
+
- !ruby/object:Gem::Dependency
|
560
|
+
name: greynoise
|
561
|
+
requirement: !ruby/object:Gem::Requirement
|
562
|
+
requirements:
|
563
|
+
- - "~>"
|
564
|
+
- !ruby/object:Gem::Version
|
565
|
+
version: '0.1'
|
566
|
+
type: :runtime
|
567
|
+
prerelease: false
|
568
|
+
version_requirements: !ruby/object:Gem::Requirement
|
569
|
+
requirements:
|
570
|
+
- - "~>"
|
571
|
+
- !ruby/object:Gem::Version
|
572
|
+
version: '0.1'
|
559
573
|
- !ruby/object:Gem::Dependency
|
560
574
|
name: hachi
|
561
575
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1078,6 +1092,7 @@ files:
|
|
1078
1092
|
- lib/mihari/analyzers/crtsh.rb
|
1079
1093
|
- lib/mihari/analyzers/dnpedia.rb
|
1080
1094
|
- lib/mihari/analyzers/dnstwister.rb
|
1095
|
+
- lib/mihari/analyzers/greynoise.rb
|
1081
1096
|
- lib/mihari/analyzers/onyphe.rb
|
1082
1097
|
- lib/mihari/analyzers/otx.rb
|
1083
1098
|
- lib/mihari/analyzers/passivetotal.rb
|
@@ -1102,6 +1117,7 @@ files:
|
|
1102
1117
|
- lib/mihari/commands/crtsh.rb
|
1103
1118
|
- lib/mihari/commands/dnpedia.rb
|
1104
1119
|
- lib/mihari/commands/dnstwister.rb
|
1120
|
+
- lib/mihari/commands/greynoise.rb
|
1105
1121
|
- lib/mihari/commands/init.rb
|
1106
1122
|
- lib/mihari/commands/json.rb
|
1107
1123
|
- lib/mihari/commands/onyphe.rb
|
@@ -1157,6 +1173,7 @@ files:
|
|
1157
1173
|
- lib/mihari/status.rb
|
1158
1174
|
- lib/mihari/structs/alert.rb
|
1159
1175
|
- lib/mihari/structs/censys.rb
|
1176
|
+
- lib/mihari/structs/greynoise.rb
|
1160
1177
|
- lib/mihari/structs/ipinfo.rb
|
1161
1178
|
- lib/mihari/structs/onyphe.rb
|
1162
1179
|
- lib/mihari/structs/shodan.rb
|
@@ -1223,6 +1240,8 @@ files:
|
|
1223
1240
|
- lib/mihari/web/public/static/img/fa-solid-900.37bc7099.svg
|
1224
1241
|
- lib/mihari/web/public/static/js/app.06d5cf1c.js
|
1225
1242
|
- lib/mihari/web/public/static/js/app.06d5cf1c.js.map
|
1243
|
+
- lib/mihari/web/public/static/js/app.0a0cc502.js
|
1244
|
+
- lib/mihari/web/public/static/js/app.0a0cc502.js.map
|
1226
1245
|
- lib/mihari/web/public/static/js/app.14008741.js
|
1227
1246
|
- lib/mihari/web/public/static/js/app.14008741.js.map
|
1228
1247
|
- lib/mihari/web/public/static/js/app.365f1907.js
|
@@ -1326,6 +1345,7 @@ files:
|
|
1326
1345
|
- sig/lib/mihari/status.rbs
|
1327
1346
|
- sig/lib/mihari/structs/alert.rbs
|
1328
1347
|
- sig/lib/mihari/structs/censys.rbs
|
1348
|
+
- sig/lib/mihari/structs/greynoise.rbs
|
1329
1349
|
- sig/lib/mihari/structs/ipinfo.rbs
|
1330
1350
|
- sig/lib/mihari/structs/onyphe.rbs
|
1331
1351
|
- sig/lib/mihari/structs/shodan.rbs
|