Fenrir is a simple IOC scanner bash script.

Fenrir is a simple IOC scanner bash script. It allows scanning Linux/Unix/OSX systems for the following Indicators of Compromise (IOCs):
+ Hashes
** MD5, SHA1 and SHA256 (using md5sum, sha1sum, sha -a 256)
+ File Names
** string – checked for substring of the full path, e.g. “temp/p.exe” in “/var/temp/p.exe”
+ Strings
** grep in files
+ C2 Server
** checking for C2 server strings in ‘lsof -i’ and ‘lsof -i -n’ output
+ Hot Time Frame
** using stat in different modes – define min and max epoch time stamp and get all files that have been created in between



Latest Changelog v0.5.2:
– String extract in output
– release, issue and uname in output
– Syslog output disabled by default (to avoid false positives)
– C2 check in lsof enabled by default
– More interesting extensions

Basic characteristics:
* Bash Script
* No installation or agent needed
* Uses common tools to extract attributes (e.g. md5sum, grep, stat in different modes)
* Intended to run on any Linux / Unix / OS X with Bash
* Low footprint – Ansible playbook with RAM drive solution
* Smart exclusions (file size, extension, certain directories) speeds up the scan process

Why Fenrir?
+ FENRIR is the 3rd tool after THOR and LOKI. THOR is our full featured APT Scanner with many modules and export types for corporate customers. LOKI is a free and open IOC scanner that uses YARA as signature format.
+ The problem with both predecessors is that both have certain requirements on the Linux platform. We build THOR for a certain Linux version in order to match the correct libc that is required by the YARA module. LOKI requires Python and YARA installed on Linux to run.
+ We faced the problem of checking more than 100 different Linux systems for certain Indicators of Compromise (IOCs) without installing an agent or software packages. We already had an Ansible playbook for the distribution of THOR on a defined set of Linux remote systems. This playbook creates a RAM drive on the remote system, copies the local program binary to the remote system, runs it and retrieves the logs afterwards. This ensures that the program’s footprint on the remote system is minimal. I adapted the Ansible playbook for Fenrir. (it is still untested)

Usage & Download from git:

Source: https://github.com/Neo23x0