
Windows users, brace yourselves! A phantom menace called Remcos RAT is lurking in the digital shadows. This isn’t your garden-variety malware; it’s a master of disguise, slipping past defenses with uncanny ease. Forget downloads Remcos infiltrates with a single, unsuspecting click on a poisoned ZIP file. It unleashes its fury via PowerShell, transforming harmless HTML applications into instruments of your digital demise. Imagine your screen mirroring the attacker’s, every keystroke recorded, your entire system puppeted from afar. Remcos doesn’t just knock; it seizes control, turning your PC into a spy within your own home. Stay vigilant.
Here’s how to protect your PowerShell from Remcos RAT and any other fileless attacks.
How Remcos RAT Hijacks PowerShell to Take Over Your System
Qualys security researchers recently exposed the shockingly simple attack vector of the Remcos RAT. Imagine this: a seemingly harmless ZIP file lands in your inbox. Inside? A wolf in sheep’s clothing an LNK file, masquerading as a legitimate document. As of May 2025, taxthemed phishing emails are the weapon of choice, luring unsuspecting victims. But be warned: future attacks could leverageanytopic or trick enticing enough to make you click. Don’t fall for it.
Opening the LNK file unleashes a silent weapon: mshta.exe, Windows’ own HTML Application Host, now a Trojan horse. From there, a fleeting PowerShell script, like a whisper named “24.ps1,” ignites a shellcode loader. This spark births Remcos RAT, fully armed and operational, hijacking your system in real-time. Ghostlike, the attack leaves no trace on your hard drive, existing purely in the volatile realm of memory.
But here’s the chilling twist: Microsoft Defender is blindfolded while attackers forge remote TLS connections, whispering secrets to a command server lurking at “ReadyRestaurants DOT com.” Chrome throws a warning flag, branding it “not secure,” but remember, the threat landscape is a chameleon. Today’s red flag could be tomorrow’s undetected menace.

Cybercriminals have discovered a potent weapon hidden in plain sight: Windows PowerShell. Its ability to execute commands directly within the operating system makes it a prime tool for launching stealthy, hardtodetect attacks. The Neptune RAT malware, discovered just last month, serves as a chilling example – requiring only a downloaded file to unleash its destructive payload via PowerShell. Are you prepared for this silent threat lurking within your system?
Prevent Remcos RAT from Executing in PowerShell
First, launch PowerShell in administrator mode. After this, check whether it is in unrestricted or restricted mode.
“`
Get-ExecutionPolicy
“`
“Defaulted to ‘Restricted’ already? Excellent, skip ahead! If you’ve been living on the wild side with unrestricted access, it’s time for a quick detour. Reinstate that ‘Restricted’ setting now. When prompted, clickAto confirm your return to the safe zone.”
“`
Set-ExecutionPolicy
Restricted “`

Once the change is live, lock down PowerShell like Fort Knox! Follow Qualys’ guidance and switch to Constrained Language Mode. This cuts off Remcos RAT and its ilk at the knees, denying them access to the juicy .NET methods and COM objects they crave. Think of it as digital pest control, specifically targeting the tools of the malware trade.
“`
$ExecutionContext
.SessionState.LanguageMode
=
“ConstrainedLanguage”
“`
Lock it down for everyone: Admin or not, every user needs this setting enabled. Even if you’re flying solo.
“`
Set-ExecutionPolicy
-Scope
LocalMachine
-ExecutionPolicy
Restricted
-Force
“`

To slam the door on stealthy malware like Remcos RAT, Qualys advises blocking suspicious PowerShell command-line arguments. Stop hidden, pre-attack scripts dead in their tracks before they can launch from a seemingly innocent PowerShell window.
Remcos RAT uses PowerShell shellcode, and that leaves tracks. Hunt for its commands! No “ScriptBlockLogging” key for “PowerShell” in your registry? Create it. The RAT hides in plain sight, but not from a vigilant defender.
“`
New-Item
-Path
“HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell”
-Force
New-Item
-Path
“HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging”
-Force
Set-ItemProperty
-Path
“HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging”
-Name
“EnableScriptBlockLogging”
-Value
1
“`

Lock down your PowerShell like Fort Knox! Flip the “ScriptBlockLogging” switch to1. This simple move slams the door on Remcos RAT and other nasty malware trying to sneak shellcode loaders into your system via PowerShell. Consider it digital pest control, PowerShell style.
“`
Set-ItemProperty
-Path
“HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging”
-Name
“EnableScriptBlockLogging”
-Value
1
“`

There is another related command to block suspicious command-line arguments using hidden scripts.
“`
New-Item
-Path
“HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell”
-Name
“CommandLineFiltering”
-Force
Set-ItemProperty
-Path
“HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\CommandLineFiltering”
-Name
“EnableCommandLineFiltering”
-Value
1
“`

Locking down PowerShell for regular users? Tempting, but we’re not going there. Why? Because your everyday Windows account is already a superhero in disguise. Think of it as a personal bodyguard against sneaky cyberattacks like NTLM credential theft. A non-admin account is your first line of defense, keeping your sensitive information safe from prying digital eyes.
Disable MSHTA.exe to Prevent Remcos RAT from Executing
Remcos RAT uses a common system application on your Windows PC called “mshta.exe”. It is located in “C:\Windows\System32.”
Is your system vulnerable to a ghost from the past? The culprit: mshta.exe. Largely a relic of the Internet Explorer and Office macro era, this ancient component is finally being laid to rest. Starting with Windows 11 version 24H2, mshta.exe is officially deprecated. Disabling it now poses virtually no risk and could significantly enhance your system’s security. Time to bury this digital dinosaur!

Mshta.exe: the silent puppeteer of your system. This unassuming Microsoft application launches HTML Application (HTA) files, effectively granting VBScript or JavaScript the keys to your digital kingdom – full system privileges, all without the confines of a web browser.

No security policies in sight? Forge your own! Rightclick to summon theNew Software Restriction Policies. With the foundation laid, venture intoAdditional Rules. Rightclick again and unleash the power ofNew Path Rule.

Rename this path toC:\Windows\System32\mshta.exe
. Set security level toDisallowedand clickApply->OK.
Bypass Group Policy limitations on Windows 11/10 Home! Dive into Windows Security. Navigate to “App & Browser Control,” then “Exploit Protection.” Unearth “Exploit Protection Settings” and finally, “Program Settings.” Ready to customize? Click “Add program to customize” and take control.

Instead of a wild goose chase, pinpoint the “mshta.exe” file with laser precision. First, click “Choose exact file path” your file explorer awaits. Then, like a seasoned navigator, chart your course directly to the elusive “mshta.exe.” Selecting it will conjure a new window, revealing the file you seek.
Disable any mshta.exe policies currently overriding your system’s security. If you’ve already taken this step, consider your system prepped and ready to roll!

Related : solve the problem if Windows Security is not working on your device.
Other Methods to Prevent Remote Exploits in PowerShell
Here are some other things you can do to prevent Remcos RAT and other remote exploits from executing in PowerShell.
-
Invest in Windows endpoint protection software, such as Microsoft Defender, which is a different product than Windows Security. Lock down your digital fortress! Stay one step ahead of cyber threats by keeping your systems updated with the latest security patches. Upgrade to Windows 11 version 24H2 and fortify your defenses with timely protection against emerging dangers.
-
Implement email filtering and phishing protection on your web browser emails used on Windows devices.
Thanks for reading Remcos RAT Malware: Secure Your PowerShell Against Fileless Attacks