Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Suricata Hash Matching

    Scheduled Pinned Locked Moved IDS/IPS
    5 Posts 2 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      johncena
      last edited by

      Hello, I would like to open this topic because I have a problem with hashes. I am trying to find a way to identity hashes of the file(md5/sha256) based on a list. After few days of configuration and so on everything is fine. The problem is i get as Response and I get the hash TRUNCATEDe7ed7766-1854-4c62-8b89-5a602ce2e9bf-image.png. The rules are in /etc/suricata/rules and the hashes list are in /etc/suricata/rules

      alert http any any -> any any (msg:"FILE EXE Detected"; filesha256:sha256filename.list; filestore; sid:6; rev:6;)
      alert http any any -> any any (msg:"FILE EXE Detected"; filemagic:"exe"; filemd5:filename; filestore; fileext:"exe"; sid:5; rev:5;)

      1 Reply Last reply Reply Quote 0
      • bmeeksB
        bmeeks
        last edited by

        I bet you need to relocate your hash files to the sub-directory underneath /etc/local/suricata where the interface is configured.

        On pfSense the configuration for each Suricata interface is stored in a unique sub-directory under /usr/local/etc/suricata and NOT in /etc/suricata like the upstream documentation might state. Look under /usr/local/etc/suricata on your firewall and you will see one or more sub-directories (one for each configured interface). The sub-directory will have a unique name that included the physical NIC driver name and a UUID (random number). Put your file hashes for in that sub-directory and then restart Suricata on the interface.

        1 Reply Last reply Reply Quote 0
        • J
          johncena
          last edited by johncena

          Hello, I dont have any directory in /usr/local/etc/suricata. I have only in /var/lib/suricata/rules.

          The only way the file can be read without errorr is in /etc/suricata/rules. I moved the hash list in /var/lib/suricata/rules and I get now the error.

          [ERRCODE: SC_ERR_OPENING_RULE_FILE(41)] - opening hash file /etc/suricata/rules/md5.list: No such file or directory.

          I mean strange i have some automated task for a web application and i get results like that but i didnt even load a hash!! but if i want to load a hash for a specific file i get Truncated
          8318b859-31bd-4bfd-930e-3f51f1eb6053-image.png

          bmeeksB 1 Reply Last reply Reply Quote 0
          • bmeeksB
            bmeeks @johncena
            last edited by bmeeks

            @johncena said in Suricata Hash Matching:

            Hello, I dont have any directory in /usr/local/etc/suricata. I have only in /var/lib/suricata/rules.

            The only way the file can be read without errorr is in /etc/suricata/rules. I moved the hash list in /var/lib/suricata/rules and I get now the error.

            [ERRCODE: SC_ERR_OPENING_RULE_FILE(41)] - opening hash file /etc/suricata/rules/md5.list: No such file or directory.

            I mean strange i have some automated task for a web application and i get results like that but i didnt even load a hash!! but if i want to load a hash for a specific file i get Truncated
            8318b859-31bd-4bfd-930e-3f51f1eb6053-image.png

            Are you running the Suricata package on pfSense? If so, then there is no way possible not to have a /usr/local/etc/suricata directory with additional sub-directories underneath for each configured Suricata interface. That is just intrinsically how the GUI package and binary work on pfSense.

            And there absolutely is not a var/lib/suricata/rules directory on pfSense. So I'm wondering if you are either using the bare Suricata CLI package from FreeBSD ports on some other platform besides pfSense, or you have a severely customized CLI setup on pfSense. Your description of directory names is not at all consistent with the installation of the Suricata GUI and binary packages on pfSense.

            This forum is only for questions regarding the installation and use of Suricata on pfSense.

            1 Reply Last reply Reply Quote 0
            • bmeeksB
              bmeeks
              last edited by bmeeks

              OP responded via other means that he was running Suricata on CentOS 7, so this thread is not applicable to pfSense.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.