Skip to content

Commit d43e11f

Browse files
committed
WinHTTP rework with proxy support, and SSL verification
This commit fixes up the winhttps stuff properly too. PHEW!
1 parent fd25349 commit d43e11f

File tree

3 files changed

+162
-192
lines changed

3 files changed

+162
-192
lines changed

lib/msf/core/payload/windows/x64/exitfunk.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ module Payload::Windows::Exitfunk_x64
1515

1616
def asm_exitfunk(opts={})
1717

18-
asm = "exitfunk:\n"
18+
asm = %Q^
19+
exitfunk:
20+
pop rax ; won't be returning, realign the stack with a pop
21+
^
1922

2023
case opts[:exitfunk]
2124

lib/msf/core/payload/windows/x64/reverse_http.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,9 @@ def asm_reverse_http(opts={})
376376
else
377377
asm << %Q^
378378
failure:
379-
push rbx ; stack alignment
380-
push 0x56A2B5F0 ; hardcoded to exitprocess for size
381-
call rbp
379+
; hard-coded to ExitProcess(whatever) for size
380+
mov r10, #{Rex::Text.block_api_hash('kernel32.dll', 'ExitProcess')}
381+
call rbp ; ExitProcess(whatever)
382382
^
383383
end
384384

0 commit comments

Comments
 (0)