
YARA नियम विश्लेषक जो नियम की गुणवत्ता और प्रदर्शन में सुधार करता है
YARA नियम विश्लेषक नियम गुणवत्ता और प्रदर्शन में सुधार करने के लिए
YARA नियम वाक्यात्मक रूप से सही हो सकते हैं लेकिन फिर भी निष्क्रिय हो सकते हैं। yaraQA इन मुद्दों को YARA नियम सेट के लेखक या अनुरक्षक को खोजने और रिपोर्ट करने का प्रयास करता है।
yaraQA जिन मुद्दों का पता लगाने का प्रयास करता है, उदाहरण के लिए:
2 of them)$ = "\\Debug\\" fullword)$ = "AA"; --ignore-performance का उपयोग करके विश्लेषण से बाहर किया जा सकता है)मैं समय के साथ परीक्षण सेट का विस्तार करने जा रहा हूँ। प्रत्येक मामूली संस्करण में नई सुविधाएँ या नए परीक्षण शामिल होंगे।
pip install -r requirements.txt
usage: yaraQA.py [-h] [-f yara files [yara files ...]] [-d yara files [yara files ...]] [-o outfile] [-b baseline] [-l level]
[--ignore-performance] [--debug]
YARA RULE ANALYZER
optional arguments:
-h, --help show this help message and exit
-f yara files [yara files ...]
Path to input files (one or more YARA rules, separated by space)
-d yara files [yara files ...]
Path to input directory (YARA rules folders, separated by space)
-o outfile Output file that lists the issues (JSON, default: 'yaraQA-issues.json')
-b baseline Use a issues baseline (issues found and reviewed before) to filter issues
-l level Minium level to show (1=informational, 2=warning, 3=critical)
--ignore-performance Suppress performance-related rule issues
--debug Debug output
python3 yaraQA.py -d ./test/
सभी प्रदर्शन मुद्दों को दबाएं और केवल पहचान/तर्क मुद्दे दिखाएं।
python3 yaraQA.py -d ./test/ --ignore-performance
सूचनात्मक प्रकृति के सभी मुद्दों को दबाएं
python3 yaraQA.py -d ./test/ -level 2
केवल नए मुद्दों को देखने के लिए बेसलाइन का उपयोग करें (उन मुद्दों को नहीं जिनकी आप पहले ही समीक्षा कर चुके हैं)। बेसलाइन फ़ाइल एक समीक्षित स्थिति का पुराना JSON आउटपुट है।
python3 yaraQA.py -d ./test/ -b yaraQA-reviewed-issues.json
मुद्दों वाले उदाहरण नियम ./test फ़ोल्डर में पाए जा सकते हैं।
yaraQA डिफ़ॉल्ट रूप से पाए गए मुद्दों को yaraQA-issues.json नामक फ़ाइल में लिखता है।
यह सूची yaraQA द्वारा JSON प्रारूप में उत्पन्न आउटपुट का एक उदाहरण दिखाती है: