pwn 0.4.808 → 0.4.809
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -4
- data/README.md +2 -2
- data/bin/pwn_nmap_discover_tcp_udp +24 -14
- data/lib/pwn/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3a66f4dc0df7d68e1b6e2c1514aff4642802973b5e0e9e7d082206befd69f07
|
4
|
+
data.tar.gz: f9944df718d590c7a1c1b591c9f7dd2eb3fdfc1d2014905fdb8ce2e7791f48de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c05afa8cc33f4f03b289dd5f871a27070a5f24ecb6415aa393f21edd39fc57e4b1bd4baef368984944c39c648827e5ac9cb44186f120ec4198385eb303e4789
|
7
|
+
data.tar.gz: 4d426e821fc40814c897be419ac3ea575121aa6cd4f52606382ed7254d17324145c87cdb7adee89dbb3f8f422d75389c1114cf1340b0cd75cb7a325727f947e0
|
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.7'
|
15
15
|
gem 'anemone', '0.7.2'
|
16
16
|
gem 'authy', '3.0.1'
|
17
17
|
gem 'aws-sdk', '3.1.0'
|
@@ -67,9 +67,9 @@ gem 'rex', '2.0.13'
|
|
67
67
|
gem 'rmagick', '5.3.0'
|
68
68
|
gem 'rspec', '3.12.0'
|
69
69
|
gem 'rtesseract', '3.1.2'
|
70
|
-
gem 'rubocop', '1.
|
70
|
+
gem 'rubocop', '1.56.0'
|
71
71
|
gem 'rubocop-rake', '0.6.0'
|
72
|
-
gem 'rubocop-rspec', '2.23.
|
72
|
+
gem 'rubocop-rspec', '2.23.2'
|
73
73
|
gem 'ruby-audio', '1.6.1'
|
74
74
|
gem 'ruby-nmap', '1.0.1'
|
75
75
|
gem 'ruby-saml', '1.15.0'
|
@@ -77,7 +77,7 @@ gem 'rvm', '1.11.3.9'
|
|
77
77
|
gem 'savon', '2.14.0'
|
78
78
|
gem 'selenium-devtools', '0.115.0'
|
79
79
|
gem 'serialport', '1.3.2'
|
80
|
-
gem 'sinatra', '3.0
|
80
|
+
gem 'sinatra', '3.1.0'
|
81
81
|
gem 'slack-ruby-client', '2.1.0'
|
82
82
|
gem 'socksify', '1.7.1'
|
83
83
|
gem 'spreadsheet', '1.3.0'
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
|
|
37
37
|
$ rvm list gemsets
|
38
38
|
$ gem install --verbose pwn
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.4.
|
40
|
+
pwn[v0.4.809]: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.2.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.809]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
@@ -12,7 +12,11 @@ OptionParser.new do |options|
|
|
12
12
|
#{$PROGRAM_NAME} [opts]
|
13
13
|
"
|
14
14
|
|
15
|
-
options.on('-
|
15
|
+
options.on('-fFILE', '--target-file=FILE', '<Required if --target-range excluded - File containing one supported nmap target / line e.g. foo.bar, 10.1.1.1, 192.168.1.1-20, 192.168.1.0/24, etc>') do |f|
|
16
|
+
opts[:target_file] = f
|
17
|
+
end
|
18
|
+
|
19
|
+
options.on('-tRANGE', '--target-range=RANGE', '<Required if --target-file excluded - nmap supported host || ip range e.g. foo.bar, 10.1.1.1, 192.168.1.1-20, 192.168.1.0/24, etc>') do |t|
|
16
20
|
opts[:target_range] = t
|
17
21
|
end
|
18
22
|
|
@@ -49,7 +53,12 @@ banner = '-' * 64
|
|
49
53
|
puts "\n\n\n#{banner}"
|
50
54
|
puts "- STARTED: #{started_at} "
|
51
55
|
|
56
|
+
target_file = opts[:target_file]
|
52
57
|
target_range = opts[:target_range]
|
58
|
+
if (target_file && target_range) || (!target_file && !target_range)
|
59
|
+
puts 'ERROR: Must specify --target-file OR --target-range'
|
60
|
+
exit 1
|
61
|
+
end
|
53
62
|
|
54
63
|
results_root = opts[:results_root]
|
55
64
|
results_root ||= '/tmp'
|
@@ -144,7 +153,7 @@ discovery_sctp_ports = {
|
|
144
153
|
sicc: 38_412
|
145
154
|
}
|
146
155
|
|
147
|
-
|
156
|
+
discovered_targets_file = "#{results_root}/nmap_discovery_results.txt"
|
148
157
|
latest_discovery_results = "#{results_root}/nmap_discovery_results.xml"
|
149
158
|
latest_tcp_results = "#{results_root}/nmap_tcp_results"
|
150
159
|
latest_udp_results = "#{results_root}/nmap_udp_results"
|
@@ -174,22 +183,23 @@ begin
|
|
174
183
|
PWN::Plugins::NmapIt.port_scan do |nmap|
|
175
184
|
if with_tor
|
176
185
|
nmap.proxies = proxy
|
177
|
-
nmap.syn_discovery = discovery_tcp_ports.values
|
178
186
|
nmap.ack_discovery = discovery_tcp_ports.values
|
179
187
|
else
|
180
|
-
nmap.ping = true
|
181
|
-
nmap.arp_ping = true
|
182
|
-
nmap.icmp_echo_discovery = true
|
183
|
-
nmap.icmp_timestamp_discovery = true
|
184
188
|
nmap.udp_discovery = discovery_udp_ports.values
|
185
|
-
nmap.sctp_init_ping = discovery_sctp_ports.values
|
186
189
|
end
|
190
|
+
nmap.ping = true
|
191
|
+
nmap.arp_ping = true
|
192
|
+
nmap.icmp_echo_discovery = true
|
193
|
+
nmap.icmp_timestamp_discovery = true
|
194
|
+
nmap.syn_discovery = discovery_tcp_ports.values
|
195
|
+
nmap.sctp_init_ping = discovery_sctp_ports.values
|
187
196
|
nmap.verbose = true
|
188
197
|
nmap.exclude_file = exclude_file
|
189
198
|
nmap.interface = interface
|
190
199
|
nmap.insane_timing = true
|
191
200
|
nmap.output_xml = latest_discovery_results
|
192
|
-
nmap.targets = target_range
|
201
|
+
nmap.targets = target_range if target_range
|
202
|
+
nmap.target_file = target_file if target_file
|
193
203
|
nmap.randomize_hosts = true
|
194
204
|
nmap.min_parallelism = 36
|
195
205
|
nmap.max_retries = 3
|
@@ -198,7 +208,7 @@ begin
|
|
198
208
|
|
199
209
|
# Generate targets.txt from discovery above
|
200
210
|
# taking into consideration IPs to skip scans
|
201
|
-
File.open(
|
211
|
+
File.open(discovered_targets_file, 'w') do |f|
|
202
212
|
PWN::Plugins::NmapIt.parse_xml_results(
|
203
213
|
xml_file: latest_discovery_results
|
204
214
|
) do |xml|
|
@@ -212,13 +222,13 @@ begin
|
|
212
222
|
end
|
213
223
|
|
214
224
|
# Produce a good targets.txt redacting duplicates && sorting by IP
|
215
|
-
sorted_ips = File.readlines(
|
225
|
+
sorted_ips = File.readlines(discovered_targets_file).uniq.map do |ip|
|
216
226
|
IPAddr.new(ip.chomp)
|
217
227
|
end
|
218
228
|
sorted_ips = sorted_ips.sort_by(&:hton)
|
219
229
|
|
220
230
|
# Now Add additional info about the IP as a comment
|
221
|
-
File.open(
|
231
|
+
File.open(discovered_targets_file, 'w') do |f|
|
222
232
|
sorted_ips.each do |ip|
|
223
233
|
PWN::Plugins::NmapIt.parse_xml_results(
|
224
234
|
xml_file: latest_discovery_results
|
@@ -263,7 +273,7 @@ begin
|
|
263
273
|
nmap.update_scriptdb = true
|
264
274
|
end
|
265
275
|
nmap.verbose = true
|
266
|
-
nmap.target_file =
|
276
|
+
nmap.target_file = discovered_targets_file
|
267
277
|
nmap.randomize_hosts = true
|
268
278
|
nmap.show_reason = true
|
269
279
|
nmap.exclude_file = exclude_file
|
@@ -310,7 +320,7 @@ begin
|
|
310
320
|
nmap.update_scriptdb = true
|
311
321
|
end
|
312
322
|
nmap.verbose = true
|
313
|
-
nmap.target_file =
|
323
|
+
nmap.target_file = discovered_targets_file
|
314
324
|
nmap.fast = true
|
315
325
|
nmap.randomize_hosts = true
|
316
326
|
nmap.show_reason = true
|
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.809
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-10 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.7
|
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.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: anemone
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -786,14 +786,14 @@ dependencies:
|
|
786
786
|
requirements:
|
787
787
|
- - '='
|
788
788
|
- !ruby/object:Gem::Version
|
789
|
-
version: 1.
|
789
|
+
version: 1.56.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: 1.
|
796
|
+
version: 1.56.0
|
797
797
|
- !ruby/object:Gem::Dependency
|
798
798
|
name: rubocop-rake
|
799
799
|
requirement: !ruby/object:Gem::Requirement
|
@@ -814,14 +814,14 @@ dependencies:
|
|
814
814
|
requirements:
|
815
815
|
- - '='
|
816
816
|
- !ruby/object:Gem::Version
|
817
|
-
version: 2.23.
|
817
|
+
version: 2.23.2
|
818
818
|
type: :runtime
|
819
819
|
prerelease: false
|
820
820
|
version_requirements: !ruby/object:Gem::Requirement
|
821
821
|
requirements:
|
822
822
|
- - '='
|
823
823
|
- !ruby/object:Gem::Version
|
824
|
-
version: 2.23.
|
824
|
+
version: 2.23.2
|
825
825
|
- !ruby/object:Gem::Dependency
|
826
826
|
name: ruby-audio
|
827
827
|
requirement: !ruby/object:Gem::Requirement
|
@@ -926,14 +926,14 @@ dependencies:
|
|
926
926
|
requirements:
|
927
927
|
- - '='
|
928
928
|
- !ruby/object:Gem::Version
|
929
|
-
version: 3.0
|
929
|
+
version: 3.1.0
|
930
930
|
type: :runtime
|
931
931
|
prerelease: false
|
932
932
|
version_requirements: !ruby/object:Gem::Requirement
|
933
933
|
requirements:
|
934
934
|
- - '='
|
935
935
|
- !ruby/object:Gem::Version
|
936
|
-
version: 3.0
|
936
|
+
version: 3.1.0
|
937
937
|
- !ruby/object:Gem::Dependency
|
938
938
|
name: slack-ruby-client
|
939
939
|
requirement: !ruby/object:Gem::Requirement
|