Loki-RS Parity Matrix

January 4, 2026 · View on GitHub

This document provides a feature-by-feature comparison between Loki v1 and Loki-RS, identifying gaps, bugs, and implementation plans.

Last Updated: 2026-01-04 Loki v1 Version: 0.51.1 Loki-RS Version: 2.0.1-alpha


Legend

Status:

  • Implemented: Feature exists and works
  • ⚠️ Partial: Feature exists but incomplete or has issues
  • Missing: Feature not implemented
  • 🐛 Broken: Feature exists but has bugs
  • 🔄 Divergent: Works differently than v1 (may be intentional)

Priority:

  • P0: Release blocker - must have for v1 parity
  • P1: High priority - important for usability
  • P2: Medium priority - nice to have
  • P3: Low priority - can defer
  • Skip: Can be skipped (better alternatives or not needed)

Core Scanning Features

FeatureLoki v1 BehaviorLoki-RS StatusGap / Bug DescriptionPriorityPlanTest Plan
File System ScanningRecursive directory walk with os.walk(), followlinks=False✅ ImplementedUses walkdir with follow_links(false) to match v1 behavior✅ CompleteTest with symlink directories
File Type FilteringFilters by extension list + file magic signatures⚠️ PartialUses file-format crate, different approach, missing "evil extensions" listP1Add evil extensions list, consider file magic loadingTest with various file types
File Size LimitDefault 5000 KB, configurable via -s⚠️ PartialDefault 10MB (bytes), no KB optionP1Add -s flag for KB, keep bytes optionTest size limit enforcement
Hash IOC MatchingMD5/SHA1/SHA256 matching with binary search✅ ImplementedBinary search implemented - hashes organized by type and sorted for O(log n) lookup✅ CompleteTest with large hash IOC files
Hash Score ParsingReads score from IOC file (3-column format)✅ ImplementedSupports 2-column (hash;description → score=75) and 3-column (hash;score;description) formats✅ CompleteTest with IOC files containing scores
False Positive HashesChecks false positive hashes before matching✅ ImplementedLoads files with "hash" and "falsepositive" in filename, checks before hash matching, skips file if match found✅ CompleteTest with false positive hash file
Hash WhitelistExcludes empty file hashes❌ MissingNo whitelistP2Add hash whitelistTest with empty files
Filename IOC MatchingRegex matching on full file path✅ ImplementedRegex compilation and matching implemented, supports false positive regex✅ CompleteTest with filename IOC patterns
Filename IOC False PositivesOptional FP regex per IOC✅ ImplementedThird column parsed as false positive regex✅ CompleteTest with FP patterns
Filename IOC Environment VarsReplaces %VAR% / $VAR in patterns❌ MissingNo replacementP2Add env var replacementTest with patterns containing vars
YARA Rule CompilationCompiles from multiple directories⚠️ PartialOnly one directory, no recursive walk. ✅ Migrated to YARA-X.P1Add recursive walk, multiple directoriesTest with nested rule directories
YARA Metadata ExtractionExtracts score, description, reference, author✅ ImplementedUsing YARA-X API: matching_rule.metadata() extracts description, author, score from rule metadata✅ Complete - Migrated to YARA-XTest with rules containing metadata
YARA Matched StringsShows matched string values with offsets✅ ImplementedUsing YARA-X API: pattern.matches() extracts matched strings with offsets, hex-encodes non-ASCII✅ Complete - Migrated to YARA-XTest with rules that match strings, including non-ASCII
YARA Memory RulesChecks memory meta field for process scanning❌ MissingScans all rules on processesP1Filter rules by memory flagTest with memory-only rules
Process Memory ScanningYARA scan of process memory✅ ImplementedWorks, but no working set limitP1Add --maxworkingset flagTest with large processes
C2 IOC MatchingMatches process network connections✅ ImplementedLoads C2 IOCs from files with "c2" in filename, matches against process network connections from /proc/net/tcp and /proc/net/udp✅ CompleteTest with process connections

CLI Interface

FeatureLoki v1 BehaviorLoki-RS StatusGap / Bug DescriptionPriorityPlanTest Plan
Path Selection (-p)Default C:\ or /, configurable⚠️ PartialUses --folder instead of -pP1Add -p alias, keep --folderTest path selection
File Size (-s KB)Size in KB, default 5000❌ MissingOnly bytes option existsP1Add -s flag for KBTest KB vs bytes
Score Thresholds (-a/-w/-n)Alert/Warning/Notice levels✅ Implemented--alert-level, --warning-level, --notice-level flags (default: 80/60/40), --max-reasons flag✅ CompleteTest with different thresholds
Log File (-l)Custom log file path❌ MissingFixed filename onlyP2Add -l flagTest custom log paths
Log Folder (--logfolder)Folder for log files❌ MissingNo folder optionP2Add --logfolder flagTest log folder
No Log (--nolog)Skip log file writing❌ MissingAlways writes logP2Add --nolog flagTest no log mode
Syslog (-r/-t/--syslogtcp)Remote syslog logging❌ MissingNo syslog supportP3Add syslog support (low priority)Test syslog output
CSV Output (--csv)CSV format to STDOUT❌ MissingNo CSV modeP2Add CSV output formatTest CSV parsing
Only Relevant (--onlyrelevant)Filter to warnings/alerts❌ MissingAll messages loggedP2Add filteringTest message filtering
Print All (--printall)Log all scanned files❌ MissingNo verbose modeP3Add verbose loggingTest verbose output
All Reasons (--allreasons)Show all match reasons⚠️ PartialAlways shows all (no option to limit)P3Add flag to limit reasonsTest reason display
Intense Mode (--intense)Scan unknown file types⚠️ Partial--scan-all-files similar but not identicalP2Align with v1 behaviorTest intense mode
Force (--force)Override exclusions❌ MissingNo override optionP2Add force flagTest exclusion override
Version (--version)Show version and exit✅ Implemented--version flag shows version and exits✅ CompleteTest version display
Update (--update)Update signatures⚠️ Partialloki-util implements update, but main binary does not have --update flagP2Encourage loki-util usageTest signature update
Help (-h/--help)Show help✅ ImplementedWorks via rustop--

Path Exclusions and Filtering

FeatureLoki v1 BehaviorLoki-RS StatusGap / Bug DescriptionPriorityPlanTest Plan
Linux Path ExclusionsExcludes /proc, /dev, /sys, etc.✅ ImplementedExcludes /proc, /dev, /sys/kernel/debug, /sys/kernel/slab, /sys/devices, /usr/src/linux, /media, /volumes (unless --scan-all-drives)✅ CompleteTest on Linux system
Windows Drive Handling--allhds, --alldrives options❌ MissingNo Windows-specific drive handlingP2Add Windows drive enumerationTest on Windows
User Excludes Configconfig/excludes.cfg regex patterns❌ MissingNo config file supportP1Load and apply excludes.cfgTest with exclude patterns
Program Directory SkipSkips Loki's own directory❌ MissingMay scan own directoryP1Detect and skip program directoryTest with Loki-RS in scan path
Mounted DevicesExcludes /media, /volumes✅ ImplementedExcludes /media and /Volumes✅ CompleteTest with mounted drives
Network DrivesExcludes network drives (unless --alldrives)❌ MissingNo network drive detectionP2Detect and exclude network drivesTest with network mounts

Output and Reporting

FeatureLoki v1 BehaviorLoki-RS StatusGap / Bug DescriptionPriorityPlanTest Plan
Console ColorsColorama with specific colors per level⚠️ PartialBasic colors via flexi_loggerP2Enhance colorization to match v1Test color output
Message FormattingKey-value pairs with line breaks⚠️ PartialBasic formattingP2Add key-value formattingTest formatted output
Result SummaryFinal counts and recommendations✅ ImplementedShows files/processes scanned/matched and alert/warning/notice counts at end of scan✅ CompleteTest summary output
Alert/Warning/Notice CountersTracks counts per level✅ ImplementedCounted during scan and displayed in summary✅ CompleteTest counter accuracy
Log File Timestamploki_{hostname}_{timestamp}.log⚠️ PartialNo timestamp in filenameP2Add timestamp to filenameTest log file naming
Log File RemovalRemoves old log at start⚠️ PartialAppends insteadP2Remove old log fileTest log file handling

Error Handling and Robustness

FeatureLoki v1 BehaviorLoki-RS StatusGap / Bug DescriptionPriorityPlanTest Plan
Graceful IOC Load ErrorsLogs error, continues or exits gracefully✅ ImplementedReplaced expect() with Result handling, returns empty vectors on errors✅ CompleteTest with missing IOC files
Graceful YARA ErrorsLogs error, skips file✅ ImplementedReturns Result from compilation, handles scan errors gracefully✅ CompleteTest with invalid YARA rules
File Access Error HandlingLogs and continues✅ ImplementedHandles errors gracefully✅ Complete-
Process Scan Error HandlingLogs and continues✅ ImplementedHandles errors gracefully✅ Complete-
Exit Codes0 for success, 1 for errors✅ ImplementedExit 0 for success (no matches), exit 1 for fatal errors, exit 2 for partial success (matches found)✅ CompleteTest exit code scenarios
Signal Handling (CTRL+C)Catches SIGINT, exits gracefully❌ MissingNo signal handlingP1Add signal handlerTest CTRL+C handling
Argument ValidationValidates conflicting flags⚠️ PartialValidates score thresholds (alert > warning > notice)P1Add more argument validationTest invalid flag combinations

Platform-Specific Features

FeatureLoki v1 BehaviorLoki-RS StatusGap / Bug DescriptionPriorityPlanTest Plan
Windows Process EnumerationWMI for process list⚠️ PartialUses sysinfo (cross-platform)P2Consider WMI for WindowsTest process enumeration
PE-Sieve IntegrationWindows process analysis tool❌ MissingNo PE-Sieve supportSkipWindows-only, complex dependency-
Rootkit CheckRegin filesystem check❌ MissingNo rootkit checkSkipWindows-only, specialized-
Vulnerability ChecksWindows vulnerability scanner❌ MissingNo vuln checksSkipWindows-only, specialized-
Process Anomaly ChecksSystem process validation❌ MissingNo anomaly checksP3Low priority, Windows-focused-
DoublePulsar CheckBackdoor detection❌ MissingNo DoublePulsar checkSkipWindows-only, specialized-
Admin/Root CheckWarns if not admin/root❌ MissingNo privilege checkP2Add privilege detectionTest privilege warnings
Process PrioritySets nice priority❌ MissingNo priority settingP3Low priority-

Advanced Features

FeatureLoki v1 BehaviorLoki-RS StatusGap / Bug DescriptionPriorityPlanTest Plan
Levenshtein DistanceFilename similarity check❌ MissingNo Levenshtein checkP3Low priority, can be added later-
Script AnalysisStatistical obfuscation detection❌ MissingBeta feature in v1SkipBeta feature, can skip-
Progress IndicatorFile count display❌ MissingNo progress displayP3Nice to have-
SWF DecompressionDecompresses SWF files❌ MissingNo archive handlingSkipSpecialized, low usage-
Memory Dump ScanningSpecial handling for MDMP files❌ MissingNo special caseP2Add MDMP special handlingTest with memory dumps

Performance Optimizations

FeatureLoki v1 BehaviorLoki-RS StatusGap / Bug DescriptionPriorityPlanTest Plan
Hash Binary SearchSorted lists + binary search✅ ImplementedHashes are sorted by type and value, using binary_search_by✅ CompleteTest with large hash sets
File Magic CachingCaches max signature length❌ MissingNo magic file supportP2If adding magic file, cache length-
YARA Rule ReuseCompiled once, reused✅ ImplementedWorks correctly--

Release Blockers (P0)

These features must be implemented for v1 parity:

  1. Error Handling - Robust recovery - continue scanning even if individual checks fail (Completed)
  2. Hash Score Parsing - Default score: 75, support 2/3 columns (Completed)
  3. Score Thresholds - Alert/Warning/Notice configuration (Completed)
  4. Score Calculation - Weighted score formula (Completed)
  5. Exit Codes - Follow common standards (Completed)
  6. Linux Path Exclusions - Exclude system directories on Linux (Completed)
  7. YARA Metadata Extraction - Extract info from rules (Completed)

High Priority (P1)

Important for usability but not blockers:

  1. User Excludes Config - Load config/excludes.cfg
  2. Filename IOC Environment Vars - Resolve %SystemRoot% etc.
  3. YARA Memory Rules - Filter process scanning rules
  4. Signal Handling - Handle CTRL+C gracefully
  5. Log File Timestamp - Add timestamp to log filename
  6. Process Working Set Limit - Stability for large processes

Can Be Skipped or Deferred

These features can be skipped or have better alternatives:

  1. PE-Sieve Integration - Windows-only, complex dependency, can skip
  2. Rootkit Check - Windows-only, specialized, can skip
  3. Vulnerability Checks - Windows-only, specialized, can skip
  4. DoublePulsar Check - Windows-only, specialized, can skip
  5. Script Analysis - Beta feature in v1, can skip
  6. SWF Decompression - Specialized, low usage, can skip
  7. Levenshtein Distance - Low priority, can defer
  8. Progress Indicator - Nice to have, can defer
  9. Syslog Support - Low usage, can defer to P3