yawast 0.5.2 → 0.6.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b364a28ae5689b6ec07c5f7f9bcf3475fc11144
4
- data.tar.gz: 4d49cb9633e87e6f31fcb1e77c4177b73370a772
3
+ metadata.gz: 71eb6eb4ed8a87d84f26c92c4ec55fc685dd4a1e
4
+ data.tar.gz: ea0bfebab8bce5379d26d3bdfee53f5cf6fa2a23
5
5
  SHA512:
6
- metadata.gz: 56ea8e0165b2b634c24f8e4382099a0aa02fd5f57b1b4981994ea7885243d857fea28783ecdbe853701ab607169143f042c4d7cc8566de41a8c79dc05fef6264
7
- data.tar.gz: 815079863ff0369a7fece526423a3e047ef814555488735f937048c6ca91a1a00e228336a70f0008fc533391daa5d407a95e39c941d2bf0a62cde2ffc2c864a6
6
+ metadata.gz: eb8c1f78bd2768b39879ecac338fddfc926aeea8f949d4503dc5ceebc7914c3084d1472b9878a42542a6cf951a62131e0475f80e5fe238d30ae8723b7c83578d
7
+ data.tar.gz: 7e0225ef254fca5cb47fb75f0fa687edca356267e16a0bdec33a71eefb0809194b7145c9dabc74b012bf0354ef8e096713f7552ed7ff82ff8c8b5064382f6b9e
data/.rubocop.yml CHANGED
@@ -81,7 +81,7 @@ Lint/EnsureReturn:
81
81
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
82
82
  Enabled: true
83
83
 
84
- Lint/Eval:
84
+ Security/Eval:
85
85
  Description: 'The use of eval represents a serious security risk.'
86
86
  Enabled: true
87
87
 
@@ -716,7 +716,7 @@ Style/LineEndConcatenation:
716
716
  line end.
717
717
  Enabled: false
718
718
 
719
- Style/MethodCallParentheses:
719
+ Style/MethodCallWithoutArgsParentheses:
720
720
  Description: 'Do not use parentheses for method calls with no arguments.'
721
721
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
722
722
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.6.0 - In Development
2
+
3
+ * [#109](https://github.com/adamcaudill/yawast/issues/109) - DNS CAA Support
4
+ * [#113](https://github.com/adamcaudill/yawast/issues/113) - Better False Positive Detection For Directory Search
5
+
1
6
  ## 0.5.2 - 2017-07-13
2
7
 
3
8
  * [#107](https://github.com/adamcaudill/yawast/issues/107) - Current version check
@@ -0,0 +1,51 @@
1
+ require 'dnsruby'
2
+ include Dnsruby
3
+
4
+ module Yawast
5
+ module Scanner
6
+ module Plugins
7
+ module DNS
8
+ class CAA
9
+ def self.caa_info(uri)
10
+ # force DNS resolver to something that works
11
+ res = Resolver.new({:nameserver => ['8.8.8.8']})
12
+
13
+ domain = uri.host.to_s
14
+
15
+ #BUG: this is a basic implementation that ignores CNAMEs/etc
16
+ while domain != '' do
17
+ begin
18
+ ans = res.query(domain, 'CAA')
19
+
20
+ # check if we have any response
21
+ if ans.answer.count > 0
22
+ ans.answer.each do |rec|
23
+ # check for CNAME first
24
+ if rec.type == 'CNAME'
25
+ Yawast::Utilities.puts_error "\t\tCAA (#{domain}): CNAME Found: Not Currently Supported"
26
+ else
27
+ # check for RDATA
28
+ if rec.rdata != nil
29
+ Yawast::Utilities.puts_info "\t\tCAA (#{domain}): #{rec.rdata}"
30
+ else
31
+ Yawast::Utilities.puts_error "\t\tCAA (#{domain}): Invalid Response: #{ans.answer}"
32
+ end
33
+ end
34
+ end
35
+ else
36
+ Yawast::Utilities.puts_info "\t\tCAA (#{domain}): No Records Found"
37
+ end
38
+
39
+ rescue => e
40
+ Yawast::Utilities.puts_error "\t\tCAA (#{domain}): #{e.message}"
41
+ end
42
+
43
+ # strip the leading element off the domain
44
+ domain = domain.partition('.').last
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -150,6 +150,9 @@ module Yawast
150
150
  end
151
151
  end
152
152
 
153
+ #get the CAA info
154
+ Yawast::Scanner::Plugins::DNS::CAA.caa_info uri
155
+
153
156
  puts
154
157
  rescue => e
155
158
  Yawast::Utilities.puts_error "Error getting basic information: #{e.message}"
@@ -1,9 +1,18 @@
1
+ require 'securerandom'
2
+
1
3
  module Yawast
2
4
  module Scanner
3
5
  module Plugins
4
6
  module Http
5
7
  class DirectorySearch
6
8
  def self.search(uri, recursive, list_redirects, search_list = nil)
9
+ #first, we need to see if the site responds to 404 in a reasonable way
10
+ unless Yawast::Shared::Http.check_not_found(uri, false)
11
+ puts 'Site does not respond properly to non-existent directory requests; skipping some checks.'
12
+
13
+ return
14
+ end
15
+
7
16
  @recursive = recursive
8
17
  @list_redirects = list_redirects
9
18
 
@@ -27,10 +27,7 @@ module Yawast
27
27
 
28
28
  def self.check_all(uri, common_files)
29
29
  #first, we need to see if the site responds to 404 in a reasonable way
30
- fake_uri = uri.copy
31
- fake_uri.path = "/#{SecureRandom.hex}/"
32
- if Yawast::Shared::Http.get_status_code(fake_uri) != '404'
33
- #crazy 404 handling
30
+ unless Yawast::Shared::Http.check_not_found(uri, true)
34
31
  puts 'Site does not respond properly to non-existent file requests; skipping some checks.'
35
32
 
36
33
  return
data/lib/shared/http.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'securerandom'
2
+
1
3
  module Yawast
2
4
  module Shared
3
5
  class Http
@@ -62,6 +64,23 @@ module Yawast
62
64
  req
63
65
  end
64
66
 
67
+ def self.check_not_found(uri, file)
68
+ fake_uri = uri.copy
69
+
70
+ if file
71
+ fake_uri.path = "/#{SecureRandom.hex}.html"
72
+ else
73
+ fake_uri.path = "/#{SecureRandom.hex}/"
74
+ end
75
+
76
+ if Yawast::Shared::Http.get_status_code(fake_uri) != '404'
77
+ #crazy 404 handling
78
+ return false
79
+ end
80
+
81
+ return true
82
+ end
83
+
65
84
  # noinspection RubyStringKeysInHashInspection
66
85
  def self.get_headers(extra_headers = nil)
67
86
  if @cookie == nil
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yawast
2
- VERSION = '0.5.2'
2
+ VERSION = '0.6.0.beta1'
3
3
  end
data/yawast.gemspec CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.add_runtime_dependency 'ipaddress', '~> 0.8'
23
23
  s.add_runtime_dependency 'public_suffix', '~> 2.0'
24
24
  s.add_runtime_dependency 'sslshake', '~> 1.1'
25
+ s.add_runtime_dependency 'dnsruby', '~> 1.60'
25
26
 
26
27
  s.bindir = 'bin'
27
28
  s.files = `git ls-files`.split("\n")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yawast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Caudill
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-13 00:00:00.000000000 Z
11
+ date: 2017-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ssllabs
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '1.1'
139
+ - !ruby/object:Gem::Dependency
140
+ name: dnsruby
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '1.60'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '1.60'
139
153
  description: YAWAST is an application meant to simplify initial analysis and information
140
154
  gathering for penetration testers and security auditors.
141
155
  email: adam@adamcaudill.com
@@ -173,6 +187,7 @@ files:
173
187
  - lib/scanner/iis.rb
174
188
  - lib/scanner/nginx.rb
175
189
  - lib/scanner/php.rb
190
+ - lib/scanner/plugins/dns/caa.rb
176
191
  - lib/scanner/plugins/dns/generic.rb
177
192
  - lib/scanner/plugins/http/directory_search.rb
178
193
  - lib/scanner/plugins/http/file_presence.rb
@@ -225,9 +240,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
240
  version: '0'
226
241
  required_rubygems_version: !ruby/object:Gem::Requirement
227
242
  requirements:
228
- - - ">="
243
+ - - ">"
229
244
  - !ruby/object:Gem::Version
230
- version: '0'
245
+ version: 1.3.1
231
246
  requirements: []
232
247
  rubyforge_project: yawast
233
248
  rubygems_version: 2.4.8