# IRFuzz | Simple Scanner with Yara Rule

**URL:** <https://onehack.st/t/irfuzz-simple-scanner-with-yara-rule/101542>\
**Category:** Tools & Scripts\
**Tags:** tools, documents\
**Created:** [August 18, 2020, 2:24pm UTC](https://onehack.st/t/irfuzz-simple-scanner-with-yara-rule/101542 "2020-08-18T14:24:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheStrength](https://onehack.st/user_avatar/onehack.st/thestrength/32/46753_2.png) [@TheStrength](https://onehack.st/u/TheStrength)\
**Post date:** [August 18, 2020, 2:24pm UTC](https://onehack.st/t/irfuzz-simple-scanner-with-yara-rule/101542/1 "2020-08-18T14:24:04Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/1/8/1800bb5281733230d1732b8639ed586cbd19ce5e.png)

IRFuzz is a simple scanner with yara rules for document archives or any files.

**Install**

**1. Prerequisites**  
Linux or OS X

- [Yara](https://github.com/VirusTotal/yara/): just use the latest release source code, compile and install it (or install it via pip install yara-python)
- [Yara Rules](https://github.com/Yara-Rules/rules) – You may download yara rules from here or import your own custom ruleset.
- Python dependencies

Dependencies are managed with `pipenv` . To get started install dependencies and activate virtual environment with following commands:  
`$ pipenv install`  
`$ pipenv shell`

**Running IRFuzz**  
`$ python -m watchd.watch ~/tools/IR/ -y rules/maldocs --csv csvfile.csv`

**Supported Features**

- Scans new files with inotify
- Polling if inotify is not supported
- Custom extensions are supported
- Delete mode will delete matched file
- Recursive directory scan
- Lists matched Yara functions with yarastrings with ctime
- CSV results for Filebeat

**Custom extensions**  
`$ python -m watchd.watch ~/tools/IR/ -y rules/maldocs --csv csvfile.csv --extensions .zip,.rar`

**Alert matching yara rule**  
Generate token from [https://irfuzz.com/tokens](https://irfuzz.com/tokens)  
`$ python -m watchd.watch ~/tools/IR/ -y rules/maldocs --csv csvfile.csv --extensions .php --token tokenhere`  
Configure alerts from the website to Telegram or your email.

**Delete matched file**  
`$ python -m watchd.watch ~/tools/IR/ -y rules/maldocs --csv csvfile.csv --delete`

**Polling (inotify not supported)**  
`$ python -m watchd.watch ~/tools/IR/ -y rules/maldocs --csv csvfile.csv --polling`  
Adds –poll option to force the use of polling mechanism to detect changes in data directory. Polling is slower than the underlying mechanism in OS to detect changes but it’s necessary with certain file systems such as SMB mounts.

**Default extensions if no extensions are mentioned.**

**Microsoft Office Word supported file formats**  
.doc .docm .docx .docx .dot .dotm .dotx .odt

**Microsoft Office Excel supported file formats**  
.ods .xla .xlam .xls .xls .xlsb .xlsm .xlsx .xlsx .xlt .xltm .xltx .xlw

**Microsoft Office PowerPoint supported file formats**  
.pot .potm .potx .ppa .ppam .pps .ppsm .ppsx .ppt .pptm .pptx .pptx .pptx

**zipdump.py**  
IRFuzz uses [zipdump.py](https://github.com/DidierStevens/DidierStevensSuite/blob/master/zipdump.py) for zip file analysis.

## GitHub:

> **[GitHub - oxiqa/IRFuzz](https://github.com/oxiqa/IRFuzz)**
>
> Contribute to oxiqa/IRFuzz development by creating an account on GitHub.
