pwn 0.4.418 → 0.4.422

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23e5b36751a3b2abfccc8ce7271838191b7a9a1d315cd7cef3d7d489fcfb4d29
4
- data.tar.gz: 1fcfbea8a333ddf7c5902a48eeea892cc605db9c3c36b7c39a64a8a9f4095eec
3
+ metadata.gz: cc1e32a44a5b5797d925e464dbc32195f27d20302fe4ec0f0b05f417c5a2b7c2
4
+ data.tar.gz: 95f27bf92deba3e9bcc8100024c9d28cceebee21b47a2013d6f1e65489561ab3
5
5
  SHA512:
6
- metadata.gz: af22fc1e015fd9dc9168282e230df4e09892cc10a34e7efc87c357b5ee1ab7f03e2a0a8104c73dc71d4c787c9c748477ddcd44c257aa88798fc5a05afe14ef19
7
- data.tar.gz: 381c7a01c667ad26f1888ac88556c83769379d7ee925885d02cbf275b76e34cb2cde6c191ae71ab9e8633a635f3c7a6675350439dd9ac2118ca00c53d4af07c1
6
+ metadata.gz: 5e1b67eea92a2647689bfd6d3b3a2b4ee951e37da0740d8465619cd489679873c8ce2a62bac14cd6d8a1a275e00afd3f906916213734844c3dc806c26956cea9
7
+ data.tar.gz: 22d4340100fc68bc36636bb10e78edb8d478b9f53ce8923be8c684ed788cd6930176b175807cd8fcd00815f3539fefe4680a4bc4c71d4f9b7276827290982098
data/.rubocop_todo.yml CHANGED
@@ -1,76 +1,83 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2022-02-28 16:41:22 UTC using RuboCop version 1.25.1.
3
+ # on 2022-05-08 06:06:43 UTC using RuboCop version 1.29.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 225
9
+ # Offense count: 227
10
10
  Lint/UselessAssignment:
11
11
  Enabled: false
12
12
 
13
- # Offense count: 258
13
+ # Offense count: 246
14
14
  # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
15
15
  Metrics/AbcSize:
16
16
  Max: 328
17
17
 
18
- # Offense count: 58
18
+ # Offense count: 60
19
19
  # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
20
20
  # IgnoredMethods: refine
21
21
  Metrics/BlockLength:
22
22
  Max: 194
23
23
 
24
- # Offense count: 43
24
+ # Offense count: 45
25
25
  # Configuration parameters: CountBlocks.
26
26
  Metrics/BlockNesting:
27
27
  Max: 5
28
28
 
29
- # Offense count: 81
29
+ # Offense count: 83
30
30
  # Configuration parameters: IgnoredMethods.
31
31
  Metrics/CyclomaticComplexity:
32
32
  Max: 231
33
33
 
34
- # Offense count: 446
34
+ # Offense count: 440
35
35
  # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
36
36
  Metrics/MethodLength:
37
37
  Max: 466
38
38
 
39
- # Offense count: 36
39
+ # Offense count: 33
40
40
  # Configuration parameters: CountComments, CountAsOne.
41
41
  Metrics/ModuleLength:
42
42
  Max: 1186
43
43
 
44
- # Offense count: 91
44
+ # Offense count: 75
45
45
  # Configuration parameters: IgnoredMethods.
46
46
  Metrics/PerceivedComplexity:
47
47
  Max: 51
48
48
 
49
- # Offense count: 159
49
+ # Offense count: 161
50
50
  Style/ClassVars:
51
51
  Enabled: false
52
52
 
53
- # Offense count: 297
54
- # Cop supports --auto-correct.
53
+ # Offense count: 281
54
+ # This cop supports safe auto-correction (--auto-correct).
55
55
  # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
56
56
  # SupportedStyles: assign_to_condition, assign_inside_condition
57
57
  Style/ConditionalAssignment:
58
58
  Enabled: false
59
59
 
60
60
  # Offense count: 2
61
- # Cop supports --auto-correct.
61
+ # This cop supports safe auto-correction (--auto-correct).
62
62
  Style/ExplicitBlockArgument:
63
63
  Exclude:
64
64
  - 'lib/pwn/plugins/nmap_it.rb'
65
65
 
66
- # Offense count: 42
67
- # Cop supports --auto-correct-all.
66
+ # Offense count: 95
67
+ # This cop supports safe auto-correction (--auto-correct).
68
+ Style/RedundantCondition:
69
+ Exclude:
70
+ - 'bin/pwn_simple_http_server'
71
+ - 'lib/pwn/plugins/packet.rb'
72
+
73
+ # Offense count: 44
74
+ # This cop supports unsafe auto-correction (--auto-correct-all).
68
75
  Style/SlicingWithRange:
69
76
  Enabled: false
70
77
 
71
- # Offense count: 520
72
- # Cop supports --auto-correct.
73
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
78
+ # Offense count: 531
79
+ # This cop supports safe auto-correction (--auto-correct).
80
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
74
81
  # URISchemes: http, https
75
82
  Layout/LineLength:
76
83
  Max: 1620
data/Gemfile CHANGED
@@ -11,14 +11,14 @@ gemspec
11
11
  # In some circumstances custom flags are passed to gems in order
12
12
  # to build appropriately. Defer to ./reinstall_pwn_gemset.sh
13
13
  # to review these custom flags (e.g. pg, serialport, etc).
14
- gem 'activesupport', '7.0.2.3'
14
+ gem 'activesupport', '7.0.3'
15
15
  gem 'anemone', '0.7.2'
16
16
  gem 'authy', '3.0.0'
17
17
  gem 'aws-sdk', '3.1.0'
18
18
  gem 'bettercap', '1.6.2'
19
- gem 'brakeman', '5.2.2'
19
+ gem 'brakeman', '5.2.3'
20
20
  gem 'bson', '4.15.0'
21
- gem 'bundler', '>=2.3.12'
21
+ gem 'bundler', '>=2.3.13'
22
22
  gem 'bundler-audit', '0.9.0.1'
23
23
  gem 'bunny', '2.19.0'
24
24
  gem 'colorize', '0.8.1'
@@ -31,7 +31,7 @@ gem 'htmlentities', '4.3.4'
31
31
  gem 'ipaddress', '0.8.3'
32
32
  # gem 'jenkins_api_client', '1.5.3' # Temporarily disabled until arangamani/jenkins_api_client/issues/304 is Closed out
33
33
  gem 'js-beautify', '0.1.8'
34
- gem 'json', '2.6.1'
34
+ gem 'json', '2.6.2'
35
35
  gem 'jsonpath', '1.1.2'
36
36
  gem 'jwt', '2.3.0'
37
37
  gem 'luhn', '1.0.2'
@@ -42,11 +42,11 @@ gem 'net-ldap', '0.17.0'
42
42
  gem 'net-openvpn', '0.8.7'
43
43
  gem 'net-smtp', '0.3.1'
44
44
  gem 'nexpose', '7.3.0'
45
- gem 'nokogiri', '1.13.4'
45
+ gem 'nokogiri', '1.13.6'
46
46
  gem 'oily_png', '1.2.1'
47
47
  gem 'os', '1.1.4'
48
48
  gem 'packetfu', '1.1.13'
49
- gem 'pdf-reader', '2.9.2'
49
+ gem 'pdf-reader', '2.10.0'
50
50
  gem 'pg', '1.3.5'
51
51
  gem 'pry', '0.14.1'
52
52
  gem 'pry-doc', '1.3.0'
@@ -59,7 +59,7 @@ gem 'rex', '2.0.13'
59
59
  gem 'rmagick', '4.2.5'
60
60
  gem 'rspec', '3.11.0'
61
61
  gem 'rtesseract', '3.1.2'
62
- gem 'rubocop', '1.28.2'
62
+ gem 'rubocop', '1.29.1'
63
63
  gem 'rubocop-rake', '0.6.0'
64
64
  gem 'rubocop-rspec', '2.10.0'
65
65
  gem 'ruby-audio', '1.6.1'
@@ -67,7 +67,7 @@ gem 'ruby-nmap', '0.10.0'
67
67
  gem 'ruby-saml', '1.14.0'
68
68
  gem 'rvm', '1.11.3.9'
69
69
  gem 'savon', '2.12.1'
70
- gem 'selenium-devtools', '0.100.0'
70
+ gem 'selenium-devtools', '0.101.0'
71
71
  gem 'serialport', '1.3.2'
72
72
  gem 'sinatra', '2.2.0'
73
73
  gem 'slack-ruby-client', '1.0.0'
@@ -79,5 +79,5 @@ gem 'tty-prompt', '0.23.1'
79
79
  gem 'watir', '7.1.0'
80
80
  gem 'waveform', '0.1.2'
81
81
  gem 'webrick', '1.7.0'
82
- gem 'wicked_pdf', '2.6.0'
82
+ gem 'wicked_pdf', '2.6.2'
83
83
  gem 'yard', '0.9.27'
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.1.2@pwn
37
37
  $ rvm list gemsets
38
38
  $ gem install --verbose pwn
39
39
  $ pwn
40
- pwn[v0.4.418]:001 >>> PWN.help
40
+ pwn[v0.4.422]:001 >>> PWN.help
41
41
  ```
42
42
 
43
43
  [![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -52,7 +52,7 @@ $ rvm use ruby-3.1.2@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.418]:001 >>> PWN.help
55
+ pwn[v0.4.422]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'pwn'
5
+ require 'optparse'
6
+ require 'yaml'
7
+
8
+ opts = {}
9
+ OptionParser.new do |options|
10
+ options.banner = "USAGE:
11
+ #{$PROGRAM_NAME} [opts]
12
+ "
13
+
14
+ options.on('-cYPATH', '--yaml-config=YPATH', '<Required - YAML Config Containing Access & Secret Keys for Authentication>') do |c|
15
+ opts[:yaml_config] = c
16
+ end
17
+
18
+ options.on('-nVALUE', '--scan-name=VALUE', '<Required - Name of Scan to Launch>') do |n|
19
+ opts[:scan_name] = n
20
+ end
21
+
22
+ options.on('-rRPATH', '--report-path=RPATH', '<Required - Path / Filename of Report>') do |r|
23
+ opts[:path_to_export] = r
24
+ end
25
+
26
+ options.on('-fFORMAT', '--report-format=FORMAT', '<Optional - Report Format :csv|:db|:html|:nessus|:pdf (defaults to :csv)>') do |f|
27
+ opts[:format] = f
28
+ end
29
+ end.parse!
30
+
31
+ if opts.empty?
32
+ puts `#{$PROGRAM_NAME} --help`
33
+ exit 1
34
+ end
35
+
36
+ begin
37
+ yaml_config = opts[:yaml_config]
38
+
39
+ raise "YAML Config Not Found: #{yaml_config}" unless File.exist?(yaml_config)
40
+
41
+ yaml = YAML.load_file(
42
+ yaml_config,
43
+ symbolize_names: true
44
+ )
45
+
46
+ access_key = yaml[:access_key]
47
+ secret_key = yaml[:secret_key]
48
+ scan_name = opts[:scan_name]
49
+ path_to_export = opts[:path_to_export]
50
+ format = opts[:format]
51
+
52
+ nessus_obj = PWN::Plugins::NessusCloud.login(
53
+ access_key: access_key,
54
+ secret_key: secret_key
55
+ )
56
+
57
+ scan_template_list = PWN::Plugins::NessusCloud.list_scan_templates(
58
+ nessus_obj: nessus_obj
59
+ )
60
+
61
+ selected_scan_template = scan_template_list[:scans].select do |scan|
62
+ scan[:name] == scan_name
63
+ end
64
+ puts selected_scan_template.inspect
65
+
66
+ # scan_template_id = selected_scan_template.first[:id]
67
+ # puts scan_template_id
68
+ rescue Interrupt
69
+ puts 'CTRL+C detected...goodbye.'
70
+ rescue StandardError => e
71
+ raise e
72
+ end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'credit_card_validations'
4
+ require 'credit_card_validations/string'
4
5
 
5
6
  module PWN
6
7
  module Plugins
@@ -26,6 +27,18 @@ module PWN
26
27
  raise e
27
28
  end
28
29
 
30
+ # Supported Method Parameters::
31
+ # PWN::Plugins::CreditCard.type(
32
+ # cc: 'required - e.g. XXXX XXXX XXXX XXXX'
33
+ # )
34
+
35
+ public_class_method def self.type(opts = {})
36
+ cc = opts[:cc].to_s.scrub.strip.chomp
37
+ cc.credit_card_brand
38
+ rescue StandardError => e
39
+ raise e
40
+ end
41
+
29
42
  # Author(s):: 0day Inc. <request.pentest@0dayinc.com>
30
43
 
31
44
  public_class_method def self.authors
@@ -43,6 +56,10 @@ module PWN
43
56
  count: 'required - number of numbers to generate'
44
57
  )
45
58
 
59
+ #{self}.type(
60
+ cc: 'required - e.g. XXXX XXXX XXXX XXXX'
61
+ )
62
+
46
63
  #{self}.authors
47
64
  "
48
65
  end
@@ -92,6 +92,24 @@ module PWN
92
92
  raise e
93
93
  end
94
94
 
95
+ # Supported Method Parameters::
96
+ # PWN::Plugins::NessusCloud.list_scan_templates(
97
+ # nessus_obj: 'required - nessus_obj returned from #login method'
98
+ # )
99
+
100
+ public_class_method def self.list_scan_templates(opts = {})
101
+ nessus_obj = opts[:nessus_obj]
102
+
103
+ scan_templates_resp = nessus_cloud_rest_call(
104
+ nessus_obj: nessus_obj,
105
+ rest_call: 'editor/scan/templates'
106
+ ).body
107
+
108
+ JSON.parse(scan_templates_resp, symbolize_names: true)
109
+ rescue StandardError, SystemExit, Interrupt => e
110
+ raise e
111
+ end
112
+
95
113
  # Supported Method Parameters::
96
114
  # PWN::Plugins::NessusCloud.list_scans(
97
115
  # nessus_obj: 'required - nessus_obj returned from #login method'
@@ -283,6 +301,10 @@ module PWN
283
301
  secret_key: 'required - API secret key (will prompt if blank)'
284
302
  )
285
303
 
304
+ #{self}.list_scan_templates(
305
+ nessus_obj: 'required - nessus_obj returned from #login method'
306
+ )
307
+
286
308
  #{self}.list_scans(
287
309
  nessus_obj: 'required - nessus_obj returned from #login method'
288
310
  )
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'serialport'
4
+ require 'io/wait'
4
5
 
5
6
  module PWN
6
7
  module Plugins
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.4.418'
4
+ VERSION = '0.4.422'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.418
4
+ version: 0.4.422
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-26 00:00:00.000000000 Z
11
+ date: 2022-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 7.0.2.3
19
+ version: 7.0.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 7.0.2.3
26
+ version: 7.0.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: anemone
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 5.2.2
89
+ version: 5.2.3
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 5.2.2
96
+ version: 5.2.3
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bson
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 2.3.12
117
+ version: 2.3.13
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 2.3.12
124
+ version: 2.3.13
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bundler-audit
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -282,14 +282,14 @@ dependencies:
282
282
  requirements:
283
283
  - - '='
284
284
  - !ruby/object:Gem::Version
285
- version: 2.6.1
285
+ version: 2.6.2
286
286
  type: :runtime
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
289
289
  requirements:
290
290
  - - '='
291
291
  - !ruby/object:Gem::Version
292
- version: 2.6.1
292
+ version: 2.6.2
293
293
  - !ruby/object:Gem::Dependency
294
294
  name: jsonpath
295
295
  requirement: !ruby/object:Gem::Requirement
@@ -436,14 +436,14 @@ dependencies:
436
436
  requirements:
437
437
  - - '='
438
438
  - !ruby/object:Gem::Version
439
- version: 1.13.4
439
+ version: 1.13.6
440
440
  type: :runtime
441
441
  prerelease: false
442
442
  version_requirements: !ruby/object:Gem::Requirement
443
443
  requirements:
444
444
  - - '='
445
445
  - !ruby/object:Gem::Version
446
- version: 1.13.4
446
+ version: 1.13.6
447
447
  - !ruby/object:Gem::Dependency
448
448
  name: oily_png
449
449
  requirement: !ruby/object:Gem::Requirement
@@ -492,14 +492,14 @@ dependencies:
492
492
  requirements:
493
493
  - - '='
494
494
  - !ruby/object:Gem::Version
495
- version: 2.9.2
495
+ version: 2.10.0
496
496
  type: :runtime
497
497
  prerelease: false
498
498
  version_requirements: !ruby/object:Gem::Requirement
499
499
  requirements:
500
500
  - - '='
501
501
  - !ruby/object:Gem::Version
502
- version: 2.9.2
502
+ version: 2.10.0
503
503
  - !ruby/object:Gem::Dependency
504
504
  name: pg
505
505
  requirement: !ruby/object:Gem::Requirement
@@ -674,14 +674,14 @@ dependencies:
674
674
  requirements:
675
675
  - - '='
676
676
  - !ruby/object:Gem::Version
677
- version: 1.28.2
677
+ version: 1.29.1
678
678
  type: :runtime
679
679
  prerelease: false
680
680
  version_requirements: !ruby/object:Gem::Requirement
681
681
  requirements:
682
682
  - - '='
683
683
  - !ruby/object:Gem::Version
684
- version: 1.28.2
684
+ version: 1.29.1
685
685
  - !ruby/object:Gem::Dependency
686
686
  name: rubocop-rake
687
687
  requirement: !ruby/object:Gem::Requirement
@@ -786,14 +786,14 @@ dependencies:
786
786
  requirements:
787
787
  - - '='
788
788
  - !ruby/object:Gem::Version
789
- version: 0.100.0
789
+ version: 0.101.0
790
790
  type: :runtime
791
791
  prerelease: false
792
792
  version_requirements: !ruby/object:Gem::Requirement
793
793
  requirements:
794
794
  - - '='
795
795
  - !ruby/object:Gem::Version
796
- version: 0.100.0
796
+ version: 0.101.0
797
797
  - !ruby/object:Gem::Dependency
798
798
  name: serialport
799
799
  requirement: !ruby/object:Gem::Requirement
@@ -954,14 +954,14 @@ dependencies:
954
954
  requirements:
955
955
  - - '='
956
956
  - !ruby/object:Gem::Version
957
- version: 2.6.0
957
+ version: 2.6.2
958
958
  type: :runtime
959
959
  prerelease: false
960
960
  version_requirements: !ruby/object:Gem::Requirement
961
961
  requirements:
962
962
  - - '='
963
963
  - !ruby/object:Gem::Version
964
- version: 2.6.0
964
+ version: 2.6.2
965
965
  - !ruby/object:Gem::Dependency
966
966
  name: yard
967
967
  requirement: !ruby/object:Gem::Requirement
@@ -1007,6 +1007,7 @@ executables:
1007
1007
  - pwn_jenkins_useradd
1008
1008
  - pwn_mail_agent
1009
1009
  - pwn_msf_postgres_login
1010
+ - pwn_nessus_cloud_create_scan
1010
1011
  - pwn_nessus_cloud_vulnscan
1011
1012
  - pwn_nexpose
1012
1013
  - pwn_openvas_vulnscan
@@ -1065,6 +1066,7 @@ files:
1065
1066
  - bin/pwn_jenkins_useradd
1066
1067
  - bin/pwn_mail_agent
1067
1068
  - bin/pwn_msf_postgres_login
1069
+ - bin/pwn_nessus_cloud_create_scan
1068
1070
  - bin/pwn_nessus_cloud_vulnscan
1069
1071
  - bin/pwn_nexpose
1070
1072
  - bin/pwn_openvas_vulnscan
@@ -1966,7 +1968,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1966
1968
  - !ruby/object:Gem::Version
1967
1969
  version: '0'
1968
1970
  requirements: []
1969
- rubygems_version: 3.3.12
1971
+ rubygems_version: 3.3.13
1970
1972
  signing_key:
1971
1973
  specification_version: 4
1972
1974
  summary: Automated Security Testing for CI/CD Pipelines & Beyond