CN102841795A - 一种远程线程注入技术方法 - Google Patents
一种远程线程注入技术方法 Download PDFInfo
- Publication number
- CN102841795A CN102841795A CN2011101722798A CN201110172279A CN102841795A CN 102841795 A CN102841795 A CN 102841795A CN 2011101722798 A CN2011101722798 A CN 2011101722798A CN 201110172279 A CN201110172279 A CN 201110172279A CN 102841795 A CN102841795 A CN 102841795A
- Authority
- CN
- China
- Prior art keywords
- dll
- thread
- remote
- remote thread
- function
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
一种远程线程注入技术方法:监控系统要求具有实时性和隐藏性,远程线程注入技术能实现在Windows系统下进程的隐藏。将监控程序编译成动态链接库文件,采用远程线程注入技术注入到系统进程运行,能有效地提高监控系统的安全性能。本方法分析了基于远程线程注入的监控系统的关键技术和实现方法,通过设置定时器的方法解决了系统实时性需求,通过给出的远程线程注入技术解决了隐藏性需求。最后分析采用两级监控和应对安全检测技术来提高监控系统的安全性。
Description
技术领域
本发明涉及一种远程线程注入技术方法。这种方法是主要用在远程线程注入的监控系统实现的关键技术和实现方法,分析了在DLL中定时监控功能的实现,提出采用两级监控的方法来提高监控系统的功能。
背景技术
监控系统必须要保证系统的正常运行,并最大程度地减少系统资源负担,同时要防止被用户结束,较为有效的方法就是把进程隐藏。进程隐藏的实现机制包括修改动态链接库、应用程序的接口挂钩、远程线程注入等方式。远程线程注入技术是指在指定远程进程中创建线程,通过注入到指定进程的内存地址空间。通过远程线程注入技术将所需的线程代码注入的目标进程中运行,不创建独立的进程,很难被发现,但常规的远程线程注入技术难以避过安全检测技术的检测。远程线程注入被广泛的运用到电脑病毒传播中,然而也由于其不易被使用者删除的特点可以协助管理人员安装监控、计费等系统管理程序而不被使用者破坏,达到安全管理的目的。
发明内容
针对以上的不足,本发明的目的是提出一种远程线程注入技术方法,实现在Windows系统下进程的隐藏,将监控程序编译成动态链接库文件,采用远程线程注入技术注入到系统进程运行,能有效地提高监控系统的安全性能。
每一DLL必须有一个人口点,DllMain函数是DLL模块的默认入口点。DllMain负责初始化和结束工作。DLLMain函数在将DLL模块加载到进程时、DLL模块与进程分离时被调用。Delphi语言中,DLL入口由DLLProc传入。
在DLL文件中编写一个线程执行体函数ThreadProc实现监控的功能,比如监控某个程序是否在运行,如果没有则重新启动这个程序。定时功能可调用API函数SetTimer实现,比用组件精度高。在DLL注入到目标进程后,将监控程序创建一个线程,启动过程如图2所示。创建和结束线程分别用到CreateThread函数和TerminateThread函数。
CreateThread的函数定义:
其中lpStartAddress,lpParameter,lpThreadId三个参数是必须的。
lpStartAddress参数指向的是线程执行体ThreadProc的开始地址;lpParameter指针类型,线程的传入参数,给线程执行体ThreadProc传递数据;lpThreadId返回创建线程ID,这是控制线程必须的。
实现监控功能的DLL文件的主要代码如下:
具体实施方式
远程线程注入技术的主要步骤如下:
(1)调整权限,使程序可以访问其他进程的内存空间(EnableDebugPriv)。
(2)得到远程进程的HANDLE(OpenProcess)。
(3)在远程进程中为要注入的数据分配内存(VirtualAllocEx)。
(4)将注入DLL复制到本进程,实现函数DLL装载过程(MapInjectFile)。
(5)把DLL资源复制到分配的内存中(WriteProcessMemory)。
(6)用CreateRemoteThread启动远程的线程。
Claims (2)
2.根据权利要求1的远程线程注入技术方法,其特征是每一线程DLL必须有一个人口点,DllMain函数是DLL模块的默认入口点。DllMain负责初始化和结束工作。DLLMain函数在将DLL模块加载到进程时、DLL模块与进程分离时被调用。Delphi语言中,DLL入口由DLLProc传入。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011101722798A CN102841795A (zh) | 2011-06-24 | 2011-06-24 | 一种远程线程注入技术方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011101722798A CN102841795A (zh) | 2011-06-24 | 2011-06-24 | 一种远程线程注入技术方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102841795A true CN102841795A (zh) | 2012-12-26 |
Family
ID=47369199
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011101722798A Pending CN102841795A (zh) | 2011-06-24 | 2011-06-24 | 一种远程线程注入技术方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102841795A (zh) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104123492A (zh) * | 2014-07-21 | 2014-10-29 | 蓝盾信息安全技术有限公司 | 一种Windows的进程保护方法 |
CN104484789A (zh) * | 2014-12-26 | 2015-04-01 | 河南信安通信技术有限公司 | 实时寄递信息快速采集方法 |
CN106293967A (zh) * | 2016-08-03 | 2017-01-04 | 武汉斗鱼网络科技有限公司 | 一种远程注入代码的方法及系统 |
CN106339300A (zh) * | 2016-08-12 | 2017-01-18 | 武汉斗鱼网络科技有限公司 | 一种第三方游戏的fps获取方法及获取系统 |
CN106371899A (zh) * | 2015-07-22 | 2017-02-01 | 无锡天脉聚源传媒科技有限公司 | 一种线程参数的处理方法及装置 |
CN107229862A (zh) * | 2017-06-06 | 2017-10-03 | 电子科技大学 | 基于模拟栈和线程注入的一种rop攻击栈溢出防护方法 |
CN111026452A (zh) * | 2019-11-20 | 2020-04-17 | 北京明朝万达科技股份有限公司 | 一种远程32位进程注入64位进程的方法及系统 |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090204980A1 (en) * | 2008-02-11 | 2009-08-13 | Blue Coat Systems, Inc. | Method for implementing ejection-safe API interception |
CN101984409A (zh) * | 2010-11-10 | 2011-03-09 | 南京南瑞继保电气有限公司 | 一种用于Linux系统测试代码注入的方法 |
-
2011
- 2011-06-24 CN CN2011101722798A patent/CN102841795A/zh active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090204980A1 (en) * | 2008-02-11 | 2009-08-13 | Blue Coat Systems, Inc. | Method for implementing ejection-safe API interception |
CN101984409A (zh) * | 2010-11-10 | 2011-03-09 | 南京南瑞继保电气有限公司 | 一种用于Linux系统测试代码注入的方法 |
Non-Patent Citations (2)
Title |
---|
DEPARTURE: "DLL_PROCESS_ATTACH with parameters", 《HTTP://WWW.IC0DE.ORG/ARCHIVE/INDEX.PHP/T-10198.HTML》 * |
QSQU: "DLL Injection in Delphi", 《HTTP://TPFORUMS.ORG/FORUM/THREADS/1599-DLL-INJECTION-IN-DELPHI》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104123492A (zh) * | 2014-07-21 | 2014-10-29 | 蓝盾信息安全技术有限公司 | 一种Windows的进程保护方法 |
CN104484789A (zh) * | 2014-12-26 | 2015-04-01 | 河南信安通信技术有限公司 | 实时寄递信息快速采集方法 |
CN106371899A (zh) * | 2015-07-22 | 2017-02-01 | 无锡天脉聚源传媒科技有限公司 | 一种线程参数的处理方法及装置 |
CN106293967A (zh) * | 2016-08-03 | 2017-01-04 | 武汉斗鱼网络科技有限公司 | 一种远程注入代码的方法及系统 |
CN106339300A (zh) * | 2016-08-12 | 2017-01-18 | 武汉斗鱼网络科技有限公司 | 一种第三方游戏的fps获取方法及获取系统 |
CN107229862A (zh) * | 2017-06-06 | 2017-10-03 | 电子科技大学 | 基于模拟栈和线程注入的一种rop攻击栈溢出防护方法 |
CN111026452A (zh) * | 2019-11-20 | 2020-04-17 | 北京明朝万达科技股份有限公司 | 一种远程32位进程注入64位进程的方法及系统 |
CN111026452B (zh) * | 2019-11-20 | 2023-10-20 | 北京明朝万达科技股份有限公司 | 一种远程32位进程注入64位进程的方法及系统 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102841795A (zh) | 一种远程线程注入技术方法 | |
Mantel et al. | Assumptions and guarantees for compositional noninterference | |
CN102436566B (zh) | 一种动态可信度量方法及安全嵌入式系统 | |
CN103106085A (zh) | 一种基于智能化远程线程注入技术方法 | |
DE202015009286U1 (de) | Kurzlebige Anwendungen | |
EP3142062A3 (en) | System and method for transactions security enhancement | |
CN102880817A (zh) | 计算机软件产品运行保护方法 | |
CN110474870B (zh) | 基于区块链的网络主动防御方法、系统及计算机可读存储介质 | |
Zanarini et al. | Precise enforcement of confidentiality for reactive systems | |
RU2015145292A (ru) | Управление доступом во время выполнения к интерфейсам прикладного программирования | |
CN104598841B (zh) | 一种面向终端安全的双系统引导方法和装置 | |
CN103870749A (zh) | 一种实现虚拟机系统的安全监控系统及方法 | |
WO2009069321A1 (ja) | セキュリティ管理プログラム、セキュリティ管理方法および携帯端末装置 | |
CN106528065B (zh) | 一种线程获取方法及设备 | |
US20120131654A1 (en) | Propagating security identity information to components of a composite application | |
CN106295326A (zh) | 一种用于获取显卡内容的内联hook方法和系统 | |
Russo et al. | Securing timeout instructions in web applications | |
Lanotte et al. | Runtime enforcement for control system security | |
CN108021807B (zh) | Linux容器的细粒度沙盒策略执行方法 | |
CN107368498A (zh) | 优化MySQL悲观锁的锁等待超时时间的方法及装置 | |
CN105335212A (zh) | 一种基于分布式实施的云计算强制访问控制方法 | |
CN113542256A (zh) | 客户端中登录凭证的更新方法、装置、设备及存储介质 | |
Ha et al. | Improving performance of cape using discontinuous incremental checkpointing | |
Shao et al. | Page: A partition aware graph computation engine | |
Yang et al. | Micro-kernel OS architecture and its ecosystem construction for ubiquitous electric power IoT |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C05 | Deemed withdrawal (patent law before 1993) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20121226 |