Kali Linux

Factual-Rules-Generator : An Open Source Project Which Aims To Generate YARA Rules

Factual-rules-generator is an open source project which aims to generate YARA rules about installed software from a running operating system.

The goal of the software is to be able to use a set of rules against collected or acquired digital forensic evidences and find installed software in a timely fashion.

The software can be used to baseline known software from Windows system and create a set of rules for finding similar installation on other systems.

Dependencies

  • pefile
  • psutil
  • ndjson
  • python-tlsh
  • PyInstaller (to change client.py to client.exe)
  • ssdeep
    • On Ubuntu:
      • sudo apt-get install build-essential libffi-dev python3 python3-dev python3-pip libfuzzy-dev
      • pip install ssdeep

Tools requirement

Some tools are required on the host operating system some are Unix standard tools and some additional ones:

  • xxd
  • curl

For the Windows virtual machine, the following software is required to be installed:

  • SDelete
  • AsA (AttackSurfaceAnalyzer)

Install

  • Install all Python dependencies defined requirements.txt
  • Create a shared folder to communicate with VM
  • Install a Windows VM
    • Install chocolatey on Windows VM
    • Complete bin/OnWindows/Varclient.py
    • Change bin/OnWindows/client.py in an executable file with PyInstaller and put in startup folder
  • Update etc/allVariables.py to match your desired configuraiton

In test/ some examples of software to install is given, the following specific format is required:

  • First, select the name of the packages to install using chocolatey before :, or the name of the file in case of msi or exe file.
  • Second, after : there’s the name of the exe to extract and run it (without extension).
  • The second part after , follow the same system with the word installer first and after : the type of installer :
    • choco
    • msiexec
    • exe
  • Finally, the third part, uninstaller follow by : and the uninstaller like choco, msiexec or exe

Run and generate the rules

  • bin/Generator.py is the only script to run, don’t forget to update etc/allVariables.py (critical step).

Public YARA rules repository

  • factual-rules – Sample rules generated from some very common software.

Overview of factual rules generator

R K

Recent Posts

Kali Linux 2024.4 Released, What’s New?

Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…

11 hours ago

Lifetime-Amsi-EtwPatch : Disabling PowerShell’s AMSI And ETW Protections

This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…

11 hours ago

GPOHunter – Active Directory Group Policy Security Analyzer

GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…

2 days ago

2024 MITRE ATT&CK Evaluation Results – Cynet Became a Leader With 100% Detection & Protection

Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…

5 days ago

SecHub : Streamlining Security Across Software Development Lifecycles

The free and open-source security platform SecHub, provides a central API to test software with…

1 week ago

Hawker : The Comprehensive OSINT Toolkit For Cybersecurity Professionals

Don't worry if there are any bugs in the tool, we will try to fix…

1 week ago