pwn 0.5.14 → 0.5.16
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 +3 -3
- data/lib/pwn/plugins/assembly.rb +81 -0
- data/lib/pwn/plugins/detect_os.rb +11 -0
- data/lib/pwn/plugins.rb +1 -0
- data/lib/pwn/version.rb +1 -1
- data/spec/lib/pwn/plugins/assembly_spec.rb +15 -0
- 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: cc85d1a101656ee9aec078f6d1f22ce6321eb026411a99741016b0a6f9f57825
|
4
|
+
data.tar.gz: 1d5ea91b0a93c1b883e33464431c68acdcdac06d6d2a6d33d7d7dfb07f9ccde0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a08f6c2484a5e31cb51068d67c0964f76b310b1046d7ce34ff33661af91ef7538ac58f060acc9b02b09846e8703de636c0d9e65d68ba9c10bfbe43adb2058ce
|
7
|
+
data.tar.gz: 5556463bff9ea637bd8fa7659d37234c15bab2e6cf002b2db0dbe1cb04fd0274eafd838484440f81029d19f6c6ebece8d5847aae062d911755be0fac66444e6b
|
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.1.3'
|
14
|
+
gem 'activesupport', '7.1.3.2'
|
15
15
|
gem 'anemone', '0.7.2'
|
16
16
|
gem 'authy', '3.0.1'
|
17
17
|
gem 'aws-sdk', '3.2.0'
|
@@ -40,7 +40,7 @@ gem 'jenkins_api_client2', '1.9.0'
|
|
40
40
|
gem 'js-beautify', '0.1.8'
|
41
41
|
gem 'json', '2.7.1'
|
42
42
|
gem 'jsonpath', '1.1.5'
|
43
|
-
gem 'jwt', '2.
|
43
|
+
gem 'jwt', '2.8.0'
|
44
44
|
gem 'libusb', '0.6.4'
|
45
45
|
gem 'luhn', '1.0.2'
|
46
46
|
gem 'mail', '2.8.1'
|
@@ -59,7 +59,7 @@ gem 'os', '1.1.4'
|
|
59
59
|
gem 'packetfu', '2.0.0'
|
60
60
|
gem 'packetgen', '3.3.1'
|
61
61
|
gem 'pdf-reader', '2.12.0'
|
62
|
-
gem 'pg', '1.5.
|
62
|
+
gem 'pg', '1.5.5'
|
63
63
|
gem 'pry', '0.14.2'
|
64
64
|
gem 'pry-doc', '1.5.0'
|
65
65
|
gem 'rake', '13.1.0'
|
@@ -68,7 +68,7 @@ gem 'rbvmomi', '3.0.0'
|
|
68
68
|
gem 'rdoc', '6.6.2'
|
69
69
|
gem 'rest-client', '2.1.0'
|
70
70
|
gem 'rex', '2.0.13'
|
71
|
-
gem 'rmagick', '5.4.
|
71
|
+
gem 'rmagick', '5.4.4'
|
72
72
|
gem 'rqrcode', '2.2.0'
|
73
73
|
gem 'rspec', '3.13.0'
|
74
74
|
gem 'rtesseract', '3.1.3'
|
@@ -80,7 +80,7 @@ gem 'ruby-nmap', '1.0.3'
|
|
80
80
|
gem 'ruby-saml', '1.16.0'
|
81
81
|
gem 'rvm', '1.11.3.9'
|
82
82
|
gem 'savon', '2.15.0'
|
83
|
-
gem 'selenium-devtools', '0.
|
83
|
+
gem 'selenium-devtools', '0.122.0'
|
84
84
|
gem 'serialport', '1.3.2'
|
85
85
|
# gem 'sinatra', '4.0.0'
|
86
86
|
gem 'slack-ruby-client', '2.3.0'
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
|
|
37
37
|
$ ./install.sh
|
38
38
|
$ ./install.sh ruby-gem
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.5.
|
40
|
+
pwn[v0.5.16]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.3.0@pwn
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
53
53
|
$ gem install --verbose pwn
|
54
54
|
$ pwn
|
55
|
-
pwn[v0.5.
|
55
|
+
pwn[v0.5.16]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
If you're using a multi-user install of RVM do:
|
@@ -62,7 +62,7 @@ $ rvm use ruby-3.3.0@pwn
|
|
62
62
|
$ rvmsudo gem uninstall --all --executables pwn
|
63
63
|
$ rvmsudo gem install --verbose pwn
|
64
64
|
$ pwn
|
65
|
-
pwn[v0.5.
|
65
|
+
pwn[v0.5.16]:001 >>> PWN.help
|
66
66
|
```
|
67
67
|
|
68
68
|
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
|
@@ -0,0 +1,81 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'tempfile'
|
4
|
+
|
5
|
+
module PWN
|
6
|
+
module Plugins
|
7
|
+
# This plugin converts images to readable text
|
8
|
+
module Assembly
|
9
|
+
# Supported Method Parameters::
|
10
|
+
# PWN::Plugins::Assembly.opcode_to_asm(
|
11
|
+
# opcodes: 'required - hex escaped opcode(s) (e.g. '\x90\x90\x90')',
|
12
|
+
# arch: 'optional - architecture (defaults to PWN::Plugins::DetectOS.arch)'
|
13
|
+
# )
|
14
|
+
|
15
|
+
public_class_method def self.opcode_to_asm(opts = {})
|
16
|
+
opcodes = opts[:opcodes]
|
17
|
+
arch = opts[:arch] ||= PWN::Plugins::DetectOS.arch
|
18
|
+
|
19
|
+
opcodes_tmp = Tempfile.new('pwn_opcodes')
|
20
|
+
File.binwrite(opcodes_tmp.path, opcodes)
|
21
|
+
asm = `objdump -M intel -b binary -m #{arch} -D #{opcodes_tmp.path}`
|
22
|
+
opcodes_tmp.unlink
|
23
|
+
|
24
|
+
asm
|
25
|
+
rescue StandardError => e
|
26
|
+
raise e
|
27
|
+
end
|
28
|
+
|
29
|
+
# Supported Method Parameters::
|
30
|
+
# PWN::Plugins::Assembly.asm_to_opcode(
|
31
|
+
# asm: 'required - assembly code(s) (e.g. 'nop\nnop\nnop\njmp rsp\n)',
|
32
|
+
# arch: 'optional - architecture (defaults to PWN::Plugins::DetectOS.arch)'
|
33
|
+
# )
|
34
|
+
|
35
|
+
public_class_method def self.asm_to_opcode(opts = {})
|
36
|
+
asm = opts[:asm]
|
37
|
+
arch = opts[:arch] ||= PWN::Plugins::DetectOS.arch
|
38
|
+
|
39
|
+
asm_code = ".global _start\n_start:\n#{asm}"
|
40
|
+
|
41
|
+
asm_tmp = Tempfile.new('pwn_asm')
|
42
|
+
asm_tmp.write(asm_code)
|
43
|
+
asm_tmp.close
|
44
|
+
|
45
|
+
system('as', '-o', "#{asm_tmp.path}.o", asm_tmp.path)
|
46
|
+
opcodes = `objdump -d #{asm_tmp.path}.o`
|
47
|
+
asm_tmp.unlink
|
48
|
+
|
49
|
+
opcodes
|
50
|
+
rescue StandardError => e
|
51
|
+
raise e
|
52
|
+
end
|
53
|
+
|
54
|
+
# Author(s):: 0day Inc. <request.pentest@0dayinc.com>
|
55
|
+
|
56
|
+
public_class_method def self.authors
|
57
|
+
"AUTHOR(S):
|
58
|
+
0day Inc. <request.pentest@0dayinc.com>
|
59
|
+
"
|
60
|
+
end
|
61
|
+
|
62
|
+
# Display Usage for this Module
|
63
|
+
|
64
|
+
public_class_method def self.help
|
65
|
+
puts "USAGE:
|
66
|
+
#{self}.opcode_to_asm(
|
67
|
+
opcodes: 'required - hex escaped opcode(s) (e.g. '\\x90\\x90\\x90')',
|
68
|
+
arch: 'optional - architecture (defaults to PWN::Plugins::DetectOS.arch)'
|
69
|
+
)
|
70
|
+
|
71
|
+
#{self}.asm_to_opcode(
|
72
|
+
asm: 'required - assembly code(s) (e.g. 'jmp rsp')',
|
73
|
+
arch: 'optional - architecture (defaults to PWN::Plugins::DetectOS.arch)'
|
74
|
+
)
|
75
|
+
|
76
|
+
#{self}.authors
|
77
|
+
"
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -23,6 +23,15 @@ module PWN
|
|
23
23
|
raise e
|
24
24
|
end
|
25
25
|
|
26
|
+
# Supported Method Parameters::
|
27
|
+
# PWN::Plugins::DetectOS.arch
|
28
|
+
|
29
|
+
public_class_method def self.arch
|
30
|
+
RUBY_PLATFORM.split('-').first
|
31
|
+
rescue StandardError => e
|
32
|
+
raise e
|
33
|
+
end
|
34
|
+
|
26
35
|
# Author(s):: 0day Inc. <request.pentest@0dayinc.com>
|
27
36
|
|
28
37
|
public_class_method def self.authors
|
@@ -37,6 +46,8 @@ module PWN
|
|
37
46
|
puts "USAGE:
|
38
47
|
#{self}.type
|
39
48
|
|
49
|
+
#{self}.arch
|
50
|
+
|
40
51
|
#{self}.authors
|
41
52
|
"
|
42
53
|
end
|
data/lib/pwn/plugins.rb
CHANGED
@@ -7,6 +7,7 @@ module PWN
|
|
7
7
|
module Plugins
|
8
8
|
autoload :Android, 'pwn/plugins/android'
|
9
9
|
autoload :AnsibleVault, 'pwn/plugins/ansible_vault'
|
10
|
+
autoload :Assembly, 'pwn/plugins/assembly'
|
10
11
|
autoload :AuthenticationHelper, 'pwn/plugins/authentication_helper'
|
11
12
|
autoload :BareSIP, 'pwn/plugins/baresip'
|
12
13
|
autoload :BasicAuth, 'pwn/plugins/basic_auth'
|
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::Assembly do
|
6
|
+
it 'should display information for authors' do
|
7
|
+
authors_response = PWN::Plugins::Assembly
|
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::Assembly
|
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.5.
|
4
|
+
version: 0.5.16
|
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-02-
|
11
|
+
date: 2024-02-25 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.1.3
|
19
|
+
version: 7.1.3.2
|
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.1.3
|
26
|
+
version: 7.1.3.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: anemone
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -408,14 +408,14 @@ dependencies:
|
|
408
408
|
requirements:
|
409
409
|
- - '='
|
410
410
|
- !ruby/object:Gem::Version
|
411
|
-
version: 2.
|
411
|
+
version: 2.8.0
|
412
412
|
type: :runtime
|
413
413
|
prerelease: false
|
414
414
|
version_requirements: !ruby/object:Gem::Requirement
|
415
415
|
requirements:
|
416
416
|
- - '='
|
417
417
|
- !ruby/object:Gem::Version
|
418
|
-
version: 2.
|
418
|
+
version: 2.8.0
|
419
419
|
- !ruby/object:Gem::Dependency
|
420
420
|
name: libusb
|
421
421
|
requirement: !ruby/object:Gem::Requirement
|
@@ -660,14 +660,14 @@ dependencies:
|
|
660
660
|
requirements:
|
661
661
|
- - '='
|
662
662
|
- !ruby/object:Gem::Version
|
663
|
-
version: 1.5.
|
663
|
+
version: 1.5.5
|
664
664
|
type: :runtime
|
665
665
|
prerelease: false
|
666
666
|
version_requirements: !ruby/object:Gem::Requirement
|
667
667
|
requirements:
|
668
668
|
- - '='
|
669
669
|
- !ruby/object:Gem::Version
|
670
|
-
version: 1.5.
|
670
|
+
version: 1.5.5
|
671
671
|
- !ruby/object:Gem::Dependency
|
672
672
|
name: pry
|
673
673
|
requirement: !ruby/object:Gem::Requirement
|
@@ -786,14 +786,14 @@ dependencies:
|
|
786
786
|
requirements:
|
787
787
|
- - '='
|
788
788
|
- !ruby/object:Gem::Version
|
789
|
-
version: 5.4.
|
789
|
+
version: 5.4.4
|
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: 5.4.
|
796
|
+
version: 5.4.4
|
797
797
|
- !ruby/object:Gem::Dependency
|
798
798
|
name: rqrcode
|
799
799
|
requirement: !ruby/object:Gem::Requirement
|
@@ -954,14 +954,14 @@ dependencies:
|
|
954
954
|
requirements:
|
955
955
|
- - '='
|
956
956
|
- !ruby/object:Gem::Version
|
957
|
-
version: 0.
|
957
|
+
version: 0.122.0
|
958
958
|
type: :runtime
|
959
959
|
prerelease: false
|
960
960
|
version_requirements: !ruby/object:Gem::Requirement
|
961
961
|
requirements:
|
962
962
|
- - '='
|
963
963
|
- !ruby/object:Gem::Version
|
964
|
-
version: 0.
|
964
|
+
version: 0.122.0
|
965
965
|
- !ruby/object:Gem::Dependency
|
966
966
|
name: serialport
|
967
967
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1707,6 +1707,7 @@ files:
|
|
1707
1707
|
- lib/pwn/plugins.rb
|
1708
1708
|
- lib/pwn/plugins/android.rb
|
1709
1709
|
- lib/pwn/plugins/ansible_vault.rb
|
1710
|
+
- lib/pwn/plugins/assembly.rb
|
1710
1711
|
- lib/pwn/plugins/authentication_helper.rb
|
1711
1712
|
- lib/pwn/plugins/baresip.rb
|
1712
1713
|
- lib/pwn/plugins/basic_auth.rb
|
@@ -2032,6 +2033,7 @@ files:
|
|
2032
2033
|
- spec/lib/pwn/ffi_spec.rb
|
2033
2034
|
- spec/lib/pwn/plugins/android_spec.rb
|
2034
2035
|
- spec/lib/pwn/plugins/ansible_vault_spec.rb
|
2036
|
+
- spec/lib/pwn/plugins/assembly_spec.rb
|
2035
2037
|
- spec/lib/pwn/plugins/authentication_helper_spec.rb
|
2036
2038
|
- spec/lib/pwn/plugins/baresip_spec.rb
|
2037
2039
|
- spec/lib/pwn/plugins/basic_auth_spec.rb
|