The detection identifies potential Naikon malware activity by analyzing code features that are indicative of malicious behavior. SOC teams should proactively hunt for this behavior in Azure Sentinel to detect and mitigate early-stage adversarial activity that may evade traditional detection methods.
YARA Rule
rule NaikonCode : Naikon Family
{
meta:
description = "Naikon code features"
author = "Seth Hardy"
last_modified = "2014-06-25"
strings:
// decryption
$ = { 0F AF C1 C1 E0 1F } // imul eax, ecx; shl eah, 1fh
$ = { 35 5A 01 00 00} // xor eax, 15ah
$ = { 81 C2 7F 14 06 00 } // add edx, 6147fh
condition:
all of them
}
This YARA rule can be deployed in the following contexts:
Scenario: A system administrator is using PowerShell to automate the deployment of a legitimate application that includes base64 encoded data for configuration purposes.
Filter/Exclusion: Exclude processes initiated by the Local System account or processes with PowerShell.exe in the command line arguments.
Scenario: A scheduled job runs nightly to update internal tools, and the update package contains base64 encoded payloads as part of the installation process.
Filter/Exclusion: Exclude processes associated with Task Scheduler or jobs with known update-related command lines.
Scenario: A developer is using Python to process logs and encode/decode data using base64 for internal data manipulation.
Filter/Exclusion: Exclude processes running under a developer user account or those with python.exe in the process name.
Scenario: A Windows Update task includes a script that uses base64 encoding to obfuscate configuration settings for compatibility with older systems.
Filter/Exclusion: Exclude processes initiated by Windows Update services or those with wuauclt.exe in the parent process chain.
Scenario: A CI/CD pipeline (e.g., Jenkins or Azure DevOps) runs a script that encodes credentials in base64 for secure storage in environment variables.
Filter/Exclusion: Exclude processes with Jenkins.exe, Azure Pipeline Agent, or GitHub Actions in the process name or command line.