Security News New FileFix attack runs JScript while bypassing Windows MoTW alerts

Parkinsond

Level 23
Thread author
Dec 6, 2023
1,257
The attack involves a phishing page to trick the victim into copying a malicious PowerShell command. Once they past it into File Explorer, Windows executes the PowerShell, making it a very subtle attack.

With the new FileFix attack, an attacker would use social engineering to trick the user into saving an HTML page (using Ctrl+S) and renaming it to .HTA, which auto-executes embedded JScript via mshta.exe.

HTML Applications (.HTA) are considered legacy technology. This Windows file type can be used to execute HTML and scripting content using the legitimate mshta.exe in the context of the current user.

The researcher found that when HTML files are saved as "Webpage, Complete" (with MIME type text/html), they do not receive the MoTW tag, allowing script execution without warnings for the user.

When the victim opens the .HTA file, the embedded malicious script runs immediately without any warning.
 

Victor M

Level 19
Verified
Top Poster
Well-known
Oct 3, 2022
904
Tip: Use SRP (software restriction policy) to ban mshta.exe. Nobody uses it anymore. Same goes for cscript.exe. MS keeps old (vulnerable and mis-usable) things around to let people 'prolong their IT investments'. ChatGPT says it first appeared in 1999. (Win 98)

Andy Ful said:
The Kanthak correction to restore SRP functionality on Windows 11 ver.
22H2, works only when Smart App Control is OFF. If it is in Evaluate or ON
mode, then the invalid registry values are automatically restored after
restarting Windows.
To restore SRP on all SAC modes, one should not delete registry values but
simply set the "RuleCount" value to 0:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Srp\Gp]
"RuleCount"=dword:00000000
 
Last edited:

Parkinsond

Level 23
Thread author
Dec 6, 2023
1,257
Tip: Use SRP (software restriction policy) to ban mshta.exe. Nobody uses it anymore. Same goes for cscript.exe. MS keeps old (vulnerable and mis-usable) things around to let people 'prolong their IT investments'. ChatGPT says it first appeared in 1999. (Win 98)

Andy Ful said:
The Kanthak correction to restore SRP functionality on Windows 11 ver.
22H2, works only when Smart App Control is OFF. If it is in Evaluate or ON
mode, then the invalid registry values are automatically restored after
restarting Windows.
To restore SRP on all SAC modes, one should not delete registry values but
simply set the "RuleCount" value to 0:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Srp\Gp]
"RuleCount"=dword:00000000
I downloaded a full web page and found it really has no motw; does using rub-by-smartscreen adds the motw and solve such situation?
 

Andy Ful

From Hard_Configurator Tools
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
9,116
I downloaded a full web page and found it really has no motw; does using rub-by-smartscreen adds the motw and solve such situation?
The HTA files (and many others) are blocked with an alert when run via "Run by SmartScreen":

1751456218822.png
 

Andy Ful

From Hard_Configurator Tools
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
9,116
Tip: Use SRP (software restriction policy) to ban mshta.exe. Nobody uses it anymore.

SRP is still used on Windows Server editions. It is not so popular on Windows 11 because, from version 24H2, SRP is turned off by default (can be activated).
SRP is deprecated on Windows 10+ because there are new solutions available in Windows Pro and Enterprise editions (AppLocker and WDAC). But SRP is fully functional on all Windows versions:

New and changed functionality​

There are no changes in functionality for Software Restriction Policies.

Removed or deprecated functionality​

There is no removed or deprecated functionality for Software Restriction Policies.

 

Victor M

Level 19
Verified
Top Poster
Well-known
Oct 3, 2022
904
@Andy Ful by saying GPO, do you mean gpedit ? Even Local Security Policy?

If we use Local Security Policy, can't we just remember to set that registry RuleCount"=dword:00000000 whenever we finish modifying SRP rules?
 
  • Like
Reactions: simmerskool

Andy Ful

From Hard_Configurator Tools
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
9,116
@Andy Ful by saying GPO, do you mean gpedit ? Even Local Security Policy?

GPO = Group Policy Object.
GPEedit and SecPol depend on GPO.

If we use Local Security Policy, can't we just remember to set that registry RuleCount"=dword:00000000 whenever we finish modifying SRP rules?

Yes. But, applying any Windows Policy (also non-SRP) via GPO turns off SRP. So using SRP and GPO is risky and requires caution. For most users, maintaining SRP via GPO is a challenge. Most SRP configurations available publicly have some serious flaws. The proper configurations require many rules and extended knowledge about Windows and SRP.
 
Last edited:

Victor M

Level 19
Verified
Top Poster
Well-known
Oct 3, 2022
904
If they play with security restrictions of any sort and don't have drive image backups then they should really think twice.
 
  • Like
Reactions: simmerskool

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top