pwn 0.4.421 → 0.4.422
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -5
- data/README.md +2 -2
- data/bin/pwn_nessus_cloud_create_scan +72 -0
- data/lib/pwn/plugins/nessus_cloud.rb +22 -0
- data/lib/pwn/version.rb +1 -1
- metadata +14 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc1e32a44a5b5797d925e464dbc32195f27d20302fe4ec0f0b05f417c5a2b7c2
|
4
|
+
data.tar.gz: 95f27bf92deba3e9bcc8100024c9d28cceebee21b47a2013d6f1e65489561ab3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e1b67eea92a2647689bfd6d3b3a2b4ee951e37da0740d8465619cd489679873c8ce2a62bac14cd6d8a1a275e00afd3f906916213734844c3dc806c26956cea9
|
7
|
+
data.tar.gz: 22d4340100fc68bc36636bb10e78edb8d478b9f53ce8923be8c684ed788cd6930176b175807cd8fcd00815f3539fefe4680a4bc4c71d4f9b7276827290982098
|
data/Gemfile
CHANGED
@@ -11,7 +11,7 @@ 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.
|
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'
|
@@ -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.
|
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.
|
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.
|
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.29.
|
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'
|
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.
|
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.
|
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
|
@@ -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
|
)
|
data/lib/pwn/version.rb
CHANGED
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.
|
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-05-
|
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.
|
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.
|
26
|
+
version: 7.0.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: anemone
|
29
29
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.29.
|
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.29.
|
684
|
+
version: 1.29.1
|
685
685
|
- !ruby/object:Gem::Dependency
|
686
686
|
name: rubocop-rake
|
687
687
|
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
|