metasploit-payloads 2.0.156 → 2.0.157
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/Rakefile +4 -1
- data/data/android/meterpreter.jar +0 -0
- data/data/android/metstage.jar +0 -0
- data/data/android/shell.jar +0 -0
- data/data/meterpreter/dump_sam.x64.debug.dll +0 -0
- data/data/meterpreter/dump_sam.x64.dll +0 -0
- data/data/meterpreter/dump_sam.x86.debug.dll +0 -0
- data/data/meterpreter/dump_sam.x86.dll +0 -0
- data/data/meterpreter/elevator.x64.debug.dll +0 -0
- data/data/meterpreter/elevator.x64.dll +0 -0
- data/data/meterpreter/elevator.x86.debug.dll +0 -0
- data/data/meterpreter/elevator.x86.dll +0 -0
- data/data/meterpreter/ext_server_bofloader.x64.debug.dll +0 -0
- data/data/meterpreter/ext_server_bofloader.x64.dll +0 -0
- data/data/meterpreter/ext_server_bofloader.x86.debug.dll +0 -0
- data/data/meterpreter/ext_server_bofloader.x86.dll +0 -0
- data/data/meterpreter/ext_server_espia.x64.debug.dll +0 -0
- data/data/meterpreter/ext_server_espia.x64.dll +0 -0
- data/data/meterpreter/ext_server_espia.x86.debug.dll +0 -0
- data/data/meterpreter/ext_server_espia.x86.dll +0 -0
- data/data/meterpreter/ext_server_extapi.x64.debug.dll +0 -0
- data/data/meterpreter/ext_server_extapi.x64.dll +0 -0
- data/data/meterpreter/ext_server_extapi.x86.debug.dll +0 -0
- data/data/meterpreter/ext_server_extapi.x86.dll +0 -0
- data/data/meterpreter/ext_server_incognito.x64.debug.dll +0 -0
- data/data/meterpreter/ext_server_incognito.x64.dll +0 -0
- data/data/meterpreter/ext_server_incognito.x86.debug.dll +0 -0
- data/data/meterpreter/ext_server_incognito.x86.dll +0 -0
- data/data/meterpreter/ext_server_kiwi.x64.debug.dll +0 -0
- data/data/meterpreter/ext_server_kiwi.x64.dll +0 -0
- data/data/meterpreter/ext_server_kiwi.x86.debug.dll +0 -0
- data/data/meterpreter/ext_server_kiwi.x86.dll +0 -0
- data/data/meterpreter/ext_server_lanattacks.x64.debug.dll +0 -0
- data/data/meterpreter/ext_server_lanattacks.x64.dll +0 -0
- data/data/meterpreter/ext_server_lanattacks.x86.debug.dll +0 -0
- data/data/meterpreter/ext_server_lanattacks.x86.dll +0 -0
- data/data/meterpreter/ext_server_peinjector.x64.debug.dll +0 -0
- data/data/meterpreter/ext_server_peinjector.x64.dll +0 -0
- data/data/meterpreter/ext_server_peinjector.x86.debug.dll +0 -0
- data/data/meterpreter/ext_server_peinjector.x86.dll +0 -0
- data/data/meterpreter/ext_server_powershell.x64.debug.dll +0 -0
- data/data/meterpreter/ext_server_powershell.x64.dll +0 -0
- data/data/meterpreter/ext_server_powershell.x86.debug.dll +0 -0
- data/data/meterpreter/ext_server_powershell.x86.dll +0 -0
- data/data/meterpreter/ext_server_priv.x64.debug.dll +0 -0
- data/data/meterpreter/ext_server_priv.x64.dll +0 -0
- data/data/meterpreter/ext_server_priv.x86.debug.dll +0 -0
- data/data/meterpreter/ext_server_priv.x86.dll +0 -0
- data/data/meterpreter/ext_server_python.x64.debug.dll +0 -0
- data/data/meterpreter/ext_server_python.x64.dll +0 -0
- data/data/meterpreter/ext_server_python.x86.debug.dll +0 -0
- data/data/meterpreter/ext_server_python.x86.dll +0 -0
- data/data/meterpreter/ext_server_sniffer.x64.dll +0 -0
- data/data/meterpreter/ext_server_sniffer.x86.dll +0 -0
- data/data/meterpreter/ext_server_stdapi.jar +0 -0
- data/data/meterpreter/ext_server_stdapi.php +0 -0
- data/data/meterpreter/ext_server_stdapi.py +0 -0
- data/data/meterpreter/ext_server_stdapi.x64.debug.dll +0 -0
- data/data/meterpreter/ext_server_stdapi.x64.dll +0 -0
- data/data/meterpreter/ext_server_stdapi.x86.debug.dll +0 -0
- data/data/meterpreter/ext_server_stdapi.x86.dll +0 -0
- data/data/meterpreter/ext_server_unhook.x64.debug.dll +0 -0
- data/data/meterpreter/ext_server_unhook.x64.dll +0 -0
- data/data/meterpreter/ext_server_unhook.x86.debug.dll +0 -0
- data/data/meterpreter/ext_server_unhook.x86.dll +0 -0
- data/data/meterpreter/ext_server_winpmem.x64.debug.dll +0 -0
- data/data/meterpreter/ext_server_winpmem.x64.dll +0 -0
- data/data/meterpreter/ext_server_winpmem.x86.debug.dll +0 -0
- data/data/meterpreter/ext_server_winpmem.x86.dll +0 -0
- data/data/meterpreter/meterpreter.jar +0 -0
- data/data/meterpreter/meterpreter.php +0 -0
- data/data/meterpreter/meterpreter.py +0 -0
- data/data/meterpreter/metsrv.x64.debug.dll +0 -0
- data/data/meterpreter/metsrv.x64.dll +0 -0
- data/data/meterpreter/metsrv.x86.debug.dll +0 -0
- data/data/meterpreter/metsrv.x86.dll +0 -0
- data/data/meterpreter/screenshot.x64.debug.dll +0 -0
- data/data/meterpreter/screenshot.x64.dll +0 -0
- data/data/meterpreter/screenshot.x86.debug.dll +0 -0
- data/data/meterpreter/screenshot.x86.dll +0 -0
- data/lib/metasploit-payloads/crypto.rb +66 -0
- data/lib/metasploit-payloads/version.rb +1 -1
- data/lib/metasploit-payloads.rb +18 -6
- data/manifest +79 -79
- data/manifest.uuid +1 -1
- data/spec/metasploit_payloads/crypto_spec.rb +22 -0
- data/spec/metasploit_payloads/metasploit_payloads_spec.rb +30 -0
- data.tar.gz.sig +0 -0
- metadata +4 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 438bb2951a59864af18156abc58f00221f6e18711d5c5daeded76faa04d5ede6
|
4
|
+
data.tar.gz: 32c3b9800d310087ebbc29660911f68674ac7316a73af2c1176332618343a10f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 507621be0a3dfce9c65c23ad1f2db04d4d00305c676874c205a9427bff46f5cacacc40eb51f6157c5f54afd608a1acf5fbc3e08f8e5066a56d831b8ecf87b12f
|
7
|
+
data.tar.gz: 3b95b280c79c029e2ee0f8fd3e548b7c575c11be0147e54692aed795bb56b8a1b3876a3a9d8883cf84439cd11288220dc537f4702f1f8271562eb56385ac69f4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Rakefile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require 'openssl'
|
3
|
+
require 'metasploit-payloads/crypto'
|
3
4
|
|
4
5
|
c_source = "../c/meterpreter/"
|
5
6
|
java_source = "../java"
|
@@ -52,7 +53,9 @@ def copy_files(cnf, meterpreter_dest)
|
|
52
53
|
Dir.glob("#{f}/*.#{ext}").each do |bin|
|
53
54
|
target = File.join(meterpreter_dest, File.basename(bin))
|
54
55
|
print("Copying: #{bin} -> #{target}\n")
|
55
|
-
|
56
|
+
contents = ::File.binread(::File.expand_path(bin))
|
57
|
+
encrypted_contents = ::MetasploitPayloads::Crypto.encrypt(plaintext: contents)
|
58
|
+
::File.binwrite(::File.expand_path(target), encrypted_contents)
|
56
59
|
end
|
57
60
|
end
|
58
61
|
end
|
Binary file
|
data/data/android/metstage.jar
CHANGED
Binary file
|
data/data/android/shell.jar
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'openssl'
|
2
|
+
|
3
|
+
module MetasploitPayloads
|
4
|
+
module Crypto
|
5
|
+
CIPHERS = {
|
6
|
+
chacha20: {
|
7
|
+
name: 'chacha20'.b,
|
8
|
+
version: 1,
|
9
|
+
iv: {
|
10
|
+
value: "\x52\x25\xd7\xab\x52\x8f\x3f\xf8\x94\x97\x08\x42\x33\xb9\xd3\xb6".b, # 16 bytes
|
11
|
+
version: 1
|
12
|
+
},
|
13
|
+
key: {
|
14
|
+
value: "\x28\x39\x97\x4c\x95\x11\x9d\x42\x6c\x8b\xff\x43\x3e\x5d\x3c\x33\x1b\x95\xd3\xea\xeb\xc9\xae\x71\x0a\x36\xe7\x98\x3d\x9d\x09\x52".b, # 32 bytes
|
15
|
+
version: 1
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}.freeze
|
19
|
+
CURRENT_CIPHER = CIPHERS[:chacha20]
|
20
|
+
CIPHER_VERSION = CURRENT_CIPHER[:version]
|
21
|
+
KEY_VERSION = CURRENT_CIPHER[:key][:version]
|
22
|
+
IV_VERSION = CURRENT_CIPHER[:iv][:version]
|
23
|
+
# Binary String, unsigned char, unsigned char, unsigned char
|
24
|
+
ENCRYPTED_PAYLOAD_HEADER = ['msf', CIPHER_VERSION, IV_VERSION, KEY_VERSION].pack('A*CCC')
|
25
|
+
|
26
|
+
private_constant :CIPHERS
|
27
|
+
private_constant :CURRENT_CIPHER
|
28
|
+
private_constant :CIPHER_VERSION
|
29
|
+
private_constant :KEY_VERSION
|
30
|
+
private_constant :IV_VERSION
|
31
|
+
|
32
|
+
def self.encrypt(plaintext: '')
|
33
|
+
raise ::ArgumentError, 'Unable to encrypt plaintext: ' << plaintext, caller unless plaintext.to_s
|
34
|
+
|
35
|
+
cipher = ::OpenSSL::Cipher.new(CURRENT_CIPHER[:name])
|
36
|
+
|
37
|
+
cipher.encrypt
|
38
|
+
cipher.iv = CURRENT_CIPHER[:iv][:value]
|
39
|
+
cipher.key = CURRENT_CIPHER[:key][:value]
|
40
|
+
|
41
|
+
output = ENCRYPTED_PAYLOAD_HEADER.dup
|
42
|
+
output << cipher.update(plaintext)
|
43
|
+
output << cipher.final
|
44
|
+
|
45
|
+
output
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.decrypt(ciphertext: '')
|
49
|
+
raise ::ArgumentError, 'Unable to decrypt ciphertext: ' << ciphertext, caller unless ciphertext.to_s
|
50
|
+
|
51
|
+
cipher = ::OpenSSL::Cipher.new(CURRENT_CIPHER[:name])
|
52
|
+
|
53
|
+
cipher.decrypt
|
54
|
+
cipher.iv = CURRENT_CIPHER[:iv][:value]
|
55
|
+
cipher.key = CURRENT_CIPHER[:key][:value]
|
56
|
+
|
57
|
+
# Remove encrypted header if present
|
58
|
+
ciphertext = ciphertext.sub(ENCRYPTED_PAYLOAD_HEADER, '')
|
59
|
+
|
60
|
+
output = cipher.update(ciphertext)
|
61
|
+
output << cipher.final
|
62
|
+
|
63
|
+
output
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
data/lib/metasploit-payloads.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'openssl' unless defined? OpenSSL::Digest
|
4
4
|
require 'metasploit-payloads/version' unless defined? MetasploitPayloads::VERSION
|
5
5
|
require 'metasploit-payloads/error' unless defined? MetasploitPayloads::Error
|
6
|
+
require 'metasploit-payloads/crypto' unless defined? MetasploitPayloads::Crypto
|
6
7
|
|
7
8
|
#
|
8
9
|
# This module dispenses Metasploit payload binary files
|
@@ -43,8 +44,9 @@ module MetasploitPayloads
|
|
43
44
|
manifest_contents.each_line do |line|
|
44
45
|
filename, hash_type, hash = line.chomp.split(':')
|
45
46
|
begin
|
47
|
+
filename = filename.sub('./data/', '')
|
46
48
|
# self.path prepends the gem data directory, which is already present in the manifest file.
|
47
|
-
out_path = self.path(filename
|
49
|
+
out_path = self.path(filename)
|
48
50
|
# self.path can return a path to the gem data, or user's local data.
|
49
51
|
bundled_file = out_path.start_with?(data_directory)
|
50
52
|
if bundled_file
|
@@ -137,15 +139,25 @@ module MetasploitPayloads
|
|
137
139
|
|
138
140
|
#
|
139
141
|
# Get the contents of any file packaged in this gem by local path and name.
|
142
|
+
# If the file is encrypted using ChaCha20, automatically decrypt it and return the file contents.
|
140
143
|
#
|
141
144
|
def self.read(*path_parts)
|
142
|
-
file_path = path(path_parts)
|
143
|
-
|
144
|
-
|
145
|
-
|
145
|
+
file_path = self.path(path_parts)
|
146
|
+
|
147
|
+
begin
|
148
|
+
file_contents = ::File.binread(file_path)
|
149
|
+
rescue ::Errno::ENOENT => _e
|
150
|
+
raise ::MetasploitPayloads::NotFoundError, file_path, caller
|
151
|
+
rescue ::Errno::EACCES => _e
|
152
|
+
raise ::MetasploitPayloads::NotReadableError, file_path, caller
|
153
|
+
rescue ::StandardError => e
|
154
|
+
raise e
|
146
155
|
end
|
147
156
|
|
148
|
-
|
157
|
+
encrypted_file = file_contents.start_with?(Crypto::ENCRYPTED_PAYLOAD_HEADER)
|
158
|
+
return file_contents unless encrypted_file
|
159
|
+
|
160
|
+
Crypto.decrypt(ciphertext: file_contents)
|
149
161
|
end
|
150
162
|
|
151
163
|
#
|
data/manifest
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
./data/android/apk/classes.dex:SHA3-256:0ca34b9e74428678ca808e3601eb30ec78256d76a38c8eecf26e5f419837b769
|
3
3
|
./data/android/apk/resources.arsc:SHA3-256:9a6f5eb5cb24fb1f83808a67c692e66c1a698d6222db2000b8b07e595689311f
|
4
4
|
./data/android/meterpreter.dex:SHA3-256:4596cdac6b36141c35d026f6c349416097f6968f8fb95a7a1421e0fbd1da9d65
|
5
|
-
./data/android/meterpreter.jar:SHA3-256:
|
6
|
-
./data/android/metstage.jar:SHA3-256:
|
7
|
-
./data/android/shell.jar:SHA3-256:
|
5
|
+
./data/android/meterpreter.jar:SHA3-256:48b774ea108004ef83dee3170919f7aa36a66806ed6acaaed46c18c2a25678a8
|
6
|
+
./data/android/metstage.jar:SHA3-256:98147a9f04130634d474cd1083b85e7163eb65de2fb0506e53c756302fffef96
|
7
|
+
./data/android/shell.jar:SHA3-256:d2470ac08d0d307402cfd6c7b86c7df6123d8ff1742161e96a6c9cd6f9731756
|
8
8
|
./data/java/com/metasploit/meterpreter/JarFileClassLoader.class:SHA3-256:70e39898965b1cdcf7efeab2fff76471950fb19d6e0d03589ff3a15705c35f2b
|
9
9
|
./data/java/javapayload/stage/Meterpreter.class:SHA3-256:7c2cada964463b28f0d9d900e4979d79a7d8931d00c514f46cf589cf7b77e2e7
|
10
10
|
./data/java/javapayload/stage/Shell.class:SHA3-256:78aeee685de937bd62a5364ca1a16a798f1c963968b829bcfcb675723d4f8650
|
@@ -18,79 +18,79 @@
|
|
18
18
|
./data/java/metasploit/PayloadTrustManager.class:SHA3-256:e2d25c8b3e43f584e198e46c2576b367f96275800a96a42fd2dc2c81059a3c41
|
19
19
|
./data/java/metasploit/RMILoader.class:SHA3-256:4add539548d76e0142ff5e6ccdba6ee4b21191354be1a40499cb2a745b480bee
|
20
20
|
./data/java/metasploit/RMIPayload.class:SHA3-256:0d3e96836a8c3591f4bc827b33c4edb0b4f505a9f17cb0bdb27a367fb71d53c3
|
21
|
-
./data/meterpreter/dump_sam.x64.debug.dll:SHA3-256:
|
22
|
-
./data/meterpreter/dump_sam.x64.dll:SHA3-256:
|
23
|
-
./data/meterpreter/dump_sam.x86.debug.dll:SHA3-256:
|
24
|
-
./data/meterpreter/dump_sam.x86.dll:SHA3-256:
|
25
|
-
./data/meterpreter/elevator.x64.debug.dll:SHA3-256:
|
26
|
-
./data/meterpreter/elevator.x64.dll:SHA3-256:
|
27
|
-
./data/meterpreter/elevator.x86.debug.dll:SHA3-256:
|
28
|
-
./data/meterpreter/elevator.x86.dll:SHA3-256:
|
29
|
-
./data/meterpreter/ext_server_bofloader.x64.debug.dll:SHA3-256:
|
30
|
-
./data/meterpreter/ext_server_bofloader.x64.dll:SHA3-256:
|
31
|
-
./data/meterpreter/ext_server_bofloader.x86.debug.dll:SHA3-256:
|
32
|
-
./data/meterpreter/ext_server_bofloader.x86.dll:SHA3-256:
|
33
|
-
./data/meterpreter/ext_server_espia.x64.debug.dll:SHA3-256:
|
34
|
-
./data/meterpreter/ext_server_espia.x64.dll:SHA3-256:
|
35
|
-
./data/meterpreter/ext_server_espia.x86.debug.dll:SHA3-256:
|
36
|
-
./data/meterpreter/ext_server_espia.x86.dll:SHA3-256:
|
37
|
-
./data/meterpreter/ext_server_extapi.x64.debug.dll:SHA3-256:
|
38
|
-
./data/meterpreter/ext_server_extapi.x64.dll:SHA3-256:
|
39
|
-
./data/meterpreter/ext_server_extapi.x86.debug.dll:SHA3-256:
|
40
|
-
./data/meterpreter/ext_server_extapi.x86.dll:SHA3-256:
|
41
|
-
./data/meterpreter/ext_server_incognito.x64.debug.dll:SHA3-256:
|
42
|
-
./data/meterpreter/ext_server_incognito.x64.dll:SHA3-256:
|
43
|
-
./data/meterpreter/ext_server_incognito.x86.debug.dll:SHA3-256:
|
44
|
-
./data/meterpreter/ext_server_incognito.x86.dll:SHA3-256:
|
45
|
-
./data/meterpreter/ext_server_kiwi.x64.debug.dll:SHA3-256:
|
46
|
-
./data/meterpreter/ext_server_kiwi.x64.dll:SHA3-256:
|
47
|
-
./data/meterpreter/ext_server_kiwi.x86.debug.dll:SHA3-256:
|
48
|
-
./data/meterpreter/ext_server_kiwi.x86.dll:SHA3-256:
|
49
|
-
./data/meterpreter/ext_server_lanattacks.x64.debug.dll:SHA3-256:
|
50
|
-
./data/meterpreter/ext_server_lanattacks.x64.dll:SHA3-256:
|
51
|
-
./data/meterpreter/ext_server_lanattacks.x86.debug.dll:SHA3-256:
|
52
|
-
./data/meterpreter/ext_server_lanattacks.x86.dll:SHA3-256:
|
53
|
-
./data/meterpreter/ext_server_peinjector.x64.debug.dll:SHA3-256:
|
54
|
-
./data/meterpreter/ext_server_peinjector.x64.dll:SHA3-256:
|
55
|
-
./data/meterpreter/ext_server_peinjector.x86.debug.dll:SHA3-256:
|
56
|
-
./data/meterpreter/ext_server_peinjector.x86.dll:SHA3-256:
|
57
|
-
./data/meterpreter/ext_server_powershell.x64.debug.dll:SHA3-256:
|
58
|
-
./data/meterpreter/ext_server_powershell.x64.dll:SHA3-256:
|
59
|
-
./data/meterpreter/ext_server_powershell.x86.debug.dll:SHA3-256:
|
60
|
-
./data/meterpreter/ext_server_powershell.x86.dll:SHA3-256:
|
61
|
-
./data/meterpreter/ext_server_priv.x64.debug.dll:SHA3-256:
|
62
|
-
./data/meterpreter/ext_server_priv.x64.dll:SHA3-256:
|
63
|
-
./data/meterpreter/ext_server_priv.x86.debug.dll:SHA3-256:
|
64
|
-
./data/meterpreter/ext_server_priv.x86.dll:SHA3-256:
|
65
|
-
./data/meterpreter/ext_server_python.x64.debug.dll:SHA3-256:
|
66
|
-
./data/meterpreter/ext_server_python.x64.dll:SHA3-256:
|
67
|
-
./data/meterpreter/ext_server_python.x86.debug.dll:SHA3-256:
|
68
|
-
./data/meterpreter/ext_server_python.x86.dll:SHA3-256:
|
69
|
-
./data/meterpreter/ext_server_sniffer.x64.dll:SHA3-256:
|
70
|
-
./data/meterpreter/ext_server_sniffer.x86.dll:SHA3-256:
|
71
|
-
./data/meterpreter/ext_server_stdapi.jar:SHA3-256:
|
72
|
-
./data/meterpreter/ext_server_stdapi.php:SHA3-256:
|
73
|
-
./data/meterpreter/ext_server_stdapi.py:SHA3-256:
|
74
|
-
./data/meterpreter/ext_server_stdapi.x64.debug.dll:SHA3-256:
|
75
|
-
./data/meterpreter/ext_server_stdapi.x64.dll:SHA3-256:
|
76
|
-
./data/meterpreter/ext_server_stdapi.x86.debug.dll:SHA3-256:
|
77
|
-
./data/meterpreter/ext_server_stdapi.x86.dll:SHA3-256:
|
78
|
-
./data/meterpreter/ext_server_unhook.x64.debug.dll:SHA3-256:
|
79
|
-
./data/meterpreter/ext_server_unhook.x64.dll:SHA3-256:
|
80
|
-
./data/meterpreter/ext_server_unhook.x86.debug.dll:SHA3-256:
|
81
|
-
./data/meterpreter/ext_server_unhook.x86.dll:SHA3-256:
|
82
|
-
./data/meterpreter/ext_server_winpmem.x64.debug.dll:SHA3-256:
|
83
|
-
./data/meterpreter/ext_server_winpmem.x64.dll:SHA3-256:
|
84
|
-
./data/meterpreter/ext_server_winpmem.x86.debug.dll:SHA3-256:
|
85
|
-
./data/meterpreter/ext_server_winpmem.x86.dll:SHA3-256:
|
86
|
-
./data/meterpreter/meterpreter.jar:SHA3-256:
|
87
|
-
./data/meterpreter/meterpreter.php:SHA3-256:
|
88
|
-
./data/meterpreter/meterpreter.py:SHA3-256:
|
89
|
-
./data/meterpreter/metsrv.x64.debug.dll:SHA3-256:
|
90
|
-
./data/meterpreter/metsrv.x64.dll:SHA3-256:
|
91
|
-
./data/meterpreter/metsrv.x86.debug.dll:SHA3-256:
|
92
|
-
./data/meterpreter/metsrv.x86.dll:SHA3-256:
|
93
|
-
./data/meterpreter/screenshot.x64.debug.dll:SHA3-256:
|
94
|
-
./data/meterpreter/screenshot.x64.dll:SHA3-256:
|
95
|
-
./data/meterpreter/screenshot.x86.debug.dll:SHA3-256:
|
96
|
-
./data/meterpreter/screenshot.x86.dll:SHA3-256:
|
21
|
+
./data/meterpreter/dump_sam.x64.debug.dll:SHA3-256:1b50289c287fe2c873351c32c53b51befcdef5d89d2269d5467a4d81bc7b8bf1
|
22
|
+
./data/meterpreter/dump_sam.x64.dll:SHA3-256:7673e1fdde2f8e9b6b959f6732910b57a2ef847f66a773ac1c2021192d57b9bd
|
23
|
+
./data/meterpreter/dump_sam.x86.debug.dll:SHA3-256:e7dc554fa30ab83302b2a874b14dad384ca1c2a90c1b29154f6a2b335933e8e4
|
24
|
+
./data/meterpreter/dump_sam.x86.dll:SHA3-256:397d84181bfd1adfe718110694f8c97ad392acf8e105761a48fbb92c7c01c370
|
25
|
+
./data/meterpreter/elevator.x64.debug.dll:SHA3-256:f14321c1000e03773c11fb45be0c133a0392b712865ea910710812a0854b2574
|
26
|
+
./data/meterpreter/elevator.x64.dll:SHA3-256:f8a0f9778087d351440f02cbed6dd5b1342ed2d5f0a3bb7448f7a28fd694a34b
|
27
|
+
./data/meterpreter/elevator.x86.debug.dll:SHA3-256:3f96ad4185694eacaeead1019dcba1f998b11fe63a9a8fcb6a2306b3c14bf1b6
|
28
|
+
./data/meterpreter/elevator.x86.dll:SHA3-256:1361a53c8fe294276863f57f9fc35ef5caa5a68b65d6cd5c5bcd4d800fed18a8
|
29
|
+
./data/meterpreter/ext_server_bofloader.x64.debug.dll:SHA3-256:edad1246bb093ff15e648e8a0f34cfa6962366f3ee3518c360c12062a3a3a120
|
30
|
+
./data/meterpreter/ext_server_bofloader.x64.dll:SHA3-256:50cbb8ff069e9472cdd3863be84726aab85993cebe14684d72ddae89dd0de0ea
|
31
|
+
./data/meterpreter/ext_server_bofloader.x86.debug.dll:SHA3-256:4911238652687df38bb9d7656f3c1ee907b033bb45f204f2e0c8945db18e082b
|
32
|
+
./data/meterpreter/ext_server_bofloader.x86.dll:SHA3-256:ab980948f16007c49c28a2d000ce887cc61b6c64b362b4171dcf662112f1f737
|
33
|
+
./data/meterpreter/ext_server_espia.x64.debug.dll:SHA3-256:6c316e5b6b7d995c7b352017224ffc98f270d2eb2033f7a2d93900e1d53f4c2a
|
34
|
+
./data/meterpreter/ext_server_espia.x64.dll:SHA3-256:de80aa1fa67d231c8a9e8b801f68f6a66c1ae02c3c8c7c0acdd5c9e03f13886a
|
35
|
+
./data/meterpreter/ext_server_espia.x86.debug.dll:SHA3-256:40b23ce3514bd1a0962b495d638628b473233ae2021d7cfffd03766939e68991
|
36
|
+
./data/meterpreter/ext_server_espia.x86.dll:SHA3-256:6fb00120c3f04fb1dd7b07fa2d92d01736cd1fe6f2d78cb4c3548e239b2135b4
|
37
|
+
./data/meterpreter/ext_server_extapi.x64.debug.dll:SHA3-256:ba7435a5b127ea5c060ef1ef32669d14b141db68c698dedd15824e46c3e7d6fa
|
38
|
+
./data/meterpreter/ext_server_extapi.x64.dll:SHA3-256:9796e479bf4391a1061f7f1760a08e6fa06d493590f33590c086d9222a30460c
|
39
|
+
./data/meterpreter/ext_server_extapi.x86.debug.dll:SHA3-256:3a196fe8b50a02a52f713b18ba748972a8d3fffd006bc8f3e4efb33096b1c450
|
40
|
+
./data/meterpreter/ext_server_extapi.x86.dll:SHA3-256:c670c0ca0570c1e42c33605ade7c7d25017cff6f86f6acdde3369d1ac64962be
|
41
|
+
./data/meterpreter/ext_server_incognito.x64.debug.dll:SHA3-256:4904401448a5a48d82f07f81d9518d7757bc1af92df40bbd36c19a4b9adfd540
|
42
|
+
./data/meterpreter/ext_server_incognito.x64.dll:SHA3-256:7e960f041d57525789c9b5c3703b20afeca9d7ebb7c07b43c89435d756f091f1
|
43
|
+
./data/meterpreter/ext_server_incognito.x86.debug.dll:SHA3-256:d39d047e5d2014af67440fb76a5592631e04fd67d7c49290f427ea10f11fe8e8
|
44
|
+
./data/meterpreter/ext_server_incognito.x86.dll:SHA3-256:8140e30a3ca5478956a0a87c99e10910d4ebec64ba5c194ced4ac35aa34d2bd8
|
45
|
+
./data/meterpreter/ext_server_kiwi.x64.debug.dll:SHA3-256:ce993f4cc04334e71ae52124b335e09ab0a6405ce56ef6ac2e259ea3c5b2b7f9
|
46
|
+
./data/meterpreter/ext_server_kiwi.x64.dll:SHA3-256:b1dc0ee9c7d24375d1f851360749b1d71b751e668ea0754242d9d331f50fb11c
|
47
|
+
./data/meterpreter/ext_server_kiwi.x86.debug.dll:SHA3-256:76ac90c1a31116a061e4cfd4e5d181b68f8adf6f02403437a9619f0ff59a0ae4
|
48
|
+
./data/meterpreter/ext_server_kiwi.x86.dll:SHA3-256:923ca0a4b808eedd9140e5d148d82f2e3c340288d7a9d1e204ccf3d8e92865ba
|
49
|
+
./data/meterpreter/ext_server_lanattacks.x64.debug.dll:SHA3-256:8a88d7c368e99178dc697cff695103ee01447778f891c142b2cba1b760428be8
|
50
|
+
./data/meterpreter/ext_server_lanattacks.x64.dll:SHA3-256:2ef84406c557954049ed2a3c98719ebd5ef1b89a083ebca633723da839310116
|
51
|
+
./data/meterpreter/ext_server_lanattacks.x86.debug.dll:SHA3-256:cf84a63a407a4c2e59d34c89d5eb43a5be26315b174264682bcea86c354be67b
|
52
|
+
./data/meterpreter/ext_server_lanattacks.x86.dll:SHA3-256:3325eb7bb36541b3d2e81c8831415817f422ed556530561aa9eb80606b6d4014
|
53
|
+
./data/meterpreter/ext_server_peinjector.x64.debug.dll:SHA3-256:7925a9e4a9bbf3d4114896692811f98c110b308b8657cb25cca1e4cebed90761
|
54
|
+
./data/meterpreter/ext_server_peinjector.x64.dll:SHA3-256:9992d49ea92d4884712476eeafdee6015c1f9e72dfbd4bf978e7dc90651227b8
|
55
|
+
./data/meterpreter/ext_server_peinjector.x86.debug.dll:SHA3-256:00b0a34ff67d37a127ec5ec1a730fe7d23491033e1ea80b6bab2e8b6c925ae44
|
56
|
+
./data/meterpreter/ext_server_peinjector.x86.dll:SHA3-256:7d08b920979a446dc2aa342cc81fd4fc3096bebeb146397a1a7e1ddd4d1e0d7f
|
57
|
+
./data/meterpreter/ext_server_powershell.x64.debug.dll:SHA3-256:0204749de3bcd3bfbfaa3a8581f9554f59c4e11633ed957200ea4bf9cb4f63ec
|
58
|
+
./data/meterpreter/ext_server_powershell.x64.dll:SHA3-256:97edced1c66c0e05e23d294fdffe988bd90e41af53ad52f12e16b89a831e66e5
|
59
|
+
./data/meterpreter/ext_server_powershell.x86.debug.dll:SHA3-256:7455d9c25ec3c0f0423e0613ad81a70fcd3e515170bd6dde3f625998d914f0df
|
60
|
+
./data/meterpreter/ext_server_powershell.x86.dll:SHA3-256:56f5aa376f595c5a2724b19aeb33c7f116dbfaa93f97be71569cf3805f5420c4
|
61
|
+
./data/meterpreter/ext_server_priv.x64.debug.dll:SHA3-256:2938399e2b3a439596aa369655c1c763ad71709fa949b811a556c0e064c89472
|
62
|
+
./data/meterpreter/ext_server_priv.x64.dll:SHA3-256:d8d085b711238e01b8812e61b796380ce9951aebd60a03995a6d53f241fae939
|
63
|
+
./data/meterpreter/ext_server_priv.x86.debug.dll:SHA3-256:e8cbd12640f991a293960e10c2815ae2c3e4e069220d4982ec69c8b522522f98
|
64
|
+
./data/meterpreter/ext_server_priv.x86.dll:SHA3-256:fed2a5973b56d37ffbca5c9ed5b39765c5198c27a4ca6b60e40c7ed446a773c0
|
65
|
+
./data/meterpreter/ext_server_python.x64.debug.dll:SHA3-256:d435396016805ad7576247d763da2666b1c8b4cab56c692eb9b08d245067ab7e
|
66
|
+
./data/meterpreter/ext_server_python.x64.dll:SHA3-256:ae7f96bc4424546ad33d145d42a211abab0f2703bf5e2130e924511cf2b27683
|
67
|
+
./data/meterpreter/ext_server_python.x86.debug.dll:SHA3-256:9ea21f78bdfd74c4b9c358706aea5f60a27681c87a8f213558d2d629eae45639
|
68
|
+
./data/meterpreter/ext_server_python.x86.dll:SHA3-256:1876a7c41d0e6e54890234d94f33ac8b0eec4c6d039a4e180829acef91b0bb24
|
69
|
+
./data/meterpreter/ext_server_sniffer.x64.dll:SHA3-256:d0c2310a1819c758735bb147c172a4d6eef208aecfe7da230d92134a1f6069fe
|
70
|
+
./data/meterpreter/ext_server_sniffer.x86.dll:SHA3-256:e01a547704ee10a864552d786eb9fcb3fa749bcc89a00a28d531c2a4ed4a23a2
|
71
|
+
./data/meterpreter/ext_server_stdapi.jar:SHA3-256:1b0f9989d196b5e01c9bdf8bf2b5f7a6905bd454c2d9cb19be16ab1f23690f89
|
72
|
+
./data/meterpreter/ext_server_stdapi.php:SHA3-256:405f79d15b270baa012f1d2875b6d26abdb987401ca0321ca027e8ab0d5ef28d
|
73
|
+
./data/meterpreter/ext_server_stdapi.py:SHA3-256:752606a378d2da68d1be8e8c01389f04505c1f2bcce38be43e0deab675794592
|
74
|
+
./data/meterpreter/ext_server_stdapi.x64.debug.dll:SHA3-256:522e3c08e047ba338cec960858fbb9f2d870cb340f07169e0a2ac52914f44e1a
|
75
|
+
./data/meterpreter/ext_server_stdapi.x64.dll:SHA3-256:cf4a1021e9a08f1551782e40bdbfe392808e90f5342c91c1351c4c22c6f9e7a6
|
76
|
+
./data/meterpreter/ext_server_stdapi.x86.debug.dll:SHA3-256:b34986f5faafdc1a6a396658b635aa58511bcfd88cfe2737bb827ee26458217b
|
77
|
+
./data/meterpreter/ext_server_stdapi.x86.dll:SHA3-256:44ff32cd9bf1a975e5bdde3f4e50919f0921ef1843bc8a03e97c02b7c86e8271
|
78
|
+
./data/meterpreter/ext_server_unhook.x64.debug.dll:SHA3-256:5f86d7c1c26f5020b0c28f93a617444b69b4438938e98b8a7f3af5e9db4dadd4
|
79
|
+
./data/meterpreter/ext_server_unhook.x64.dll:SHA3-256:f6f11b2fa8bab705bcd1dde11fab842cc9764e4033cf907328da7b10d823453c
|
80
|
+
./data/meterpreter/ext_server_unhook.x86.debug.dll:SHA3-256:de1477c3001b84405e2126e0562c3a6f849916f56e1c57293b1028633857fd66
|
81
|
+
./data/meterpreter/ext_server_unhook.x86.dll:SHA3-256:9f9461c65692e409c894f683df23881cf768eb03a2f7050334764734d498dbf2
|
82
|
+
./data/meterpreter/ext_server_winpmem.x64.debug.dll:SHA3-256:3550e85b4c360ab8b86f82b8b7ca881ec275604fbec8902d217b73f0f0162c7b
|
83
|
+
./data/meterpreter/ext_server_winpmem.x64.dll:SHA3-256:ba12dd560f52a395b35f1ced2f0c574c511f0594dffe011ff8ae9fc6ea19da96
|
84
|
+
./data/meterpreter/ext_server_winpmem.x86.debug.dll:SHA3-256:62c18cb8b4607dd429579189e28bd536988a0d36670eaa022a05553d3e153f1d
|
85
|
+
./data/meterpreter/ext_server_winpmem.x86.dll:SHA3-256:37dcb722ff83dd7e81a530d904650b09dccfe35bc06d8fc2dc541d4170e187fe
|
86
|
+
./data/meterpreter/meterpreter.jar:SHA3-256:f9103d8aaf5053ebe1a52c0fb1e9f3ba5fdcac70bfee1ba95b9681c910e95244
|
87
|
+
./data/meterpreter/meterpreter.php:SHA3-256:5de0fa5a38305c9fde9f2617df0a96f669cd7a9bb8b4bba6885a6413eb6779b6
|
88
|
+
./data/meterpreter/meterpreter.py:SHA3-256:eb979cb8e4743c33a44731218b9ef9bff02967f0384c828465aa8cfc41f66e15
|
89
|
+
./data/meterpreter/metsrv.x64.debug.dll:SHA3-256:3d20b525b167d14795c79b2eea3979ac786e72c082d264f9710e6f3538224bb9
|
90
|
+
./data/meterpreter/metsrv.x64.dll:SHA3-256:3077be156a95b6879090be6de3da19799bbe0faf6b677103ecfcaf434fb9ee9d
|
91
|
+
./data/meterpreter/metsrv.x86.debug.dll:SHA3-256:b8ba7de8092a878257ba4170c6dea8f6999799188c38ea5336450246e56ce122
|
92
|
+
./data/meterpreter/metsrv.x86.dll:SHA3-256:88cb2e4fcd315fd653771a134ab4998182bd6016f55257afe321d7776fb44e35
|
93
|
+
./data/meterpreter/screenshot.x64.debug.dll:SHA3-256:484e2e1731fdf3f26ea1549bd3dd67c407a47307126d4536e536f4dd54ac9d67
|
94
|
+
./data/meterpreter/screenshot.x64.dll:SHA3-256:8c32d12fc7f29e8dd739cde403a43194c019babe6cd032f2fa2610985d032b04
|
95
|
+
./data/meterpreter/screenshot.x86.debug.dll:SHA3-256:7800a03f8fde4f8d9622b9e966f9574a2ef69f95dac5c9695618c387e42b64fa
|
96
|
+
./data/meterpreter/screenshot.x86.dll:SHA3-256:f2add9214cfe5900a3143fd01f7e5e91b81e473cdc86cef90411bb9178942a44
|
data/manifest.uuid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
c5bde707a441e23e5a09d03d9afcd2af301c243166308be3c93e0511a7d49a66
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'metasploit-payloads'
|
3
|
+
|
4
|
+
RSpec.describe ::MetasploitPayloads::Crypto do
|
5
|
+
describe '#encrypt' do
|
6
|
+
let(:encrypted_header) { ::MetasploitPayloads::Crypto::ENCRYPTED_PAYLOAD_HEADER }
|
7
|
+
let(:plaintext) { "Hello World!".b }
|
8
|
+
let(:ciphertext) { encrypted_header + "\x89:^r\xC1\xC9\xD9\xA1\xDC\xEB\xBFm".b }
|
9
|
+
|
10
|
+
it 'can encrypt plaintext' do
|
11
|
+
expect(described_class.encrypt(plaintext: plaintext)).to eq ciphertext
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'can decrypt ciphertext' do
|
15
|
+
expect(described_class.decrypt(ciphertext: ciphertext)).to eq plaintext
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'is idempotent' do
|
19
|
+
expect(described_class.decrypt(ciphertext: described_class.encrypt(plaintext: plaintext))).to eq plaintext
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -246,4 +246,34 @@ RSpec.describe ::MetasploitPayloads do
|
|
246
246
|
end
|
247
247
|
end
|
248
248
|
end
|
249
|
+
|
250
|
+
describe '#read' do
|
251
|
+
let(:encrypted_header) { 'encrypted_payload_chacha20_v1' }
|
252
|
+
let(:raw_file) { { name: 'meterpreter.py', contents: 'sample_file_contents' } }
|
253
|
+
# ChaCha20 encrypted contents
|
254
|
+
let(:encrypted_contents) { "gg\xB7R\x96\xA00\x84\xC4\xBF5\x1D\xDBG6J\n\x86\x06\xF1" }
|
255
|
+
let(:encrypted_file) { { name: raw_file[:name], contents: encrypted_header + encrypted_contents } }
|
256
|
+
|
257
|
+
before :each do
|
258
|
+
allow(::MetasploitPayloads).to receive(:path).and_call_original
|
259
|
+
allow(::MetasploitPayloads).to receive(:path).with([encrypted_file[:name]]).and_return(encrypted_file[:name])
|
260
|
+
allow(::MetasploitPayloads).to receive(:path).with([raw_file[:name]]).and_return(raw_file[:name])
|
261
|
+
|
262
|
+
allow(::File).to receive(:binread).and_call_original
|
263
|
+
allow(::File).to receive(:binread).with(encrypted_file[:name]).and_return(encrypted_file[:contents])
|
264
|
+
allow(::File).to receive(:binread).with(raw_file[:name]).and_return(raw_file[:contents])
|
265
|
+
end
|
266
|
+
|
267
|
+
context 'an encrypted file' do
|
268
|
+
it 'returns plain-text file contents' do
|
269
|
+
expect(subject.read(encrypted_file[:name])).to eq(raw_file[:contents])
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
context 'a plain-text file' do
|
274
|
+
it 'returns plain-text file contents' do
|
275
|
+
expect(subject.read(raw_file[:name])).to eq(raw_file[:contents])
|
276
|
+
end
|
277
|
+
end
|
278
|
+
end
|
249
279
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metasploit-payloads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.157
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OJ Reeves
|
@@ -96,7 +96,7 @@ cert_chain:
|
|
96
96
|
EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
|
97
97
|
9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
|
98
98
|
-----END CERTIFICATE-----
|
99
|
-
date: 2023-10-
|
99
|
+
date: 2023-10-13 00:00:00.000000000 Z
|
100
100
|
dependencies:
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: rake
|
@@ -240,11 +240,13 @@ files:
|
|
240
240
|
- data/meterpreter/screenshot.x86.debug.dll
|
241
241
|
- data/meterpreter/screenshot.x86.dll
|
242
242
|
- lib/metasploit-payloads.rb
|
243
|
+
- lib/metasploit-payloads/crypto.rb
|
243
244
|
- lib/metasploit-payloads/error.rb
|
244
245
|
- lib/metasploit-payloads/version.rb
|
245
246
|
- manifest
|
246
247
|
- manifest.uuid
|
247
248
|
- metasploit-payloads.gemspec
|
249
|
+
- spec/metasploit_payloads/crypto_spec.rb
|
248
250
|
- spec/metasploit_payloads/metasploit_payloads_spec.rb
|
249
251
|
- spec/spec_helper.rb
|
250
252
|
homepage: http://www.metasploit.com
|
metadata.gz.sig
CHANGED
Binary file
|