当前位置: 首页 > wzjs >正文

做网站需要解析吗百度手机网页版入口

做网站需要解析吗,百度手机网页版入口,php和python,seo信息编辑招聘一、什么是进程注入? 进程注入是将代码或者dll插入另一个目标进程的地址空间中,并强制该进程执行注入的代码。与dll注入不同,直接代码注入相对隐蔽,不需要额外的DLL文件。该技术通常会有如下应用场景: 游戏外挂开发安…

一、什么是进程注入?

进程注入是将代码或者dll插入另一个目标进程的地址空间中,并强制该进程执行注入的代码。与dll注入不同,直接代码注入相对隐蔽,不需要额外的DLL文件。该技术通常会有如下应用场景:

  • 游戏外挂开发
  • 安全软件检测
  • 进程监控
  • 恶意软件分析

二、实现注入程序

注入程序实现思路如下:

  1. 通过窗口标题找到扫雷程序
  2. 获取目标进程ID
  3. 打开目标进程获取句柄
  4. 在目标进程中分配可执行内存
  5. 获取MessageBoxA函数地址
  6. 创建远程线程执行注入代码

实现代码如下;

.586
.model flat,stdcall
option casemap:noneinclude windows.inc
include user32.inc
include kernel32.incincludelib user32.lib
includelib kernel32.libInjectCode proto .datagameWindowCaption     db "扫雷",0injectionSuccessTitle db "注入成功",0 injectionMessage      db "扫雷进程被注入!",0  
.codeInjectedCodeStart:
invoke MessageBox, NULL, offset injectionMessage, offset injectionSuccessTitle, MB_OK; ---------------------------------------------------------------------------
InjectCode proc LOCAL @hwndMinesweeper   :HWNDLOCAL @dwTargetProcessId :DWORDLOCAL @hTargetProcess    :HANDLELOCAL @lpRemoteCode      :LPVOIDLOCAL @dwBytesWritten    :DWORDinvoke FindWindow, NULL, offset gameWindowCaptionmov    @hwndMinesweeper, eaxinvoke GetWindowThreadProcessId, @hwndMinesweeper, addr @dwTargetProcessIdinvoke OpenProcess, PROCESS_ALL_ACCESS, FALSE, @dwTargetProcessIdmov   @hTargetProcess, eaxinvoke VirtualAllocEx, @hTargetProcess, NULL, 1, MEM_COMMIT, PAGE_EXECUTE_READWRITE mov   @lpRemoteCode, eaxinvoke WriteProcessMemory, @hTargetProcess, @lpRemoteCode, offset InjectedCodeStart, offset InjectCode - offset InjectedCodeStart,addr @dwBytesWritteninvoke CreateRemoteThread, @hTargetProcess, NULL, 0, @lpRemoteCode, NULL, 0, NULLmov eax, 0 ret
InjectCode endpstart:invoke InjectCodeinvoke ExitProcess, eaxend start

经过编译执行上述代码后,我们发现扫雷进程会自动退出。通过使用OD进行调试,可以确认WriteProcessMemory操作执行成功。因此,现在使用OD附加到扫雷进程,并对扫雷进程中写入地址出设设置断点(也可以直接在注入的代码中增加int 3指令),写入到进程中的代码如下:
在这里插入图片描述
这里明显有问题,地址0x403005和0x40300E是注入进程中的地址。在数据窗口中搜索,发现不存在:
在这里插入图片描述
这引出一个核心问题:如何正确处理注入到目标进程的代码重定位。解决方案是通过计算注入进程与目标进程的地址差值,然后为注入代码中的字符串地址和函数地址加上这个差值即可实现重定位。与此同时,我们的注入程序中的funcMessageBox是在代码段,当前只有可读和执行权限,因此需要修改内存属性。重定位原理示意图如下所示:
在这里插入图片描述
修正后的代码如下:

.586
.model flat,stdcall
option casemap:noneinclude windows.inc
include user32.inc
include kernel32.incincludelib user32.lib
includelib kernel32.libInjectCode proto .datagameWindowCaption     	db "扫雷",0szUser32 				db "user32.dll", 0   szMessageBox 			db "MessageBoxA", 0.codeInjectedCodeStart:jmp MsgBoxinjectionSuccessTitle 	db "Injection successful",0 injectionMessage      	db "The winmine process was injected!",0 funcMessageBox   	dd 0
MsgBox:pushadcall Next
Next:pop 	ebxsub 	ebx ,offset Nextpush 	MB_OKmov 	eax, offset injectionSuccessTitleadd 	eax, ebxpush 	eaxmov 	eax, offset injectionMessageadd 	eax, ebxpush 	eaxpush 	NULLmov 	eax, offset funcMessageBox   add 	eax, ebx   call 	dword ptr [eax]popadret
InjectedCodeStart_End:dwCodeSize dd offset InjectedCodeStart_End - offset InjectedCodeStart; ---------------------------------------------------------------------------
InjectCode proc LOCAL @hwndMinesweeper   :HWNDLOCAL @dwTargetProcessId :DWORDLOCAL @hTargetProcess    :HANDLELOCAL @lpRemoteCode      :LPVOIDLOCAL @dwBytesWritten    :DWORDLOCAL @dwOldProc:DWORDLOCAL @hUser32:DWORDinvoke LoadLibrary, offset szUser32mov @hUser32, eax;修改内存属性invoke VirtualProtect, offset funcMessageBox, size funcMessageBox, PAGE_EXECUTE_READWRITE, addr @dwOldProcinvoke GetProcAddress, @hUser32, offset szMessageBoxmov funcMessageBox, eax;还原内存属性invoke VirtualProtect, offset funcMessageBox, size funcMessageBox, @dwOldProc, addr @dwOldProcinvoke FindWindow, NULL, offset gameWindowCaptionmov    @hwndMinesweeper, eaxinvoke GetWindowThreadProcessId, @hwndMinesweeper, addr @dwTargetProcessIdinvoke OpenProcess, PROCESS_ALL_ACCESS, FALSE, @dwTargetProcessIdmov   @hTargetProcess, eaxinvoke VirtualAllocEx, @hTargetProcess, NULL, 1, MEM_COMMIT, PAGE_EXECUTE_READWRITE mov   @lpRemoteCode, eaxinvoke WriteProcessMemory, @hTargetProcess, @lpRemoteCode, offset InjectedCodeStart, dwCodeSize,addr @dwBytesWritteninvoke CreateRemoteThread, @hTargetProcess, NULL, 0, @lpRemoteCode, NULL, 0, NULLmov eax, 0 ret
InjectCode endpstart:invoke InjectCodeinvoke ExitProcess, eaxend start

执行结果如下所示:
在这里插入图片描述

http://www.dtcms.com/wzjs/373214.html

相关文章:

  • 做网站联系我们模板免费seo教程免费
  • 遵义网站制作一般需要多少钱网络怎样做推广
  • 全国最大的网站建设公司seo新手教程
  • 衡阳seo网站推广青山seo排名公司
  • 小白如何做网站咨询公司
  • 入侵网站后台管理系统推广产品的方式有哪些
  • 威海网站建设哪一家线上推广的好处
  • go和java做网站优化公司哪家好
  • 百度免费网站怎样建设百度收录在线提交
  • wordpress默认小工具seo查询seo优化
  • 8图片这样的网站怎么做的网络运营是什么意思
  • 正规网站建设官网口碑营销案例2022
  • 优秀网站设计案例百度指数网
  • 做网站的哪个好爱战网关键词
  • 政府门户网站建设管理典型经验网络推广引流方式
  • 网站制作推荐营业推广经典案例
  • 邯郸网站建设服务2023年新闻热点事件摘抄
  • 运营好还是网站开发好网络营销方法有什么
  • 有没有做软件的网站网络广告怎么做
  • 网站首页缩略图 seo全能搜
  • 专业网站制作团队seo整站优化公司持续监控
  • iis如何做网站管理器百度关键词优化软件排名
  • 湖州做网站公司兰州seo快速优化报价
  • 做电影方面的网站怎么做友情链接网站大全
  • 永久免费个人网站搜索引擎优化方法与技巧
  • 家庭装修seo关键词排名优化怎样收费
  • 辽宁建设安装集团有限公司网站网络优化是干什么的
  • 做cover用什么网站中国职业培训在线平台
  • 大发快三网站自做企业网络推广技巧
  • wordpress搭建网站教程怎么免费建立网站