-
Notifications
You must be signed in to change notification settings - Fork 465
Updates 01 #2624
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
Updates 01 #2624
Conversation
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.
Summary of Changes
Hello @enzok, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request focuses on enhancing our malware detection capabilities by introducing a new YARA rule for 'AdaptixBeacon' and substantially improving the existing rules for 'NitrogenLoader'. The changes aim to increase the accuracy and breadth of detection for these malware families, adapting to new variants and behaviors.
Highlights
- New Malware Detection Rule: I've added a new YARA rule,
AdaptixBeacon.yar
, specifically designed to detect 'AdaptixBeacon' payloads. This rule identifies the malware based on a combination of configuration-related strings and WinInet API usage patterns. - NitrogenLoader Rule Enhancements: I've significantly updated the existing
NitrogenLoader.yar
andNitrogenLoaderConfig.yar
rules. This includes adding a new sample hash, refining existing string patterns, and introducing new patterns to identify additional decryption routines (including RC4), anti-analysis techniques (Task Manager related), and a new key extraction method. The detection conditions have also been made more robust to improve coverage against new variants. - Improved Configuration Extraction: The
NitrogenLoaderConfig.yar
rule'scape_options
have been updated to capture an additional decryption key, providing more comprehensive configuration extraction for NitrogenLoader samples.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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.
Code Review
The pull request updates YARA rules for NitrogenLoader and adds a new rule for AdaptixBeacon. The condition in NitrogenLoaderConfig
might be too broad, and the regex in $decrypt1
could be more specific. Consider renaming $string1
for clarity and adding descriptions to bp actions. The condition in NitrogenLoader
might also be too broad.
condition: | ||
all of them | ||
any of them |
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.
The condition any of them
might be too broad for reliable config extraction given the specificity of the cape_options
. The cape_options
require both $decrypt1
and $key
to be present for the breakpoints and actions to function correctly. Consider changing the condition to ensure $decrypt1
and $key
are matched for reliable config extraction.
$decrypt1 and $key
strings: | ||
$decrypt1 = {48 8B 8C 24 [4] 0F B6 04 01 89 ?? 24 [1-4] 48 63 4C 24 ?? 33 D2 48 8B C1 48 F7 B4 24 [4] 48 8B C2 48 8B 8C} | ||
$decrypt1 = {48 63 4? 24 ?? 33 D2 48 [0-3] F7 B4 24 [4] 48 8B C2 48 8B 8C 24 [4] 0F BE 04 01} |
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.
strings: | ||
$stringaes1 = {63 7c 77 7b f2 6b 6f c5 30 01 67 2b fe d7 ab 76 ca 82 c9 7d fa} | ||
$stringaes2 = {52 09 6a d5 30 36 a5 38 bf 40 a3 9e 81 f3 d7 fb 7c e3 39 82 9b} | ||
$string1 = "BASS_GetEAXParameters" | ||
$string1 = "GetComputerNameExA" |
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.
@@ -45,10 +45,12 @@ rule NitrogenLoaderConfig | |||
meta: | |||
author = "enzok" | |||
description = "NitrogenLoader Config Extraction" | |||
cape_options = "bp0=$decrypt1*+6,hc0=1,count=0,action0=string:rcx,typestring=NitrogenLoader Config" | |||
cape_options = "bp0=$decrypt1*+1,bp1=$key*-4,hc=1,count=0,action0=string:rcx,action1=string:rdx,typestring=NitrogenLoader Config" |
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.
condition: | ||
(2 of ($string*) and any of ($syscall*)) or 4 of ($decrypt*) or (3 of ($taskman_*) and all of ($rc4decrypt_*)) |
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.
The condition (2 of ($string*) and any of ($syscall*)) or 4 of ($decrypt*) or (3 of ($taskman_*) and all of ($rc4decrypt_*))
might be too broad. Consider narrowing the conditions for better accuracy.
(2 of ($string*) and any of ($syscall*)) or (4 of ($decrypt*) and any of ($syscall*)) or (3 of ($taskman_*) and all of ($rc4decrypt_*))
🙏 |
No description provided.