cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nk0l3v
Level 7
Report Inappropriate Content
Message 1 of 6

Expert Rule does not honor exclusion.

Hi guys, 

 

I am not sure where or what I do wrong, but one particular rule from https://kc.mcafee.com/corporate/index?page=content&id=KB93828 just does not want to accept particular command line exclusion. 

I am talking about T1559.001 – COM - WMI using PowerShell/WMIC/MSHTA/VBScript

The rule has following lines: 

 

Rule {
Process {
Include OBJECT_NAME {
        -v "powershell.exe"
        -v "powershell_ise.exe"
        -v "mshta.exe"
        -v "wscript.exe"
        -v "cscript.exe"
    }
    Exclude PROCESS_CMD_LINE { -v "*McAfee\\MAR\\scripts\\*" }
}
Target {
    Match SECTION {
        Include OBJECT_NAME { -v "wmiutils.dll" }
    }
}
}

 

Source description of the event is following: 

C:\WINDOWS\system32\cscript /nologo "C:\WINDOWS\Temp"\script.vbs

 

I am adding following exclusion in place which seems to not work. 

Exclude PROCESS_CMD_LINE {

-v "*McAfee\\MAR\\scripts\\*"

-v "**\\WINDOWS\\Temp\"\\script.vbs"

}

I am literally escaping \" as explained in the internal trainings for Expert rules syntax, and still it is being detected. Any ideas?

 

Thanks in advance. 

5 Replies

Re: Expert Rule does not honor exclusion.

I've seen rules stick before.  Try renaming the rule and see if that helps. 

Dave

nk0l3v
Level 7
Report Inappropriate Content
Message 3 of 6

Re: Expert Rule does not honor exclusion.

Hi Dave, 

 

By rename, you mean to rename the rule name not anything from the content itself I guess?

Re: Expert Rule does not honor exclusion.

Correct. 

nk0l3v
Level 7
Report Inappropriate Content
Message 5 of 6

Re: Expert Rule does not honor exclusion.

Well, I have tried despite the fact rule name does not make a lot of sense in the light of wrong/correct rule syntax. I'd guess there is something else missing which again is not explained in the product guude or in any other trainings. 

 

@AdithyanT @Former Member 

Can someone suggest a solution ? 

AdithyanT
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 6 of 6

Re: Expert Rule does not honor exclusion.

Hi @nk0l3v,

Thank you for your post.

"**\\WINDOWS\\Temp\"\\script.vbs" -May I know what is the exact event you faced that had you exclude this? As you have mentioned earlier, it does look like the rule may need us to escape both the "(doublequotes) in place. There is no syntax error as such and hence the exclusions may not work because it is not actually matching the pattern we have given. While expert rules customizations are not supported by technical support, this one is a modified (added exclusions) rule from our KBAs. Hence I would recommend creating a support ticket if this does not help.

Was my reply helpful?
If you find this post useful, Please give it a Kudos! Also, Please don't forget to select "Accept as a solution" if this reply resolves your query!

Thanks and regards,
Adithyan T
You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community