pwn 0.5.30 → 0.5.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/pwn/plugins/assembly.rb +14 -7
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4aaec5842b8e4f45064030d9bf15e4b95e9a2608da256391203957dcd2156e2
|
4
|
+
data.tar.gz: f96a7d795fee71f0a66039d7e357c5d12e52367adae529fa5c4f2cb09ab1b35c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1aab91b51df53af22edfe396c4dc95d4e4c6045113dd5ba9ed777c6c3d5d8fa929f924ea0cc6271cfb064ed1bc102d816018a3bb2b714f93ac1e6c68aad35ac1
|
7
|
+
data.tar.gz: 6dac0146d36fec6187103d1ed8340507c5ebe1c80f0ef26a54ac96d51888e25cb37901862e2539c03ddc51cc19be79f5f0e9332b5a2c87e9e4ab3aa84e976c07
|
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.31]: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.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.31]: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.31]: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:
|
data/lib/pwn/plugins/assembly.rb
CHANGED
@@ -19,15 +19,15 @@ module PWN
|
|
19
19
|
arch = opts[:arch] ||= PWN::Plugins::DetectOS.arch
|
20
20
|
endian = opts[:endian] ||= :little
|
21
21
|
|
22
|
+
raise "ERROR: opcodes parameter is required." if opcodes.nil?
|
23
|
+
|
22
24
|
case arch
|
23
|
-
when 'i386', 'i686', 'x86'
|
24
|
-
|
25
|
-
when 'amd64', 'x86_64'
|
26
|
-
arch_obj = Metasm::X86_64.new(endian)
|
25
|
+
when 'amd64', 'i386', 'i686', 'x86', 'x86_64'
|
26
|
+
arch = 'i386'
|
27
27
|
when 'armv4l', 'armv4b', 'armv5l', 'armv5b', 'armv6l', 'armv6b', 'armv7b', 'armv7l', 'arm', 'armhf'
|
28
|
-
|
28
|
+
arch = 'arm'
|
29
29
|
when 'aarch64', 'arm64'
|
30
|
-
|
30
|
+
arch = 'aarch64'
|
31
31
|
else
|
32
32
|
raise "Unsupported architecture: #{arch}"
|
33
33
|
end
|
@@ -41,9 +41,14 @@ module PWN
|
|
41
41
|
# If opcodes appear to be '909090' then convert to "\x90\x90\x90"
|
42
42
|
opcodes = opcodes.chars.each_slice(2).map(&:join).map { |x| format('\x%02x', x.to_i(16)) }.join if opcodes.length.even?
|
43
43
|
|
44
|
-
|
44
|
+
pwn_asm_tmp = Tempfile.new('pwn_asm')
|
45
|
+
File.binwrite(pwn_asm_tmp.path, opcodes)
|
46
|
+
`objdump -D -b binary -m #{arch} -M intel --endian #{endian} #{pwn_asm_tmp.path}`
|
45
47
|
rescue StandardError => e
|
46
48
|
raise e
|
49
|
+
ensure
|
50
|
+
tmp_file = [pwn_asm_tmp.path]
|
51
|
+
FileUtils.rm_f(tmp_file) if File.exist?(pwn_asm_tmp.path)
|
47
52
|
end
|
48
53
|
|
49
54
|
# Supported Method Parameters::
|
@@ -58,6 +63,8 @@ module PWN
|
|
58
63
|
arch = opts[:arch] ||= PWN::Plugins::DetectOS.arch
|
59
64
|
endian = opts[:endian] ||= :little
|
60
65
|
|
66
|
+
raise "ERROR: asm parameter is required." if asm.nil?
|
67
|
+
|
61
68
|
case arch
|
62
69
|
when 'i386', 'i686', 'x86'
|
63
70
|
arch_obj = Metasm::Ia32.new(endian)
|
data/lib/pwn/version.rb
CHANGED