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
@@ -1,33 +0,0 @@
|
|
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
|
@@ -1,48 +0,0 @@
|
|
1
|
-
module Mihari
|
2
|
-
class TypeChecker
|
3
|
-
# extend Dry::Initializer
|
4
|
-
|
5
|
-
def initialize: (*untyped args, **untyped kwargs) -> void
|
6
|
-
|
7
|
-
# @return [true, false]
|
8
|
-
def hash?: () -> bool
|
9
|
-
|
10
|
-
# @return [true, false]
|
11
|
-
def ip?: () -> bool
|
12
|
-
|
13
|
-
# @return [true, false]
|
14
|
-
def domain?: () -> bool
|
15
|
-
|
16
|
-
# @return [true, false]
|
17
|
-
def url?: () -> bool
|
18
|
-
|
19
|
-
# @return [true, false]
|
20
|
-
def mail?: () -> bool
|
21
|
-
|
22
|
-
# @return [String, nil]
|
23
|
-
def type: () -> ("hash" | "ip" | "domain" | "url" | nil)
|
24
|
-
|
25
|
-
# @return [String, nil]
|
26
|
-
def detailed_type: () -> ("md5" | "sha1" | "sha256" | "sha512" | nil)
|
27
|
-
|
28
|
-
# @return [String, nil]
|
29
|
-
def self.type: (untyped data) -> String?
|
30
|
-
|
31
|
-
# @return [String, nil]
|
32
|
-
def self.detailed_type: (untyped data) -> String?
|
33
|
-
|
34
|
-
private
|
35
|
-
|
36
|
-
# @return [true, false]
|
37
|
-
def md5?: () -> bool
|
38
|
-
|
39
|
-
# @return [true, false]
|
40
|
-
def sha1?: () -> bool
|
41
|
-
|
42
|
-
# @return [true, false]
|
43
|
-
def sha256?: () -> bool
|
44
|
-
|
45
|
-
# @return [true, false]
|
46
|
-
def sha512?: () -> bool
|
47
|
-
end
|
48
|
-
end
|
data/sig/lib/mihari/types.rbs
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
module Mihari
|
2
|
-
module Types
|
3
|
-
Int: ::Integer
|
4
|
-
|
5
|
-
Nil: nil
|
6
|
-
|
7
|
-
Hash: Hash[(String | Symbol), untyped]
|
8
|
-
|
9
|
-
String: ::String
|
10
|
-
|
11
|
-
Double: (::Float | ::Integer)
|
12
|
-
|
13
|
-
DataTypes: Array[String]
|
14
|
-
|
15
|
-
AnalyzerTypes: Array[String]
|
16
|
-
|
17
|
-
FeedHttpRequestMethods: Array[String]
|
18
|
-
|
19
|
-
FeedHttpRequestPayloadTypes: Array[String]
|
20
|
-
|
21
|
-
EmitterTypes: Array[String]
|
22
|
-
end
|
23
|
-
end
|
data/sig/lib/mihari/version.rbs
DELETED
data/sig/lib/mihari/web/app.rbs
DELETED
data/sig/lib/mihari.rbs
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
class Configuration
|
2
|
-
attr_accessor binaryedge_api_key (): String?
|
3
|
-
attr_accessor censys_id (): String?
|
4
|
-
attr_accessor censys_secret (): String?
|
5
|
-
attr_accessor circl_passive_password (): String?
|
6
|
-
attr_accessor circl_passive_username (): String?
|
7
|
-
attr_accessor ipinfo_api_key (): String?
|
8
|
-
attr_accessor misp_url (): String?
|
9
|
-
attr_accessor misp_api_key (): String?
|
10
|
-
attr_accessor onyphe_api_key (): String?
|
11
|
-
attr_accessor otx_api_key (): String?
|
12
|
-
attr_accessor passivetotal_api_key (): String?
|
13
|
-
attr_accessor passivetotal_username (): String?
|
14
|
-
attr_accessor pulsedive_api_key (): String?
|
15
|
-
attr_accessor securitytrails_api_key (): String?
|
16
|
-
attr_accessor shodan_api_key (): String?
|
17
|
-
attr_accessor slack_channel (): String?
|
18
|
-
attr_accessor slack_webhook_url (): String?
|
19
|
-
attr_accessor spyse_api_key (): String?
|
20
|
-
attr_accessor thehive_url (): String?
|
21
|
-
attr_accessor thehive_api_key (): String?
|
22
|
-
attr_accessor thehive_api_version (): String?
|
23
|
-
attr_accessor urlscan_api_key (): String?
|
24
|
-
attr_accessor virustotal_api_key (): String?
|
25
|
-
attr_accessor zoomeye_api_key (): String?
|
26
|
-
attr_accessor webhook_url (): String?
|
27
|
-
attr_accessor webhook_use_json_body (): (bool | nil)
|
28
|
-
attr_accessor database (): String?
|
29
|
-
attr_accessor sentry_dsn(): String?
|
30
|
-
|
31
|
-
attr_reader values: Hash[(String | Symbol), String?]
|
32
|
-
end
|
33
|
-
|
34
|
-
module Mihari
|
35
|
-
def self.config: () -> Configuration
|
36
|
-
|
37
|
-
# extend Dry::Configurable
|
38
|
-
|
39
|
-
extend Mixins::Configuration
|
40
|
-
|
41
|
-
def self.emitters: () -> ::Array[singleton(Mihari::Emitters::Base)]
|
42
|
-
|
43
|
-
def self.analyzers: () -> ::Array[singleton(Mihari::Analyzers::Base)]
|
44
|
-
|
45
|
-
def self.enrichers: () -> ::Array[singleton(Mihari::Enrichers::Base)]
|
46
|
-
|
47
|
-
def self.logger: () -> SemanticLogger
|
48
|
-
|
49
|
-
def self.initialize_sentry: () -> void
|
50
|
-
end
|
51
|
-
|
52
|
-
class Object
|
53
|
-
def truthy?: (untyped value) -> bool
|
54
|
-
end
|