mihari 3.5.0 → 3.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/README.md +2 -0
- data/Steepfile +32 -0
- data/config.ru +1 -0
- data/lib/mihari/analyzers/base.rb +24 -11
- data/lib/mihari/analyzers/binaryedge.rb +13 -0
- data/lib/mihari/analyzers/censys.rb +42 -9
- data/lib/mihari/analyzers/circl.rb +15 -0
- data/lib/mihari/analyzers/crtsh.rb +5 -0
- data/lib/mihari/analyzers/dnpedia.rb +5 -0
- data/lib/mihari/analyzers/dnstwister.rb +17 -0
- data/lib/mihari/analyzers/onyphe.rb +50 -9
- data/lib/mihari/analyzers/otx.rb +20 -0
- data/lib/mihari/analyzers/passivetotal.rb +25 -0
- data/lib/mihari/analyzers/pulsedive.rb +10 -0
- data/lib/mihari/analyzers/rule.rb +18 -0
- data/lib/mihari/analyzers/securitytrails.rb +25 -0
- data/lib/mihari/analyzers/shodan.rb +39 -5
- data/lib/mihari/analyzers/spyse.rb +20 -0
- data/lib/mihari/analyzers/urlscan.rb +10 -0
- data/lib/mihari/analyzers/virustotal.rb +20 -0
- data/lib/mihari/analyzers/zoomeye.rb +38 -0
- data/lib/mihari/{constraints.rb → constants.rb} +0 -0
- data/lib/mihari/database.rb +55 -3
- data/lib/mihari/emitters/base.rb +1 -1
- data/lib/mihari/emitters/misp.rb +38 -5
- data/lib/mihari/emitters/slack.rb +20 -2
- data/lib/mihari/emitters/the_hive.rb +16 -3
- data/lib/mihari/emitters/webhook.rb +18 -3
- data/lib/mihari/enrichers/base.rb +18 -0
- data/lib/mihari/enrichers/ipinfo.rb +49 -0
- data/lib/mihari/mixins/autonomous_system.rb +19 -0
- data/lib/mihari/mixins/disallowed_data_value.rb +1 -1
- data/lib/mihari/models/alert.rb +8 -4
- data/lib/mihari/models/artifact.rb +94 -0
- data/lib/mihari/models/autonomous_system.rb +26 -0
- data/lib/mihari/models/dns.rb +55 -0
- data/lib/mihari/models/geolocation.rb +29 -0
- data/lib/mihari/models/reverse_dns.rb +26 -0
- data/lib/mihari/models/whois.rb +119 -0
- data/lib/mihari/schemas/rule.rb +2 -15
- data/lib/mihari/serializers/alert.rb +6 -4
- data/lib/mihari/serializers/artifact.rb +11 -2
- data/lib/mihari/serializers/autonomous_system.rb +9 -0
- data/lib/mihari/serializers/dns.rb +11 -0
- data/lib/mihari/serializers/geolocation.rb +11 -0
- data/lib/mihari/serializers/reverse_dns.rb +11 -0
- data/lib/mihari/serializers/tag.rb +4 -2
- data/lib/mihari/serializers/whois.rb +11 -0
- data/lib/mihari/status.rb +7 -2
- data/lib/mihari/structs/censys.rb +92 -0
- data/lib/mihari/structs/ipinfo.rb +39 -0
- data/lib/mihari/structs/onyphe.rb +47 -0
- data/lib/mihari/structs/shodan.rb +53 -0
- data/lib/mihari/type_checker.rb +9 -9
- data/lib/mihari/types.rb +21 -0
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari/web/controllers/artifacts_controller.rb +53 -8
- data/lib/mihari/web/controllers/ip_address_controller.rb +4 -19
- data/lib/mihari/web/controllers/sources_controller.rb +2 -2
- data/lib/mihari/web/public/index.html +1 -1
- data/lib/mihari/web/public/redoc-static.html +7 -6
- data/lib/mihari/web/public/static/js/app.06d5cf1c.js +36 -0
- data/lib/mihari/web/public/static/js/app.06d5cf1c.js.map +1 -0
- data/lib/mihari/web/public/static/js/app.8e3e5150.js +36 -0
- data/lib/mihari/web/public/static/js/app.8e3e5150.js.map +1 -0
- data/lib/mihari.rb +39 -5
- data/mihari.gemspec +10 -1
- data/sig/lib/mihari/analyzers/base.rbs +90 -0
- data/sig/lib/mihari/analyzers/basic.rbs +17 -0
- data/sig/lib/mihari/analyzers/binaryedge.rbs +25 -0
- data/sig/lib/mihari/analyzers/censys.rbs +38 -0
- data/sig/lib/mihari/analyzers/circl.rbs +29 -0
- data/sig/lib/mihari/analyzers/crtsh.rbs +19 -0
- data/sig/lib/mihari/analyzers/dnpedia.rbs +18 -0
- data/sig/lib/mihari/analyzers/dnstwister.rbs +27 -0
- data/sig/lib/mihari/analyzers/onyphe.rbs +33 -0
- data/sig/lib/mihari/analyzers/otx.rbs +33 -0
- data/sig/lib/mihari/analyzers/passivetotal.rbs +33 -0
- data/sig/lib/mihari/analyzers/pulsedive.rbs +27 -0
- data/sig/lib/mihari/analyzers/rule.rbs +68 -0
- data/sig/lib/mihari/analyzers/securitytrails.rbs +33 -0
- data/sig/lib/mihari/analyzers/shodan.rbs +33 -0
- data/sig/lib/mihari/analyzers/spyse.rbs +29 -0
- data/sig/lib/mihari/analyzers/urlscan.rbs +28 -0
- data/sig/lib/mihari/analyzers/virustotal.rbs +31 -0
- data/sig/lib/mihari/analyzers/zoomeye.rbs +33 -0
- data/sig/lib/mihari/cli/analyzer.rbs +39 -0
- data/sig/lib/mihari/cli/base.rbs +11 -0
- data/sig/lib/mihari/cli/init.rbs +7 -0
- data/sig/lib/mihari/cli/main.rbs +9 -0
- data/sig/lib/mihari/cli/mixins/utils.rbs +50 -0
- data/sig/lib/mihari/cli/validator.rbs +7 -0
- data/sig/lib/mihari/commands/binaryedge.rbs +7 -0
- data/sig/lib/mihari/commands/censys.rbs +7 -0
- data/sig/lib/mihari/commands/circl.rbs +7 -0
- data/sig/lib/mihari/commands/crtsh.rbs +7 -0
- data/sig/lib/mihari/commands/dnpedia.rbs +7 -0
- data/sig/lib/mihari/commands/dnstwister.rbs +7 -0
- data/sig/lib/mihari/commands/init.rbs +11 -0
- data/sig/lib/mihari/commands/json.rbs +7 -0
- data/sig/lib/mihari/commands/onyphe.rbs +7 -0
- data/sig/lib/mihari/commands/otx.rbs +7 -0
- data/sig/lib/mihari/commands/passivetotal.rbs +7 -0
- data/sig/lib/mihari/commands/pulsedive.rbs +7 -0
- data/sig/lib/mihari/commands/search.rbs +35 -0
- data/sig/lib/mihari/commands/securitytrails.rbs +7 -0
- data/sig/lib/mihari/commands/shodan.rbs +7 -0
- data/sig/lib/mihari/commands/spyse.rbs +7 -0
- data/sig/lib/mihari/commands/urlscan.rbs +7 -0
- data/sig/lib/mihari/commands/validator.rbs +11 -0
- data/sig/lib/mihari/commands/virustotal.rbs +7 -0
- data/sig/lib/mihari/commands/web.rbs +7 -0
- data/sig/lib/mihari/commands/zoomeye.rbs +7 -0
- data/sig/lib/mihari/constants.rbs +3 -0
- data/sig/lib/mihari/database.rbs +25 -0
- data/sig/lib/mihari/emitters/base.rbs +18 -0
- data/sig/lib/mihari/emitters/database.rbs +9 -0
- data/sig/lib/mihari/emitters/misp.rbs +28 -0
- data/sig/lib/mihari/emitters/slack.rbs +58 -0
- data/sig/lib/mihari/emitters/stdout.rbs +9 -0
- data/sig/lib/mihari/emitters/the_hive.rbs +24 -0
- data/sig/lib/mihari/emitters/webhook.rbs +20 -0
- data/sig/lib/mihari/enrichers/base.rbs +12 -0
- data/sig/lib/mihari/enrichers/ipinfo.rbs +16 -0
- data/sig/lib/mihari/errors.rbs +10 -0
- data/sig/lib/mihari/mixins/autonomous_system.rbs +14 -0
- data/sig/lib/mihari/mixins/configurable.rbs +26 -0
- data/sig/lib/mihari/mixins/configuration.rbs +45 -0
- data/sig/lib/mihari/mixins/disallowed_data_value.rbs +25 -0
- data/sig/lib/mihari/mixins/hash.rbs +14 -0
- data/sig/lib/mihari/mixins/refang.rbs +14 -0
- data/sig/lib/mihari/mixins/retriable.rbs +15 -0
- data/sig/lib/mihari/mixins/rule.rbs +41 -0
- data/sig/lib/mihari/models/alert.rbs +46 -0
- data/sig/lib/mihari/models/artifact.rbs +65 -0
- data/sig/lib/mihari/models/autonomous_system.rbs +14 -0
- data/sig/lib/mihari/models/dns.rbs +19 -0
- data/sig/lib/mihari/models/geolocation.rbs +15 -0
- data/sig/lib/mihari/models/reverse_dns.rbs +14 -0
- data/sig/lib/mihari/models/tag.rbs +5 -0
- data/sig/lib/mihari/models/tagging.rbs +4 -0
- data/sig/lib/mihari/models/whois.rbs +66 -0
- data/sig/lib/mihari/notifiers/base.rbs +18 -0
- data/sig/lib/mihari/notifiers/exception_notifier.rbs +75 -0
- data/sig/lib/mihari/notifiers/slack.rbs +50 -0
- data/sig/lib/mihari/status.rbs +25 -0
- data/sig/lib/mihari/structs/censys.rbs +50 -0
- data/sig/lib/mihari/structs/ipinfo.rbs +17 -0
- data/sig/lib/mihari/structs/onyphe.rbs +25 -0
- data/sig/lib/mihari/structs/shodan.rbs +28 -0
- data/sig/lib/mihari/type_checker.rbs +48 -0
- data/sig/lib/mihari/types.rbs +17 -0
- data/sig/lib/mihari/version.rbs +3 -0
- data/sig/lib/mihari/web/app.rbs +5 -0
- data/sig/lib/mihari.rbs +59 -0
- metadata +244 -6
@@ -0,0 +1,29 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class CIRCL < Base
|
4
|
+
include Mixins::Refang
|
5
|
+
|
6
|
+
attr_reader query: String
|
7
|
+
attr_reader title: String
|
8
|
+
attr_reader description: String
|
9
|
+
attr_reader tags: Array[String]
|
10
|
+
attr_reader type: String
|
11
|
+
|
12
|
+
def initialize: (*untyped args, **untyped kwargs) -> void
|
13
|
+
|
14
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def configuration_keys: () -> ::Array["circl_passive_password" | "circl_passive_username"]
|
19
|
+
|
20
|
+
def api: () -> untyped
|
21
|
+
|
22
|
+
def search: () -> Array[String]
|
23
|
+
|
24
|
+
def passive_dns_search: () -> Array[String]
|
25
|
+
|
26
|
+
def passive_ssl_search: () -> Array[String]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class Crtsh < Base
|
4
|
+
attr_reader query: String
|
5
|
+
attr_reader title: String
|
6
|
+
attr_reader description: String
|
7
|
+
attr_reader tags: Array[String]
|
8
|
+
attr_reader exclude_expired: bool
|
9
|
+
|
10
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def api: () -> untyped
|
15
|
+
|
16
|
+
def search: () -> Array[Hash[(String | Symbol), untyped]]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class DNPedia < 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 artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def api: () -> untyped
|
14
|
+
|
15
|
+
def search: () -> Array[String]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class DNSTwister < Base
|
4
|
+
include Mixins::Refang
|
5
|
+
|
6
|
+
attr_reader query: String
|
7
|
+
attr_reader title: String
|
8
|
+
attr_reader description: String
|
9
|
+
attr_reader tags: Array[String]
|
10
|
+
attr_reader type: String
|
11
|
+
|
12
|
+
def initialize: (*untyped args, **untyped kwargs) -> void
|
13
|
+
|
14
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def valid_type?: () -> bool
|
19
|
+
|
20
|
+
def api: () -> untyped
|
21
|
+
|
22
|
+
def resolvable?: (String domain) -> bool
|
23
|
+
|
24
|
+
def search: () -> Array[String]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class Onyphe < 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 artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
PAGE_SIZE: ::Integer
|
14
|
+
|
15
|
+
def configuration_keys: () -> ::Array["onyphe_api_key"]
|
16
|
+
|
17
|
+
def api: () -> untyped
|
18
|
+
|
19
|
+
def search_with_page: (String query, ?page: ::Integer page) -> Mihari::Structs::Onyphe::Response
|
20
|
+
|
21
|
+
def search: () -> Array[Mihari::Structs::Onyphe::Response]
|
22
|
+
|
23
|
+
#
|
24
|
+
# Build an artifact from an Onyphe search API result
|
25
|
+
#
|
26
|
+
# @param [Structs::Onyphe::Result] result
|
27
|
+
#
|
28
|
+
# @return [Artifact]
|
29
|
+
#
|
30
|
+
def build_artifact: (Mihari::Structs::Onyphe::Result result) -> Mihari::Artifact
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class OTX < Base
|
4
|
+
include Mixins::Refang
|
5
|
+
|
6
|
+
attr_reader query: String
|
7
|
+
attr_reader title: String
|
8
|
+
attr_reader description: String
|
9
|
+
attr_reader tags: Array[String]
|
10
|
+
attr_reader type: String
|
11
|
+
|
12
|
+
def initialize: (*untyped args, **untyped kwargs) -> void
|
13
|
+
|
14
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def configuration_keys: () -> ::Array["otx_api_key"]
|
19
|
+
|
20
|
+
def domain_client: () -> untyped
|
21
|
+
|
22
|
+
def ip_client: () -> untyped
|
23
|
+
|
24
|
+
def valid_type?: () -> bool
|
25
|
+
|
26
|
+
def search: () -> Array[String]
|
27
|
+
|
28
|
+
def domain_search: () -> Array[String]
|
29
|
+
|
30
|
+
def ip_search: () -> Array[String]
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class PassiveTotal < Base
|
4
|
+
include Mixins::Refang
|
5
|
+
|
6
|
+
attr_reader query: String
|
7
|
+
attr_reader title: String
|
8
|
+
attr_reader description: String
|
9
|
+
attr_reader tags: Array[String]
|
10
|
+
attr_reader type: String
|
11
|
+
|
12
|
+
def initialize: (*untyped args, **untyped kwargs) -> void
|
13
|
+
|
14
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def configuration_keys: () -> ::Array["passivetotal_username" | "passivetotal_api_key"]
|
19
|
+
|
20
|
+
def api: () -> untyped
|
21
|
+
|
22
|
+
def valid_type?: () -> bool
|
23
|
+
|
24
|
+
def search: () -> Array[String]
|
25
|
+
|
26
|
+
def passive_dns_search: () -> Array[String]
|
27
|
+
|
28
|
+
def reverse_whois_search: () -> Array[String]
|
29
|
+
|
30
|
+
def ssl_search: () -> Array[String]
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class Pulsedive < Base
|
4
|
+
include Mixins::Refang
|
5
|
+
|
6
|
+
attr_reader query: String
|
7
|
+
attr_reader title: String
|
8
|
+
attr_reader description: String
|
9
|
+
attr_reader tags: Array[String]
|
10
|
+
attr_reader type: String
|
11
|
+
|
12
|
+
def initialize: (*untyped args, **untyped kwargs) -> void
|
13
|
+
|
14
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def configuration_keys: () -> ::Array["pulsedive_api_key"]
|
19
|
+
|
20
|
+
def api: () -> untyped
|
21
|
+
|
22
|
+
def valid_type?: () -> bool
|
23
|
+
|
24
|
+
def search: () -> Array[String]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class Rule < Base
|
4
|
+
include Mihari::Mixins::DisallowedDataValue
|
5
|
+
|
6
|
+
attr_reader title: String
|
7
|
+
attr_reader description: String
|
8
|
+
attr_reader queries: Hash[(String | Symbol), untyped]
|
9
|
+
attr_reader tags: Array[String]
|
10
|
+
attr_reader allowed_data_types: Array[String]
|
11
|
+
attr_reader disallowed_data_values: Array[String]
|
12
|
+
attr_reader source: String
|
13
|
+
attr_reader id: String?
|
14
|
+
|
15
|
+
def initialize: (**untyped kwargs) -> void
|
16
|
+
|
17
|
+
ANALYZER_TO_CLASS: Hash[String, singleton(Mihari::Analyzers::Base)]
|
18
|
+
|
19
|
+
#
|
20
|
+
# Returns a list of artifacts matched with queries
|
21
|
+
#
|
22
|
+
# @return [Array<Mihari::Artifact>]
|
23
|
+
#
|
24
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
25
|
+
|
26
|
+
#
|
27
|
+
# Normalize artifacts
|
28
|
+
# - Uniquefy artifacts by #uniq(&:data)
|
29
|
+
# - Reject an invalid artifact (for just in case)
|
30
|
+
# - Select artifacts with allowed data types
|
31
|
+
# - Reject artifacts with disallowed data values
|
32
|
+
#
|
33
|
+
# @return [Array<Mihari::Artifact>]
|
34
|
+
#
|
35
|
+
def normalized_artifacts: () -> untyped
|
36
|
+
|
37
|
+
#
|
38
|
+
# Normalized disallowed data values
|
39
|
+
#
|
40
|
+
# @return [Array<Regexp, String>]
|
41
|
+
#
|
42
|
+
def normalized_disallowed_data_values: () -> untyped
|
43
|
+
|
44
|
+
#
|
45
|
+
# Check whether a value is a disallowed data value or not
|
46
|
+
#
|
47
|
+
# @return [Boolean]
|
48
|
+
#
|
49
|
+
def disallowed_data_value?: (untyped value) -> untyped
|
50
|
+
|
51
|
+
private
|
52
|
+
|
53
|
+
#
|
54
|
+
# Get analyzer class
|
55
|
+
#
|
56
|
+
# @param [String] analyzer_name
|
57
|
+
#
|
58
|
+
# @return [Class<Mihari::Analyzers::Base>] analyzer class
|
59
|
+
#
|
60
|
+
def get_analyzer_class: (untyped analyzer_name) -> untyped
|
61
|
+
|
62
|
+
#
|
63
|
+
# Validate configuration of analyzers
|
64
|
+
#
|
65
|
+
def validate_analyzer_configurations: () -> untyped
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class SecurityTrails < Base
|
4
|
+
include Mixins::Refang
|
5
|
+
|
6
|
+
attr_reader query: String
|
7
|
+
attr_reader title: String
|
8
|
+
attr_reader description: String
|
9
|
+
attr_reader tags: Array[String]
|
10
|
+
attr_reader type: String
|
11
|
+
|
12
|
+
def initialize: (*untyped args, **untyped kwargs) -> void
|
13
|
+
|
14
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def configuration_keys: () -> ::Array["securitytrails_api_key"]
|
19
|
+
|
20
|
+
def api: () -> untyped
|
21
|
+
|
22
|
+
def valid_type?: () -> bool
|
23
|
+
|
24
|
+
def search: () -> Array[String]
|
25
|
+
|
26
|
+
def domain_search: () -> Array[String]
|
27
|
+
|
28
|
+
def ip_search: () -> Array[String]
|
29
|
+
|
30
|
+
def mail_search: () -> Array[String]
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class Shodan < 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 artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
PAGE_SIZE: ::Integer
|
14
|
+
|
15
|
+
def configuration_keys: () -> ::Array["shodan_api_key"]
|
16
|
+
|
17
|
+
def api: () -> untyped
|
18
|
+
|
19
|
+
def search_with_page: (String query, ?page: ::Integer page) -> Hash[(String | Symbol), untyped]
|
20
|
+
|
21
|
+
def search: () -> Array[Hash[(String | Symbol), untyped]]
|
22
|
+
|
23
|
+
#
|
24
|
+
# Build an artifact from a Shodan search API response
|
25
|
+
#
|
26
|
+
# @param [Structs::Shodan::Match] match
|
27
|
+
#
|
28
|
+
# @return [Artifact]
|
29
|
+
#
|
30
|
+
def build_artifact: (Mihari::Structs::Shodan::Match match) -> Mihari::Artifact
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class Spyse < Base
|
4
|
+
attr_reader query: String
|
5
|
+
attr_reader title: String
|
6
|
+
attr_reader description: String
|
7
|
+
attr_reader tags: Array[String]
|
8
|
+
attr_reader type: String
|
9
|
+
|
10
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def search_params: () -> Hash[(String | Symbol), untyped]
|
15
|
+
|
16
|
+
def configuration_keys: () -> ::Array["spyse_api_key"]
|
17
|
+
|
18
|
+
def api: () -> untyped
|
19
|
+
|
20
|
+
def valid_type?: () -> bool
|
21
|
+
|
22
|
+
def domain_search: () -> Array[String]
|
23
|
+
|
24
|
+
def ip_search: () -> Array[String]
|
25
|
+
|
26
|
+
def search: () -> Array[String]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
SUPPORTED_DATA_TYPES: untyped
|
2
|
+
|
3
|
+
module Mihari
|
4
|
+
module Analyzers
|
5
|
+
class Urlscan < Base
|
6
|
+
attr_reader query: String
|
7
|
+
attr_reader title: String
|
8
|
+
attr_reader description: String
|
9
|
+
attr_reader tags: Array[String]
|
10
|
+
attr_reader allowed_data_types: Array[String]
|
11
|
+
attr_reader use_similarity: bool
|
12
|
+
|
13
|
+
def initialize: (*untyped args, **untyped kwargs) -> void
|
14
|
+
|
15
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def configuration_keys: () -> ::Array["urlscan_api_key"]
|
20
|
+
|
21
|
+
def api: () -> untyped
|
22
|
+
|
23
|
+
def search: () -> Array[Hash[(String | Symbol), untyped]]
|
24
|
+
|
25
|
+
def valid_alllowed_data_types?: () -> bool
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Mihari
|
2
|
+
module Analyzers
|
3
|
+
class VirusTotal < Base
|
4
|
+
attr_reader query: String
|
5
|
+
attr_reader title: String
|
6
|
+
attr_reader description: String
|
7
|
+
attr_reader tags: Array[String]
|
8
|
+
attr_reader type: String
|
9
|
+
|
10
|
+
include Mixins::Refang
|
11
|
+
|
12
|
+
def initialize: (*untyped args, **untyped kwargs) -> void
|
13
|
+
|
14
|
+
def artifacts: () -> (Array[String] | Array[Mihari::Artifact])
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def configuration_keys: () -> ::Array["virustotal_api_key"]
|
19
|
+
|
20
|
+
def api: () -> untyped
|
21
|
+
|
22
|
+
def valid_type?: () -> bool
|
23
|
+
|
24
|
+
def search: () -> Array[String]
|
25
|
+
|
26
|
+
def domain_search: () -> Array[String]
|
27
|
+
|
28
|
+
def ip_search: () -> Array[String]
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|