diff --git a/data/meterpreter/elevator.dll b/data/meterpreter/elevator.dll index 628e28852e..51cbaa022a 100644 Binary files a/data/meterpreter/elevator.dll and b/data/meterpreter/elevator.dll differ diff --git a/data/meterpreter/elevator.x64.dll b/data/meterpreter/elevator.x64.dll index fac3a89540..97b9745da8 100644 Binary files a/data/meterpreter/elevator.x64.dll and b/data/meterpreter/elevator.x64.dll differ diff --git a/data/meterpreter/ext_server_espia.dll b/data/meterpreter/ext_server_espia.dll index 3e3afdde3f..6d749f4d44 100644 Binary files a/data/meterpreter/ext_server_espia.dll and b/data/meterpreter/ext_server_espia.dll differ diff --git a/data/meterpreter/ext_server_espia.x64.dll b/data/meterpreter/ext_server_espia.x64.dll index 2c759a2b2a..d5443c3614 100644 Binary files a/data/meterpreter/ext_server_espia.x64.dll and b/data/meterpreter/ext_server_espia.x64.dll differ diff --git a/data/meterpreter/ext_server_incognito.dll b/data/meterpreter/ext_server_incognito.dll index 186743a3fe..68f5dc57fb 100755 Binary files a/data/meterpreter/ext_server_incognito.dll and b/data/meterpreter/ext_server_incognito.dll differ diff --git a/data/meterpreter/ext_server_incognito.x64.dll b/data/meterpreter/ext_server_incognito.x64.dll index c79f0c4721..f63e7f5a00 100644 Binary files a/data/meterpreter/ext_server_incognito.x64.dll and b/data/meterpreter/ext_server_incognito.x64.dll differ diff --git a/data/meterpreter/ext_server_priv.dll b/data/meterpreter/ext_server_priv.dll index 8265c6b88e..b51729ee40 100755 Binary files a/data/meterpreter/ext_server_priv.dll and b/data/meterpreter/ext_server_priv.dll differ diff --git a/data/meterpreter/ext_server_priv.x64.dll b/data/meterpreter/ext_server_priv.x64.dll index 9678638e55..7399f432fa 100644 Binary files a/data/meterpreter/ext_server_priv.x64.dll and b/data/meterpreter/ext_server_priv.x64.dll differ diff --git a/data/meterpreter/ext_server_sniffer.dll b/data/meterpreter/ext_server_sniffer.dll index 907e59c333..b8db6dc43f 100644 Binary files a/data/meterpreter/ext_server_sniffer.dll and b/data/meterpreter/ext_server_sniffer.dll differ diff --git a/data/meterpreter/ext_server_sniffer.x64.dll b/data/meterpreter/ext_server_sniffer.x64.dll index 6b47ab2ad0..15f872a354 100755 Binary files a/data/meterpreter/ext_server_sniffer.x64.dll and b/data/meterpreter/ext_server_sniffer.x64.dll differ diff --git a/data/meterpreter/ext_server_stdapi.dll b/data/meterpreter/ext_server_stdapi.dll index 0bf034c9e9..1fbea99883 100755 Binary files a/data/meterpreter/ext_server_stdapi.dll and b/data/meterpreter/ext_server_stdapi.dll differ diff --git a/data/meterpreter/ext_server_stdapi.x64.dll b/data/meterpreter/ext_server_stdapi.x64.dll index 394e68e810..613f1f7e4f 100644 Binary files a/data/meterpreter/ext_server_stdapi.x64.dll and b/data/meterpreter/ext_server_stdapi.x64.dll differ diff --git a/data/meterpreter/metsrv.dll b/data/meterpreter/metsrv.dll index b34a28e3c3..9b92d76a26 100755 Binary files a/data/meterpreter/metsrv.dll and b/data/meterpreter/metsrv.dll differ diff --git a/data/meterpreter/metsrv.x64.dll b/data/meterpreter/metsrv.x64.dll index 8a0cd480f7..c9508ef7e9 100644 Binary files a/data/meterpreter/metsrv.x64.dll and b/data/meterpreter/metsrv.x64.dll differ diff --git a/data/meterpreter/screenshot.dll b/data/meterpreter/screenshot.dll index a2eb650971..446231f86f 100644 Binary files a/data/meterpreter/screenshot.dll and b/data/meterpreter/screenshot.dll differ diff --git a/data/meterpreter/screenshot.x64.dll b/data/meterpreter/screenshot.x64.dll index acfbee7ba3..1983b5f274 100644 Binary files a/data/meterpreter/screenshot.x64.dll and b/data/meterpreter/screenshot.x64.dll differ diff --git a/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb b/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb index 2e5871988c..476fd00e31 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb @@ -90,6 +90,47 @@ Separator = "\\" return response.get_tlv_value(TLV_TYPE_FILE_PATH) end + + # + # Calculates the MD5 (16-bytes raw) of a remote file + # + def File.md5(path) + request = Packet.create_request('stdapi_fs_md5') + + request.add_tlv(TLV_TYPE_FILE_PATH, path) + + response = client.send_request(request) + + return response.get_tlv_value(TLV_TYPE_FILE_NAME) + end + + # + # Calculates the SHA1 (20-bytes raw) of a remote file + # + def File.sha1(path) + request = Packet.create_request('stdapi_fs_sha1') + + request.add_tlv(TLV_TYPE_FILE_PATH, path) + + response = client.send_request(request) + + return response.get_tlv_value(TLV_TYPE_FILE_NAME) + end + + # + # Expands a file path, substituting all environment variables, such as + # %TEMP%. + # + def File.expand_path(path) + request = Packet.create_request('stdapi_fs_file_expand_path') + + request.add_tlv(TLV_TYPE_FILE_PATH, path) + + response = client.send_request(request) + + return response.get_tlv_value(TLV_TYPE_FILE_PATH) + end + # # Performs a stat on a file and returns a FileStat instance. #