mihari 5.6.2 → 5.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -1
- data/README.md +1 -0
- data/config.ru +1 -1
- data/docs/analyzers/fofa.md +31 -0
- data/docs/analyzers/index.md +1 -0
- data/frontend/package-lock.json +73 -73
- data/frontend/package.json +5 -5
- data/frontend/src/components/alert/Form.vue +1 -14
- data/frontend/src/components/artifact/AS.vue +2 -8
- data/frontend/src/components/artifact/DnsRecords.vue +2 -8
- data/frontend/src/components/artifact/ReverseDnsNames.vue +2 -10
- data/frontend/src/components/artifact/WhoisRecord.vue +1 -1
- data/lib/mihari/actor.rb +14 -4
- data/lib/mihari/analyzers/base.rb +13 -12
- data/lib/mihari/analyzers/binaryedge.rb +4 -1
- data/lib/mihari/analyzers/censys.rb +4 -2
- data/lib/mihari/analyzers/circl.rb +4 -1
- data/lib/mihari/analyzers/crtsh.rb +4 -1
- data/lib/mihari/analyzers/dnstwister.rb +4 -1
- data/lib/mihari/analyzers/feed.rb +3 -0
- data/lib/mihari/analyzers/fofa.rb +65 -0
- data/lib/mihari/analyzers/greynoise.rb +4 -1
- data/lib/mihari/analyzers/hunterhow.rb +6 -1
- data/lib/mihari/analyzers/onyphe.rb +4 -1
- data/lib/mihari/analyzers/otx.rb +4 -1
- data/lib/mihari/analyzers/passivetotal.rb +4 -1
- data/lib/mihari/analyzers/pulsedive.rb +3 -0
- data/lib/mihari/analyzers/securitytrails.rb +4 -1
- data/lib/mihari/analyzers/shodan.rb +4 -1
- data/lib/mihari/analyzers/urlscan.rb +4 -1
- data/lib/mihari/analyzers/virustotal.rb +4 -1
- data/lib/mihari/analyzers/virustotal_intelligence.rb +4 -1
- data/lib/mihari/analyzers/zoomeye.rb +5 -2
- data/lib/mihari/cli/alert.rb +3 -0
- data/lib/mihari/cli/base.rb +3 -0
- data/lib/mihari/cli/database.rb +3 -0
- data/lib/mihari/cli/main.rb +3 -0
- data/lib/mihari/cli/rule.rb +3 -0
- data/lib/mihari/clients/base.rb +3 -0
- data/lib/mihari/clients/binaryedge.rb +5 -2
- data/lib/mihari/clients/censys.rb +7 -4
- data/lib/mihari/clients/circl.rb +3 -0
- data/lib/mihari/clients/crtsh.rb +3 -0
- data/lib/mihari/clients/dnstwister.rb +3 -0
- data/lib/mihari/clients/fofa.rb +83 -0
- data/lib/mihari/clients/greynoise.rb +5 -2
- data/lib/mihari/clients/hunterhow.rb +5 -2
- data/lib/mihari/clients/misp.rb +3 -0
- data/lib/mihari/clients/onyphe.rb +5 -2
- data/lib/mihari/clients/otx.rb +3 -0
- data/lib/mihari/clients/passivetotal.rb +3 -0
- data/lib/mihari/clients/publsedive.rb +4 -1
- data/lib/mihari/clients/securitytrails.rb +3 -0
- data/lib/mihari/clients/shodan.rb +5 -2
- data/lib/mihari/clients/the_hive.rb +3 -0
- data/lib/mihari/clients/urlscan.rb +7 -4
- data/lib/mihari/clients/virustotal.rb +5 -2
- data/lib/mihari/clients/zoomeye.rb +3 -0
- data/lib/mihari/commands/alert.rb +5 -14
- data/lib/mihari/commands/database.rb +3 -0
- data/lib/mihari/commands/rule.rb +10 -1
- data/lib/mihari/commands/search.rb +9 -6
- data/lib/mihari/commands/version.rb +3 -0
- data/lib/mihari/commands/web.rb +4 -1
- data/lib/mihari/config.rb +139 -150
- data/lib/mihari/constants.rb +1 -1
- data/lib/mihari/database.rb +6 -0
- data/lib/mihari/emitters/base.rb +13 -11
- data/lib/mihari/emitters/database.rb +4 -1
- data/lib/mihari/emitters/misp.rb +7 -4
- data/lib/mihari/emitters/slack.rb +3 -3
- data/lib/mihari/emitters/the_hive.rb +3 -3
- data/lib/mihari/emitters/webhook.rb +4 -3
- data/lib/mihari/enrichers/base.rb +15 -9
- data/lib/mihari/enrichers/google_public_dns.rb +6 -5
- data/lib/mihari/enrichers/ipinfo.rb +10 -8
- data/lib/mihari/enrichers/shodan.rb +4 -6
- data/lib/mihari/enrichers/whois.rb +12 -9
- data/lib/mihari/errors.rb +6 -0
- data/lib/mihari/feed/parser.rb +3 -0
- data/lib/mihari/feed/reader.rb +3 -0
- data/lib/mihari/http.rb +6 -0
- data/lib/mihari/mixins/autonomous_system.rb +3 -0
- data/lib/mihari/mixins/configurable.rb +3 -0
- data/lib/mihari/mixins/error_notification.rb +3 -0
- data/lib/mihari/mixins/falsepositive.rb +3 -0
- data/lib/mihari/mixins/refang.rb +3 -0
- data/lib/mihari/mixins/retriable.rb +6 -2
- data/lib/mihari/models/alert.rb +7 -4
- data/lib/mihari/models/artifact.rb +6 -0
- data/lib/mihari/models/autonomous_system.rb +4 -1
- data/lib/mihari/models/cpe.rb +4 -1
- data/lib/mihari/models/dns.rb +4 -1
- data/lib/mihari/models/geolocation.rb +4 -1
- data/lib/mihari/models/port.rb +4 -1
- data/lib/mihari/models/reverse_dns.rb +4 -1
- data/lib/mihari/models/rule.rb +6 -3
- data/lib/mihari/models/tag.rb +3 -0
- data/lib/mihari/models/tagging.rb +3 -0
- data/lib/mihari/models/whois.rb +4 -3
- data/lib/mihari/rule.rb +17 -12
- data/lib/mihari/schemas/alert.rb +3 -0
- data/lib/mihari/schemas/analyzer.rb +11 -0
- data/lib/mihari/schemas/emitter.rb +3 -0
- data/lib/mihari/schemas/enricher.rb +3 -0
- data/lib/mihari/schemas/macros.rb +4 -0
- data/lib/mihari/schemas/mixins.rb +5 -0
- data/lib/mihari/schemas/rule.rb +3 -0
- data/lib/mihari/service.rb +16 -0
- data/lib/mihari/services/alert_builder.rb +8 -5
- data/lib/mihari/services/alert_proxy.rb +6 -1
- data/lib/mihari/services/alert_runner.rb +8 -12
- data/lib/mihari/services/rule_builder.rb +8 -5
- data/lib/mihari/services/rule_runner.rb +8 -10
- data/lib/mihari/structs/binaryedge.rb +13 -28
- data/lib/mihari/structs/censys.rb +48 -127
- data/lib/mihari/structs/config.rb +19 -30
- data/lib/mihari/structs/filters.rb +38 -0
- data/lib/mihari/structs/fofa.rb +44 -0
- data/lib/mihari/structs/google_public_dns.rb +10 -28
- data/lib/mihari/structs/greynoise.rb +33 -84
- data/lib/mihari/structs/hunterhow.rb +24 -22
- data/lib/mihari/structs/ipinfo.rb +14 -35
- data/lib/mihari/structs/onyphe.rb +31 -76
- data/lib/mihari/structs/shodan.rb +47 -112
- data/lib/mihari/structs/urlscan.rb +24 -63
- data/lib/mihari/structs/virustotal_intelligence.rb +20 -56
- data/lib/mihari/type_checker.rb +4 -0
- data/lib/mihari/types.rb +3 -0
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari/web/api.rb +15 -10
- data/lib/mihari/web/app.rb +59 -54
- data/lib/mihari/web/endpoints/alerts.rb +94 -89
- data/lib/mihari/web/endpoints/artifacts.rb +115 -110
- data/lib/mihari/web/endpoints/configs.rb +18 -13
- data/lib/mihari/web/endpoints/ip_addresses.rb +21 -16
- data/lib/mihari/web/endpoints/rules.rb +203 -198
- data/lib/mihari/web/endpoints/tags.rb +41 -36
- data/lib/mihari/web/middleware/connection_adapter.rb +16 -9
- data/lib/mihari/web/middleware/error_notification_adapter.rb +17 -10
- data/lib/mihari/web/public/assets/{index-28d4c79d.js → index-821134e2.js} +30 -30
- data/lib/mihari/web/public/assets/mode-yaml-24faa242.js +8 -0
- data/lib/mihari/web/public/index.html +1 -1
- data/lib/mihari.rb +24 -5
- data/mihari.gemspec +8 -1
- data/mkdocs.yml +3 -2
- metadata +39 -7
- data/lib/mihari/templates/rule.yml.erb +0 -5
- data/lib/mihari/web/public/assets/mode-yaml-a21faa53.js +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f226f30917400448aecfc83808609ff3eb180228c2d10d797d3409cc3ecdb9c0
|
4
|
+
data.tar.gz: 5ce20637fed160cdecb7d8c22726b44670834843f2e77f5ef235f943a6321701
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3900c2cc6a8ac2010b4579f574be0ce4d620a180dcfadf00c97b7597a7bccd79de9efdfdce402b40f06d7afeaaec0062210796391123e3a145f54d3be4270261
|
7
|
+
data.tar.gz: 7655638dd621bf03f0d9178eb2e0ca6bf4d161b6563c266380d3cc8bf37bef692bc06765ef3050aaf7683a0f1be2ca51d8a9d7e7c3f34a9e184389fcd31b2885
|
data/.rubocop.yml
CHANGED
@@ -3,12 +3,16 @@ Style/HashSyntax:
|
|
3
3
|
Style/StringLiterals:
|
4
4
|
EnforcedStyle: double_quotes
|
5
5
|
Metrics/BlockLength:
|
6
|
+
Max: 100
|
6
7
|
Exclude:
|
7
8
|
- "spec/**/*"
|
8
9
|
- "*.gemspec"
|
9
10
|
Metrics/ClassLength:
|
10
11
|
Enabled: false
|
11
12
|
Metrics/MethodLength:
|
12
|
-
Max:
|
13
|
+
Max: 50
|
14
|
+
Metrics/AbcSize:
|
15
|
+
Max: 50
|
13
16
|
require:
|
14
17
|
- rubocop-rspec
|
18
|
+
- rubocop-yard
|
data/README.md
CHANGED
@@ -24,6 +24,7 @@ Mihari supports the following services by default.
|
|
24
24
|
- [CIRCL passive DNS](https://www.circl.lu/services/passive-dns/) / [passive SSL](https://www.circl.lu/services/passive-ssl/)
|
25
25
|
- [crt.sh](https://crt.sh/)
|
26
26
|
- [dnstwister](https://dnstwister.report/)
|
27
|
+
- [Fofa](https://en.fofa.info/)
|
27
28
|
- [GreyNoise](https://www.greynoise.io/)
|
28
29
|
- [HunterHow](https://hunter.how/)
|
29
30
|
- [Onyphe](https://onyphe.io)
|
data/config.ru
CHANGED
@@ -0,0 +1,31 @@
|
|
1
|
+
---
|
2
|
+
tags:
|
3
|
+
- Artifact:IP
|
4
|
+
---
|
5
|
+
|
6
|
+
# Fofa
|
7
|
+
|
8
|
+
- https://en.fofa.info/
|
9
|
+
|
10
|
+
This analyzer uses Fofa API (`/api/v1/search/all`) to search. Pagination is supported.
|
11
|
+
|
12
|
+
```yaml
|
13
|
+
analyzer: fofa
|
14
|
+
query: ...
|
15
|
+
api_key: ...
|
16
|
+
email: ...
|
17
|
+
```
|
18
|
+
|
19
|
+
## Components
|
20
|
+
|
21
|
+
### Query
|
22
|
+
|
23
|
+
`query` (`string`) is a search query.
|
24
|
+
|
25
|
+
### API Key
|
26
|
+
|
27
|
+
`api_key` (`string`) is an API key. Optional. Defaults to `ENV[”FOFA_API_KEY"]`.
|
28
|
+
|
29
|
+
### Email
|
30
|
+
|
31
|
+
`email` (`string`) is an email. Optional. Defaults to `ENV[”FOFA_EMAIL"]`.
|
data/docs/analyzers/index.md
CHANGED
data/frontend/package-lock.json
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
"@fortawesome/vue-fontawesome": "^3.0.3",
|
14
14
|
"@vueuse/core": "^10.5.0",
|
15
15
|
"@vueuse/router": "^10.5.0",
|
16
|
-
"ace-builds": "^1.31.
|
16
|
+
"ace-builds": "^1.31.1",
|
17
17
|
"axios": "^1.6.0",
|
18
18
|
"bulma": "^0.9.4",
|
19
19
|
"bulma-helpers": "^0.4.3",
|
@@ -28,17 +28,17 @@
|
|
28
28
|
"vue-concurrency": "4.0.1",
|
29
29
|
"vue-json-pretty": "^2.2.4",
|
30
30
|
"vue-router": "^4.2.5",
|
31
|
-
"vue3-ace-editor": "^2.2.
|
31
|
+
"vue3-ace-editor": "^2.2.4"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
34
34
|
"@redocly/cli": "1.4.0",
|
35
35
|
"@rushstack/eslint-patch": "^1.5.1",
|
36
36
|
"@tsconfig/node20": "^20.1.2",
|
37
37
|
"@types/jsdom": "^21.1.4",
|
38
|
-
"@types/node": "^20.8.
|
38
|
+
"@types/node": "^20.8.10",
|
39
39
|
"@types/url-parse": "^1.4.10",
|
40
|
-
"@typescript-eslint/eslint-plugin": "^6.9.
|
41
|
-
"@typescript-eslint/parser": "^6.9.
|
40
|
+
"@typescript-eslint/eslint-plugin": "^6.9.1",
|
41
|
+
"@typescript-eslint/parser": "^6.9.1",
|
42
42
|
"@vitejs/plugin-vue": "^4.4.0",
|
43
43
|
"@vue/eslint-config-prettier": "^8.0.0",
|
44
44
|
"@vue/eslint-config-typescript": "^12.0.0",
|
@@ -858,9 +858,9 @@
|
|
858
858
|
"dev": true
|
859
859
|
},
|
860
860
|
"node_modules/@types/node": {
|
861
|
-
"version": "20.8.
|
862
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.
|
863
|
-
"integrity": "sha512-
|
861
|
+
"version": "20.8.10",
|
862
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz",
|
863
|
+
"integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==",
|
864
864
|
"dev": true,
|
865
865
|
"dependencies": {
|
866
866
|
"undici-types": "~5.26.4"
|
@@ -901,16 +901,16 @@
|
|
901
901
|
"integrity": "sha512-v/ZHEj9xh82usl8LMR3GarzFY1IrbXJw5L4QfQhokjRV91q+SelFqxQWSep1ucXEZ22+dSTwLFkXeur25sPIbw=="
|
902
902
|
},
|
903
903
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
904
|
-
"version": "6.9.
|
905
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.9.
|
906
|
-
"integrity": "sha512-
|
904
|
+
"version": "6.9.1",
|
905
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.9.1.tgz",
|
906
|
+
"integrity": "sha512-w0tiiRc9I4S5XSXXrMHOWgHgxbrBn1Ro+PmiYhSg2ZVdxrAJtQgzU5o2m1BfP6UOn7Vxcc6152vFjQfmZR4xEg==",
|
907
907
|
"dev": true,
|
908
908
|
"dependencies": {
|
909
909
|
"@eslint-community/regexpp": "^4.5.1",
|
910
|
-
"@typescript-eslint/scope-manager": "6.9.
|
911
|
-
"@typescript-eslint/type-utils": "6.9.
|
912
|
-
"@typescript-eslint/utils": "6.9.
|
913
|
-
"@typescript-eslint/visitor-keys": "6.9.
|
910
|
+
"@typescript-eslint/scope-manager": "6.9.1",
|
911
|
+
"@typescript-eslint/type-utils": "6.9.1",
|
912
|
+
"@typescript-eslint/utils": "6.9.1",
|
913
|
+
"@typescript-eslint/visitor-keys": "6.9.1",
|
914
914
|
"debug": "^4.3.4",
|
915
915
|
"graphemer": "^1.4.0",
|
916
916
|
"ignore": "^5.2.4",
|
@@ -936,15 +936,15 @@
|
|
936
936
|
}
|
937
937
|
},
|
938
938
|
"node_modules/@typescript-eslint/parser": {
|
939
|
-
"version": "6.9.
|
940
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.9.
|
941
|
-
"integrity": "sha512-
|
939
|
+
"version": "6.9.1",
|
940
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.9.1.tgz",
|
941
|
+
"integrity": "sha512-C7AK2wn43GSaCUZ9do6Ksgi2g3mwFkMO3Cis96kzmgudoVaKyt62yNzJOktP0HDLb/iO2O0n2lBOzJgr6Q/cyg==",
|
942
942
|
"dev": true,
|
943
943
|
"dependencies": {
|
944
|
-
"@typescript-eslint/scope-manager": "6.9.
|
945
|
-
"@typescript-eslint/types": "6.9.
|
946
|
-
"@typescript-eslint/typescript-estree": "6.9.
|
947
|
-
"@typescript-eslint/visitor-keys": "6.9.
|
944
|
+
"@typescript-eslint/scope-manager": "6.9.1",
|
945
|
+
"@typescript-eslint/types": "6.9.1",
|
946
|
+
"@typescript-eslint/typescript-estree": "6.9.1",
|
947
|
+
"@typescript-eslint/visitor-keys": "6.9.1",
|
948
948
|
"debug": "^4.3.4"
|
949
949
|
},
|
950
950
|
"engines": {
|
@@ -964,13 +964,13 @@
|
|
964
964
|
}
|
965
965
|
},
|
966
966
|
"node_modules/@typescript-eslint/scope-manager": {
|
967
|
-
"version": "6.9.
|
968
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.9.
|
969
|
-
"integrity": "sha512-
|
967
|
+
"version": "6.9.1",
|
968
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.9.1.tgz",
|
969
|
+
"integrity": "sha512-38IxvKB6NAne3g/+MyXMs2Cda/Sz+CEpmm+KLGEM8hx/CvnSRuw51i8ukfwB/B/sESdeTGet1NH1Wj7I0YXswg==",
|
970
970
|
"dev": true,
|
971
971
|
"dependencies": {
|
972
|
-
"@typescript-eslint/types": "6.9.
|
973
|
-
"@typescript-eslint/visitor-keys": "6.9.
|
972
|
+
"@typescript-eslint/types": "6.9.1",
|
973
|
+
"@typescript-eslint/visitor-keys": "6.9.1"
|
974
974
|
},
|
975
975
|
"engines": {
|
976
976
|
"node": "^16.0.0 || >=18.0.0"
|
@@ -981,13 +981,13 @@
|
|
981
981
|
}
|
982
982
|
},
|
983
983
|
"node_modules/@typescript-eslint/type-utils": {
|
984
|
-
"version": "6.9.
|
985
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.9.
|
986
|
-
"integrity": "sha512-
|
984
|
+
"version": "6.9.1",
|
985
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.9.1.tgz",
|
986
|
+
"integrity": "sha512-eh2oHaUKCK58qIeYp19F5V5TbpM52680sB4zNSz29VBQPTWIlE/hCj5P5B1AChxECe/fmZlspAWFuRniep1Skg==",
|
987
987
|
"dev": true,
|
988
988
|
"dependencies": {
|
989
|
-
"@typescript-eslint/typescript-estree": "6.9.
|
990
|
-
"@typescript-eslint/utils": "6.9.
|
989
|
+
"@typescript-eslint/typescript-estree": "6.9.1",
|
990
|
+
"@typescript-eslint/utils": "6.9.1",
|
991
991
|
"debug": "^4.3.4",
|
992
992
|
"ts-api-utils": "^1.0.1"
|
993
993
|
},
|
@@ -1008,9 +1008,9 @@
|
|
1008
1008
|
}
|
1009
1009
|
},
|
1010
1010
|
"node_modules/@typescript-eslint/types": {
|
1011
|
-
"version": "6.9.
|
1012
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.
|
1013
|
-
"integrity": "sha512
|
1011
|
+
"version": "6.9.1",
|
1012
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.1.tgz",
|
1013
|
+
"integrity": "sha512-BUGslGOb14zUHOUmDB2FfT6SI1CcZEJYfF3qFwBeUrU6srJfzANonwRYHDpLBuzbq3HaoF2XL2hcr01c8f8OaQ==",
|
1014
1014
|
"dev": true,
|
1015
1015
|
"engines": {
|
1016
1016
|
"node": "^16.0.0 || >=18.0.0"
|
@@ -1021,13 +1021,13 @@
|
|
1021
1021
|
}
|
1022
1022
|
},
|
1023
1023
|
"node_modules/@typescript-eslint/typescript-estree": {
|
1024
|
-
"version": "6.9.
|
1025
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.
|
1026
|
-
"integrity": "sha512-
|
1024
|
+
"version": "6.9.1",
|
1025
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.1.tgz",
|
1026
|
+
"integrity": "sha512-U+mUylTHfcqeO7mLWVQ5W/tMLXqVpRv61wm9ZtfE5egz7gtnmqVIw9ryh0mgIlkKk9rZLY3UHygsBSdB9/ftyw==",
|
1027
1027
|
"dev": true,
|
1028
1028
|
"dependencies": {
|
1029
|
-
"@typescript-eslint/types": "6.9.
|
1030
|
-
"@typescript-eslint/visitor-keys": "6.9.
|
1029
|
+
"@typescript-eslint/types": "6.9.1",
|
1030
|
+
"@typescript-eslint/visitor-keys": "6.9.1",
|
1031
1031
|
"debug": "^4.3.4",
|
1032
1032
|
"globby": "^11.1.0",
|
1033
1033
|
"is-glob": "^4.0.3",
|
@@ -1048,17 +1048,17 @@
|
|
1048
1048
|
}
|
1049
1049
|
},
|
1050
1050
|
"node_modules/@typescript-eslint/utils": {
|
1051
|
-
"version": "6.9.
|
1052
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.9.
|
1053
|
-
"integrity": "sha512-
|
1051
|
+
"version": "6.9.1",
|
1052
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.9.1.tgz",
|
1053
|
+
"integrity": "sha512-L1T0A5nFdQrMVunpZgzqPL6y2wVreSyHhKGZryS6jrEN7bD9NplVAyMryUhXsQ4TWLnZmxc2ekar/lSGIlprCA==",
|
1054
1054
|
"dev": true,
|
1055
1055
|
"dependencies": {
|
1056
1056
|
"@eslint-community/eslint-utils": "^4.4.0",
|
1057
1057
|
"@types/json-schema": "^7.0.12",
|
1058
1058
|
"@types/semver": "^7.5.0",
|
1059
|
-
"@typescript-eslint/scope-manager": "6.9.
|
1060
|
-
"@typescript-eslint/types": "6.9.
|
1061
|
-
"@typescript-eslint/typescript-estree": "6.9.
|
1059
|
+
"@typescript-eslint/scope-manager": "6.9.1",
|
1060
|
+
"@typescript-eslint/types": "6.9.1",
|
1061
|
+
"@typescript-eslint/typescript-estree": "6.9.1",
|
1062
1062
|
"semver": "^7.5.4"
|
1063
1063
|
},
|
1064
1064
|
"engines": {
|
@@ -1073,12 +1073,12 @@
|
|
1073
1073
|
}
|
1074
1074
|
},
|
1075
1075
|
"node_modules/@typescript-eslint/visitor-keys": {
|
1076
|
-
"version": "6.9.
|
1077
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.
|
1078
|
-
"integrity": "sha512-
|
1076
|
+
"version": "6.9.1",
|
1077
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.1.tgz",
|
1078
|
+
"integrity": "sha512-MUaPUe/QRLEffARsmNfmpghuQkW436DvESW+h+M52w0coICHRfD6Np9/K6PdACwnrq1HmuLl+cSPZaJmeVPkSw==",
|
1079
1079
|
"dev": true,
|
1080
1080
|
"dependencies": {
|
1081
|
-
"@typescript-eslint/types": "6.9.
|
1081
|
+
"@typescript-eslint/types": "6.9.1",
|
1082
1082
|
"eslint-visitor-keys": "^3.4.1"
|
1083
1083
|
},
|
1084
1084
|
"engines": {
|
@@ -1204,30 +1204,30 @@
|
|
1204
1204
|
}
|
1205
1205
|
},
|
1206
1206
|
"node_modules/@volar/language-core": {
|
1207
|
-
"version": "1.10.
|
1208
|
-
"resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-1.10.
|
1209
|
-
"integrity": "sha512-
|
1207
|
+
"version": "1.10.10",
|
1208
|
+
"resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-1.10.10.tgz",
|
1209
|
+
"integrity": "sha512-nsV1o3AZ5n5jaEAObrS3MWLBWaGwUj/vAsc15FVNIv+DbpizQRISg9wzygsHBr56ELRH8r4K75vkYNMtsSNNWw==",
|
1210
1210
|
"dev": true,
|
1211
1211
|
"dependencies": {
|
1212
|
-
"@volar/source-map": "1.10.
|
1212
|
+
"@volar/source-map": "1.10.10"
|
1213
1213
|
}
|
1214
1214
|
},
|
1215
1215
|
"node_modules/@volar/source-map": {
|
1216
|
-
"version": "1.10.
|
1217
|
-
"resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-1.10.
|
1218
|
-
"integrity": "sha512-
|
1216
|
+
"version": "1.10.10",
|
1217
|
+
"resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-1.10.10.tgz",
|
1218
|
+
"integrity": "sha512-GVKjLnifV4voJ9F0vhP56p4+F3WGf+gXlRtjFZsv6v3WxBTWU3ZVeaRaEHJmWrcv5LXmoYYpk/SC25BKemPRkg==",
|
1219
1219
|
"dev": true,
|
1220
1220
|
"dependencies": {
|
1221
1221
|
"muggle-string": "^0.3.1"
|
1222
1222
|
}
|
1223
1223
|
},
|
1224
1224
|
"node_modules/@volar/typescript": {
|
1225
|
-
"version": "1.10.
|
1226
|
-
"resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-1.10.
|
1227
|
-
"integrity": "sha512-
|
1225
|
+
"version": "1.10.10",
|
1226
|
+
"resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-1.10.10.tgz",
|
1227
|
+
"integrity": "sha512-4a2r5bdUub2m+mYVnLu2wt59fuoYWe7nf0uXtGHU8QQ5LDNfzAR0wK7NgDiQ9rcl2WT3fxT2AA9AylAwFtj50A==",
|
1228
1228
|
"dev": true,
|
1229
1229
|
"dependencies": {
|
1230
|
-
"@volar/language-core": "1.10.
|
1230
|
+
"@volar/language-core": "1.10.10",
|
1231
1231
|
"path-browserify": "^1.0.1"
|
1232
1232
|
}
|
1233
1233
|
},
|
@@ -1588,9 +1588,9 @@
|
|
1588
1588
|
"dev": true
|
1589
1589
|
},
|
1590
1590
|
"node_modules/ace-builds": {
|
1591
|
-
"version": "1.31.
|
1592
|
-
"resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.31.
|
1593
|
-
"integrity": "sha512-
|
1591
|
+
"version": "1.31.1",
|
1592
|
+
"resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.31.1.tgz",
|
1593
|
+
"integrity": "sha512-3DnE5bZF6Ji+l4F5acoLk+rV7mxrUt1C4r61Xy9owp5rVM4lj5NL8GJfoX6Jnnbhx6kKV7Vdpb+Tco+0ORTvhg=="
|
1594
1594
|
},
|
1595
1595
|
"node_modules/acorn": {
|
1596
1596
|
"version": "8.11.2",
|
@@ -2084,9 +2084,9 @@
|
|
2084
2084
|
}
|
2085
2085
|
},
|
2086
2086
|
"node_modules/core-js": {
|
2087
|
-
"version": "3.33.
|
2088
|
-
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.
|
2089
|
-
"integrity": "sha512-
|
2087
|
+
"version": "3.33.2",
|
2088
|
+
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.2.tgz",
|
2089
|
+
"integrity": "sha512-XeBzWI6QL3nJQiHmdzbAOiMYqjrb7hwU7A39Qhvd/POSa/t9E1AeZyEZx3fNvp/vtM8zXwhoL0FsiS0hD0pruQ==",
|
2090
2090
|
"dev": true,
|
2091
2091
|
"hasInstallScript": true,
|
2092
2092
|
"funding": {
|
@@ -5279,9 +5279,9 @@
|
|
5279
5279
|
"dev": true
|
5280
5280
|
},
|
5281
5281
|
"node_modules/punycode": {
|
5282
|
-
"version": "2.3.
|
5283
|
-
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.
|
5284
|
-
"integrity": "sha512-
|
5282
|
+
"version": "2.3.1",
|
5283
|
+
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
|
5284
|
+
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
|
5285
5285
|
"dev": true,
|
5286
5286
|
"engines": {
|
5287
5287
|
"node": ">=6"
|
@@ -6949,9 +6949,9 @@
|
|
6949
6949
|
}
|
6950
6950
|
},
|
6951
6951
|
"node_modules/vue3-ace-editor": {
|
6952
|
-
"version": "2.2.
|
6953
|
-
"resolved": "https://registry.npmjs.org/vue3-ace-editor/-/vue3-ace-editor-2.2.
|
6954
|
-
"integrity": "sha512-
|
6952
|
+
"version": "2.2.4",
|
6953
|
+
"resolved": "https://registry.npmjs.org/vue3-ace-editor/-/vue3-ace-editor-2.2.4.tgz",
|
6954
|
+
"integrity": "sha512-FZkEyfpbH068BwjhMyNROxfEI8135Sc+x8ouxkMdCNkuj/Tuw83VP/gStFQqZHqljyX9/VfMTCdTqtOnJZGN8g==",
|
6955
6955
|
"dependencies": {
|
6956
6956
|
"resize-observer-polyfill": "^1.5.1"
|
6957
6957
|
},
|
data/frontend/package.json
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
"@fortawesome/vue-fontawesome": "^3.0.3",
|
20
20
|
"@vueuse/core": "^10.5.0",
|
21
21
|
"@vueuse/router": "^10.5.0",
|
22
|
-
"ace-builds": "^1.31.
|
22
|
+
"ace-builds": "^1.31.1",
|
23
23
|
"axios": "^1.6.0",
|
24
24
|
"bulma": "^0.9.4",
|
25
25
|
"bulma-helpers": "^0.4.3",
|
@@ -34,17 +34,17 @@
|
|
34
34
|
"vue-concurrency": "4.0.1",
|
35
35
|
"vue-json-pretty": "^2.2.4",
|
36
36
|
"vue-router": "^4.2.5",
|
37
|
-
"vue3-ace-editor": "^2.2.
|
37
|
+
"vue3-ace-editor": "^2.2.4"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
40
|
"@redocly/cli": "1.4.0",
|
41
41
|
"@rushstack/eslint-patch": "^1.5.1",
|
42
42
|
"@tsconfig/node20": "^20.1.2",
|
43
43
|
"@types/jsdom": "^21.1.4",
|
44
|
-
"@types/node": "^20.8.
|
44
|
+
"@types/node": "^20.8.10",
|
45
45
|
"@types/url-parse": "^1.4.10",
|
46
|
-
"@typescript-eslint/eslint-plugin": "^6.9.
|
47
|
-
"@typescript-eslint/parser": "^6.9.
|
46
|
+
"@typescript-eslint/eslint-plugin": "^6.9.1",
|
47
|
+
"@typescript-eslint/parser": "^6.9.1",
|
48
48
|
"@vitejs/plugin-vue": "^4.4.0",
|
49
49
|
"@vue/eslint-config-prettier": "^8.0.0",
|
50
50
|
"@vue/eslint-config-typescript": "^12.0.0",
|
@@ -124,24 +124,11 @@ export default defineComponent({
|
|
124
124
|
|
125
125
|
const artifact = ref<string | undefined>(undefined)
|
126
126
|
const fromAt = ref<string | undefined>(undefined)
|
127
|
-
const tagInput =
|
127
|
+
const tagInput = ref<string | undefined>(props.tag)
|
128
128
|
const ruleId = ref<string | undefined>(undefined)
|
129
129
|
const toAt = ref<string | undefined>(undefined)
|
130
|
-
const asn = ref<number | undefined>(undefined)
|
131
|
-
const dnsRecord = ref<string | undefined>(undefined)
|
132
|
-
const reverseDnsName = ref<string | undefined>(undefined)
|
133
130
|
|
134
131
|
const updateByQueryParams = () => {
|
135
|
-
const asn_ = route.query["asn"]
|
136
|
-
const normalizedAsn = normalizeQueryParam(asn_)
|
137
|
-
asn.value = normalizedAsn === undefined ? undefined : parseInt(normalizedAsn)
|
138
|
-
|
139
|
-
const dnsRecord_ = route.query["dnsRecord"]
|
140
|
-
dnsRecord.value = normalizeQueryParam(dnsRecord_)
|
141
|
-
|
142
|
-
const reverseDnsName_ = route.query["reverseDnsName"]
|
143
|
-
reverseDnsName.value = normalizeQueryParam(reverseDnsName_)
|
144
|
-
|
145
132
|
const tag_ = route.query["tag"]
|
146
133
|
if (tagInput.value === undefined) {
|
147
134
|
tagInput.value = normalizeQueryParam(tag_)
|
@@ -1,14 +1,8 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="tags are-medium">
|
3
|
-
<
|
4
|
-
class="tag"
|
5
|
-
:to="{
|
6
|
-
name: 'Alerts',
|
7
|
-
query: { asn: autonomousSystem.asn }
|
8
|
-
}"
|
9
|
-
>
|
3
|
+
<span class="tag">
|
10
4
|
{{ autonomousSystem.asn }}
|
11
|
-
</
|
5
|
+
</span>
|
12
6
|
</div>
|
13
7
|
</template>
|
14
8
|
|
@@ -3,15 +3,9 @@
|
|
3
3
|
<div class="control" v-for="(dnsRecord, index) in dnsRecords" :key="index">
|
4
4
|
<div class="tags has-addons are-medium">
|
5
5
|
<span class="tag is-dark"> {{ dnsRecord.resource }}</span>
|
6
|
-
<
|
7
|
-
class="tag"
|
8
|
-
:to="{
|
9
|
-
name: 'Alerts',
|
10
|
-
query: { dnsRecord: dnsRecord.value }
|
11
|
-
}"
|
12
|
-
>
|
6
|
+
<span class="tag">
|
13
7
|
{{ truncate(dnsRecord.value, 50) }}
|
14
|
-
</
|
8
|
+
</span>
|
15
9
|
</div>
|
16
10
|
</div>
|
17
11
|
</div>
|
@@ -1,16 +1,8 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="tags are-medium">
|
3
|
-
<
|
4
|
-
class="tag"
|
5
|
-
v-for="reverseDnsName in reverseDnsNames"
|
6
|
-
:key="reverseDnsName.name"
|
7
|
-
:to="{
|
8
|
-
name: 'Alerts',
|
9
|
-
query: { reverseDnsName: reverseDnsName.name }
|
10
|
-
}"
|
11
|
-
>
|
3
|
+
<span class="tag" v-for="reverseDnsName in reverseDnsNames" :key="reverseDnsName.name">
|
12
4
|
{{ reverseDnsName.name }}
|
13
|
-
</
|
5
|
+
</span>
|
14
6
|
</div>
|
15
7
|
</template>
|
16
8
|
|
@@ -20,7 +20,7 @@
|
|
20
20
|
</div>
|
21
21
|
<div class="control">
|
22
22
|
<div class="tags has-addons are-medium">
|
23
|
-
<span class="tag is-dark">
|
23
|
+
<span class="tag is-dark">Expires on</span>
|
24
24
|
<span class="tag is-light">{{ whoisRecord.expiresOn || "N/A" }}</span>
|
25
25
|
</div>
|
26
26
|
</div>
|
data/lib/mihari/actor.rb
CHANGED
@@ -4,9 +4,7 @@ module Mihari
|
|
4
4
|
#
|
5
5
|
# Base class for Analyzer, Emitter and Enricher
|
6
6
|
#
|
7
|
-
class Actor
|
8
|
-
include Dry::Monads[:result, :try]
|
9
|
-
|
7
|
+
class Actor < Service
|
10
8
|
include Mixins::Configurable
|
11
9
|
include Mixins::Retriable
|
12
10
|
|
@@ -16,7 +14,9 @@ module Mihari
|
|
16
14
|
#
|
17
15
|
# @param [Hash, nil] options
|
18
16
|
#
|
19
|
-
def initialize(
|
17
|
+
def initialize(options: nil)
|
18
|
+
super()
|
19
|
+
|
20
20
|
@options = options || {}
|
21
21
|
end
|
22
22
|
|
@@ -57,6 +57,16 @@ module Mihari
|
|
57
57
|
raise ConfigurationError, message
|
58
58
|
end
|
59
59
|
|
60
|
+
def result
|
61
|
+
Try[StandardError] do
|
62
|
+
retry_on_error(
|
63
|
+
times: retry_times,
|
64
|
+
interval: retry_interval,
|
65
|
+
exponential_backoff: retry_exponential_backoff
|
66
|
+
) { call }
|
67
|
+
end.to_result
|
68
|
+
end
|
69
|
+
|
60
70
|
class << self
|
61
71
|
#
|
62
72
|
# @return [String]
|
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
module Mihari
|
4
4
|
module Analyzers
|
5
|
+
#
|
6
|
+
# Base class for analyzers
|
7
|
+
#
|
5
8
|
class Base < Actor
|
6
9
|
# @return [String]
|
7
10
|
attr_reader :query
|
@@ -53,22 +56,20 @@ module Mihari
|
|
53
56
|
# @return [Array<Mihari::Models::Artifact>]
|
54
57
|
#
|
55
58
|
def normalized_artifacts
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
end.select(&:valid?).uniq(&:data)
|
64
|
-
end
|
59
|
+
artifacts.compact.sort.map do |artifact|
|
60
|
+
# No need to set data_type manually
|
61
|
+
# It is set automatically in #initialize
|
62
|
+
artifact = artifact.is_a?(Models::Artifact) ? artifact : Models::Artifact.new(data: artifact)
|
63
|
+
artifact.source = self.class.class_key
|
64
|
+
artifact
|
65
|
+
end.select(&:valid?).uniq(&:data)
|
65
66
|
end
|
66
67
|
|
67
68
|
#
|
68
|
-
# @return [
|
69
|
+
# @return [Array<Mihari::Models::Artifact>]
|
69
70
|
#
|
70
|
-
def
|
71
|
-
|
71
|
+
def call
|
72
|
+
normalized_artifacts
|
72
73
|
end
|
73
74
|
|
74
75
|
class << self
|
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
module Mihari
|
4
4
|
module Analyzers
|
5
|
+
#
|
6
|
+
# BinaryEdge analyzer
|
7
|
+
#
|
5
8
|
class BinaryEdge < Base
|
6
9
|
# @return [String, nil]
|
7
10
|
attr_reader :api_key
|
@@ -32,7 +35,7 @@ module Mihari
|
|
32
35
|
# @return [Mihari::Clients::BinaryEdge]
|
33
36
|
#
|
34
37
|
def client
|
35
|
-
|
38
|
+
Clients::BinaryEdge.new(
|
36
39
|
api_key: api_key,
|
37
40
|
pagination_interval: pagination_interval,
|
38
41
|
timeout: timeout
|
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
module Mihari
|
4
4
|
module Analyzers
|
5
|
+
#
|
6
|
+
# Censys analyzer
|
7
|
+
#
|
5
8
|
class Censys < Base
|
6
9
|
# @return [String, nil]
|
7
10
|
attr_reader :id
|
@@ -12,7 +15,6 @@ module Mihari
|
|
12
15
|
#
|
13
16
|
# @param [String] query
|
14
17
|
# @param [hash, nil] options
|
15
|
-
# @param [String, nil] api_key
|
16
18
|
# @param [String, nil] id
|
17
19
|
# @param [String, nil] secret
|
18
20
|
#
|
@@ -52,7 +54,7 @@ module Mihari
|
|
52
54
|
# @return [Mihari::Clients::Censys]
|
53
55
|
#
|
54
56
|
def client
|
55
|
-
|
57
|
+
Clients::Censys.new(
|
56
58
|
id: id,
|
57
59
|
secret: secret,
|
58
60
|
pagination_interval: pagination_interval,
|