-
Notifications
You must be signed in to change notification settings - Fork 260
fix: add support for base64 modifier #1679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
base64title: TEST Rule
id: xx8f009-02f9-7db7-6504-25193624ab0a
status: test
author: TEST
date: 2025-08-15
logsource:
category: process_creation
product: windows
detection:
process_creation:
EventID: 1
Channel: Microsoft-Windows-Sysmon/Operational
selection:
CommandLine|base64|contains: '$XX=IEX(('
condition: process_creation and selection
level: high |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds support for the base64 modifier to the rule matching system, providing an alternative to the existing base64offset modifier. The key enhancement allows rules to use simple base64 encoding without the offset variations.
- Adds
base64as a new pipe element modifier alongside the existingbase64offset - Implements UTF-8, UTF-16LE, and UTF-16BE base64 encoding functions
- Updates the matcher logic to handle
base64|containspatterns
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/detections/rule/matchers.rs | Adds Base64 enum variant and implements matching logic for base64 modifier with various encoding types |
| src/detections/rule/base64_match.rs | Implements new base64 encoding functions for UTF-8, UTF-16LE, and UTF-16BE with comprehensive tests |
| src/options/profile.rs | Refactors code to use if-let pattern instead of unwrap chains for better safety |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@fukusuket Sorry, I think I might have caused the same problem with |
|
@fukusuket Sorry! I was trying to see if I could easily fix it on my end.. I will leave it to you! 🙏 |
|
@YamatoSecurity |
|
@fukusuket Thanks! Yea, I wouldn't trust AI blindly to fix things. I trusted |
YamatoSecurity
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks so much!
What Changed
base64modifier is used #1677Evidence
Integration-Test
I’d appreciate it if you could check it when you have time🙏