pwn 0.5.43 → 0.5.44

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67b8c9503fff9b4358ae2cf4645d6581a5758b6269c0f0cd752c56beca3d0005
4
- data.tar.gz: 85edd938c4fed98afc834eed906f482824ffb75eae38ff0c514475562b3c7464
3
+ metadata.gz: 3f25e99b7bab77b60bf540f3a7116b5a73880b4a48bb657fab50d3b790fa1c55
4
+ data.tar.gz: 1b1f20af44bedd09315acfe8f0d7e96cb80c51709a38daf7686f806de07694a1
5
5
  SHA512:
6
- metadata.gz: ab83130d2982492590513f40e755a7dc2453adad90acdb820e025e062fac610ecb8a0580c74019bab2e6e32f3481b9eb151c44998cf86ba5def959cc04464fcf
7
- data.tar.gz: 39f243b2f75b10a7291711783f9cbf2a2b8da84771eca501e95e6c6f62defafb88d311725215d5d5cc80d47e7368f4c1ed697e515b5030adbeb92fd736b254e3
6
+ metadata.gz: e5a537100ad7b89d3f50fff3378a6d278cfd306fafcb28a25bdfef94c3284865b80936fa70010e67851a98f1b113466606c59175ddefaee25273492cdad16616
7
+ data.tar.gz: 8e686718096043e4b91a9f82a31ea5d584a7a80f9e7f07c7293c6a455910d06aad5e06b091b9111115e1f38f4bfae7031c8bfdab0c46c710afcc97773a42477c
data/.rubocop.yml CHANGED
@@ -1,9 +1,26 @@
1
- inherit_from: .rubocop_todo.yml
2
1
  AllCops:
3
2
  UseCache: false
4
3
  NewCops: enable
5
- Layout:
6
- Max: 3000
4
+ Layout/LineLength:
5
+ Max: 293
6
+ Lint/UselessRescue:
7
+ Enabled: false
8
+ Metrics/AbcSize:
9
+ Max: 537.6
10
+ Metrics/BlockLength:
11
+ Max: 138
12
+ Metrics/BlockNesting:
13
+ Max: 4
14
+ Metrics/ClassLength:
15
+ Max: 134
16
+ Metrics/CyclomaticComplexity:
17
+ Max: 103
18
+ Metrics/MethodLength:
19
+ Max: 485
20
+ Metrics/ModuleLength:
21
+ Max: 495
22
+ Metrics/PerceivedComplexity:
23
+ Max: 101
7
24
  Style/HashEachMethods:
8
25
  Enabled: true
9
26
  Style/HashSyntax:
@@ -14,3 +31,5 @@ Style/HashTransformValues:
14
31
  Enabled: true
15
32
  Style/RedundantLineContinuation:
16
33
  Enabled: false
34
+
35
+ inherit_from: .rubocop_todo.yml
data/.rubocop_todo.yml CHANGED
@@ -1,11 +1,18 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2024-01-23 19:41:36 UTC using RuboCop version 1.60.1.
3
+ # on 2024-03-04 01:40:30 UTC using RuboCop version 1.61.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Offense count: 1
10
+ # Configuration parameters: Severity, Include.
11
+ # Include: **/*.gemspec
12
+ Gemspec/RequiredRubyVersion:
13
+ Exclude:
14
+ - 'pwn.gemspec'
15
+
9
16
  # Offense count: 5
10
17
  # This cop supports safe autocorrection (--autocorrect).
11
18
  # Configuration parameters: EnforcedStyle.
@@ -17,30 +24,43 @@ Layout/LineContinuationSpacing:
17
24
  - 'packer/provisioners/wpscan.rb'
18
25
  - 'vagrant/provisioners/beef.rb'
19
26
 
20
- # Offense count: 290
27
+ # Offense count: 18
28
+ # This cop supports safe autocorrection (--autocorrect).
29
+ # Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
30
+ # URISchemes: http, https
31
+ Layout/LineLength:
32
+ Exclude:
33
+ - 'Vagrantfile'
34
+ - 'bin/pwn_diff_csv_files_w_column_exclude'
35
+ - 'lib/pwn/banner/jmp_esp.rb'
36
+ - 'lib/pwn/plugins/mail_agent.rb'
37
+ - 'lib/pwn/plugins/open_ai.rb'
38
+ - 'lib/pwn/reports/fuzz.rb'
39
+ - 'lib/pwn/reports/phone.rb'
40
+ - 'lib/pwn/reports/sast.rb'
41
+ - 'lib/pwn/reports/uri_buster.rb'
42
+ - 'lib/pwn/sast/banned_function_calls_c.rb'
43
+
44
+ # Offense count: 294
21
45
  # This cop supports unsafe autocorrection (--autocorrect-all).
46
+ # Configuration parameters: AutoCorrect.
22
47
  Lint/UselessAssignment:
23
48
  Enabled: false
24
49
 
25
- # Offense count: 694
26
- Lint/UselessRescue:
27
- Enabled: false
28
-
29
- # Offense count: 291
30
- # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
31
- Metrics/AbcSize:
32
- Max: 328
33
-
34
- # Offense count: 71
35
- # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
50
+ # Offense count: 3
51
+ # Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
36
52
  # AllowedMethods: refine
37
53
  Metrics/BlockLength:
38
- Max: 196
54
+ Exclude:
55
+ - '**/*.gemspec'
56
+ - 'lib/pwn/plugins/android.rb'
57
+ - 'lib/pwn/plugins/msr206.rb'
58
+ - 'lib/pwn/sast/banned_function_calls_c.rb'
39
59
 
40
- # Offense count: 49
41
- # Configuration parameters: CountBlocks.
60
+ # Offense count: 44
61
+ # Configuration parameters: CountBlocks, Max.
42
62
  Metrics/BlockNesting:
43
- Max: 5
63
+ Enabled: false
44
64
 
45
65
  # Offense count: 1
46
66
  # Configuration parameters: LengthThreshold.
@@ -48,31 +68,36 @@ Metrics/CollectionLiteralLength:
48
68
  Exclude:
49
69
  - 'lib/pwn/plugins/uri_scheme.rb'
50
70
 
51
- # Offense count: 116
52
- # Configuration parameters: AllowedMethods, AllowedPatterns.
71
+ # Offense count: 1
72
+ # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
53
73
  Metrics/CyclomaticComplexity:
54
- Max: 231
74
+ Exclude:
75
+ - 'lib/pwn/plugins/android.rb'
55
76
 
56
- # Offense count: 536
57
- # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
77
+ # Offense count: 1
78
+ # Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
58
79
  Metrics/MethodLength:
59
- Max: 1001
80
+ Exclude:
81
+ - 'lib/pwn/banner/code_cave.rb'
60
82
 
61
- # Offense count: 56
62
- # Configuration parameters: CountComments, CountAsOne.
83
+ # Offense count: 8
84
+ # Configuration parameters: CountComments, Max, CountAsOne.
63
85
  Metrics/ModuleLength:
64
- Max: 1187
65
-
66
- # Offense count: 108
67
- # Configuration parameters: AllowedMethods, AllowedPatterns.
68
- Metrics/PerceivedComplexity:
69
- Max: 51
86
+ Exclude:
87
+ - 'lib/pwn/banner/code_cave.rb'
88
+ - 'lib/pwn/plugins/android.rb'
89
+ - 'lib/pwn/plugins/black_duck_binary_analysis.rb'
90
+ - 'lib/pwn/plugins/ibm_appscan.rb'
91
+ - 'lib/pwn/plugins/msr206.rb'
92
+ - 'lib/pwn/plugins/nessus_cloud.rb'
93
+ - 'lib/pwn/plugins/open_ai.rb'
94
+ - 'lib/pwn/plugins/packet.rb'
70
95
 
71
96
  # Offense count: 160
72
97
  Style/ClassVars:
73
98
  Enabled: false
74
99
 
75
- # Offense count: 278
100
+ # Offense count: 280
76
101
  # This cop supports safe autocorrection (--autocorrect).
77
102
  # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
78
103
  # SupportedStyles: assign_to_condition, assign_inside_condition
@@ -85,12 +110,13 @@ Style/ExplicitBlockArgument:
85
110
  Exclude:
86
111
  - 'lib/pwn/plugins/nmap_it.rb'
87
112
 
88
- # Offense count: 2
113
+ # Offense count: 3
89
114
  # This cop supports safe autocorrection (--autocorrect).
90
115
  Style/IfUnlessModifier:
91
116
  Exclude:
92
117
  - 'bin/pwn'
93
118
  - 'lib/pwn/plugins/baresip.rb'
119
+ - 'lib/pwn/plugins/mail_agent.rb'
94
120
 
95
121
  # Offense count: 94
96
122
  # This cop supports safe autocorrection (--autocorrect).
@@ -108,7 +134,7 @@ Style/RedundantStringEscape:
108
134
  - 'lib/pwn/sast/redos.rb'
109
135
  - 'vagrant/provisioners/kali_customize.rb'
110
136
 
111
- # Offense count: 46
137
+ # Offense count: 48
112
138
  # This cop supports unsafe autocorrection (--autocorrect-all).
113
139
  Style/SlicingWithRange:
114
140
  Enabled: false
@@ -127,10 +153,3 @@ Style/SoleNestedConditional:
127
153
  Style/StringLiterals:
128
154
  Exclude:
129
155
  - 'bin/pwn'
130
-
131
- # Offense count: 637
132
- # This cop supports safe autocorrection (--autocorrect).
133
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
134
- # URISchemes: http, https
135
- Layout/LineLength:
136
- Max: 1620
data/Gemfile CHANGED
@@ -60,7 +60,7 @@ gem 'os', '1.1.4'
60
60
  gem 'packetfu', '2.0.0'
61
61
  gem 'packetgen', '3.3.1'
62
62
  gem 'pdf-reader', '2.12.0'
63
- gem 'pg', '1.5.5'
63
+ gem 'pg', '1.5.6'
64
64
  gem 'pry', '0.14.2'
65
65
  gem 'pry-doc', '1.5.0'
66
66
  gem 'rake', '13.1.0'
@@ -75,7 +75,7 @@ gem 'rspec', '3.13.0'
75
75
  gem 'rtesseract', '3.1.3'
76
76
  gem 'rubocop', '1.61.0'
77
77
  gem 'rubocop-rake', '0.6.0'
78
- gem 'rubocop-rspec', '2.27.0'
78
+ gem 'rubocop-rspec', '2.27.1'
79
79
  gem 'ruby-audio', '1.6.1'
80
80
  gem 'ruby-nmap', '1.0.3'
81
81
  gem 'ruby-saml', '1.16.0'
@@ -97,3 +97,4 @@ gem 'webrick', '1.8.1'
97
97
  gem 'whois', '5.1.1'
98
98
  gem 'whois-parser', '2.0.0'
99
99
  gem 'wicked_pdf', '2.8.0'
100
+ gem 'yard', '0.9.36'
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.43]:001 >>> PWN.help
40
+ pwn[v0.5.44]: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.43]:001 >>> PWN.help
55
+ pwn[v0.5.44]: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.43]:001 >>> PWN.help
65
+ pwn[v0.5.44]: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/bin/pwn CHANGED
@@ -216,21 +216,21 @@ begin
216
216
  end
217
217
  end
218
218
 
219
- Pry::Commands.create_command 'toggle-pwn-asm' do
220
- description 'Toggle pwn.asm interface.'
219
+ Pry::Commands.create_command 'pwn-asm' do
220
+ description 'Initiate pwn.asm shell.'
221
221
 
222
222
  def process
223
223
  pi = pry_instance
224
- pi.config.pwn_asm ? pi.config.pwn_asm = false : pi.config.pwn_asm = true
224
+ pi.config.pwn_asm = true
225
225
  end
226
226
  end
227
227
 
228
- Pry::Commands.create_command 'toggle-pwn-gpt' do
229
- description 'Toggle pwn.gpt chat interface.'
228
+ Pry::Commands.create_command 'pwn-gpt' do
229
+ description 'Initiate pwn.gpt chat interface.'
230
230
 
231
231
  def process
232
232
  pi = pry_instance
233
- pi.config.pwn_gpt ? pi.config.pwn_gpt = false : pi.config.pwn_gpt = true
233
+ pi.config.pwn_gpt = true
234
234
  pi.config.color = false if pi.config.pwn_gpt
235
235
  pi.config.color = true unless pi.config.pwn_gpt
236
236
  end
@@ -254,6 +254,18 @@ begin
254
254
  end
255
255
  end
256
256
 
257
+ Pry::Commands.create_command 'back' do
258
+ description 'Jump back to pwn REPL when in pwn-asm || pwn-gpt.'
259
+
260
+ def process
261
+ pi = pry_instance
262
+ pi.config.pwn_asm = false if pi.config.pwn_asm
263
+ pi.config.pwn_gpt = false if pi.config.pwn_gpt
264
+ pi.config.pwn_gpt_debug = false if pi.config.pwn_gpt_debug
265
+ pi.config.pwn_gpt_speak = false if pi.config.pwn_gpt_speak
266
+ end
267
+ end
268
+
257
269
  # Define REPL Hooks
258
270
  # Welcome Banner Hook
259
271
  Pry.config.hooks.add_hook(:before_session, :welcome) do |output, _binding, _pi|
@@ -29,10 +29,40 @@ module PWN
29
29
  arch_obj = Metasm::Ia32.new(endian)
30
30
  when 'amd64', 'x86_64'
31
31
  arch_obj = Metasm::X86_64.new(endian)
32
+ when 'arc'
33
+ arch_obj = Metasm::ARC.new(endian)
32
34
  when 'armv4l', 'armv4b', 'armv5l', 'armv5b', 'armv6l', 'armv6b', 'armv7b', 'armv7l', 'arm', 'armhf'
33
35
  arch_obj = Metasm::ARM.new(endian)
34
36
  when 'aarch64', 'arm64'
35
37
  arch_obj = Metasm::ARM64.new(endian)
38
+ when 'bpf'
39
+ arch_obj = Metasm::BPF.new(endian)
40
+ when 'cy16'
41
+ arch_obj = Metasm::CY16.new(endian)
42
+ when 'dalvik'
43
+ arch_obj = Metasm::Dalvik.new(endian)
44
+ when 'ebpf'
45
+ arch_obj = Metasm::EBPF.new(endian)
46
+ when 'mcs51'
47
+ arch_obj = Metasm::MCS51.new(endian)
48
+ when 'mips'
49
+ arch_obj = Metasm::MIPS.new(endian)
50
+ when 'mips64'
51
+ arch_obj = Metasm::MIPS64.new(endian)
52
+ when 'msp430'
53
+ arch_obj = Metasm::MSP430.new(endian)
54
+ when 'openrisc'
55
+ arch_obj = Metasm::OpenRisc.new(endian)
56
+ when 'ppc'
57
+ arch_obj = Metasm::PPC.new(endian)
58
+ when 'sh4'
59
+ arch_obj = Metasm::SH4.new(endian)
60
+ when 'st20'
61
+ arch_obj = Metasm::ST20.new(endian)
62
+ when 'webasm'
63
+ arch_obj = Metasm::WebAsm.new(endian)
64
+ when 'z80'
65
+ arch_obj = Metasm::Z80.new(endian)
36
66
  else
37
67
  raise "Unsupported architecture: #{arch}"
38
68
  end
@@ -104,10 +134,40 @@ module PWN
104
134
  arch_obj = Metasm::Ia32.new(endian)
105
135
  when 'amd64', 'x86_64'
106
136
  arch_obj = Metasm::X86_64.new(endian)
137
+ when 'arc'
138
+ arch_obj = Metasm::ARC.new(endian)
107
139
  when 'armv4l', 'armv4b', 'armv5l', 'armv5b', 'armv6l', 'armv6b', 'armv7b', 'armv7l', 'arm', 'armhf'
108
140
  arch_obj = Metasm::ARM.new(endian)
109
141
  when 'aarch64', 'arm64'
110
142
  arch_obj = Metasm::ARM64.new(endian)
143
+ when 'bpf'
144
+ arch_obj = Metasm::BPF.new(endian)
145
+ when 'cy16'
146
+ arch_obj = Metasm::CY16.new(endian)
147
+ when 'dalvik'
148
+ arch_obj = Metasm::Dalvik.new(endian)
149
+ when 'ebpf'
150
+ arch_obj = Metasm::EBPF.new(endian)
151
+ when 'mcs51'
152
+ arch_obj = Metasm::MCS51.new(endian)
153
+ when 'mips'
154
+ arch_obj = Metasm::MIPS.new(endian)
155
+ when 'mips64'
156
+ arch_obj = Metasm::MIPS64.new(endian)
157
+ when 'msp430'
158
+ arch_obj = Metasm::MSP430.new(endian)
159
+ when 'openrisc'
160
+ arch_obj = Metasm::OpenRisc.new(endian)
161
+ when 'ppc'
162
+ arch_obj = Metasm::PPC.new(endian)
163
+ when 'sh4'
164
+ arch_obj = Metasm::SH4.new(endian)
165
+ when 'st20'
166
+ arch_obj = Metasm::ST20.new(endian)
167
+ when 'webasm'
168
+ arch_obj = Metasm::WebAsm.new(endian)
169
+ when 'z80'
170
+ arch_obj = Metasm::Z80.new(endian)
111
171
  else
112
172
  raise "Unsupported architecture: #{arch}"
113
173
  end
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.5.43'
4
+ VERSION = '0.5.44'
5
5
  end
@@ -6,6 +6,7 @@ system("sudo touch #{alias_file}")
6
6
  system("sudo chmod 777 #{alias_file}")
7
7
  File.open(alias_file, 'w') do |f|
8
8
  f.puts '#!/bin/bash'
9
+ f.puts "alias file='file --keep-going --raw'"
9
10
  f.puts "alias grep='grep --color=auto'"
10
11
  f.puts "alias kpid='kill -15'"
11
12
  f.puts "alias ls='ls --color=auto'"
data/pwn.gemspec CHANGED
@@ -6,7 +6,9 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
6
  require 'pwn/version'
7
7
 
8
8
  Gem::Specification.new do |spec|
9
- spec.required_ruby_version = ">= #{File.read('.ruby-version').split('-').last.chomp}"
9
+ ruby_version = ">= #{File.read('.ruby-version').split('-').last.chomp}".freeze
10
+ # spec.required_ruby_version = ruby_version
11
+ spec.required_ruby_version = '>= 3.3.0'
10
12
  spec.name = 'pwn'
11
13
  spec.version = PWN::VERSION
12
14
  spec.authors = ['0day Inc.']
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.43
4
+ version: 0.5.44
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-03-01 00:00:00.000000000 Z
11
+ date: 2024-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -674,14 +674,14 @@ dependencies:
674
674
  requirements:
675
675
  - - '='
676
676
  - !ruby/object:Gem::Version
677
- version: 1.5.5
677
+ version: 1.5.6
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.5.5
684
+ version: 1.5.6
685
685
  - !ruby/object:Gem::Dependency
686
686
  name: pry
687
687
  requirement: !ruby/object:Gem::Requirement
@@ -884,14 +884,14 @@ dependencies:
884
884
  requirements:
885
885
  - - '='
886
886
  - !ruby/object:Gem::Version
887
- version: 2.27.0
887
+ version: 2.27.1
888
888
  type: :runtime
889
889
  prerelease: false
890
890
  version_requirements: !ruby/object:Gem::Requirement
891
891
  requirements:
892
892
  - - '='
893
893
  - !ruby/object:Gem::Version
894
- version: 2.27.0
894
+ version: 2.27.1
895
895
  - !ruby/object:Gem::Dependency
896
896
  name: ruby-audio
897
897
  requirement: !ruby/object:Gem::Requirement
@@ -1172,6 +1172,20 @@ dependencies:
1172
1172
  - - '='
1173
1173
  - !ruby/object:Gem::Version
1174
1174
  version: 2.8.0
1175
+ - !ruby/object:Gem::Dependency
1176
+ name: yard
1177
+ requirement: !ruby/object:Gem::Requirement
1178
+ requirements:
1179
+ - - '='
1180
+ - !ruby/object:Gem::Version
1181
+ version: 0.9.36
1182
+ type: :runtime
1183
+ prerelease: false
1184
+ version_requirements: !ruby/object:Gem::Requirement
1185
+ requirements:
1186
+ - - '='
1187
+ - !ruby/object:Gem::Version
1188
+ version: 0.9.36
1175
1189
  description: https://github.com/0dayinc/pwn/README.md
1176
1190
  email:
1177
1191
  - request.pentest@0dayinc.com