cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Miro
Level 8
Report Inappropriate Content
Message 1 of 5

How to exclude all McAfee executables in the Expert Rule

Jump to solution
Hello, I want to exclude all McAfee executables in the Expert Rule. I try it by using Exclude OBJECT_NAME { -l "*" -sdn "CN=\"McAfee, Inc.\", OU=Engineering, O=\"McAfee, Inc.\", L=Santa Clara, ST=California, C=US" } but it does not work. The whole rule looks like: Rule { Process { Include OBJECT_NAME { -v "**" } Exclude OBJECT_NAME { -v "teams.exe" | "mfeesp.exe" | "SYSTEM" -v "[iEnv windir]\\System32\\WBEM\\WMIPRVSE.EXE" -v "[iEnv windir]\\System32\\CSRSS.EXE" -v "[iEnv windir]\\System32\\WERFAULT.EXE" -v "[iEnv windir]\\System32\\SERVICES.EXE" -v "[iEnv windir]\\explorer.exe" -v "[iEnv windir]\\System32\\SearchProtocolHost.exe" } Exclude OBJECT_NAME { -l "*" -sdn "CN=\"McAfee, Inc.\", OU=Engineering, O=\"McAfee, Inc.\", L=Santa Clara, ST=California, C=US" } } Target { Match FILE { Include OBJECT_NAME { -v "[iEnv SystemDrive]\\Users\\**\*.*" } Include OBJECT_SIZE { -v 0 } Include -access "CLOSE" Exclude OBJECT_NAME { -v "[iEnv SystemDrive]\\Users\\*\\AppData" -v "[iEnv SystemDrive]\\Users\\*\\AppData\\**" -v "[iEnv SystemDrive]\\Users\\*\\**\\*.tmp" } } } } Thank you for help. Miro
2 Solutions

Accepted Solutions

Re: How to exclude all McAfee executables in the Expert Rule

Jump to solution


Exclude VTP_PRIVILEGES -type BITMASK { -v 0x8 }

View solution in original post

Re: How to exclude all McAfee executables in the Expert Rule

Jump to solution

This should give you what you want, doing both ways.  I commented out the McAfee cert since you won't need it, but there you can add other certs.  Hopefully you see what I mean about the cert order.

I didn't realize there was a code paste option.  Much cleaner.  🙂

Rule {
	Process {
		Include OBJECT_NAME { -v "**" }        
		Exclude AggregateMatch {
			Include VTP_PRIVILEGES -type BITMASK { -v 0x8 }
			}
		#Exclude AggregateMatch {
			#Include CERT_NAME {
			#	-v "C=US, ST=California, L=Santa Clara, O=\"McAfee, Inc.\", OU=Engineering, CN=\"McAfee, Inc.\""
			#}
		#}
		Exclude AggregateMatch { 
			Include OBJECT_NAME { 
				-v "teams.exe"
				-v "mfeesp.exe"  
				-v "SYSTEM"		
				-v "[iEnv windir]\\System32\\WBEM\\WMIPRVSE.EXE"
				-v "[iEnv windir]\\System32\\CSRSS.EXE"
				-v "[iEnv windir]\\System32\\WERFAULT.EXE"
				-v "[iEnv windir]\\System32\\SERVICES.EXE"
				-v "[iEnv windir]\\explorer.exe"
				-v "[iEnv windir]\\System32\\SearchProtocolHost.exe"
			}		
		}
	}
	Target {
		Match FILE {
			Include OBJECT_NAME { -v "[iEnv SystemDrive]\\Users\\**\*.*" }
            Include OBJECT_SIZE { -v 0 }
            Include -access "CLOSE"            
            Exclude OBJECT_NAME { 
				-v "[iEnv SystemDrive]\\Users\\*\\AppData"
				-v "[iEnv SystemDrive]\\Users\\*\\AppData\\**"
				-v "[iEnv SystemDrive]\\Users\\*\\**\\*.tmp" 
			}
		}
	}
}

 

View solution in original post

4 Replies

Re: How to exclude all McAfee executables in the Expert Rule

Jump to solution


Exclude VTP_PRIVILEGES -type BITMASK { -v 0x8 }

Re: How to exclude all McAfee executables in the Expert Rule

Jump to solution

Also, for certs generally, they are backwards in these rules.  Don't ask me why.  But if you reversed the order it would probably work as well.  Using VTP is easier though.  

Miro
Level 8
Report Inappropriate Content
Message 4 of 5

Re: How to exclude all McAfee executables in the Expert Rule

Jump to solution

Thank you for the quick reply.   

What do you think with reversed the order?   

Put the certificate exclusion on the first position?   

I prefer to use -sdn, because later, if necessary, I can add more exclusions for certificates (signer).   

Thank you!   

 

Rule {
	Process {
		Include OBJECT_NAME { -v "**" }        
		Exclude OBJECT_NAME { 
			-l "*" -sdn "CN=\"McAfee, Inc.\", OU=Engineering, O=\"McAfee, Inc.\", L=Santa Clara, ST=California, C=US"
			-v "teams.exe" | "mfeesp.exe" | "SYSTEM"		
			-v "[iEnv windir]\\System32\\WBEM\\WMIPRVSE.EXE"
			-v "[iEnv windir]\\System32\\CSRSS.EXE"
			-v "[iEnv windir]\\System32\\WERFAULT.EXE"
			-v "[iEnv windir]\\System32\\SERVICES.EXE"
			-v "[iEnv windir]\\explorer.exe"
			-v "[iEnv windir]\\System32\\SearchProtocolHost.exe"
		}		
	}	
	Target {
		Match FILE {
			Include OBJECT_NAME { -v "[iEnv SystemDrive]\\Users\\**\*.*" }
            Include OBJECT_SIZE {  -v 0  }
            Include -access "CLOSE"            
            Exclude OBJECT_NAME { 
				-v "[iEnv SystemDrive]\\Users\\*\\AppData"
				-v "[iEnv SystemDrive]\\Users\\*\\AppData\\**"
				-v "[iEnv SystemDrive]\\Users\\*\\**\\*.tmp" 
			}
		}
	}
}

 

Re: How to exclude all McAfee executables in the Expert Rule

Jump to solution

This should give you what you want, doing both ways.  I commented out the McAfee cert since you won't need it, but there you can add other certs.  Hopefully you see what I mean about the cert order.

I didn't realize there was a code paste option.  Much cleaner.  🙂

Rule {
	Process {
		Include OBJECT_NAME { -v "**" }        
		Exclude AggregateMatch {
			Include VTP_PRIVILEGES -type BITMASK { -v 0x8 }
			}
		#Exclude AggregateMatch {
			#Include CERT_NAME {
			#	-v "C=US, ST=California, L=Santa Clara, O=\"McAfee, Inc.\", OU=Engineering, CN=\"McAfee, Inc.\""
			#}
		#}
		Exclude AggregateMatch { 
			Include OBJECT_NAME { 
				-v "teams.exe"
				-v "mfeesp.exe"  
				-v "SYSTEM"		
				-v "[iEnv windir]\\System32\\WBEM\\WMIPRVSE.EXE"
				-v "[iEnv windir]\\System32\\CSRSS.EXE"
				-v "[iEnv windir]\\System32\\WERFAULT.EXE"
				-v "[iEnv windir]\\System32\\SERVICES.EXE"
				-v "[iEnv windir]\\explorer.exe"
				-v "[iEnv windir]\\System32\\SearchProtocolHost.exe"
			}		
		}
	}
	Target {
		Match FILE {
			Include OBJECT_NAME { -v "[iEnv SystemDrive]\\Users\\**\*.*" }
            Include OBJECT_SIZE { -v 0 }
            Include -access "CLOSE"            
            Exclude OBJECT_NAME { 
				-v "[iEnv SystemDrive]\\Users\\*\\AppData"
				-v "[iEnv SystemDrive]\\Users\\*\\AppData\\**"
				-v "[iEnv SystemDrive]\\Users\\*\\**\\*.tmp" 
			}
		}
	}
}

 

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