recog 2.3.21 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +42 -16
- data/Rakefile +2 -9
- data/lib/recog/db.rb +2 -1
- data/lib/recog/db_manager.rb +1 -1
- data/lib/recog/fingerprint.rb +33 -6
- data/lib/recog/fingerprint_parse_error.rb +10 -0
- data/lib/recog/verifier.rb +9 -9
- data/lib/recog/verify_reporter.rb +17 -6
- data/lib/recog/version.rb +1 -1
- data/{bin → recog/bin}/recog_match +0 -1
- data/{xml → recog/xml}/apache_modules.xml +0 -0
- data/{xml → recog/xml}/apache_os.xml +98 -56
- data/{xml → recog/xml}/architecture.xml +15 -1
- data/recog/xml/dhcp_vendor_class.xml +206 -0
- data/{xml → recog/xml}/dns_versionbind.xml +16 -13
- data/{xml → recog/xml}/favicons.xml +297 -47
- data/{xml → recog/xml}/fingerprints.xsd +9 -1
- data/{xml → recog/xml}/ftp_banners.xml +160 -156
- data/{xml → recog/xml}/h323_callresp.xml +101 -101
- data/{xml → recog/xml}/hp_pjl_id.xml +84 -84
- data/{xml → recog/xml}/html_title.xml +727 -34
- data/{xml → recog/xml}/http_cookies.xml +160 -77
- data/{xml → recog/xml}/http_servers.xml +556 -283
- data/{xml → recog/xml}/http_wwwauth.xml +190 -75
- data/{xml → recog/xml}/imap_banners.xml +5 -5
- data/{xml → recog/xml}/ldap_searchresult.xml +0 -0
- data/{xml → recog/xml}/mdns_device-info_txt.xml +389 -26
- data/{xml → recog/xml}/mdns_workstation_txt.xml +0 -0
- data/{xml → recog/xml}/mysql_banners.xml +1 -1
- data/{xml → recog/xml}/mysql_error.xml +0 -0
- data/{xml → recog/xml}/nntp_banners.xml +11 -8
- data/{xml → recog/xml}/ntp_banners.xml +97 -97
- data/{xml → recog/xml}/operating_system.xml +95 -80
- data/{xml → recog/xml}/pop_banners.xml +23 -23
- data/{xml → recog/xml}/rsh_resp.xml +3 -3
- data/{xml → recog/xml}/rtsp_servers.xml +0 -0
- data/{xml → recog/xml}/sip_banners.xml +43 -5
- data/{xml → recog/xml}/sip_user_agents.xml +175 -27
- data/{xml → recog/xml}/smb_native_lm.xml +5 -5
- data/{xml → recog/xml}/smb_native_os.xml +25 -25
- data/{xml → recog/xml}/smtp_banners.xml +147 -146
- data/{xml → recog/xml}/smtp_debug.xml +0 -0
- data/{xml → recog/xml}/smtp_ehlo.xml +1 -1
- data/{xml → recog/xml}/smtp_expn.xml +0 -0
- data/{xml → recog/xml}/smtp_help.xml +11 -11
- data/{xml → recog/xml}/smtp_mailfrom.xml +0 -0
- data/{xml → recog/xml}/smtp_noop.xml +2 -2
- data/{xml → recog/xml}/smtp_quit.xml +0 -0
- data/{xml → recog/xml}/smtp_rcptto.xml +0 -0
- data/{xml → recog/xml}/smtp_rset.xml +0 -0
- data/{xml → recog/xml}/smtp_turn.xml +0 -0
- data/{xml → recog/xml}/smtp_vrfy.xml +0 -0
- data/{xml → recog/xml}/snmp_sysdescr.xml +1570 -1430
- data/{xml → recog/xml}/snmp_sysobjid.xml +38 -27
- data/{xml → recog/xml}/ssh_banners.xml +16 -10
- data/{xml → recog/xml}/telnet_banners.xml +238 -21
- data/{xml → recog/xml}/tls_jarm.xml +56 -6
- data/{xml → recog/xml}/x11_banners.xml +3 -3
- data/{xml → recog/xml}/x509_issuers.xml +49 -1
- data/{xml → recog/xml}/x509_subjects.xml +139 -38
- data/recog.gemspec +9 -5
- data/spec/data/external_example_fingerprint/hp_printer_ex_01.txt +1 -0
- data/spec/data/external_example_fingerprint/hp_printer_ex_02.txt +1 -0
- data/spec/data/external_example_fingerprint.xml +8 -0
- data/spec/data/external_example_illegal_path_fingerprint.xml +7 -0
- data/spec/lib/recog/db_spec.rb +84 -61
- data/spec/lib/recog/fingerprint_spec.rb +4 -4
- data/spec/lib/recog/verify_reporter_spec.rb +73 -4
- data/spec/spec_helper.rb +4 -0
- metadata +65 -134
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -37
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -17
- data/.github/ISSUE_TEMPLATE/fingerprint_request.md +0 -27
- data/.github/PULL_REQUEST_TEMPLATE +0 -24
- data/.github/SECURITY.md +0 -35
- data/.github/workflows/ci.yml +0 -26
- data/.gitignore +0 -23
- data/.rspec +0 -3
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- data/.snyk +0 -10
- data/.travis.yml +0 -25
- data/CONTRIBUTING.md +0 -270
- data/bin/recog_cleanup +0 -16
- data/bin/recog_export +0 -81
- data/bin/recog_standardize +0 -148
- data/bin/recog_verify +0 -64
- data/cpe-remap.yaml +0 -343
- data/features/data/failing_banners_fingerprints.xml +0 -20
- data/features/data/matching_banners_fingerprints.xml +0 -23
- data/features/data/multiple_banners_fingerprints.xml +0 -32
- data/features/data/no_tests.xml +0 -3
- data/features/data/sample_banner.txt +0 -2
- data/features/data/successful_tests.xml +0 -18
- data/features/data/tests_with_failures.xml +0 -20
- data/features/data/tests_with_warnings.xml +0 -17
- data/features/match.feature +0 -36
- data/features/support/aruba.rb +0 -3
- data/features/support/env.rb +0 -6
- data/features/verify.feature +0 -48
- data/identifiers/README.md +0 -70
- data/identifiers/fields.txt +0 -104
- data/identifiers/hw_device.txt +0 -78
- data/identifiers/hw_family.txt +0 -113
- data/identifiers/hw_product.txt +0 -410
- data/identifiers/os_architecture.txt +0 -10
- data/identifiers/os_device.txt +0 -75
- data/identifiers/os_family.txt +0 -233
- data/identifiers/os_product.txt +0 -340
- data/identifiers/service_family.txt +0 -249
- data/identifiers/service_product.txt +0 -752
- data/identifiers/vendor.txt +0 -798
- data/lib/recog/verifier_factory.rb +0 -13
- data/misc/convert_mysql_err +0 -61
- data/misc/order.xsl +0 -17
- data/requirements.txt +0 -2
- data/spec/lib/fingerprint_self_test_spec.rb +0 -174
- data/update_cpes.py +0 -250
|
@@ -75,7 +75,7 @@ describe Recog::Fingerprint do
|
|
|
75
75
|
let(:entry) { described_class.new(doc.xpath("//fingerprints/fingerprint")[6]) }
|
|
76
76
|
|
|
77
77
|
it "identifies when a parameter defined by a capture group is not included in one example" do
|
|
78
|
-
expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:
|
|
78
|
+
expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:fail, String])
|
|
79
79
|
end
|
|
80
80
|
end
|
|
81
81
|
|
|
@@ -83,7 +83,7 @@ describe Recog::Fingerprint do
|
|
|
83
83
|
let(:entry) { described_class.new(doc.xpath("//fingerprints/fingerprint")[7]) }
|
|
84
84
|
|
|
85
85
|
it "identifies when two parameters defined by a capture groups are not included in one example" do
|
|
86
|
-
expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:
|
|
86
|
+
expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:fail, String], [:fail, String])
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
|
|
@@ -92,7 +92,7 @@ describe Recog::Fingerprint do
|
|
|
92
92
|
let(:entry) { described_class.new(doc.xpath("//fingerprints/fingerprint")[8]) }
|
|
93
93
|
|
|
94
94
|
it "identifies when a parameter defined by a capture group is not included in one example" do
|
|
95
|
-
expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:
|
|
95
|
+
expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:fail, String])
|
|
96
96
|
end
|
|
97
97
|
end
|
|
98
98
|
|
|
@@ -100,7 +100,7 @@ describe Recog::Fingerprint do
|
|
|
100
100
|
let(:entry) { described_class.new(doc.xpath("//fingerprints/fingerprint")[9]) }
|
|
101
101
|
|
|
102
102
|
it "identifies when two parameters defined by a capture groups are not included in one example" do
|
|
103
|
-
expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:
|
|
103
|
+
expect { |unused| entry.verify_tests_have_capture_groups(&unused) }.to yield_successive_args([:fail, String], [:fail, String])
|
|
104
104
|
end
|
|
105
105
|
end
|
|
106
106
|
|
|
@@ -7,6 +7,7 @@ describe Recog::VerifyReporter do
|
|
|
7
7
|
let(:summary_line) do
|
|
8
8
|
"SUMMARY: Test completed with 1 successful, 1 warnings, and 1 failures"
|
|
9
9
|
end
|
|
10
|
+
let(:path) { "fingerprint.xml" }
|
|
10
11
|
|
|
11
12
|
subject { Recog::VerifyReporter.new(double(detail: false, quiet: false, warnings: true), formatter) }
|
|
12
13
|
|
|
@@ -21,12 +22,12 @@ describe Recog::VerifyReporter do
|
|
|
21
22
|
|
|
22
23
|
describe "#report" do
|
|
23
24
|
it "prints warnings" do
|
|
24
|
-
expect(formatter).to receive(:warning_message).with('a warning')
|
|
25
|
+
expect(formatter).to receive(:warning_message).with('WARN: a warning')
|
|
25
26
|
run_report
|
|
26
27
|
end
|
|
27
28
|
|
|
28
29
|
it "prints failures" do
|
|
29
|
-
expect(formatter).to receive(:failure_message).with('a failure')
|
|
30
|
+
expect(formatter).to receive(:failure_message).with('FAIL: a failure')
|
|
30
31
|
run_report
|
|
31
32
|
end
|
|
32
33
|
|
|
@@ -49,12 +50,80 @@ describe Recog::VerifyReporter do
|
|
|
49
50
|
end
|
|
50
51
|
|
|
51
52
|
it "prints warnings" do
|
|
52
|
-
expect(formatter).to receive(:warning_message).with(' a warning')
|
|
53
|
+
expect(formatter).to receive(:warning_message).with(' WARN: a warning')
|
|
53
54
|
run_report
|
|
54
55
|
end
|
|
55
56
|
|
|
56
57
|
it "prints failures" do
|
|
57
|
-
expect(formatter).to receive(:failure_message).with(' a failure')
|
|
58
|
+
expect(formatter).to receive(:failure_message).with(' FAIL: a failure')
|
|
59
|
+
run_report
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
it "prints the fingerprint count" do
|
|
63
|
+
expect(formatter).to receive(:status_message).with("\nVerified 1 fingerprints:")
|
|
64
|
+
run_report
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
it "prints summary" do
|
|
68
|
+
expect(formatter).to receive(:failure_message).with(summary_line)
|
|
69
|
+
run_report
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
context "with no fingerprint tests" do
|
|
73
|
+
let(:tests) { [] }
|
|
74
|
+
|
|
75
|
+
it "does not print the name" do
|
|
76
|
+
expect(formatter).not_to receive(:status_message).with("\na name")
|
|
77
|
+
run_report
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
context "with fingerprint path" do
|
|
83
|
+
|
|
84
|
+
subject { Recog::VerifyReporter.new(double(detail: false, quiet: false, warnings: true), formatter, path) }
|
|
85
|
+
|
|
86
|
+
it "prints warnings" do
|
|
87
|
+
expect(formatter).to receive(:warning_message).with("#{path}: WARN: a warning")
|
|
88
|
+
run_report
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
it "prints failures" do
|
|
92
|
+
expect(formatter).to receive(:failure_message).with("#{path}: FAIL: a failure")
|
|
93
|
+
run_report
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
it "prints summary" do
|
|
97
|
+
expect(formatter).to receive(:failure_message).with("#{path}: #{summary_line}")
|
|
98
|
+
run_report
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
context "with fingerprint path and detail" do
|
|
103
|
+
subject { Recog::VerifyReporter.new(double(detail: true, quiet: false, warnings: true), formatter, path) }
|
|
104
|
+
|
|
105
|
+
it "prints the fingerprint path" do
|
|
106
|
+
expect(formatter).to receive(:status_message).with("\n#{path}:\n")
|
|
107
|
+
run_report
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
it "prints the fingerprint name" do
|
|
111
|
+
expect(formatter).to receive(:status_message).with("\na name")
|
|
112
|
+
run_report
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
it "prints successes" do
|
|
116
|
+
expect(formatter).to receive(:success_message).with(' passed')
|
|
117
|
+
run_report
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
it "prints warnings" do
|
|
121
|
+
expect(formatter).to receive(:warning_message).with(' WARN: a warning')
|
|
122
|
+
run_report
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
it "prints failures" do
|
|
126
|
+
expect(formatter).to receive(:failure_message).with(' FAIL: a failure')
|
|
58
127
|
run_report
|
|
59
128
|
end
|
|
60
129
|
|
data/spec/spec_helper.rb
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
FINGERPRINT_DIR = File.expand_path(File.join('..', 'recog', 'xml'), __dir__)
|
|
2
|
+
|
|
3
|
+
# setup code coverage
|
|
1
4
|
require 'simplecov'
|
|
2
5
|
SimpleCov.start
|
|
3
6
|
|
|
7
|
+
require 'rspec'
|
|
4
8
|
# This file was generated by the `rspec --init` command. Conventionally, all
|
|
5
9
|
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
|
6
10
|
# The generated `.rspec` file contains `--require spec_helper` which will cause this
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: recog
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rapid7 Research
|
|
8
8
|
autorequire:
|
|
9
|
-
bindir: bin
|
|
9
|
+
bindir: recog/bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-06-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -52,20 +52,6 @@ dependencies:
|
|
|
52
52
|
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: cucumber
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - ">="
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - ">="
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0'
|
|
69
55
|
- !ruby/object:Gem::Dependency
|
|
70
56
|
name: aruba
|
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -115,90 +101,94 @@ description: Recog is a framework for identifying products, services, operating
|
|
|
115
101
|
email:
|
|
116
102
|
- research@rapid7.com
|
|
117
103
|
executables:
|
|
118
|
-
- recog_cleanup
|
|
119
|
-
- recog_export
|
|
120
104
|
- recog_match
|
|
121
|
-
- recog_standardize
|
|
122
|
-
- recog_verify
|
|
123
105
|
extensions: []
|
|
124
106
|
extra_rdoc_files: []
|
|
125
107
|
files:
|
|
126
|
-
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
|
127
|
-
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
|
128
|
-
- ".github/ISSUE_TEMPLATE/fingerprint_request.md"
|
|
129
|
-
- ".github/PULL_REQUEST_TEMPLATE"
|
|
130
|
-
- ".github/SECURITY.md"
|
|
131
|
-
- ".github/workflows/ci.yml"
|
|
132
|
-
- ".gitignore"
|
|
133
|
-
- ".rspec"
|
|
134
|
-
- ".ruby-gemset"
|
|
135
|
-
- ".ruby-version"
|
|
136
|
-
- ".snyk"
|
|
137
|
-
- ".travis.yml"
|
|
138
108
|
- ".yardopts"
|
|
139
|
-
- CONTRIBUTING.md
|
|
140
109
|
- COPYING
|
|
141
110
|
- Gemfile
|
|
142
111
|
- LICENSE
|
|
143
112
|
- README.md
|
|
144
113
|
- Rakefile
|
|
145
|
-
- bin/recog_cleanup
|
|
146
|
-
- bin/recog_export
|
|
147
|
-
- bin/recog_match
|
|
148
|
-
- bin/recog_standardize
|
|
149
|
-
- bin/recog_verify
|
|
150
|
-
- cpe-remap.yaml
|
|
151
|
-
- features/data/failing_banners_fingerprints.xml
|
|
152
|
-
- features/data/matching_banners_fingerprints.xml
|
|
153
|
-
- features/data/multiple_banners_fingerprints.xml
|
|
154
|
-
- features/data/no_tests.xml
|
|
155
|
-
- features/data/sample_banner.txt
|
|
156
|
-
- features/data/successful_tests.xml
|
|
157
|
-
- features/data/tests_with_failures.xml
|
|
158
|
-
- features/data/tests_with_warnings.xml
|
|
159
|
-
- features/match.feature
|
|
160
|
-
- features/support/aruba.rb
|
|
161
|
-
- features/support/env.rb
|
|
162
|
-
- features/verify.feature
|
|
163
|
-
- identifiers/README.md
|
|
164
|
-
- identifiers/fields.txt
|
|
165
|
-
- identifiers/hw_device.txt
|
|
166
|
-
- identifiers/hw_family.txt
|
|
167
|
-
- identifiers/hw_product.txt
|
|
168
|
-
- identifiers/os_architecture.txt
|
|
169
|
-
- identifiers/os_device.txt
|
|
170
|
-
- identifiers/os_family.txt
|
|
171
|
-
- identifiers/os_product.txt
|
|
172
|
-
- identifiers/service_family.txt
|
|
173
|
-
- identifiers/service_product.txt
|
|
174
|
-
- identifiers/vendor.txt
|
|
175
114
|
- lib/recog.rb
|
|
176
115
|
- lib/recog/db.rb
|
|
177
116
|
- lib/recog/db_manager.rb
|
|
178
117
|
- lib/recog/fingerprint.rb
|
|
179
118
|
- lib/recog/fingerprint/regexp_factory.rb
|
|
180
119
|
- lib/recog/fingerprint/test.rb
|
|
120
|
+
- lib/recog/fingerprint_parse_error.rb
|
|
181
121
|
- lib/recog/formatter.rb
|
|
182
122
|
- lib/recog/match_reporter.rb
|
|
183
123
|
- lib/recog/matcher.rb
|
|
184
124
|
- lib/recog/matcher_factory.rb
|
|
185
125
|
- lib/recog/nizer.rb
|
|
186
126
|
- lib/recog/verifier.rb
|
|
187
|
-
- lib/recog/verifier_factory.rb
|
|
188
127
|
- lib/recog/verify_reporter.rb
|
|
189
128
|
- lib/recog/version.rb
|
|
190
|
-
- misc/convert_mysql_err
|
|
191
|
-
- misc/order.xsl
|
|
192
129
|
- recog.gemspec
|
|
193
|
-
-
|
|
130
|
+
- recog/bin/recog_match
|
|
131
|
+
- recog/xml/apache_modules.xml
|
|
132
|
+
- recog/xml/apache_os.xml
|
|
133
|
+
- recog/xml/architecture.xml
|
|
134
|
+
- recog/xml/dhcp_vendor_class.xml
|
|
135
|
+
- recog/xml/dns_versionbind.xml
|
|
136
|
+
- recog/xml/favicons.xml
|
|
137
|
+
- recog/xml/fingerprints.xsd
|
|
138
|
+
- recog/xml/ftp_banners.xml
|
|
139
|
+
- recog/xml/h323_callresp.xml
|
|
140
|
+
- recog/xml/hp_pjl_id.xml
|
|
141
|
+
- recog/xml/html_title.xml
|
|
142
|
+
- recog/xml/http_cookies.xml
|
|
143
|
+
- recog/xml/http_servers.xml
|
|
144
|
+
- recog/xml/http_wwwauth.xml
|
|
145
|
+
- recog/xml/imap_banners.xml
|
|
146
|
+
- recog/xml/ldap_searchresult.xml
|
|
147
|
+
- recog/xml/mdns_device-info_txt.xml
|
|
148
|
+
- recog/xml/mdns_workstation_txt.xml
|
|
149
|
+
- recog/xml/mysql_banners.xml
|
|
150
|
+
- recog/xml/mysql_error.xml
|
|
151
|
+
- recog/xml/nntp_banners.xml
|
|
152
|
+
- recog/xml/ntp_banners.xml
|
|
153
|
+
- recog/xml/operating_system.xml
|
|
154
|
+
- recog/xml/pop_banners.xml
|
|
155
|
+
- recog/xml/rsh_resp.xml
|
|
156
|
+
- recog/xml/rtsp_servers.xml
|
|
157
|
+
- recog/xml/sip_banners.xml
|
|
158
|
+
- recog/xml/sip_user_agents.xml
|
|
159
|
+
- recog/xml/smb_native_lm.xml
|
|
160
|
+
- recog/xml/smb_native_os.xml
|
|
161
|
+
- recog/xml/smtp_banners.xml
|
|
162
|
+
- recog/xml/smtp_debug.xml
|
|
163
|
+
- recog/xml/smtp_ehlo.xml
|
|
164
|
+
- recog/xml/smtp_expn.xml
|
|
165
|
+
- recog/xml/smtp_help.xml
|
|
166
|
+
- recog/xml/smtp_mailfrom.xml
|
|
167
|
+
- recog/xml/smtp_noop.xml
|
|
168
|
+
- recog/xml/smtp_quit.xml
|
|
169
|
+
- recog/xml/smtp_rcptto.xml
|
|
170
|
+
- recog/xml/smtp_rset.xml
|
|
171
|
+
- recog/xml/smtp_turn.xml
|
|
172
|
+
- recog/xml/smtp_vrfy.xml
|
|
173
|
+
- recog/xml/snmp_sysdescr.xml
|
|
174
|
+
- recog/xml/snmp_sysobjid.xml
|
|
175
|
+
- recog/xml/ssh_banners.xml
|
|
176
|
+
- recog/xml/telnet_banners.xml
|
|
177
|
+
- recog/xml/tls_jarm.xml
|
|
178
|
+
- recog/xml/x11_banners.xml
|
|
179
|
+
- recog/xml/x509_issuers.xml
|
|
180
|
+
- recog/xml/x509_subjects.xml
|
|
194
181
|
- spec/data/best_os_match_1.yml
|
|
195
182
|
- spec/data/best_os_match_2.yml
|
|
196
183
|
- spec/data/best_service_match_1.yml
|
|
184
|
+
- spec/data/external_example_fingerprint.xml
|
|
185
|
+
- spec/data/external_example_fingerprint/hp_printer_ex_01.txt
|
|
186
|
+
- spec/data/external_example_fingerprint/hp_printer_ex_02.txt
|
|
187
|
+
- spec/data/external_example_illegal_path_fingerprint.xml
|
|
197
188
|
- spec/data/smb_native_os.txt
|
|
198
189
|
- spec/data/test_fingerprints.xml
|
|
199
190
|
- spec/data/verification_fingerprints.xml
|
|
200
191
|
- spec/data/whitespaced_fingerprint.xml
|
|
201
|
-
- spec/lib/fingerprint_self_test_spec.rb
|
|
202
192
|
- spec/lib/recog/db_spec.rb
|
|
203
193
|
- spec/lib/recog/fingerprint/regexp_factory_spec.rb
|
|
204
194
|
- spec/lib/recog/fingerprint_spec.rb
|
|
@@ -207,57 +197,7 @@ files:
|
|
|
207
197
|
- spec/lib/recog/nizer_spec.rb
|
|
208
198
|
- spec/lib/recog/verify_reporter_spec.rb
|
|
209
199
|
- spec/spec_helper.rb
|
|
210
|
-
|
|
211
|
-
- xml/apache_modules.xml
|
|
212
|
-
- xml/apache_os.xml
|
|
213
|
-
- xml/architecture.xml
|
|
214
|
-
- xml/dns_versionbind.xml
|
|
215
|
-
- xml/favicons.xml
|
|
216
|
-
- xml/fingerprints.xsd
|
|
217
|
-
- xml/ftp_banners.xml
|
|
218
|
-
- xml/h323_callresp.xml
|
|
219
|
-
- xml/hp_pjl_id.xml
|
|
220
|
-
- xml/html_title.xml
|
|
221
|
-
- xml/http_cookies.xml
|
|
222
|
-
- xml/http_servers.xml
|
|
223
|
-
- xml/http_wwwauth.xml
|
|
224
|
-
- xml/imap_banners.xml
|
|
225
|
-
- xml/ldap_searchresult.xml
|
|
226
|
-
- xml/mdns_device-info_txt.xml
|
|
227
|
-
- xml/mdns_workstation_txt.xml
|
|
228
|
-
- xml/mysql_banners.xml
|
|
229
|
-
- xml/mysql_error.xml
|
|
230
|
-
- xml/nntp_banners.xml
|
|
231
|
-
- xml/ntp_banners.xml
|
|
232
|
-
- xml/operating_system.xml
|
|
233
|
-
- xml/pop_banners.xml
|
|
234
|
-
- xml/rsh_resp.xml
|
|
235
|
-
- xml/rtsp_servers.xml
|
|
236
|
-
- xml/sip_banners.xml
|
|
237
|
-
- xml/sip_user_agents.xml
|
|
238
|
-
- xml/smb_native_lm.xml
|
|
239
|
-
- xml/smb_native_os.xml
|
|
240
|
-
- xml/smtp_banners.xml
|
|
241
|
-
- xml/smtp_debug.xml
|
|
242
|
-
- xml/smtp_ehlo.xml
|
|
243
|
-
- xml/smtp_expn.xml
|
|
244
|
-
- xml/smtp_help.xml
|
|
245
|
-
- xml/smtp_mailfrom.xml
|
|
246
|
-
- xml/smtp_noop.xml
|
|
247
|
-
- xml/smtp_quit.xml
|
|
248
|
-
- xml/smtp_rcptto.xml
|
|
249
|
-
- xml/smtp_rset.xml
|
|
250
|
-
- xml/smtp_turn.xml
|
|
251
|
-
- xml/smtp_vrfy.xml
|
|
252
|
-
- xml/snmp_sysdescr.xml
|
|
253
|
-
- xml/snmp_sysobjid.xml
|
|
254
|
-
- xml/ssh_banners.xml
|
|
255
|
-
- xml/telnet_banners.xml
|
|
256
|
-
- xml/tls_jarm.xml
|
|
257
|
-
- xml/x11_banners.xml
|
|
258
|
-
- xml/x509_issuers.xml
|
|
259
|
-
- xml/x509_subjects.xml
|
|
260
|
-
homepage: https://www.github.com/rapid7/recog
|
|
200
|
+
homepage: https://www.github.com/rapid7/recog-ruby
|
|
261
201
|
licenses: []
|
|
262
202
|
metadata: {}
|
|
263
203
|
post_install_message:
|
|
@@ -275,31 +215,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
275
215
|
- !ruby/object:Gem::Version
|
|
276
216
|
version: '0'
|
|
277
217
|
requirements: []
|
|
278
|
-
rubygems_version: 3.
|
|
218
|
+
rubygems_version: 3.1.6
|
|
279
219
|
signing_key:
|
|
280
220
|
specification_version: 4
|
|
281
221
|
summary: Network service fingerprint database, classes, and utilities
|
|
282
222
|
test_files:
|
|
283
|
-
- features/data/failing_banners_fingerprints.xml
|
|
284
|
-
- features/data/matching_banners_fingerprints.xml
|
|
285
|
-
- features/data/multiple_banners_fingerprints.xml
|
|
286
|
-
- features/data/no_tests.xml
|
|
287
|
-
- features/data/sample_banner.txt
|
|
288
|
-
- features/data/successful_tests.xml
|
|
289
|
-
- features/data/tests_with_failures.xml
|
|
290
|
-
- features/data/tests_with_warnings.xml
|
|
291
|
-
- features/match.feature
|
|
292
|
-
- features/support/aruba.rb
|
|
293
|
-
- features/support/env.rb
|
|
294
|
-
- features/verify.feature
|
|
295
223
|
- spec/data/best_os_match_1.yml
|
|
296
224
|
- spec/data/best_os_match_2.yml
|
|
297
225
|
- spec/data/best_service_match_1.yml
|
|
226
|
+
- spec/data/external_example_fingerprint.xml
|
|
227
|
+
- spec/data/external_example_fingerprint/hp_printer_ex_01.txt
|
|
228
|
+
- spec/data/external_example_fingerprint/hp_printer_ex_02.txt
|
|
229
|
+
- spec/data/external_example_illegal_path_fingerprint.xml
|
|
298
230
|
- spec/data/smb_native_os.txt
|
|
299
231
|
- spec/data/test_fingerprints.xml
|
|
300
232
|
- spec/data/verification_fingerprints.xml
|
|
301
233
|
- spec/data/whitespaced_fingerprint.xml
|
|
302
|
-
- spec/lib/fingerprint_self_test_spec.rb
|
|
303
234
|
- spec/lib/recog/db_spec.rb
|
|
304
235
|
- spec/lib/recog/fingerprint/regexp_factory_spec.rb
|
|
305
236
|
- spec/lib/recog/fingerprint_spec.rb
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
**Describe the bug**
|
|
8
|
-
A clear and concise description of what the bug is.
|
|
9
|
-
|
|
10
|
-
**To Reproduce**
|
|
11
|
-
Steps to reproduce the behavior:
|
|
12
|
-
|
|
13
|
-
1. Do this...
|
|
14
|
-
2. Do that...
|
|
15
|
-
3. Then something happens...
|
|
16
|
-
|
|
17
|
-
Code that reproduces the behavior: <!-- This is optional -->
|
|
18
|
-
```ruby
|
|
19
|
-
# paste code here, or create a gist, or link to public code snippet
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Matcher that reproduces the behavior: <!-- This is optional -->
|
|
23
|
-
```xml
|
|
24
|
-
<!-- paste matcher xml here, or create a gist, or link to public code snippet -->
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
**Expected behavior**
|
|
28
|
-
A clear and concise description of what you expected to happen.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
**Environment (please complete the following information):**
|
|
32
|
-
- Operating System:
|
|
33
|
-
- Ruby Version:
|
|
34
|
-
- Recog Version:
|
|
35
|
-
|
|
36
|
-
**Additional context**
|
|
37
|
-
Add any other context about the problem here.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Feature request
|
|
3
|
-
about: Suggest an idea for this project
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
**Is your feature request related to a problem? Please describe.**
|
|
8
|
-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
9
|
-
|
|
10
|
-
**Describe the solution you'd like**
|
|
11
|
-
A clear and concise description of what you want to happen.
|
|
12
|
-
|
|
13
|
-
**Describe alternatives you've considered**
|
|
14
|
-
A clear and concise description of any alternative solutions or features you've considered.
|
|
15
|
-
|
|
16
|
-
**Additional context**
|
|
17
|
-
Add any other context or screenshots about the feature request here.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Fingerprint request
|
|
3
|
-
about: Request new fingerprint coverage
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
**Request for new fingerprint(s) for a product**
|
|
8
|
-
Briefly describe the product to be fingerprinted, including vendor and version information.
|
|
9
|
-
<!-- Include links to relevant public documentation from the vendor or other sources, if available -->
|
|
10
|
-
|
|
11
|
-
**Provide details about the product**
|
|
12
|
-
What protocol(s) can be used to retrieve identifiable information about the product?
|
|
13
|
-
<!-- Examples: Telnet, SSH, SNMP, SMTP, HTTP(S), Vendor Proprietary Protocol -->
|
|
14
|
-
|
|
15
|
-
What information can be collected on each protocol?
|
|
16
|
-
<!-- Example: HTTP Server banner: nginx/0.8.53 -->
|
|
17
|
-
|
|
18
|
-
What request, command, and/or payload can be used to retrieve information on each protocol?
|
|
19
|
-
<!-- Use code fences like the below example to preserve formatting -->
|
|
20
|
-
```
|
|
21
|
-
HTTP HEAD /
|
|
22
|
-
|
|
23
|
-
HTTP GET /info.php
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
**Example banner(s) with specific version info**
|
|
27
|
-
<!-- Paste raw text here, using code fences to preserve formatting if needed-->
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
## Description
|
|
2
|
-
A detailed description of your changes.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Motivation and Context
|
|
6
|
-
Explanation of why these changes are being proposed, including any links to other relevant issues or pull requests.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## How Has This Been Tested?
|
|
10
|
-
A clear and concise description of your changes were tested.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Types of changes
|
|
14
|
-
<!--- What types of changes does your code introduce? Remove any that do not apply: -->
|
|
15
|
-
- Bug fix (non-breaking change which fixes an issue)
|
|
16
|
-
- New feature (non-breaking change which adds functionality)
|
|
17
|
-
- Breaking change (fix or feature that would cause existing functionality to change)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
## Checklist:
|
|
21
|
-
<!--- After submitting the PR, check all of the boxes that apply. -->
|
|
22
|
-
- [ ] I have updated the documentation accordingly (or changes are not required).
|
|
23
|
-
- [ ] I have added tests to cover my changes (or new tests are not required).
|
|
24
|
-
- [ ] All new and existing tests passed.
|
data/.github/SECURITY.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Reporting security issues
|
|
2
|
-
|
|
3
|
-
Thanks for your interest in making Recog more secure! If you feel
|
|
4
|
-
that you have found a security issue involving Metasploit, Meterpreter,
|
|
5
|
-
Recog, or any other Rapid7 open source project, you are welcome to let
|
|
6
|
-
us know in the way that's most comfortable for you.
|
|
7
|
-
|
|
8
|
-
## Via ZenDesk
|
|
9
|
-
|
|
10
|
-
You can click on the big blue button at [Rapid7's Vulnerability
|
|
11
|
-
Disclosure][r7-vulns] page, which will get you to our general
|
|
12
|
-
vulnerability reporting system. While this does require a (free) ZenDesk
|
|
13
|
-
account to use, you'll get regular updates on your issue as our software
|
|
14
|
-
support teams work through it. As it happens [that page][r7-vulns] also
|
|
15
|
-
will tell you what to expect when it comes to reporting vulns, how fast
|
|
16
|
-
we'll fix and respond, and all the rest, so it's a pretty good read
|
|
17
|
-
regardless.
|
|
18
|
-
|
|
19
|
-
## Via email
|
|
20
|
-
|
|
21
|
-
If you're more of a traditionalist, you can email your finding to
|
|
22
|
-
security@rapid7.com. If you like, you can use our [PGP key][pgp] to
|
|
23
|
-
encrypt your messages, but we certainly don't mind cleartext reports
|
|
24
|
-
over email.
|
|
25
|
-
|
|
26
|
-
## NOT via GitHub Issues
|
|
27
|
-
|
|
28
|
-
Please don't! Disclosing security vulnerabilities to public bug trackers
|
|
29
|
-
is kind of mean, even when it's well-intentioned, since you end up
|
|
30
|
-
dropping 0-day on pretty much everyone right out of the gate. We'd prefer
|
|
31
|
-
you didn't!
|
|
32
|
-
|
|
33
|
-
[r7-vulns]:https://www.rapid7.com/security/disclosure/
|
|
34
|
-
[pgp]:https://keybase.io/rapid7/pgp_keys.asc?fingerprint=9a90aea0576cbcafa39c502ba5e16807959d3eda
|
|
35
|
-
|
data/.github/workflows/ci.yml
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
test:
|
|
7
|
-
name: 'Ruby: ${{ matrix.ruby-version }}'
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
strategy:
|
|
10
|
-
fail-fast: false
|
|
11
|
-
matrix:
|
|
12
|
-
ruby-version: ['2.5', '2.6', '2.7', '3.0', 'jruby-9.1.17.0', 'jruby']
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v2
|
|
16
|
-
- name: Set up Ruby
|
|
17
|
-
uses: ruby/setup-ruby@v1
|
|
18
|
-
with:
|
|
19
|
-
ruby-version: ${{ matrix.ruby-version }}
|
|
20
|
-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
21
|
-
- name: Run tests
|
|
22
|
-
run: |
|
|
23
|
-
bundle exec rake --version
|
|
24
|
-
bundle exec rake tests
|
|
25
|
-
env:
|
|
26
|
-
JRUBY_OPTS: --server -J-Xms512m -J-Xmx2G
|
data/.gitignore
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Ruby and tooling specific
|
|
2
|
-
.yardoc
|
|
3
|
-
coverage/
|
|
4
|
-
doc/
|
|
5
|
-
pkg/
|
|
6
|
-
|
|
7
|
-
/Gemfile.lock
|
|
8
|
-
|
|
9
|
-
#Python specific
|
|
10
|
-
venv
|
|
11
|
-
|
|
12
|
-
# IDE specific
|
|
13
|
-
.vscode/
|
|
14
|
-
.idea
|
|
15
|
-
|
|
16
|
-
# Misc
|
|
17
|
-
**/.DS_Store
|
|
18
|
-
|
|
19
|
-
# CPE XML
|
|
20
|
-
official-cpe-dictionary*.xml
|
|
21
|
-
|
|
22
|
-
# CPE Remap Errors
|
|
23
|
-
errors.txt
|
data/.rspec
DELETED
data/.ruby-gemset
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
recog
|
data/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.6.6
|
data/.snyk
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
|
2
|
-
python: 3.6.0
|
|
3
|
-
version: v1.14.1
|
|
4
|
-
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
|
5
|
-
ignore:
|
|
6
|
-
SNYK-PYTHON-PYYAML-590151:
|
|
7
|
-
- pyyaml:
|
|
8
|
-
reason: Project doesn't use vulnerable code path.
|
|
9
|
-
expires: 2021-06-01T00:00:00.000Z
|
|
10
|
-
patch: {}
|
data/.travis.yml
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
sudo: false
|
|
3
|
-
cache: bundler
|
|
4
|
-
rvm:
|
|
5
|
-
- '2.5.8'
|
|
6
|
-
- '2.6.6'
|
|
7
|
-
- 'jruby-9.1.9.0'
|
|
8
|
-
jdk:
|
|
9
|
-
- openjdk8
|
|
10
|
-
matrix:
|
|
11
|
-
allow_failures:
|
|
12
|
-
- rvm: 'jruby-9.1.9.0'
|
|
13
|
-
before_install:
|
|
14
|
-
- "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
|
|
15
|
-
- rake --version
|
|
16
|
-
before_script:
|
|
17
|
-
- bundle exec rake --version
|
|
18
|
-
script: bundle exec rake tests
|
|
19
|
-
env:
|
|
20
|
-
global:
|
|
21
|
-
- CI="travis"
|
|
22
|
-
- JRUBY_OPTS="--server -J-Xms512m -J-Xmx2G"
|
|
23
|
-
branches:
|
|
24
|
-
only:
|
|
25
|
-
- master
|