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

McAfee Expert Rule for PlugX

Hi McAfee,

I expect to detect Plugx malware with the following behavior:
- Load a dll file in the same directory
- Reads a .dat file in the same directory
How can I write rules with AND conditions. I tried with the rules below, but it just seems to understand that this is an OR condition.

 

Rule {
    Process {
        Include OBJECT_NAME { -v *.exe }
        Exclude OBJECT_NAME {-v "C:\\Program Files\\**" }
        Exclude OBJECT_NAME {-v "C:\\Program Files (x86)\\**" }
        Exclude OBJECT_NAME {-v "C:\\Windows\\**" }
        Exclude OBJECT_NAME {-v "C:\\Windows\\Fonts\\**" }
        Exclude OBJECT_NAME {-v "C:\\Windows\\Fonts\\StaticCache.dat" }
        Exclude OBJECT_NAME {-v "C:\\ProgramData\\McAfee\\**" }
        Exclude OBJECT_NAME {-v "C:\\ProgramData\\Microsoft\\Windows Defender\\**" }
        Exclude OBJECT_NAME {-v "C:\\Users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\**" }
        Exclude OBJECT_NAME {-v "C:\\Users\\*\\AppData\\Local\\Microsoft\\OneDrive\\**" }
        Exclude OBJECT_NAME {-v "C:\\Users\\*\\AppData\\Local\\Packages\\Microsoft*\\Settings\\**" }
    }
    Target {
        Match FILE {
            Include OBJECT_NAME { -v *.DAT }
            Exclude OBJECT_NAME {-v "C:\\Program Files\\**" }
            Exclude OBJECT_NAME {-v "C:\\Program Files (x86)\\**" }
            Exclude OBJECT_NAME {-v "C:\\Windows\\**" }
            Exclude OBJECT_NAME {-v "C:\\Windows\\Fonts\\**" }
            Exclude OBJECT_NAME {-v "C:\\Windows\\Fonts\\StaticCache.dat" }
            Exclude OBJECT_NAME {-v "C:\\ProgramData\\McAfee\\**" }
            Exclude OBJECT_NAME {-v "C:\\ProgramData\\Microsoft\\Windows Defender\\**" }
            Exclude OBJECT_NAME {-v "C:\\Users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\**" }
            Exclude OBJECT_NAME {-v "C:\\Users\\*\\AppData\\Local\\Microsoft\\OneDrive\\**" }
            Exclude OBJECT_NAME {-v "C:\\Users\\*\\AppData\\Local\\Packages\\Microsoft*\\Settings\\**" }
            Include -access "READ_DATA"
        }
    }
    Target {
        Match FILE {
            Include OBJECT_NAME { -v *.dll }
            Exclude OBJECT_NAME {-v "C:\\Program Files\\**" }
            Exclude OBJECT_NAME {-v "C:\\Program Files (x86)\\**" }
            Exclude OBJECT_NAME {-v "C:\\Windows\\**" }
            Exclude OBJECT_NAME {-v "C:\\Windows\\Fonts\\**" }
            Exclude OBJECT_NAME {-v "C:\\Windows\\Fonts\\StaticCache.dat" }
            Exclude OBJECT_NAME {-v "C:\\ProgramData\\McAfee\\**" }
            Exclude OBJECT_NAME {-v "C:\\ProgramData\\Microsoft\\Windows Defender\\**" }
            Exclude OBJECT_NAME {-v "C:\\Users\\*\\AppData\\Local\\Google\\Chrome\\User Data\\**" }
            Exclude OBJECT_NAME {-v "C:\\Users\\*\\AppData\\Local\\Microsoft\\OneDrive\\**" }
            Exclude OBJECT_NAME {-v "C:\\Users\\*\\AppData\\Local\\Packages\\Microsoft*\\Settings\\**" }
            Include -access "READ_DATA"
        }
    }
}

 

1 Reply
AdithyanT
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 2 of 2

Re: McAfee Expert Rule for PlugX

Hi @HoangCuong,

Thank you or your post.

I am afraid that may not be possible at the moment using Expert rules. This may go as a product enhancement request, however, this currently works very similar to Access Protection on Endpoint Security that also does not implement "AND" conditions between rules or even among subrules and only works on "OR" basis.

How to submit a new Product Idea:

https://kc.mcafee.com/corporate/index?page=content&id=KB60021

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