pwn 0.4.466 → 0.4.469
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/pwn_serial_msr206 +44 -8
- data/lib/pwn/plugins/msr206.rb +8 -2
- data/lib/pwn/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a725f33e61f7f2460911a89708e4ad9bd720d10a30efb2688a494a629280465
|
4
|
+
data.tar.gz: 775139c435c1dd9890345a23781e472dbbc941c71f80ed9fa28ebc7135c82c90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbd2ab55cd07f7f9740f925a7cc8e224145289a15bedaa64347c21d52c8b8fd8b44d9bb05ab4c61317044be25c76abdf8efdc3cc9ec00c796afa793d1f18bbcb
|
7
|
+
data.tar.gz: 426e9e3472b375f047dac05b82c394b3fa1b4f0b26b3c381663dbf3401117081c0275bc5558946ee099e1b55b3e412775888f46abb53263da66880dae230145e
|
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.469]: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.469]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
data/bin/pwn_serial_msr206
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
require 'pwn'
|
5
5
|
require 'optparse'
|
6
|
+
require 'json'
|
6
7
|
|
7
8
|
opts = {}
|
8
9
|
OptionParser.new do |options|
|
@@ -81,7 +82,7 @@ begin
|
|
81
82
|
# 4 |Track 3 Write not present|Track 3 Write present
|
82
83
|
# 5 |Track 2 Write not present|Track 2 Write present
|
83
84
|
# 6 |Track 1 Write not present|Track 1 Write present
|
84
|
-
# 7 |parity bit** |parity bit**
|
85
|
+
# 7 |parity bit** |parity bit**
|
85
86
|
exec_resp = PWN::Plugins::MSR206.exec(
|
86
87
|
msr206_obj: msr206_obj,
|
87
88
|
cmd: :configuration_request
|
@@ -100,7 +101,7 @@ begin
|
|
100
101
|
unless menu_msg.include?('ERROR')
|
101
102
|
exec_resp = PWN::Plugins::MSR206.exec(
|
102
103
|
msr206_obj: msr206_obj,
|
103
|
-
cmd: :
|
104
|
+
cmd: :green_flash
|
104
105
|
)
|
105
106
|
end
|
106
107
|
|
@@ -120,14 +121,14 @@ begin
|
|
120
121
|
when :R
|
121
122
|
menu_msg = 'READY TO READ - PLEASE SWIPE CARD'
|
122
123
|
# Read Card
|
123
|
-
PWN::Plugins::MSR206.wait_for_swipe(
|
124
|
+
track_data = PWN::Plugins::MSR206.wait_for_swipe(
|
124
125
|
msr206_obj: msr206_obj,
|
125
126
|
type: :arm_to_read
|
126
127
|
)
|
127
128
|
when :C
|
128
129
|
menu_msg = 'READY TO COPY - PLEASE SWIPE ORIGINAL CARD'
|
129
130
|
# Read Original Card
|
130
|
-
PWN::Plugins::MSR206.wait_for_swipe(
|
131
|
+
track_data = PWN::Plugins::MSR206.wait_for_swipe(
|
131
132
|
msr206_obj: msr206_obj,
|
132
133
|
type: :arm_to_read
|
133
134
|
)
|
@@ -138,7 +139,7 @@ begin
|
|
138
139
|
when :E
|
139
140
|
menu_msg = 'READY TO EDIT - PLEASE SWIPE TARGET CARD'
|
140
141
|
# Read Target Card
|
141
|
-
PWN::Plugins::MSR206.wait_for_swipe(
|
142
|
+
track_data = PWN::Plugins::MSR206.wait_for_swipe(
|
142
143
|
msr206_obj: msr206_obj,
|
143
144
|
type: :arm_to_read
|
144
145
|
)
|
@@ -149,10 +150,45 @@ begin
|
|
149
150
|
when :B
|
150
151
|
menu_msg = 'READY TO BACKUP - PLEASE SWIPE CARD'
|
151
152
|
# Read Card
|
152
|
-
PWN::Plugins::MSR206.wait_for_swipe(
|
153
|
+
track_data = PWN::Plugins::MSR206.wait_for_swipe(
|
153
154
|
msr206_obj: msr206_obj,
|
154
155
|
type: :arm_to_read
|
155
156
|
)
|
157
|
+
|
158
|
+
file = ''
|
159
|
+
backup_msg = ''
|
160
|
+
loop do
|
161
|
+
if backup_msg.empty?
|
162
|
+
exec_resp = PWN::Plugins::MSR206.exec(
|
163
|
+
msr206_obj: msr206_obj,
|
164
|
+
cmd: :green_flash
|
165
|
+
)
|
166
|
+
end
|
167
|
+
|
168
|
+
print 'Enter File Name to Save Backup: '
|
169
|
+
file = gets.scrub.chomp.strip
|
170
|
+
file_dir = File.dirname(file)
|
171
|
+
break if Dir.exist?(file_dir)
|
172
|
+
|
173
|
+
backup_msg = "\n****** ERROR: Directory #{file_dir} for #{file} does not exist ******"
|
174
|
+
puts backup_msg
|
175
|
+
exec_resp = PWN::Plugins::MSR206.exec(
|
176
|
+
msr206_obj: msr206_obj,
|
177
|
+
cmd: :green_off
|
178
|
+
)
|
179
|
+
exec_resp = PWN::Plugins::MSR206.exec(
|
180
|
+
msr206_obj: msr206_obj,
|
181
|
+
cmd: :yellow_flash
|
182
|
+
)
|
183
|
+
end
|
184
|
+
|
185
|
+
File.write(file, "#{track_data.to_json}\n")
|
186
|
+
exec_resp = PWN::Plugins::MSR206.exec(
|
187
|
+
msr206_obj: msr206_obj,
|
188
|
+
cmd: :yellow_off
|
189
|
+
)
|
190
|
+
|
191
|
+
puts 'complete.'
|
156
192
|
when :W
|
157
193
|
exec_resp = PWN::Plugins::MSR206.exec(
|
158
194
|
msr206_obj: msr206_obj,
|
@@ -165,12 +201,12 @@ begin
|
|
165
201
|
menu_msg = '****** ERROR: Invalid Menu Option Selected ******'
|
166
202
|
exec_resp = PWN::Plugins::MSR206.exec(
|
167
203
|
msr206_obj: msr206_obj,
|
168
|
-
cmd: :
|
204
|
+
cmd: :green_off
|
169
205
|
)
|
170
206
|
|
171
207
|
exec_resp = PWN::Plugins::MSR206.exec(
|
172
208
|
msr206_obj: msr206_obj,
|
173
|
-
cmd: :
|
209
|
+
cmd: :yellow_flash
|
174
210
|
)
|
175
211
|
end
|
176
212
|
end
|
data/lib/pwn/plugins/msr206.rb
CHANGED
@@ -319,7 +319,7 @@ module PWN
|
|
319
319
|
binary_byte_arr = []
|
320
320
|
if raw_byte_arr
|
321
321
|
raw_byte_arr.first.split.each do |byte_str|
|
322
|
-
binary_byte_arr.push([byte_str].pack('H*').
|
322
|
+
binary_byte_arr.push([byte_str].pack('H*').unpack1('B*').reverse)
|
323
323
|
end
|
324
324
|
end
|
325
325
|
|
@@ -555,6 +555,7 @@ module PWN
|
|
555
555
|
# Supported Method Parameters::
|
556
556
|
# PWN::Plugins::MSR206.wait_for_swipe(
|
557
557
|
# msr206_obj: 'required - msr206_obj returned from #connect method'
|
558
|
+
# type: 'required - swipe type'
|
558
559
|
# )
|
559
560
|
|
560
561
|
public_class_method def self.wait_for_swipe(opts = {})
|
@@ -570,6 +571,8 @@ module PWN
|
|
570
571
|
|
571
572
|
raise "ERROR Unsupported type in #wait_for_swipe - #{type}. Valid types:\n#{types_arr}" unless types_arr.include?(type)
|
572
573
|
|
574
|
+
track_data = {}
|
575
|
+
|
573
576
|
exec_resp = exec(
|
574
577
|
msr206_obj: msr206_obj,
|
575
578
|
cmd: :red_off
|
@@ -613,6 +616,7 @@ module PWN
|
|
613
616
|
)
|
614
617
|
puts exec_resp[:decoded]
|
615
618
|
puts exec_resp.inspect
|
619
|
+
track_data[:track1] = exec_resp
|
616
620
|
|
617
621
|
# (1..3).each do |n|
|
618
622
|
# print ">> Track 1 (ALT DATA) ISO Track Format: #{n}\n"
|
@@ -631,6 +635,7 @@ module PWN
|
|
631
635
|
)
|
632
636
|
puts exec_resp[:decoded]
|
633
637
|
puts exec_resp.inspect
|
638
|
+
track_data[:track2] = exec_resp
|
634
639
|
|
635
640
|
# (1..3).each do |n|
|
636
641
|
# print ">> Track 2 (ALT DATA) ISO Track Format: #{n}\n"
|
@@ -649,6 +654,7 @@ module PWN
|
|
649
654
|
)
|
650
655
|
puts exec_resp[:decoded]
|
651
656
|
puts exec_resp.inspect
|
657
|
+
track_data[:track3] = exec_resp
|
652
658
|
|
653
659
|
# (1..3).each do |n|
|
654
660
|
# print ">> Track 3 (ALT DATA) ISO Track Format: #{n}\n"
|
@@ -659,7 +665,7 @@ module PWN
|
|
659
665
|
# )
|
660
666
|
# puts exec_resp.inspect
|
661
667
|
# end
|
662
|
-
|
668
|
+
track_data
|
663
669
|
rescue StandardError => e
|
664
670
|
raise e
|
665
671
|
ensure
|
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.469
|
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-06-
|
11
|
+
date: 2022-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -1972,7 +1972,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1972
1972
|
- !ruby/object:Gem::Version
|
1973
1973
|
version: '0'
|
1974
1974
|
requirements: []
|
1975
|
-
rubygems_version: 3.3.
|
1975
|
+
rubygems_version: 3.3.15
|
1976
1976
|
signing_key:
|
1977
1977
|
specification_version: 4
|
1978
1978
|
summary: Automated Security Testing for CI/CD Pipelines & Beyond
|