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

Expert rules debugging

Hi,

I've found this ER which seems interesting to avoid browsers or the default email client to execute a file from the temporary folders.  But, even if there is no coding error, I cannot catch anything.

My question : there is a iDump command to dump variables.  Where may I find the content variables? 

Do you see the reason why this rule doesn't match when my browser executes an exe file from my temp folders?

Thanks!

Pat

Rule {

    # Get the list of temp folders and temp internet folders for all users that have 
    # not been changed from their default values.
    set EPTempFolders [iSystem users_folders -no_defaults Temp Cache]

    # Create variable for default browser
    set EPDefaultBrowser [iReg value HKCR\\http\\shell\\open\\command ""]
    set EPDefaultBrowser [iUtil cvt2args $EPDefaultBrowser ]
    set EPDefaultBrowser [lindex $EPDefaultBrowser 0]

    # Create variable for default email client
    set EPDefaultEmailClient [iReg value HKCR\\mailto\\shell\\open\\command ""]
    set EPDefaultEmailClient [iUtil cvt2args $EPDefaultEmailClient ]
    set EPDefaultEmailClient [lindex $EPDefaultEmailClient 0]

    # reg call to get language specific value for %SystemDrive%\Users
    set EPProfilesDirectory [iReg value "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList" EPProfilesDirectory]

    #uncomment command below to get a dump of variables content
    #iDump EP*

    Process {
        Include OBJECT_NAME {
            -v $EPDefaultBrowser
            -v $EPDefaultEmailClient
            -v explorer.exe
            -v iexplore.exe
            -v chrome.exe
            -v MsEdge.exe
            -v firefox.exe
            -v mozilla.exe
            -v netscp.exe
            -v opera.exe
        }
    }

    Target {
        Match FILE {
            Include OBJECT_NAME {
                -v $EPTempFolders
                -v "$EPProfilesDirectory\\*\\**"
                -v "$EPProfilesDirectory\\*\\AppData\\Local\\Temp\\**"
                -v "$EPProfilesDirectory\\*\\AppData\\Local\\Microsoft\\Windows\\Temporary Internet Files\\**"
            }
            
            Exclude OBJECT_NAME {
                -v "$EPProfilesDirectory\\*\\AppData\\Local\\Temp\\FNT*.exe"
            }
            
            Include -access "EXECUTE" ; # Prevents file execution
        }
    }
}

 

3 Replies
AdithyanT
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 2 of 4

Re: Expert rules debugging

Hi @Buijspa,

Thank you for your post. While Expert rules have great advantage in terms of attributes you can add and customize to them, I would leave it to the users to discuss and debug where the issue would be with the given ER since it is not my stronghold or support area.

However, May I know if you have tried the Access protection rule that is already available with us a s described here?

https://docs.mcafee.com/bundle/endpoint-security-10.5.0-threat-prevention-product-guide-epolicy-orch...

Rule Name: Browsers launching files from the Downloaded Program Files folder

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
AdithyanT
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 3 of 4

Re: Expert rules debugging

Hi @Buijspa,

Adding to the above, You can use the same concept and add many folders under the purview of the rule by creating a new one to control the browser executable you desire!

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
Buijspa
Level 7
Report Inappropriate Content
Message 4 of 4

Re: Expert rules debugging

Hi Adithyan,

Thank you for your email.

Unfortunately, with this kind of rule we are not able to exclude users using AD groups (or maybe we could but I don't see how).

We have more than 10.000 users who are centrally managed by group memberships dynamically assigned via meta directory service and it is mandatory for us to be able to exclude/include people using their group memberships.

With expert rules, the GROUP_SID is available and can be used for this.  If you have the equivalent with the Access Protection rules, I will be great!

Kind regards,

Pat

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