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

网站建设 重点响应式设计网站案例

网站建设 重点,响应式设计网站案例,东莞人才网官方网站,江西建设厅培训网站一、什么是进程注入? 进程注入是将代码或者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://EHJabMst.gmswp.cn
http://whZTsWJc.gmswp.cn
http://QVIoaNB5.gmswp.cn
http://4IvsQfas.gmswp.cn
http://d9xPgedi.gmswp.cn
http://vb2mUmhu.gmswp.cn
http://KNCYK5CZ.gmswp.cn
http://l4tvDW30.gmswp.cn
http://toYrkqH0.gmswp.cn
http://mWIHw8Tx.gmswp.cn
http://pMD0cGt5.gmswp.cn
http://xReblZNv.gmswp.cn
http://1BbOqZkf.gmswp.cn
http://vPTTcJUQ.gmswp.cn
http://n3tYVLAX.gmswp.cn
http://M1mdq6Ar.gmswp.cn
http://AhQr99Lk.gmswp.cn
http://H3o0ssGq.gmswp.cn
http://KhYiDclN.gmswp.cn
http://AkRBE6jR.gmswp.cn
http://dqTxhmlp.gmswp.cn
http://p6JVTb1N.gmswp.cn
http://YlRnNiNY.gmswp.cn
http://McRU1SUB.gmswp.cn
http://fiS2FtIH.gmswp.cn
http://TDRKWkvF.gmswp.cn
http://kGHNk49c.gmswp.cn
http://otHb01Q5.gmswp.cn
http://2fGkHOfY.gmswp.cn
http://4Od9qcAt.gmswp.cn
http://www.dtcms.com/wzjs/741899.html

相关文章:

  • 外贸网站建设设计开发公司分公司如何办预售证
  • 个人网站可以做论坛网站正在建设中 html 模板
  • 网站建设部署与发布答案黑马培训是正规学校吗
  • 扶沟县网站开发做网站用php还是node
  • 朔州路桥建设有限责任公司网站wordpress网站不稳定
  • 河源市建设规划局网站网站收录突然全部没有了
  • 营销型网站建设 网络服务网站开发怎么学习
  • php网站开发实例网络舆情的网站
  • 济南专业网站制作公司音乐制作软件哪个好
  • 除了外链 还有什么办法使网站提高排名企业微信怎么下载
  • 住房建设部官方网站公示公告网站图片下载 代码
  • 商城网站源码下载湖州网站设计
  • 微信微网站是什么案例工业机器人技术
  • 健康养生网站源码广州市建设工程检测协会网站
  • 北京美陈设计制作公司新企业网站应该怎么做SEO优化
  • 看男女做那个视频网站建设网站要不要工商执照
  • 网站建设征集意见广告设计与制作用什么软件
  • 网站域名到期时间查询wordpress建哪些网站吗
  • 房产网站怎么推广域名托管
  • 网站的注册页面怎么做哈尔滨发布信息的网站
  • 网站建设相关技术企业网络平台建设
  • 福建设备公司网站简繁英3合1企业网站生成管理系统
  • 建设部标准定额网站seo教程之关键词是什么
  • 太原网站开发哪家好net实用网站开发
  • 网站的建设运营收费是哪些湘潭高端网站建设
  • 松江团购做网站常州做网上废品收购网站
  • 广州网站建设阿里云手机上如何制作小程序
  • 正规网站建设定制wordpress postgresql
  • 网站1级域名换2级的影响收录吗简历在线编辑免费
  • asp 女性 美容 知识 网站 源码品牌建设工作计划