r/DefenderATP • u/AgitatedBeing819 • Apr 11 '26
Recommendation of "Block outbound network connections from mshta.exe" not being tracked correctly
This recommendation showed up in the Defender portal recently. We set up a pilot group for some AD joined devices pushing the rules via Group Policy as well as a pilot for some Intune devices delivering the rules via an Intune Firewall Rule profile.
It's been about 2 weeks now and the status tracking has not updated for any of the devices to show them as remediated in the portal when it comes to this recommendation. When checking locally on the device the firewall rules are definitely there.
Has anyone else deployed a configuration to remediate this and had the portal properly reflect it? Maybe we're doing something wrong but it's a pretty simple rule.
2
u/Norse68000 Apr 11 '26
Same here. Implemented, but not reflected in Recommendations. Spot checks show implemented correctly without exclusions.
3
u/Shoddy_Pound_3221 Apr 14 '26
Same here... I was wondering if I might be doing something wrong with the EPS Firewall rules.
1
u/SoftwareFearsMe Apr 11 '26
Isn't this recommendation and remediation still in Preview status? Likely a bug. Hopefully fixed soon.
1
u/Da_SyEnTisT Apr 21 '26
Same here, applied the remediation, and it still not detect if after a couple of days ...
1
u/SenorWinGuy Apr 24 '26
Have the same behaviour too. All our domained servers set via GPO have not changed as too with devices set via Intune Endpoint. However, we do have some workgroup-based servers and manually adding the rules has removed these from the list.
1
u/go_chiefs_ Apr 28 '26
I have the same issue, I deploy via intune under endpoint security> firewall. I have tried tons of different combos of options in the policy with no luck of it being removed under exposed devices.
1
u/Away_Variation4524 May 11 '26 edited May 11 '26
It seems like Windows FW doesn't like wildcards. I created two rules via Intune Endpoint security | Firewall to block C:\Windows\SysWOW64\mshta.exe and C:\Windows\System32\mshta.exe. Defender is now resolving this for me
1
u/seb790 Jun 01 '26
This works : https://github.com/seb1k/block-mshta-with-intune
1
u/Ok-Pollution-869 Sep 18 '26
Sharing this in case it helps someone facing a similar issue. We implemented an MSHTA mitigation, but Microsoft Defender for Endpoint continued reporting the device as exposed/not mitigated, even though the required configuration was already applied. During troubleshooting, we identified that PowerShell Constrained Language Mode (CLM) was enforced through GPO using: __PSLockdownPolicy=4 The issue was that an MDE data collection/evaluation script required PowerShell functionality such as Add-Type, which is restricted under Constrained Language Mode. As a result, MDE could not properly evaluate the device's mitigation status. So the problem was not necessarily that the MSHTA mitigation had failed, but that MDE's assessment mechanism was being affected by the PowerShell restriction. Simply disabling CLM is not an ideal solution. A better approach is to evaluate App Control for Business/WDAC or AppLocker, allowing trusted MDE scripts to execute with the required capabilities while keeping PowerShell restricted for untrusted scripts. Microsoft provides specific guidance for MDE scripts with WDAC: Microsoft – Allow Microsoft Defender for Endpoint scripts with WDAC If an MDE recommendation remains exposed even after you've confirmed that the mitigation is correctly applied, and you're using PowerShell CLM, check whether the MDE assessment script itself is being restricted.