Rules for Renaming File

22 views
Skip to first unread message

Yogi Valentino

unread,
Dec 15, 2025, 7:05:31 AM (2 days ago) Dec 15
to Wazuh | Mailing List
I'm trying to make a syscheck FIM rule for a renaming file. 

root@ubuntu-wazuh:~# cat /var/ossec/etc/rules/file.xml
<group name="syscheck, rename">
    <rule id="100100" level="8" timeframe="5">
        <if_sid>553</if_sid>
        <if_matched_sid>554</if_matched_sid>
        <same_field>sha1</same_field>
        <description>File $(file) renamed</description>
    </rule>

    <rule id="100101" level="8" timeframe="5">
        <if_sid>554</if_sid>
        <if_matched_sid>553</if_matched_sid>
        <same_field>sha1</same_field>
        <description>File $(file) renamed</description>
    </rule>

</group>

This is what it looks like. But when i try to rename it. It didn't trigger. Did i miss something?
FIM Rule.png

Olamilekan Abdullateef Ajani

unread,
Dec 15, 2025, 10:23:29 AM (2 days ago) Dec 15
to Wazuh | Mailing List
Hello,

I think you have a great idea here to detect when files are renamed, and it's also good as it could be transformed to a custom rule, I would advise you to try this in a test environment and observe the change activity to be sure if it meets your requirement to remove doubt on false positives.

The custom rule below which you provided works fine; I tested it and was able to detect the file being renamed
<group name="syscheck, rename">
    <rule id="198852" level="8" timeframe="20">

        <if_sid>553</if_sid>
        <if_matched_sid>554</if_matched_sid>
        <same_field>sha1</same_field>
        <description>File $(file) renamed</description>
    </rule>
</group>

For custom rules for FIM, you can find additional configurable options in the documentation below to help you when creating rules, the fields that are obtainable for modifications:
syscheck-fim.png

Yogi Valentino

unread,
Dec 16, 2025, 12:24:50 AM (yesterday) Dec 16
to Wazuh | Mailing List
Yeah i already got it, it's because the timeframe.
Reply all
Reply to author
Forward
0 new messages