Skip to content

Commit e7c23e4

Browse files
committed
fix(payloads): removing hardcoded block-api hashes
1 parent 3fe1ffb commit e7c23e4

File tree

2 files changed

+185
-269
lines changed

2 files changed

+185
-269
lines changed

lib/msf/core/payload/windows.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ module Msf::Payload::Windows
2121

2222
#
2323
# ROR hash associations for some of the exit technique routines.
24-
#
24+
2525
@@exit_types =
2626
{
2727
nil => 0, # Default to nothing
2828
'' => 0, # Default to nothing
29-
'seh' => 0xEA320EFE, # SetUnhandledExceptionFilter
30-
'thread' => 0x0A2A1DE0, # ExitThread
31-
'process' => 0x56A2B5F0, # ExitProcess
32-
'none' => 0x5DE2C5AA # GetLastError
29+
'seh' => Rex::Text.block_api_hash("kernel32.dll", "SetUnhandledExceptionFilter").to_i(16), # SetUnhandledExceptionFilter
30+
'thread' => Rex::Text.block_api_hash("kernel32.dll", "ExitThread").to_i(16), # ExitThread
31+
'process' => Rex::Text.block_api_hash("kernel32.dll", "ExitProcess").to_i(16), # ExitProcess
32+
'none' => Rex::Text.block_api_hash("kernel32.dll", "GetLastError").to_i(16) # GetLastError
3333
}
3434

3535
#

0 commit comments

Comments
 (0)