pwn 0.5.164 → 0.5.166
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/README.md +3 -3
- data/bin/pwn +1 -1
- data/bin/pwn_android_war_dialer +2 -2
- data/bin/pwn_aws_describe_resources +2 -2
- data/bin/pwn_bdba_groups +2 -2
- data/bin/pwn_bdba_scan +2 -2
- data/bin/pwn_burp_suite_pro_active_scan +2 -2
- data/bin/pwn_char_base64_encoding +2 -2
- data/bin/pwn_char_dec_encoding +2 -2
- data/bin/pwn_char_hex_escaped_encoding +2 -2
- data/bin/pwn_char_html_entity_encoding +2 -2
- data/bin/pwn_char_unicode_escaped_encoding +2 -2
- data/bin/pwn_char_url_encoding +2 -2
- data/bin/pwn_crt_sh +83 -0
- data/bin/pwn_defectdojo_engagement_create +2 -2
- data/bin/pwn_defectdojo_importscan +2 -2
- data/bin/pwn_defectdojo_reimportscan +2 -2
- data/bin/pwn_diff_csv_files_w_column_exclude +4 -4
- data/bin/pwn_domain_reversewhois +2 -2
- data/bin/pwn_fuzz_net_app_proto +3 -3
- data/bin/pwn_gqrx_scanner +2 -2
- data/bin/pwn_jenkins_create_job +2 -2
- data/bin/pwn_jenkins_create_view +2 -2
- data/bin/pwn_jenkins_install_plugin +2 -2
- data/bin/pwn_jenkins_thinBackup_aws_s3 +2 -2
- data/bin/pwn_jenkins_update_plugins +2 -2
- data/bin/pwn_jenkins_useradd +2 -2
- data/bin/pwn_mail_agent +2 -2
- data/bin/pwn_nessus_cloud_scan_crud +2 -2
- data/bin/pwn_nessus_cloud_vulnscan +2 -2
- data/bin/pwn_nexpose +2 -2
- data/bin/pwn_nmap_discover_tcp_udp +2 -2
- data/bin/pwn_openvas_vulnscan +2 -2
- data/bin/pwn_owasp_zap_active_scan +2 -2
- data/bin/pwn_pastebin_sample_filter +2 -2
- data/bin/pwn_phone +3 -3
- data/bin/pwn_sast +3 -3
- data/bin/pwn_serial_check_voicemail +2 -2
- data/bin/pwn_serial_msr206 +2 -2
- data/bin/pwn_serial_son_micro_sm132_rfid +2 -2
- data/bin/pwn_shodan_graphql_introspection +1 -1
- data/bin/pwn_shodan_search +2 -2
- data/bin/pwn_simple_http_server +1 -1
- data/bin/pwn_web_cache_deception +4 -4
- data/bin/pwn_www_checkip +3 -1
- data/bin/pwn_www_uri_buster +141 -57
- data/bin/pwn_xss_dom_vectors +2 -2
- data/lib/pwn/plugins/authentication_helper.rb +2 -2
- data/lib/pwn/plugins/ip_info.rb +2 -0
- data/lib/pwn/plugins/log.rb +3 -1
- data/lib/pwn/plugins/repl.rb +3 -1
- data/lib/pwn/plugins/thread_pool.rb +12 -42
- data/lib/pwn/plugins/tor.rb +51 -12
- data/lib/pwn/plugins/transparent_browser.rb +3 -0
- data/lib/pwn/plugins/voice.rb +3 -3
- data/lib/pwn/reports/uri_buster.rb +18 -6
- data/lib/pwn/version.rb +1 -1
- metadata +8 -6
data/lib/pwn/plugins/ip_info.rb
CHANGED
data/lib/pwn/plugins/log.rb
CHANGED
data/lib/pwn/plugins/repl.rb
CHANGED
@@ -488,8 +488,10 @@ module PWN
|
|
488
488
|
|
489
489
|
# Initialize pwn.yaml Configuration using :before_session Hook
|
490
490
|
Pry.config.hooks.add_hook(:before_session, :init_opts) do |_output, _binding, pi|
|
491
|
-
if opts[:yaml_config_path]
|
491
|
+
if opts[:yaml_config_path]
|
492
492
|
yaml_config_path = opts[:yaml_config_path]
|
493
|
+
raise "ERROR: #{yaml_config_path} does not exist." unless File.exist?(yaml_config_path)
|
494
|
+
|
493
495
|
is_encrypted = PWN::Plugins::Vault.file_encrypted?(file: yaml_config_path)
|
494
496
|
|
495
497
|
if is_encrypted
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require 'concurrent-ruby'
|
4
4
|
|
5
5
|
module PWN
|
6
6
|
module Plugins
|
@@ -22,31 +22,6 @@ module PWN
|
|
22
22
|
# end
|
23
23
|
# end
|
24
24
|
|
25
|
-
# public_class_method def self.fill(opts = {})
|
26
|
-
# enumerable_array = opts[:enumerable_array]
|
27
|
-
# max_threads = opts[:max_threads].to_i
|
28
|
-
# max_threads = 9 if max_threads.zero?
|
29
|
-
# detach = opts[:detach] ||= false
|
30
|
-
|
31
|
-
# puts "Initiating Thread Pool of #{max_threads} Worker Threads...."
|
32
|
-
# pool = Concurrent::FixedThreadPool.new(max_threads)
|
33
|
-
|
34
|
-
# enumerable_array.each do |this_thread|
|
35
|
-
# pool.post do
|
36
|
-
# yield this_thread
|
37
|
-
# end
|
38
|
-
# end
|
39
|
-
|
40
|
-
# pool.shutdown
|
41
|
-
# pool.wait_for_termination unless detach
|
42
|
-
# rescue Interrupt
|
43
|
-
# puts "\nGoodbye."
|
44
|
-
# rescue StandardError => e
|
45
|
-
# puts e.backtrace
|
46
|
-
# raise e
|
47
|
-
# end
|
48
|
-
# METHOD ABOVE IS SLOWER THAN THE ONE BELOW
|
49
|
-
|
50
25
|
public_class_method def self.fill(opts = {})
|
51
26
|
enumerable_array = opts[:enumerable_array]
|
52
27
|
max_threads = opts[:max_threads].to_i
|
@@ -54,28 +29,23 @@ module PWN
|
|
54
29
|
detach = opts[:detach] ||= false
|
55
30
|
|
56
31
|
puts "Initiating Thread Pool of #{max_threads} Worker Threads...."
|
57
|
-
|
58
|
-
threads = Array.new(max_threads) do
|
59
|
-
Thread.new do
|
60
|
-
until (this_thread = queue.pop) == :POOL_EXHAUSTED
|
61
|
-
yield this_thread
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
32
|
+
pool = Concurrent::FixedThreadPool.new(max_threads)
|
65
33
|
|
66
|
-
enumerable_array.
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
max_threads.times do
|
71
|
-
queue << :POOL_EXHAUSTED
|
34
|
+
enumerable_array.each do |this_thread|
|
35
|
+
pool.post do
|
36
|
+
yield this_thread
|
37
|
+
end
|
72
38
|
end
|
73
39
|
|
74
|
-
|
40
|
+
pool.shutdown
|
41
|
+
pool.wait_for_termination unless detach
|
75
42
|
rescue Interrupt
|
76
|
-
puts "\
|
43
|
+
puts "\n#{self}.#{__method__} => Goodbye."
|
77
44
|
rescue StandardError => e
|
45
|
+
puts e.backtrace
|
78
46
|
raise e
|
47
|
+
ensure
|
48
|
+
pool.kill if pool.running?
|
79
49
|
end
|
80
50
|
|
81
51
|
# Author(s):: 0day Inc. <support@0dayinc.com>
|
data/lib/pwn/plugins/tor.rb
CHANGED
@@ -111,6 +111,7 @@ module PWN
|
|
111
111
|
session_log = File.new(session_log_path, 'w')
|
112
112
|
session_log.sync = true
|
113
113
|
session_log.fsync
|
114
|
+
tor_obj = nil
|
114
115
|
|
115
116
|
fork_pid = Process.fork do
|
116
117
|
pty = PTY.spawn(
|
@@ -132,33 +133,52 @@ module PWN
|
|
132
133
|
stdout.each do |line|
|
133
134
|
session_log.puts line
|
134
135
|
end
|
136
|
+
rescue Interrupt,
|
137
|
+
Errno::EIO => e
|
138
|
+
puts "\n#{self}.#{__method__}#spawn => Goodbye." if e.is_a?(Interrupt)
|
139
|
+
tor_obj = {
|
140
|
+
parent_pid: fork_pid,
|
141
|
+
child_pid: pid,
|
142
|
+
data_dir: data_dir
|
143
|
+
}
|
144
|
+
stop(tor_obj: tor_obj)
|
135
145
|
end
|
136
|
-
rescue
|
137
|
-
|
138
|
-
|
139
|
-
|
146
|
+
rescue Interrupt,
|
147
|
+
Errno::EIO => e
|
148
|
+
puts "\n#{self}.#{__method__}#fork => Goodbye." if e.is_a?(Interrupt)
|
149
|
+
tor_obj = {
|
150
|
+
parent_pid: fork_pid,
|
151
|
+
data_dir: data_dir
|
152
|
+
}
|
153
|
+
stop(tor_obj: tor_obj)
|
140
154
|
end
|
155
|
+
|
141
156
|
Process.detach(fork_pid)
|
142
157
|
|
143
158
|
loop do
|
144
159
|
pid_ready = File.exist?(pid_file)
|
145
160
|
cookie_authn_ready = File.exist?(cookie_authn_file)
|
146
|
-
sleep 0.1
|
147
161
|
break if pid_ready && cookie_authn_ready
|
148
162
|
end
|
149
163
|
|
164
|
+
child_pid = File.read(pid_file).to_i
|
150
165
|
cookie_authn = `hexdump -e '32/1 "%02x"' #{cookie_authn_file}`
|
166
|
+
|
151
167
|
tor_obj = {
|
152
168
|
parent_pid: fork_pid,
|
153
|
-
child_pid:
|
169
|
+
child_pid: child_pid,
|
154
170
|
ip: ip,
|
155
171
|
port: port,
|
156
172
|
ctrl_port: ctrl_port,
|
157
173
|
data_dir: data_dir,
|
158
174
|
cookie_authn: cookie_authn
|
159
175
|
}
|
160
|
-
rescue
|
161
|
-
|
176
|
+
rescue Interrupt, SystemExit
|
177
|
+
puts "\n#{self}.#{__method__} => Goodbye."
|
178
|
+
stop(tor_obj: tor_obj) unless tor_obj.nil?
|
179
|
+
rescue StandardError => e
|
180
|
+
puts "\n#{self}.#{__method__} => Goodbye."
|
181
|
+
stop(tor_obj: tor_obj) unless tor_obj.nil?
|
162
182
|
raise e
|
163
183
|
end
|
164
184
|
|
@@ -187,11 +207,30 @@ module PWN
|
|
187
207
|
|
188
208
|
public_class_method def self.stop(opts = {})
|
189
209
|
tor_obj = opts[:tor_obj]
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
210
|
+
|
211
|
+
return nil unless tor_obj.is_a?(Hash)
|
212
|
+
|
213
|
+
child_pid = tor_obj[:child_pid]
|
214
|
+
parent_pid = tor_obj[:parent_pid]
|
215
|
+
data_dir = tor_obj[:data_dir]
|
216
|
+
if child_pid || parent_pid || data_dir
|
217
|
+
proc_list = PWN::Plugins::PS.list
|
218
|
+
find_child_pid = proc_list.find { |arr| arr[2] == child_pid.to_s }
|
219
|
+
find_parent_pid = proc_list.find { |arr| arr[2] == parent_pid.to_s }
|
220
|
+
|
221
|
+
# puts "Killing Tor child PID: #{child_pid}..."
|
222
|
+
Process.kill('SIGKILL', child_pid) if find_child_pid
|
223
|
+
|
224
|
+
# puts "Killing Tor parent PID: #{parent_pid}..."
|
225
|
+
Process.kill('SIGKILL', parent_pid) if find_parent_pid
|
226
|
+
|
227
|
+
# puts "Removing Tor data directory: #{data_dir}..."
|
228
|
+
FileUtils.rm_rf(data_dir)
|
194
229
|
end
|
230
|
+
|
231
|
+
nil
|
232
|
+
rescue Errno::ESRCH, Errno::ENOENT => e
|
233
|
+
puts e
|
195
234
|
rescue StandardError => e
|
196
235
|
raise e
|
197
236
|
end
|
data/lib/pwn/plugins/voice.rb
CHANGED
@@ -37,7 +37,7 @@ module PWN
|
|
37
37
|
|
38
38
|
puts "\nGoodbye."
|
39
39
|
rescue Interrupt
|
40
|
-
puts "\
|
40
|
+
puts "\n#{self}.#{__method__} => Goodbye."
|
41
41
|
rescue StandardError => e
|
42
42
|
raise e
|
43
43
|
end
|
@@ -70,7 +70,7 @@ module PWN
|
|
70
70
|
output_dir
|
71
71
|
)
|
72
72
|
rescue Interrupt
|
73
|
-
puts "\
|
73
|
+
puts "\n#{self}.#{__method__} => Goodbye."
|
74
74
|
rescue StandardError => e
|
75
75
|
raise e
|
76
76
|
end
|
@@ -102,7 +102,7 @@ module PWN
|
|
102
102
|
"(SayText \"#{text_to_say}\")"
|
103
103
|
)
|
104
104
|
rescue Interrupt
|
105
|
-
puts "\
|
105
|
+
puts "\n#{self}.#{__method__} => Goodbye."
|
106
106
|
rescue StandardError => e
|
107
107
|
raise e
|
108
108
|
end
|
@@ -96,12 +96,14 @@ module PWN
|
|
96
96
|
<div>
|
97
97
|
<b>Toggle Column(s):</b>
|
98
98
|
<a class="toggle-vis" data-column="1" href="#">Request Time</a> |
|
99
|
-
<a class="toggle-vis" data-column="2" href="#">
|
100
|
-
<a class="toggle-vis" data-column="3" href="#">
|
101
|
-
<a class="toggle-vis" data-column="4" href="#">
|
102
|
-
<a class="toggle-vis" data-column="5" href="#">HTTP
|
103
|
-
<a class="toggle-vis" data-column="6" href="#">HTTP Response
|
104
|
-
<a class="toggle-vis" data-column="7" href="#">HTTP Response
|
99
|
+
<a class="toggle-vis" data-column="2" href="#">Response Time</a> |
|
100
|
+
<a class="toggle-vis" data-column="3" href="#">Duration</a> |
|
101
|
+
<a class="toggle-vis" data-column="4" href="#">URI</a> |
|
102
|
+
<a class="toggle-vis" data-column="5" href="#">HTTP Method</a> |
|
103
|
+
<a class="toggle-vis" data-column="6" href="#">HTTP Response Code</a> |
|
104
|
+
<a class="toggle-vis" data-column="7" href="#">HTTP Response Length</a> |
|
105
|
+
<a class="toggle-vis" data-column="8" href="#">HTTP Response Headers</a> |
|
106
|
+
<a class="toggle-vis" data-column="9" href="#">HTTP Response Body</a> |
|
105
107
|
</div>
|
106
108
|
<br /><br />
|
107
109
|
|
@@ -111,6 +113,8 @@ module PWN
|
|
111
113
|
<tr>
|
112
114
|
<th>#</th>
|
113
115
|
<th>Request Time</th>
|
116
|
+
<th>Response Time</th>
|
117
|
+
<th>Duration</th>
|
114
118
|
<th>URI</th>
|
115
119
|
<th>HTTP Method</th>
|
116
120
|
<th>HTTP Response Code</th>
|
@@ -166,6 +170,14 @@ module PWN
|
|
166
170
|
"data": "request_timestamp",
|
167
171
|
"render": $.fn.dataTable.render.text()
|
168
172
|
},
|
173
|
+
{
|
174
|
+
"data": "response_timestamp",
|
175
|
+
"render": $.fn.dataTable.render.text()
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"data": "duration",
|
179
|
+
"render": $.fn.dataTable.render.text()
|
180
|
+
},
|
169
181
|
{
|
170
182
|
"data": "http_uri",
|
171
183
|
"render": function (data, type, row, meta) {
|
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.5.
|
4
|
+
version: 0.5.166
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -478,14 +478,14 @@ dependencies:
|
|
478
478
|
requirements:
|
479
479
|
- - '='
|
480
480
|
- !ruby/object:Gem::Version
|
481
|
-
version: 0.0.
|
481
|
+
version: 0.0.69
|
482
482
|
type: :runtime
|
483
483
|
prerelease: false
|
484
484
|
version_requirements: !ruby/object:Gem::Requirement
|
485
485
|
requirements:
|
486
486
|
- - '='
|
487
487
|
- !ruby/object:Gem::Version
|
488
|
-
version: 0.0.
|
488
|
+
version: 0.0.69
|
489
489
|
- !ruby/object:Gem::Dependency
|
490
490
|
name: metasm
|
491
491
|
requirement: !ruby/object:Gem::Requirement
|
@@ -926,14 +926,14 @@ dependencies:
|
|
926
926
|
requirements:
|
927
927
|
- - '='
|
928
928
|
- !ruby/object:Gem::Version
|
929
|
-
version: 2.
|
929
|
+
version: 2.31.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: 2.
|
936
|
+
version: 2.31.0
|
937
937
|
- !ruby/object:Gem::Dependency
|
938
938
|
name: ruby-audio
|
939
939
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1245,6 +1245,7 @@ executables:
|
|
1245
1245
|
- pwn_char_html_entity_encoding
|
1246
1246
|
- pwn_char_unicode_escaped_encoding
|
1247
1247
|
- pwn_char_url_encoding
|
1248
|
+
- pwn_crt_sh
|
1248
1249
|
- pwn_defectdojo_engagement_create
|
1249
1250
|
- pwn_defectdojo_importscan
|
1250
1251
|
- pwn_defectdojo_reimportscan
|
@@ -1312,6 +1313,7 @@ files:
|
|
1312
1313
|
- bin/pwn_char_html_entity_encoding
|
1313
1314
|
- bin/pwn_char_unicode_escaped_encoding
|
1314
1315
|
- bin/pwn_char_url_encoding
|
1316
|
+
- bin/pwn_crt_sh
|
1315
1317
|
- bin/pwn_defectdojo_engagement_create
|
1316
1318
|
- bin/pwn_defectdojo_importscan
|
1317
1319
|
- bin/pwn_defectdojo_reimportscan
|