Skip to content

Commit 91a4657

Browse files
committed
Bumped the metasploit-payloads version and cache sizes with PR#8043
2 parents d4ee254 + b2a7d18 commit 91a4657

File tree

9 files changed

+35
-16
lines changed

9 files changed

+35
-16
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ PATH
1414
metasploit-concern
1515
metasploit-credential
1616
metasploit-model
17-
metasploit-payloads (= 1.2.16)
17+
metasploit-payloads (= 1.2.17)
1818
metasploit_data_models
1919
metasploit_payloads-mettle (= 0.1.7)
2020
msgpack
@@ -190,7 +190,7 @@ GEM
190190
activemodel (~> 4.2.6)
191191
activesupport (~> 4.2.6)
192192
railties (~> 4.2.6)
193-
metasploit-payloads (1.2.16)
193+
metasploit-payloads (1.2.17)
194194
metasploit_data_models (2.0.14)
195195
activerecord (~> 4.2.6)
196196
activesupport (~> 4.2.6)

lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_kernel32.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,7 @@ def self.create_dll(dll_path = 'kernel32')
14351435
["PDWORD","phModule","out"],
14361436
])
14371437

1438-
dll.add_function( 'GetModuleHandleW', 'DWORD',[
1438+
dll.add_function( 'GetModuleHandleW', 'HANDLE',[
14391439
["PWCHAR","lpModuleName","in"],
14401440
])
14411441

@@ -1591,7 +1591,7 @@ def self.create_dll(dll_path = 'kernel32')
15911591
["PDWORD","pdwHandleCount","out"],
15921592
])
15931593

1594-
dll.add_function( 'GetProcessHeap', 'DWORD',[
1594+
dll.add_function( 'GetProcessHeap', 'HANDLE',[
15951595
])
15961596

15971597
dll.add_function( 'GetProcessHeaps', 'DWORD',[
@@ -2078,7 +2078,7 @@ def self.create_dll(dll_path = 'kernel32')
20782078
["DWORD","dwFlags","in"],
20792079
])
20802080

2081-
dll.add_function( 'HeapCreate', 'DWORD',[
2081+
dll.add_function( 'HeapCreate', 'HANDLE',[
20822082
["DWORD","flOptions","in"],
20832083
["DWORD","dwInitialSize","in"],
20842084
["DWORD","dwMaximumSize","in"],
@@ -2258,23 +2258,23 @@ def self.create_dll(dll_path = 'kernel32')
22582258
["PBLOB","lpCriticalSection","inout"],
22592259
])
22602260

2261-
dll.add_function( 'LoadLibraryA', 'DWORD',[
2261+
dll.add_function( 'LoadLibraryA', 'HANDLE',[
22622262
["PCHAR","lpLibFileName","in"],
22632263
])
22642264

2265-
dll.add_function( 'LoadLibraryExA', 'DWORD',[
2265+
dll.add_function( 'LoadLibraryExA', 'HANDLE',[
22662266
["PCHAR","lpLibFileName","in"],
22672267
["HANDLE","hFile","inout"],
22682268
["DWORD","dwFlags","in"],
22692269
])
22702270

2271-
dll.add_function( 'LoadLibraryExW', 'DWORD',[
2271+
dll.add_function( 'LoadLibraryExW', 'HANDLE',[
22722272
["PWCHAR","lpLibFileName","in"],
22732273
["HANDLE","hFile","inout"],
22742274
["DWORD","dwFlags","in"],
22752275
])
22762276

2277-
dll.add_function( 'LoadLibraryW', 'DWORD',[
2277+
dll.add_function( 'LoadLibraryW', 'HANDLE',[
22782278
["PWCHAR","lpLibFileName","in"],
22792279
])
22802280

lib/rex/post/meterpreter/extensions/stdapi/railgun/multicall.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def initialize( client, parent, win_consts )
4949
# needed by DLL helper
5050
@win_consts = win_consts
5151

52-
if @client.arch == ARCH_X64
52+
if @client.native_arch == ARCH_X64
5353
@native = 'Q<'
5454
else
5555
@native = 'V'

metasploit-framework.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Gem::Specification.new do |spec|
6565
# are needed when there's no database
6666
spec.add_runtime_dependency 'metasploit-model'
6767
# Needed for Meterpreter
68-
spec.add_runtime_dependency 'metasploit-payloads', '1.2.16'
68+
spec.add_runtime_dependency 'metasploit-payloads', '1.2.17'
6969
# Needed for the next-generation POSIX Meterpreter
7070
spec.add_runtime_dependency 'metasploit_payloads-mettle', '0.1.7'
7171
# Needed by msfgui and other rpc components

modules/payloads/singles/python/meterpreter_bind_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
module MetasploitModule
1414

15-
CachedSize = 53370
15+
CachedSize = 53382
1616

1717
include Msf::Payload::Single
1818
include Msf::Payload::Python

modules/payloads/singles/python/meterpreter_reverse_http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
module MetasploitModule
1414

15-
CachedSize = 53334
15+
CachedSize = 53346
1616

1717
include Msf::Payload::Single
1818
include Msf::Payload::Python

modules/payloads/singles/python/meterpreter_reverse_https.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
module MetasploitModule
1414

15-
CachedSize = 53334
15+
CachedSize = 53346
1616

1717
include Msf::Payload::Single
1818
include Msf::Payload::Python

modules/payloads/singles/python/meterpreter_reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
module MetasploitModule
1414

15-
CachedSize = 53286
15+
CachedSize = 53302
1616

1717
include Msf::Payload::Single
1818
include Msf::Payload::Python

test/modules/post/test/railgun.rb

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def initialize(info={})
2121

2222
def test_api_function_calls
2323

24-
it "Results should include error information" do
24+
it "Should include error information in the results" do
2525
ret = true
2626
result = session.railgun.kernel32.GetCurrentProcess()
2727
ret &&= result['GetLastError'] == 0
@@ -51,6 +51,25 @@ def test_api_function_calls
5151
ret &&= result['nSize'].to_i == result['ComputerName'].length
5252
end
5353

54+
it "Should support calling multiple functions at once" do
55+
ret = true
56+
multi_rail = [
57+
['kernel32', 'LoadLibraryA', ['kernel32.dll']],
58+
['kernel32', 'GetModuleHandleA', ['kernel32.dll']],
59+
['kernel32', 'GetCurrentProcessId', []]
60+
]
61+
results = session.railgun.multi(multi_rail)
62+
ret &&= results.length == multi_rail.length
63+
results.each do |result|
64+
ret &&= result['GetLastError'] == 0
65+
ret &&= result['return'] != 0
66+
end
67+
68+
# LoadLibraryA('kernel32.dll') == GetModuleHandleA('kernel32.dll')
69+
ret &&= results[0]['return'] == results[1]['return']
70+
ret &&= results[2]['return'] == session.sys.process.getpid
71+
end
72+
5473
it "Should support reading memory" do
5574
ret = true
5675
result = client.railgun.kernel32.GetModuleHandleA('kernel32')

0 commit comments

Comments
 (0)