Skip to content

McAfee ENS: Illegal API Injection / Solution #744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
aendieh opened this issue Jul 20, 2021 · 0 comments
Open

McAfee ENS: Illegal API Injection / Solution #744

aendieh opened this issue Jul 20, 2021 · 0 comments

Comments

@aendieh
Copy link

aendieh commented Jul 20, 2021

Issue and Steps to Reproduce

Upgrade configuration and use powershell directly in order for ENS not to alert an illegal api injection.
This requires a config change for the powershell wrapper, not using cmd \c as a prefix.

Background:

The latest version of McAfee's ENS blocks the cmd \c wrapper for powershell as it is an illegal api injection.
The command shown does not give any hints in what is actually executed and will be blocked every now and then, which leads to a flapping service.

Threat Target Process Name: POWERSHELL.EXE
Target Parent Process Name: CMD.EXE
Target Name: POWERSHELL.EXE
Target File Path: C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\POWERSHELL.EXE
Threat Target User Name: NT AUTHORITY\SYSTEM
Module Name: Threat Prevention
Action Taken: Blocked
Source Description: powershell.exe -noprofile -command -

change 
cmd /c echo try { scripts\%SCRIPT% %ARGS%; exit($lastexitcode) } catch { Write-Host $_; exit(3) } | %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -noprofile -command -
to
powershell.exe -noprofile -command "try { scripts\%SCRIPT% %ARGS%; exit($lastexitcode) } catch { Write-Host $_; exit(3) }"

This requires Powershell Version 3.0 + on the server in order to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant