cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

AAC Expert Rules - Logic Question

Jump to solution

Hello,

I am trying to write a rule that stops a process when run with three (3) command line arguments in any order. I want the rule to stop it only if all three arguments are there.

Rule {
Initiator {
Match PROCESS {
Include OBJECT_NAME { -v "PROCESS_NAME" }
# We must check for any permutation of the arguments
Include PROCESS_CMD_LINE { -v "*/x*/y*/z*" }
Include PROCESS_CMD_LINE { -v "*/x*/z*/y*" }
Include PROCESS_CMD_LINE { -v "*/y*/x*/z*" }
Include PROCESS_CMD_LINE { -v "*/y*/z*/x*" }
Include PROCESS_CMD_LINE { -v "*/z*/x*/y*" }
Include PROCESS_CMD_LINE { -v "*/z*/y*/x*" }
}
}
Target {
Match FILE {
Include OBJECT_NAME { -v "FILE_NAME" }
Include -access "EXECUTE"
}
}
}

This implementation looks as if it really inefficient, but as far as I know, you can only logical OR the PROCESS_CMD_LINES, and this may be a super inefficient way to create a command especially with all of the wildcards.

Is there some way to manipulate the logic so that I can get the same functionality out of a Process subrule like this:

Process {

Include PROCESS_CMD_LINE { -v "*/x*" }

Include PROCESS_CMD_LINE { -v "*/y*" }

Include PROCESS_CMD_LINE { -v "*/z*" }

 

Thanks

1 Solution

Accepted Solutions
Highlighted
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 2 of 2

sRe: AAC Expert Rules - Logic Question

Jump to solution

I think your initial way is probably the best way to do it, though I get your point.  You can optimize a bit though with this:

 

Rule {

Process {

Include PROCESS_CMD_LINE {

-v "*/x*/y*/z*"
-v "*/x*/z*/y*"
-v "*/y*/x*/z*"
-v "*/y*/z*/x*"
-v "*/z*/x*/y*"
-v "*/z*/y*/x*"

}

}

Target {

Match FILE/SECTION {

Include OBJECT_NAME { -v ** }

}

}}}

 

I included section because I don't know if you will always have a child process, in which case section can be used for a loaded module.

 

Dave

View solution in original post

1 Reply
Highlighted
Reliable Contributor
Reliable Contributor
Report Inappropriate Content
Message 2 of 2

sRe: AAC Expert Rules - Logic Question

Jump to solution

I think your initial way is probably the best way to do it, though I get your point.  You can optimize a bit though with this:

 

Rule {

Process {

Include PROCESS_CMD_LINE {

-v "*/x*/y*/z*"
-v "*/x*/z*/y*"
-v "*/y*/x*/z*"
-v "*/y*/z*/x*"
-v "*/z*/x*/y*"
-v "*/z*/y*/x*"

}

}

Target {

Match FILE/SECTION {

Include OBJECT_NAME { -v ** }

}

}}}

 

I included section because I don't know if you will always have a child process, in which case section can be used for a loaded module.

 

Dave

View solution in original post

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