-
Notifications
You must be signed in to change notification settings - Fork 207
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
feat: utf16/utf16be/utf16le/wide
modifiers
#1503
Conversation
UTF-16 LE
author: TEST
date: 2024/11/22
title: "TEST"
id: 9fa273cc-bcb2-4789-85e3-14ca253ac7f4
level: informational
status: test
logsource:
product: windows
service: security
detection:
selection:
Channel: Security
EventID: 4688
CommandLine|utf16le|base64offset|contains: $Wc=New-ObJecT
condition: selection
|
Wide
author: TEST
date: 2024/11/22
title: "TEST"
id: 9fa273cc-bcb2-4789-85e3-14ca253ac7f4
level: informational
status: test
logsource:
product: windows
service: security
detection:
selection:
Channel: Security
EventID: 4688
CommandLine|wide|base64offset|contains: $Wc=New-ObJecT
condition: selection
|
UTF-16
author: TEST
date: 2024/11/22
title: "TEST"
id: 9fa273cc-bcb2-4789-85e3-14ca253ac7f4
level: informational
status: test
logsource:
product: windows
service: security
detection:
selection:
Channel: Security
EventID: 4688
CommandLine|utf16|base64offset|contains: $Wc=New-ObJecT
condition: selection
|
base64offset
author: TEST
date: 2024/11/22
title: "TEST"
id: 9fa273cc-bcb2-4789-85e3-14ca253ac7f4
level: informational
status: test
logsource:
product: windows
service: sysmon
detection:
selection:
Channel: Microsoft-Windows-Sysmon/Operational
EventID: 1
CommandLine|base64offset|contains: $XX=IEX
condition: selection
|
@fukusuket Thanks so much! I tried changing
and it still detected it, which I don't think it should because the bit order is reversed. Can you check this? |
@YamatoSecurity I created simple program and checked the byte sequence and it is a partial match for both
In #1503 (comment) case, the actual is the same logic as the following rule. author: TEST
date: 2024/11/22
title: "TEST"
id: 9fa273cc-bcb2-4789-85e3-14ca253ac7f4
level: informational
status: test
logsource:
product: windows
service: security
detection:
selection:
Channel: Security
EventID: 4688
selection_utf_16_le: # same as utf16le|base64offset|contains: $Wc=New-ObJecT
CommandLine|contains:
- JABXAGMAPQBOAGUAdwAtAE8AYgBKAGUAYwBUA
- QAVwBjAD0ATgBlAHcALQBPAGIASgBlAGMAVA # matched
- kAFcAYwA9AE4AZQB3AC0ATwBiAEoAZQBjAFQA
selection_utf_16_be: # same as utf16be|base64offset|contains: $Wc=New-ObJecT
CommandLine|contains:
- ACQAVwBjAD0ATgBlAHcALQBPAGIASgBlAGMAV # matched
- AkAFcAYwA9AE4AZQB3AC0ATwBiAEoAZQBjAF
- AJABXAGMAPQBOAGUAdwAtAE8AYgBKAGUAYwBU
condition: selection and 1 of selection_* In the above rule, it matches both |
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.
@fukusuket Thanks for double-checking! LGTM! Thanks so much!
What Changed
utf16/utf16be/utf16le/wide
modifiers #1432FastMatch
andbase64offset
processing because there was too much processing inmathers.rs
Evidence
Integration-Test
I would appreciate it if you could check it out when you have time🙏