assembly - WinExec shellcode
问题描述
谁能帮我实现一个 winexec 来执行命令或使用 x86 asm 启动 cmd.exe ?
下面是我如何使用 msvcrt.system 生成 cmd.exe 的示例!我想对winexec做同样的事情。
00446001 68 65786500 PUSH 657865 // exe
00446006 8BDC MOV EBX,ESP
00446008 68 636D642E PUSH 2E646D63 // cmd.
0044600D 8BCC MOV ECX,ESP
00446010 53 PUSH EBX
00446011 51 PUSH ECX
00446012 E8 B0337E77 CALL msvcrt.system
00446017 90 NOP
解决方案
您可以尝试这两种变体中的一种(其中一种已被注释)
;mov eax,1
;push eax
;call there
;db "notepad.exe c:\windows\system32\drivers\etc\hosts",0
;there:
;call WinExec
push "sts"
push "oh\c"
push "te\s"
push "revi"
push "rd\2"
push "3met"
push "sys\"
push "swod"
push "niw\"
push ".\:c"
push " exe"
push ".dap"
push "eton"
mov eax,esp ; the last one pushed is the head of the string
push 1
push eax
call WinExec
add esp,52 ; restore stack state (13 pushes)
xor eax,eax
push eax
call ExitProcess
推荐阅读
- discord - 2 个数字未正确相加
- reactjs - 点击后如何以模态显示网页
- javascript - 如何阻止 SAPUI5 按钮提交表单
- ikimagekit - 如何将 IKDeviceBrowserView 与 IKScannerDeviceView 连接?
- c++ - 在 C++ 程序中使用哪个 Boost 二进制文件 *.a
- navigation - 如何构建具有 ROS2 和(室内)导航功能的无人机
- flutter - 为什么移动滑块会将体重和年龄更改为初始值
- babeljs - 为什么@babel/polyfill 会污染全局范围?
- flutter - Flutter AdmobAdEvent.failedToLoad , {errorCode: 2} 以前可以正常工作,但现在显示错误
- google-apps-script - 将行转置到按 Google 表格中的列分组的列