pwn 0.4.501 → 0.4.504
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 +4 -4
- data/Gemfile +5 -5
- data/README.md +2 -2
- data/bin/pwn_android_war_dialer +29 -6
- data/bin/pwn_arachni +29 -4
- data/bin/pwn_fuzz_net_app_proto +8 -1
- data/bin/pwn_perimeter_recon +9 -1
- data/bin/pwn_sast +9 -2
- data/bin/pwn_simple_http_server +11 -1
- data/lib/pwn/plugins/bus_pirate.rb +10 -12
- data/lib/pwn/plugins/github.rb +136 -0
- data/lib/pwn/plugins/packet.rb +61 -19
- data/lib/pwn/plugins/rfidler.rb +9 -11
- data/lib/pwn/plugins.rb +1 -0
- data/lib/pwn/reports/fuzz.rb +5 -1
- data/lib/pwn/reports/sast.rb +7 -3
- data/lib/pwn/version.rb +1 -1
- data/spec/lib/pwn/plugins/github_spec.rb +15 -0
- metadata +15 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 253136ca915fe42e666099b83268b49fad33ea66e55360bd89bd660948c5263b
|
|
4
|
+
data.tar.gz: 85369110544b7c21a2e86e27c4b4794a52c91952ba8e59b9be3ce0a3e94c601f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 611767de224ab03d45bebb1111366de7a8209ba56ba94165198cffa0ba42ff8d22807f9f43ecff0f9cf641ab80095ff9e284508aa3739dbda5a4d2127201a2d7
|
|
7
|
+
data.tar.gz: 21cc9be2adca3389ad131b461b31d6f4bb8cac59f179edf7f0e8f823c3e0997a3c2c1f80fdad7689ed0fbcd138be2a5bd6e9cdab9eef316c82e6f60296b5a15c
|
data/Gemfile
CHANGED
|
@@ -18,7 +18,7 @@ gem 'aws-sdk', '3.1.0'
|
|
|
18
18
|
gem 'bettercap', '1.6.2'
|
|
19
19
|
gem 'brakeman', '5.2.3'
|
|
20
20
|
gem 'bson', '4.15.0'
|
|
21
|
-
gem 'bundler', '>=2.3.
|
|
21
|
+
gem 'bundler', '>=2.3.17'
|
|
22
22
|
gem 'bundler-audit', '0.9.1'
|
|
23
23
|
gem 'bunny', '2.19.0'
|
|
24
24
|
gem 'colorize', '0.8.1'
|
|
@@ -47,7 +47,7 @@ gem 'oily_png', '1.2.1'
|
|
|
47
47
|
gem 'os', '1.1.4'
|
|
48
48
|
gem 'packetfu', '1.1.13'
|
|
49
49
|
gem 'pdf-reader', '2.10.0'
|
|
50
|
-
gem 'pg', '1.
|
|
50
|
+
gem 'pg', '1.4.1'
|
|
51
51
|
gem 'pry', '0.14.1'
|
|
52
52
|
gem 'pry-doc', '1.3.0'
|
|
53
53
|
gem 'rake', '13.0.6'
|
|
@@ -59,15 +59,15 @@ 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.
|
|
62
|
+
gem 'rubocop', '1.31.2'
|
|
63
63
|
gem 'rubocop-rake', '0.6.0'
|
|
64
|
-
gem 'rubocop-rspec', '2.
|
|
64
|
+
gem 'rubocop-rspec', '2.12.1'
|
|
65
65
|
gem 'ruby-audio', '1.6.1'
|
|
66
66
|
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.
|
|
70
|
+
gem 'selenium-devtools', '0.103.0'
|
|
71
71
|
gem 'serialport', '1.3.2'
|
|
72
72
|
gem 'sinatra', '2.2.0'
|
|
73
73
|
gem 'slack-ruby-client', '1.1.0'
|
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.504]:001 >>> PWN.help
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
[](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.504]:001 >>> PWN.help
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
|
data/bin/pwn_android_war_dialer
CHANGED
|
@@ -91,11 +91,18 @@ begin
|
|
|
91
91
|
# Record Call
|
|
92
92
|
pid_to_kill = 0
|
|
93
93
|
wav_file = "#{wav_archive}/#{target_num}-#{start_timestamp}.wav"
|
|
94
|
-
sox_params = "-d #{wav_file} trim 0 #{seconds_to_record}"
|
|
95
94
|
|
|
96
95
|
puts red
|
|
97
96
|
puts "Recording Duration: #{seconds_to_record}s"
|
|
98
|
-
system(
|
|
97
|
+
system(
|
|
98
|
+
sox_bin,
|
|
99
|
+
'-d',
|
|
100
|
+
wav_file,
|
|
101
|
+
'trim',
|
|
102
|
+
'0',
|
|
103
|
+
seconds_to_record.to_s
|
|
104
|
+
)
|
|
105
|
+
|
|
99
106
|
puts 'Complete.'
|
|
100
107
|
puts end_of_color
|
|
101
108
|
|
|
@@ -109,11 +116,27 @@ begin
|
|
|
109
116
|
|
|
110
117
|
puts cayan
|
|
111
118
|
puts 'Generating Audio Spectrogram...'
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
system(
|
|
120
|
+
sox_bin,
|
|
121
|
+
wav_file,
|
|
122
|
+
'-n',
|
|
123
|
+
'spectrogram',
|
|
124
|
+
'-o',
|
|
125
|
+
"#{wav_file}-spectrogram.png",
|
|
126
|
+
'-d',
|
|
127
|
+
seconds_to_record.to_s
|
|
128
|
+
)
|
|
129
|
+
|
|
114
130
|
puts 'Generating Audio Waveform...'
|
|
115
|
-
|
|
116
|
-
|
|
131
|
+
system(
|
|
132
|
+
waveform_bin,
|
|
133
|
+
'-c',
|
|
134
|
+
'#FF0000',
|
|
135
|
+
'-b',
|
|
136
|
+
'#000000',
|
|
137
|
+
'-F',
|
|
138
|
+
"#{wav_file} #{wav_file}-waveform.png"
|
|
139
|
+
)
|
|
117
140
|
puts 'Complete.'
|
|
118
141
|
puts end_of_color
|
|
119
142
|
|
data/bin/pwn_arachni
CHANGED
|
@@ -117,14 +117,39 @@ begin
|
|
|
117
117
|
end
|
|
118
118
|
|
|
119
119
|
# Kick off scan as defined by pwn_arachni flags
|
|
120
|
-
system(
|
|
120
|
+
system(
|
|
121
|
+
'sudo',
|
|
122
|
+
'/bin/bash',
|
|
123
|
+
'--login',
|
|
124
|
+
'-c',
|
|
125
|
+
arachni_cmd_str
|
|
126
|
+
)
|
|
121
127
|
|
|
122
128
|
# Report Scan Results
|
|
123
|
-
system(
|
|
124
|
-
|
|
129
|
+
system(
|
|
130
|
+
'sudo',
|
|
131
|
+
'/bin/bash',
|
|
132
|
+
'--login',
|
|
133
|
+
'-c',
|
|
134
|
+
"arachni_reporter #{output_dir}/arachni_results.afr --reporter=html:outfile=#{output_dir}/arachni_results.html.zip"
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
system(
|
|
138
|
+
'sudo',
|
|
139
|
+
'/bin/bash',
|
|
140
|
+
'--login',
|
|
141
|
+
'-c',
|
|
142
|
+
"arachni_reporter #{output_dir}/arachni_results.afr --reporter=json:outfile=#{output_dir}/arachni_results.json"
|
|
143
|
+
)
|
|
125
144
|
|
|
126
145
|
# Unzip Results in Output Dir
|
|
127
|
-
system(
|
|
146
|
+
system(
|
|
147
|
+
'sudo',
|
|
148
|
+
'/bin/bash',
|
|
149
|
+
'--login',
|
|
150
|
+
'-c',
|
|
151
|
+
"cd #{output_dir} && unzip -o arachni_results.html.zip"
|
|
152
|
+
)
|
|
128
153
|
rescue StandardError, SystemExit, Interrupt => e
|
|
129
154
|
raise e
|
|
130
155
|
ensure
|
data/bin/pwn_fuzz_net_app_proto
CHANGED
|
@@ -145,5 +145,12 @@ if start_reporting_server
|
|
|
145
145
|
end
|
|
146
146
|
puts "For Scan Results Navigate to: http://127.0.0.1:#{listen_port}/pwn_fuzz_net_app_proto.html"
|
|
147
147
|
simple_http_server_params = "-i #{listen_ip} -p #{listen_port}"
|
|
148
|
-
|
|
148
|
+
Dir.chdir(dir_path)
|
|
149
|
+
system(
|
|
150
|
+
'pwn_simple_http_server',
|
|
151
|
+
'-i',
|
|
152
|
+
listen_ip,
|
|
153
|
+
'-p',
|
|
154
|
+
listen_port.to_s
|
|
155
|
+
)
|
|
149
156
|
end
|
data/bin/pwn_perimeter_recon
CHANGED
|
@@ -218,7 +218,15 @@ unless nmap_path == ''
|
|
|
218
218
|
# Eyewitness Nmap XML Results
|
|
219
219
|
unless eyewitness_path == ''
|
|
220
220
|
print "#{@green}Eyewitness Nmap XML Results...#{@end_of_color}"
|
|
221
|
-
system(
|
|
221
|
+
system(
|
|
222
|
+
eyewitness_path,
|
|
223
|
+
'-x',
|
|
224
|
+
nmap_xml_results,
|
|
225
|
+
'-d',
|
|
226
|
+
"#{output_dir}/#{nmap_target}-#{@runtime_timestamp}",
|
|
227
|
+
'--no-prompt',
|
|
228
|
+
'--all-protocols'
|
|
229
|
+
)
|
|
222
230
|
end
|
|
223
231
|
|
|
224
232
|
PWN::Plugins::NmapIt.parse_xml_results(xml_file: nmap_xml_results) do |xml|
|
data/bin/pwn_sast
CHANGED
|
@@ -147,7 +147,7 @@ begin
|
|
|
147
147
|
|
|
148
148
|
# Start Simple HTTP Server (If Requested)
|
|
149
149
|
if start_reporting_server
|
|
150
|
-
listen_port = Random.rand(1_025..65_535)
|
|
150
|
+
listen_port = Random.rand(1_025..65_535).to_s
|
|
151
151
|
|
|
152
152
|
if pwn_provider == 'docker'
|
|
153
153
|
listen_ip = '0.0.0.0'
|
|
@@ -156,7 +156,14 @@ begin
|
|
|
156
156
|
end
|
|
157
157
|
|
|
158
158
|
puts "For Scan Results Navigate to: http://127.0.0.1:#{listen_port}/pwn_scan_git_source.html"
|
|
159
|
-
|
|
159
|
+
Dir.chdir(dir_path)
|
|
160
|
+
system(
|
|
161
|
+
'pwn_simple_http_server',
|
|
162
|
+
'-i',
|
|
163
|
+
listen_ip,
|
|
164
|
+
'-p',
|
|
165
|
+
listen_port
|
|
166
|
+
)
|
|
160
167
|
end
|
|
161
168
|
rescue SystemExit, Interrupt
|
|
162
169
|
puts "\nGoodbye."
|
data/bin/pwn_simple_http_server
CHANGED
|
@@ -35,7 +35,17 @@ else
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
begin
|
|
38
|
-
system(
|
|
38
|
+
system(
|
|
39
|
+
'thin',
|
|
40
|
+
'start',
|
|
41
|
+
'--adapter file',
|
|
42
|
+
'--address',
|
|
43
|
+
bind_ip,
|
|
44
|
+
'--port',
|
|
45
|
+
port.to_s,
|
|
46
|
+
'--threaded',
|
|
47
|
+
'--debug'
|
|
48
|
+
)
|
|
39
49
|
rescue RuntimeError
|
|
40
50
|
puts "WARNING: Service Already Listening on TCP #{port}..."
|
|
41
51
|
port = Random.rand(1_025..65_535)
|
|
@@ -8,7 +8,6 @@ module PWN
|
|
|
8
8
|
module BusPirate
|
|
9
9
|
# Supported Method Parameters::
|
|
10
10
|
# PWN::Plugins::BusPirate.connect_via_screen(
|
|
11
|
-
# screen_bin: 'optional - defaults to /usr/bin/screen'
|
|
12
11
|
# block_dev: 'optional - serial block device path (defaults to /dev/ttyUSB0)'
|
|
13
12
|
# )
|
|
14
13
|
|
|
@@ -17,19 +16,19 @@ module PWN
|
|
|
17
16
|
opts[:block_dev].to_s
|
|
18
17
|
)
|
|
19
18
|
|
|
20
|
-
block_dev
|
|
21
|
-
|
|
22
|
-
if opts[:screen_bin].nil?
|
|
23
|
-
screen_bin = '/usr/bin/screen'
|
|
24
|
-
else
|
|
25
|
-
screen_bin = opts[:screen_bin].to_s.strip.chomp.scrub
|
|
26
|
-
end
|
|
19
|
+
block_dev ||= '/dev/ttyUSB0'
|
|
27
20
|
|
|
21
|
+
screen_bin = '/usr/bin/screen'
|
|
28
22
|
raise "ERROR: #{screen_bin} not found." unless File.exist?(screen_bin)
|
|
29
23
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
system(
|
|
25
|
+
screen_bin,
|
|
26
|
+
block_dev,
|
|
27
|
+
'115200',
|
|
28
|
+
'8',
|
|
29
|
+
'N',
|
|
30
|
+
'1'
|
|
31
|
+
)
|
|
33
32
|
rescue StandardError => e
|
|
34
33
|
raise e
|
|
35
34
|
end
|
|
@@ -120,7 +119,6 @@ module PWN
|
|
|
120
119
|
public_class_method def self.help
|
|
121
120
|
puts "USAGE:
|
|
122
121
|
#{self}.connect_via_screen(
|
|
123
|
-
screen_bin: 'optional - defaults to /usr/bin/screen'
|
|
124
122
|
block_dev: 'optional serial block device path (defaults to /dev/ttyUSB0)'
|
|
125
123
|
)
|
|
126
124
|
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'json'
|
|
4
|
+
|
|
5
|
+
module PWN
|
|
6
|
+
module Plugins
|
|
7
|
+
# This plugin is used for interacting w/ Github's REST API using
|
|
8
|
+
# the 'rest' browser type of PWN::Plugins::TransparentBrowser.
|
|
9
|
+
module Github
|
|
10
|
+
@@logger = PWN::Plugins::PWNLogger.create
|
|
11
|
+
|
|
12
|
+
# Supported Method Parameters::
|
|
13
|
+
# github_rest_call(
|
|
14
|
+
# http_method: 'optional HTTP method (defaults to GET)
|
|
15
|
+
# rest_call: 'required rest call to make per the schema',
|
|
16
|
+
# params: 'optional params passed in the URI or HTTP Headers',
|
|
17
|
+
# http_body: 'optional HTTP body sent in HTTP methods that support it e.g. POST'
|
|
18
|
+
# )
|
|
19
|
+
|
|
20
|
+
private_class_method def self.github_rest_call(opts = {})
|
|
21
|
+
http_method = if opts[:http_method].nil?
|
|
22
|
+
:get
|
|
23
|
+
else
|
|
24
|
+
opts[:http_method].to_s.scrub.to_sym
|
|
25
|
+
end
|
|
26
|
+
rest_call = opts[:rest_call].to_s.scrub
|
|
27
|
+
params = opts[:params]
|
|
28
|
+
http_body = opts[:http_body].to_s.scrub
|
|
29
|
+
base_gist_api_uri = 'https://api.github.com'
|
|
30
|
+
|
|
31
|
+
rest_client = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)::Request
|
|
32
|
+
|
|
33
|
+
case http_method
|
|
34
|
+
when :get
|
|
35
|
+
response = rest_client.execute(
|
|
36
|
+
method: :get,
|
|
37
|
+
url: "#{base_gist_api_uri}/#{rest_call}",
|
|
38
|
+
headers: {
|
|
39
|
+
content_type: 'application/json; charset=UTF-8',
|
|
40
|
+
params: params
|
|
41
|
+
},
|
|
42
|
+
verify_ssl: false
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
when :post
|
|
46
|
+
response = rest_client.execute(
|
|
47
|
+
method: :post,
|
|
48
|
+
url: "#{base_gist_api_uri}/#{rest_call}",
|
|
49
|
+
headers: {
|
|
50
|
+
content_type: 'application/json; charset=UTF-8',
|
|
51
|
+
params: params
|
|
52
|
+
},
|
|
53
|
+
payload: http_body,
|
|
54
|
+
verify_ssl: false
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
else
|
|
58
|
+
raise @@logger.error("Unsupported HTTP Method #{http_method} for #{self} Plugin")
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
response
|
|
62
|
+
rescue RestClient::Forbidden
|
|
63
|
+
raise response
|
|
64
|
+
rescue RestClient::BadRequest, RestClient::NotFound, StandardError => e
|
|
65
|
+
raise
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Supported Method Parameters::
|
|
69
|
+
# response_json = PWN::Plugins::Github.download_all_gists(
|
|
70
|
+
# username: 'required - username of gists to backup',
|
|
71
|
+
# target_dir: 'required - target directory to save respective gists'
|
|
72
|
+
# )
|
|
73
|
+
|
|
74
|
+
public_class_method def self.download_all_gists(opts = {})
|
|
75
|
+
username = opts[:username].to_s.scrub
|
|
76
|
+
target_dir = opts[:target_dir].to_s.scrub
|
|
77
|
+
|
|
78
|
+
raise "ERROR: #{target_dir} Does Not Exist." unless Dir.exist?(target_dir)
|
|
79
|
+
|
|
80
|
+
params = {}
|
|
81
|
+
page = 1
|
|
82
|
+
response_json = [{}]
|
|
83
|
+
while response_json.any?
|
|
84
|
+
params[:page] = page
|
|
85
|
+
response_body = github_rest_call(
|
|
86
|
+
rest_call: "users/#{username}/gists",
|
|
87
|
+
params: params
|
|
88
|
+
).body
|
|
89
|
+
|
|
90
|
+
Dir.chdir(target_dir)
|
|
91
|
+
response_json = JSON.parse(response_body, symbolize_names: true)
|
|
92
|
+
response_json.each do |gist_hash|
|
|
93
|
+
clone_dir = gist_hash[:id]
|
|
94
|
+
clone_uri = gist_hash[:git_pull_url]
|
|
95
|
+
next if Dir.exist?(clone_dir)
|
|
96
|
+
|
|
97
|
+
print "Cloning: #{clone_uri}..."
|
|
98
|
+
system(
|
|
99
|
+
'git',
|
|
100
|
+
'clone',
|
|
101
|
+
clone_uri
|
|
102
|
+
)
|
|
103
|
+
puts 'complete.'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
page += 1
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
response_json
|
|
110
|
+
rescue StandardError => e
|
|
111
|
+
raise e
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Author(s):: 0day Inc. <request.pentest@0dayinc.com>
|
|
115
|
+
|
|
116
|
+
public_class_method def self.authors
|
|
117
|
+
"AUTHOR(S):
|
|
118
|
+
0day Inc. <request.pentest@0dayinc.com>
|
|
119
|
+
"
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Display Usage for this Module
|
|
123
|
+
|
|
124
|
+
public_class_method def self.help
|
|
125
|
+
puts "USAGE:
|
|
126
|
+
response_json = #{self}.download_all_gists(
|
|
127
|
+
username: 'required - username of gists to download',
|
|
128
|
+
target_dir: 'required - target directory to save respective gists'
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
#{self}.authors
|
|
132
|
+
"
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|
data/lib/pwn/plugins/packet.rb
CHANGED
|
@@ -1107,31 +1107,73 @@ module PWN
|
|
|
1107
1107
|
my_os = PWN::Plugins::DetectOS.type
|
|
1108
1108
|
case my_os
|
|
1109
1109
|
when :linux
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1110
|
+
system_resp = system(
|
|
1111
|
+
'sudo',
|
|
1112
|
+
'iptables',
|
|
1113
|
+
'-C',
|
|
1114
|
+
'OUTPUT',
|
|
1115
|
+
'--protocol',
|
|
1116
|
+
'tcp',
|
|
1117
|
+
'--source',
|
|
1118
|
+
pkt.ip_saddr,
|
|
1119
|
+
'--destination',
|
|
1120
|
+
pkt.ip_daddr,
|
|
1121
|
+
'--destination-port',
|
|
1122
|
+
pkt.tcp_dst.to_s,
|
|
1123
|
+
'--tcp-flags',
|
|
1124
|
+
'RST',
|
|
1125
|
+
'RST',
|
|
1126
|
+
'-j',
|
|
1127
|
+
'DROP',
|
|
1128
|
+
out: File::NULL,
|
|
1129
|
+
err: File::NULL
|
|
1130
|
+
)
|
|
1131
|
+
|
|
1132
|
+
unless system_resp
|
|
1120
1133
|
puts 'Preventing kernel from misbehaving when manipulating packets.'
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1134
|
+
system(
|
|
1135
|
+
'sudo',
|
|
1136
|
+
'iptables',
|
|
1137
|
+
'-A',
|
|
1138
|
+
'OUTPUT',
|
|
1139
|
+
'--protocol',
|
|
1140
|
+
'tcp',
|
|
1141
|
+
'--source',
|
|
1142
|
+
pkt.ip_saddr,
|
|
1143
|
+
'--destination',
|
|
1144
|
+
pkt.ip_daddr,
|
|
1145
|
+
'--destination-port',
|
|
1146
|
+
pkt.tcp_dst.to_s,
|
|
1147
|
+
'--tcp-flags',
|
|
1148
|
+
'RST',
|
|
1149
|
+
'RST',
|
|
1150
|
+
'-j',
|
|
1151
|
+
'DROP'
|
|
1152
|
+
)
|
|
1129
1153
|
end
|
|
1130
1154
|
|
|
1131
1155
|
pkt.recalc
|
|
1132
1156
|
pkt.to_w(iface)
|
|
1133
1157
|
|
|
1134
|
-
system(
|
|
1158
|
+
system(
|
|
1159
|
+
'sudo',
|
|
1160
|
+
'iptables',
|
|
1161
|
+
'-D',
|
|
1162
|
+
'OUTPUT',
|
|
1163
|
+
'--protocol',
|
|
1164
|
+
'tcp',
|
|
1165
|
+
'--source',
|
|
1166
|
+
pkt.ip_saddr,
|
|
1167
|
+
'--destination',
|
|
1168
|
+
pkt.ip_daddr,
|
|
1169
|
+
'--destination-port',
|
|
1170
|
+
pkt.tcp_dst.to_s,
|
|
1171
|
+
'--tcp-flags',
|
|
1172
|
+
'RST',
|
|
1173
|
+
'RST',
|
|
1174
|
+
'-j',
|
|
1175
|
+
'DROP'
|
|
1176
|
+
)
|
|
1135
1177
|
# when :osx
|
|
1136
1178
|
# ipfilter = 'pfctl'
|
|
1137
1179
|
# ipfilter_rule = "block out proto tcp from #{pkt.ip_saddr} to #{pkt.ip_daddr} port #{pkt.tcp_dst} flags R"
|
data/lib/pwn/plugins/rfidler.rb
CHANGED
|
@@ -7,7 +7,6 @@ module PWN
|
|
|
7
7
|
module RFIDler
|
|
8
8
|
# Supported Method Parameters::
|
|
9
9
|
# PWN::Plugins::RFIDler.connect_via_screen(
|
|
10
|
-
# screen_bin: 'optional - defaults to /usr/bin/screen'
|
|
11
10
|
# block_dev: 'optional - serial block device path (defaults to /dev/ttyUSB0)'
|
|
12
11
|
# )
|
|
13
12
|
|
|
@@ -17,18 +16,18 @@ module PWN
|
|
|
17
16
|
)
|
|
18
17
|
|
|
19
18
|
block_dev = '/dev/ttyUSB0' if opts[:block_dev].nil?
|
|
20
|
-
|
|
21
|
-
if opts[:screen_bin].nil?
|
|
22
|
-
screen_bin = '/usr/bin/screen'
|
|
23
|
-
else
|
|
24
|
-
screen_bin = opts[:screen_bin].to_s.strip.chomp.scrub
|
|
25
|
-
end
|
|
19
|
+
screen_bin = '/usr/bin/screen'
|
|
26
20
|
|
|
27
21
|
raise "ERROR: #{screen_bin} not found." unless File.exist?(screen_bin)
|
|
28
22
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
system(
|
|
24
|
+
screen_bin,
|
|
25
|
+
block_dev,
|
|
26
|
+
'9600',
|
|
27
|
+
'8',
|
|
28
|
+
'N',
|
|
29
|
+
'1'
|
|
30
|
+
)
|
|
32
31
|
rescue StandardError => e
|
|
33
32
|
raise e
|
|
34
33
|
end
|
|
@@ -46,7 +45,6 @@ module PWN
|
|
|
46
45
|
public_class_method def self.help
|
|
47
46
|
puts "USAGE:
|
|
48
47
|
#{self}.connect_via_screen(
|
|
49
|
-
screen_bin: 'optional - defaults to /usr/bin/screen'
|
|
50
48
|
block_dev: 'optional serial block device path (defaults to /dev/ttyUSB0)'
|
|
51
49
|
)
|
|
52
50
|
|
data/lib/pwn/plugins.rb
CHANGED
|
@@ -25,6 +25,7 @@ module PWN
|
|
|
25
25
|
autoload :FileFu, 'pwn/plugins/file_fu'
|
|
26
26
|
autoload :Fuzz, 'pwn/plugins/fuzz'
|
|
27
27
|
autoload :Git, 'pwn/plugins/git'
|
|
28
|
+
autoload :Github, 'pwn/plugins/github'
|
|
28
29
|
autoload :HackerOne, 'pwn/plugins/hacker_one'
|
|
29
30
|
autoload :IBMAppscan, 'pwn/plugins/ibm_appscan'
|
|
30
31
|
autoload :IPInfo, 'pwn/plugins/ip_info'
|
data/lib/pwn/reports/fuzz.rb
CHANGED
|
@@ -25,7 +25,11 @@ module PWN
|
|
|
25
25
|
|
|
26
26
|
# JSON object Completion
|
|
27
27
|
File.open("#{dir_path}/pwn_fuzz_net_app_proto.json", "w:#{char_encoding}") do |f|
|
|
28
|
-
f.print(
|
|
28
|
+
f.print(
|
|
29
|
+
JSON.pretty_generate(
|
|
30
|
+
results_hash.to_json.force_encoding(char_encoding)
|
|
31
|
+
)
|
|
32
|
+
)
|
|
29
33
|
end
|
|
30
34
|
|
|
31
35
|
# Report All the Bugs!!! \o/
|
data/lib/pwn/reports/sast.rb
CHANGED
|
@@ -22,9 +22,13 @@ module PWN
|
|
|
22
22
|
results_hash = opts[:results_hash]
|
|
23
23
|
|
|
24
24
|
# JSON object Completion
|
|
25
|
-
File.open("#{dir_path}/pwn_scan_git_source.json", 'w') do |f|
|
|
26
|
-
|
|
27
|
-
end
|
|
25
|
+
# File.open("#{dir_path}/pwn_scan_git_source.json", 'w') do |f|
|
|
26
|
+
# f.print(results_hash.to_json)
|
|
27
|
+
# end
|
|
28
|
+
File.write(
|
|
29
|
+
"#{dir_path}/pwn_scan_git_source.json",
|
|
30
|
+
JSON.pretty_generate(results_hash.to_json)
|
|
31
|
+
)
|
|
28
32
|
|
|
29
33
|
html_report = %q{<!DOCTYPE HTML>
|
|
30
34
|
<html>
|
data/lib/pwn/version.rb
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
describe PWN::Plugins::Github do
|
|
6
|
+
it 'should display information for authors' do
|
|
7
|
+
authors_response = PWN::Plugins::Github
|
|
8
|
+
expect(authors_response).to respond_to :authors
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
it 'should display information for existing help method' do
|
|
12
|
+
help_response = PWN::Plugins::Github
|
|
13
|
+
expect(help_response).to respond_to :help
|
|
14
|
+
end
|
|
15
|
+
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.
|
|
4
|
+
version: 0.4.504
|
|
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-
|
|
11
|
+
date: 2022-07-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -114,14 +114,14 @@ dependencies:
|
|
|
114
114
|
requirements:
|
|
115
115
|
- - ">="
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: 2.3.
|
|
117
|
+
version: 2.3.17
|
|
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.
|
|
124
|
+
version: 2.3.17
|
|
125
125
|
- !ruby/object:Gem::Dependency
|
|
126
126
|
name: bundler-audit
|
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -506,14 +506,14 @@ dependencies:
|
|
|
506
506
|
requirements:
|
|
507
507
|
- - '='
|
|
508
508
|
- !ruby/object:Gem::Version
|
|
509
|
-
version: 1.
|
|
509
|
+
version: 1.4.1
|
|
510
510
|
type: :runtime
|
|
511
511
|
prerelease: false
|
|
512
512
|
version_requirements: !ruby/object:Gem::Requirement
|
|
513
513
|
requirements:
|
|
514
514
|
- - '='
|
|
515
515
|
- !ruby/object:Gem::Version
|
|
516
|
-
version: 1.
|
|
516
|
+
version: 1.4.1
|
|
517
517
|
- !ruby/object:Gem::Dependency
|
|
518
518
|
name: pry
|
|
519
519
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -674,14 +674,14 @@ dependencies:
|
|
|
674
674
|
requirements:
|
|
675
675
|
- - '='
|
|
676
676
|
- !ruby/object:Gem::Version
|
|
677
|
-
version: 1.
|
|
677
|
+
version: 1.31.2
|
|
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.
|
|
684
|
+
version: 1.31.2
|
|
685
685
|
- !ruby/object:Gem::Dependency
|
|
686
686
|
name: rubocop-rake
|
|
687
687
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -702,14 +702,14 @@ dependencies:
|
|
|
702
702
|
requirements:
|
|
703
703
|
- - '='
|
|
704
704
|
- !ruby/object:Gem::Version
|
|
705
|
-
version: 2.
|
|
705
|
+
version: 2.12.1
|
|
706
706
|
type: :runtime
|
|
707
707
|
prerelease: false
|
|
708
708
|
version_requirements: !ruby/object:Gem::Requirement
|
|
709
709
|
requirements:
|
|
710
710
|
- - '='
|
|
711
711
|
- !ruby/object:Gem::Version
|
|
712
|
-
version: 2.
|
|
712
|
+
version: 2.12.1
|
|
713
713
|
- !ruby/object:Gem::Dependency
|
|
714
714
|
name: ruby-audio
|
|
715
715
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -786,14 +786,14 @@ dependencies:
|
|
|
786
786
|
requirements:
|
|
787
787
|
- - '='
|
|
788
788
|
- !ruby/object:Gem::Version
|
|
789
|
-
version: 0.
|
|
789
|
+
version: 0.103.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.
|
|
796
|
+
version: 0.103.0
|
|
797
797
|
- !ruby/object:Gem::Dependency
|
|
798
798
|
name: serialport
|
|
799
799
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -1558,6 +1558,7 @@ files:
|
|
|
1558
1558
|
- lib/pwn/plugins/file_fu.rb
|
|
1559
1559
|
- lib/pwn/plugins/fuzz.rb
|
|
1560
1560
|
- lib/pwn/plugins/git.rb
|
|
1561
|
+
- lib/pwn/plugins/github.rb
|
|
1561
1562
|
- lib/pwn/plugins/hacker_one.rb
|
|
1562
1563
|
- lib/pwn/plugins/http_intercept_helper.rb
|
|
1563
1564
|
- lib/pwn/plugins/ibm_appscan.rb
|
|
@@ -1856,6 +1857,7 @@ files:
|
|
|
1856
1857
|
- spec/lib/pwn/plugins/file_fu_spec.rb
|
|
1857
1858
|
- spec/lib/pwn/plugins/fuzz_spec.rb
|
|
1858
1859
|
- spec/lib/pwn/plugins/git_spec.rb
|
|
1860
|
+
- spec/lib/pwn/plugins/github_spec.rb
|
|
1859
1861
|
- spec/lib/pwn/plugins/hacker_one_spec.rb
|
|
1860
1862
|
- spec/lib/pwn/plugins/ibm_appscan_spec.rb
|
|
1861
1863
|
- spec/lib/pwn/plugins/ip_info_spec.rb
|
|
@@ -2005,7 +2007,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
2005
2007
|
- !ruby/object:Gem::Version
|
|
2006
2008
|
version: '0'
|
|
2007
2009
|
requirements: []
|
|
2008
|
-
rubygems_version: 3.3.
|
|
2010
|
+
rubygems_version: 3.3.17
|
|
2009
2011
|
signing_key:
|
|
2010
2012
|
specification_version: 4
|
|
2011
2013
|
summary: Automated Security Testing for CI/CD Pipelines & Beyond
|