• U.S. Sanctions Firm Behind N. Korean IT Scheme; Arizona Woman Jailed for Running Laptop Farm The Hacker [email protected] (The Hacker News)
    • Patchwork Targets Turkish Defense Firms with Spear-Phishing Using Malicious LNK Files The Hacker [email protected] (The Hacker News)
    • Why Security Nudges Took Off darkreadingSwati Babbar
    • Cyber Espionage Campaign Hits Russian Aerospace Sector Using EAGLET Backdoor The Hacker [email protected] (The Hacker News)
    • The Young and the Restless: Young Cybercriminals Raise Concerns darkreadingRobert Lemos, Contributing Writer
    • The Beginner’s Guide to Using AI: 5 Easy Ways to Get Started (Without Accidentally Summoning Skynet)
      by Tech Jacks
      March 29, 2025
    • Tips and Tricks to Enhance Your Incident Response Procedures
      by Tech Jacks
      March 17, 2025
    • Building a Security Roadmap for Your Company: Strategic Precision for Modern Enterprises 
      by Tech Jacks
      March 10, 2025
    • The Power of Policy: How Creating Strong Standard Operating Procedures Expedites Security Initiatives
      by Tech Jacks
      March 6, 2025
    • Building a Future-Proof SOC: Strategies for CISOs and Infosec Leaders 
      by Tech Jacks
      March 3, 2025
    • Security Gate Keeping – Annoying – Unhelpful
      by Tech Jacks
      November 13, 2024

  • Home
  • Blog & Observations
  • Articles
    • Guest Author
      • Peter Ramadan
        • SOC IT to ME
        • The Power of Policy
        • CISO Elite
  • In The News
  • Podcast & Vlogs
    • Podcast Videos
    • Security Unfiltered Podcast Information
  • Training & Videos
    • AI
      • AI Governance
    • Cloud
      • AWS
      • Azure
      • Google Cloud
    • Networking
    • Scripting
    • Security
      • Application Security
      • Cloud Security
      • Incident Response
      • Pentesting Information
      • Risk Management
      • Security Policy
    • Servers
    • Microsoft SCCM
    • ISC2
  • Services

New Tool: ficheck.py, (Thu, Jul 24th) SANS Internet Storm Center, InfoCON: green

July 23, 2025

As I mention every time I teach FOR577, I have been a big fan of file integrity monitoring tools (FIM) since Gene Kim first released Tripwire well over 30 years ago. I&#;x26;#;39;ve used quite a few of them over the years including tripwire, OSSEC, samhain, and aide, just to name a few. For many years, I used the fcheck Perl script (by Michael A. Gumienny) that was available as an apt package on Ubuntu because it was lightning fast. Unfortunately, sometime between Ubuntu 16.04 and Ubuntu 20.04 (my memory fails me as to exactly when), it slowed down on many of the systems I managed to the point where instead of being able to run it 4-6 times a day, it would now sometimes take more than 24 hours to run. And that was just running it on select directories, not the entire system, the way I run tools like aide. Though I started writing Perl scripts in 1989, I didn&#;x26;#;39;t spend any time trying to figure out why fcheck was suddenly having so many issues. I let it go for quite a while, but a few months ago, I started thinking about it again and decided I&#;x26;#;39;d write a look-alike in python. What I&#;x26;#;39;m releasing today is not quite complete, hence the 0.9.0 version number, but I&#;x26;#;39;ve been using it an about a dozen systems (Debian and Ubuntu, though it shoud run just fine on any Linux with Python 3.9 or newer, probably older, too, but I again haven&#;x26;#;39;t tried it on anything older) for about 6 months. I still want to add a couple of things including the ability to include additional config files like the .local.cfg that fcheck had, rather than having to put all the additions into the primary config. 

As I mention every time I teach FOR577, I have been a big fan of file integrity monitoring tools (FIM) since Gene Kim first released Tripwire well over 30 years ago. I’ve used quite a few of them over the years including tripwire, OSSEC, samhain, and aide, just to name a few. For many years, I used the fcheck Perl script (by Michael A. Gumienny) that was available as an apt package on Ubuntu because it was lightning fast. Unfortunately, sometime between Ubuntu 16.04 and Ubuntu 20.04 (my memory fails me as to exactly when), it slowed down on many of the systems I managed to the point where instead of being able to run it 4-6 times a day, it would now sometimes take more than 24 hours to run. And that was just running it on select directories, not the entire system, the way I run tools like aide. Though I started writing Perl scripts in 1989, I didn’t spend any time trying to figure out why fcheck was suddenly having so many issues. I let it go for quite a while, but a few months ago, I started thinking about it again and decided I’d write a look-alike in python. What I’m releasing today is not quite complete, hence the 0.9.0 version number, but I’ve been using it an about a dozen systems (Debian and Ubuntu, though it shoud run just fine on any Linux with Python 3.9 or newer, probably older, too, but I again haven’t tried it on anything older) for about 6 months. I still want to add a couple of things including the ability to include additional config files like the .local.cfg that fcheck had, rather than having to put all the additions into the primary config.

I’ve named my tool ficheck.py[1] (File Integrity CHECK) since I didn’t want to step on Mr. Gumienny’s tool name, but I freely admit this is an homage to his tool that I really liked and used for years. I stole his config file and report formats. The script runs in under 90 seconds on all the systems I’ve been testing on including some large systems in public cloud and some very small memory VMs. I am also releasing a quick and dirty install script that will install a basic config, install a cron job to run it every 2 hours, and another of my scripts, mail_stuff.py[2] which will use mailx to send e-mail if it gets any ASCII (or UTF-8) bytes on stdin. Everything needed to install is in my scripts github repo[3]. The tool monitors for file creation and deletion, and inode number change (meaning a new file with same name), plus changes to file size, number of links, ownership, group, permissions, SHA2-256 hash (on files less than 500M, configurable witha  commandline switch), file modification time (MTime), file metadata (inode) change time (CTime), and, if the pystatx module is installed (as described in my mac_robber.py update diary last year), file creation time (BTime).

The directories I generally watch are ones where I don’t expect a lot of changes unless I’m applying patches. I do tune it to remove some files that get modified regularly during normal operations. I also have added some places (like /dev/shm) where attackers sometimes try to hide their malware. Here is a screenshot of the e-mail received when there are changes found. 

Check it out. If you run into any problems or have suggestions for improvements, e-mail me at the address below or on the handlers list or open an issue on github.

References:

  1. https://github.com/clausing/scripts/blob/master/ficheck.py
  2. https://github.com/clausing/scripts/blob/master/mail_stuff.py
  3. https://github.com/clausing/scripts/tree/master

—————
Jim Clausing, GIAC GSE #26
jclausing –at– isc [dot] sans (dot) edu

(c) SANS Internet Storm Center. https://isc.sans.edu Creative Commons Attribution-Noncommercial 3.0 United States License. 

​Read More

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...
Share

In The News

Tech Jacks
Derrick Jackson is a IT Security Professional with over 10 years of experience in Cybersecurity, Risk, & Compliance and over 15 Years of Experience in Enterprise Information Technology

Leave A Reply


Leave a Reply Cancel reply

You must be logged in to post a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Blog

    • Security Gate Keeping - Annoying - Unhelpful
      November 13, 2024
    • 15 Years on LinkedIn: An Authentic Reflection(or a Beauty...
      October 24, 2024
    • Podcast & Cloud Security Governance
      February 24, 2021
    • The Journey Continues - Moving through 2021
      January 5, 2021
    • CISSP Journey
      February 22, 2019




  • About TechJacks
  • Privacy Policy
  • Gaming Kaiju
© Copyright Tech Jacks Solutions 2025

%d