cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vtgt
Level 10
Report Inappropriate Content
Message 1 of 4

Expert Rule - Process execution under defined conditions

I am struggeling with the syntax for expert rules.

We have a requirement that a defined process "abc.exe" is only allowed to execute by a signed Powershell script.

How can we prevent the execution of process "abc.exe" by all other methods than the defined Powershell script?

Thanks a lot in advance!

3 Replies

Re: Expert Rule - Process execution under defined conditions

Rule {
	Process {
		Include OBJECT_NAME { -v "**" }
		Exclude AggregateMatch {
			Include OBJECT_NAME { -v "powershell.exe" }
			Include PROCESS_CMD_LINE { -v "*path\\to\\script.ps1" }
		}
	}
	Target {
		Match PROCESS {
			Include OBJECT_NAME { -v "abc.exe" }
			Include -access "CREATE"
		}
	}
}
vtgt
Level 10
Report Inappropriate Content
Message 3 of 4

Re: Expert Rule - Process execution under defined conditions

Hi @Daveb3d 

Thanks a lot for your fast reply.

Unfortunately, the rule does not work as expected.

With this configuration the defined PowerShell script is not able to start the process abc.exe.

But from a PowerShell console the execution of process abc.exe works that should not be the case.

Is some inverting of include/exclude sufficient to make it work?

Re: Expert Rule - Process execution under defined conditions

I just tested it myself.  I think the issue is just that the cmdline needs a * on both sides of it.  Try that and let me know.  If you want me to look at your exact logic with your exclusions, private message me your rule. 

Dave

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 our Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

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